diff options
author | Reynaldo H. Verdejo Pinochet <r.verdejo@partner.samsung.com> | 2013-10-14 17:44:27 -0700 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <r.verdejo@partner.samsung.com> | 2013-10-24 12:06:01 -0700 |
commit | 72edc18465ff9f746fbf026cf08cd36cf7529d4c (patch) | |
tree | 94824a4a3ad740647b9d378246cd67bcc0724a97 | |
parent | 20c32ffbdfda39ea9a83512e08b66ab3ca610e8c (diff) |
docs: Gram and nit fixes for part-buffer.txt
-rw-r--r-- | docs/design/part-buffer.txt | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/docs/design/part-buffer.txt b/docs/design/part-buffer.txt index 6df980dec..044d88da5 100644 --- a/docs/design/part-buffer.txt +++ b/docs/design/part-buffer.txt @@ -12,7 +12,7 @@ Requirements - It must be fast * allocation, free, low fragmentation - Must be able to attach multiple memory blocks to the buffer - - Must be able to attach artibtrary metadata to buffers + - Must be able to attach artbitrary metadata to buffers - efficient handling of subbuffer, copy, span, trim Lifecycle @@ -75,13 +75,13 @@ Data access ----------- Accessing the data of the buffer can happen by retrieving the individual - GstMemory objects in the GstBuffer or my using the gst_buffer_map() and - gst_buffer_unmap() function. + GstMemory objects in the GstBuffer or by using the gst_buffer_map() and + gst_buffer_unmap() functions. - The _map and _unmap function will always return the memory of all blocks as one - large contiguous region of memory. Using the _map and _unmap function might be - more convenient than accessing the individual memory blocks at the expense of - being more expensive because it might perform memcpy operations. + The _map and _unmap functions will always return the memory of all blocks as + one large contiguous region of memory. Using the _map and _unmap functions + might be more convenient than accessing the individual memory blocks at the + expense of being more expensive because it might perform memcpy operations. For buffers with only one GstMemory object (the most common case), _map and _unmap have no performance penalty at all. @@ -94,18 +94,17 @@ Data access * write access with 1 memory block - The buffer should be writable or this operation will fail.. + The buffer should be writable or this operation will fail. The memory block is accessed. If the memory block is readonly, a copy is made - and the original memory block is replaced with this copy. then the memory - block is mapped in write mode. - The memory block is unmapped after usage. + and the original memory block is replaced with this copy. Then the memory + block is mapped in write mode and unmapped after usage. * Read access with multiple memory blocks The memory blocks are combined into one large memory block. If the buffer is - writable, The memory blocks are replace with this new memory block. If the - buffer is not writable, the memory is returned as is. - The memory block is then mapped in read mode. + writable, the memory blocks are replaced with this new combined block. If the + buffer is not writable, the memory is returned as is. The memory block is + then mapped in read mode. When the memory is unmapped after usage and the buffer has multiple memory blocks, this means that the map operation was not able to store the combined @@ -116,8 +115,8 @@ Data access The buffer should be writable or the operation fails. The memory blocks are combined into one large memory block and the existing blocks are replaced with - this new block. The memory is then mapped in write mode. - The memory is unmapped after usage. + this new block. The memory is then mapped in write mode and unmapped after + usage. Use cases @@ -126,7 +125,7 @@ Use cases Generating RTP packets from h264 video ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -We receive as input a GstBuffer with an encoded h264 image and we need to +We receive a GstBuffer as input with an encoded h264 image and we need to create RTP packets containing this h264 data as the payload. We typically need to fragment the h264 data into multiple packets, each with their own RTP and payload specific header. |