|
vdr-plugin-softhddevice-drm-gles 1.6.4-d0291bb
|
PTS Tracking Buffer. More...
#include <pes.h>
Public Member Functions | |
| cPtsTrackingBuffer (const char *identifier) | |
| void | Push (const uint8_t *, int, int64_t) |
| Push data into the PTS tracking buffer. | |
| void | Erase (size_t) |
| Erase data from the beginning of the buffer. | |
| int64_t | GetPts (void) |
| Get the PTS value for the current buffer position. | |
| const uint8_t * | Peek (void) |
| void | Reset (void) |
| int | GetSize (void) |
| const char * | GetIdentifier (void) |
Private Attributes | |
| const char * | m_identifier |
| std::map< size_t, int64_t > | m_pts |
| Map of buffer positions to PTS values. | |
| std::vector< uint8_t > | m_data |
| Byte buffer. | |
PTS Tracking Buffer.
Manages a byte buffer along with a map of PTS (Presentation Time Stamp) values associated with specific positions in the buffer. This is used for maintaining temporal information when reassembling fragmented streams.
Erase data from the beginning of the buffer.
Removes the specified number of bytes from the front of the buffer and adjusts all PTS positions accordingly. The PTS value for the new position 0 is preserved by finding the last PTS value before the erase point.
This ensures that when frames are popped from the buffer, they retain the PTS of the PES packet where the frame started, even if that PES packet has been partially consumed.
| amount | Number of bytes to erase from the beginning |
Definition at line 669 of file pes.cpp.
References AV_NOPTS_VALUE, LOGFATAL, m_data, m_identifier, and m_pts.
Referenced by cReassemblyBufferAudio::FindTwoConsecutiveFramesWithSameSyncWord(), cReassemblyBuffer::PopAvPacket(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and cReassemblyBufferAudio::TruncateBufferUntilFirstValidData().
Definition at line 105 of file pes.h.
References m_identifier.
Get the PTS value for the current buffer position.
Returns the PTS associated with position 0 in the buffer, which represents the presentation timestamp for the data at the front of the buffer.
Definition at line 707 of file pes.cpp.
References AV_NOPTS_VALUE, and m_pts.
Referenced by cReassemblyBuffer::PopAvPacket(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().
Definition at line 104 of file pes.h.
References m_data.
Referenced by cReassemblyBufferAudio::FindTwoConsecutiveFramesWithSameSyncWord(), cReassemblyBuffer::GetSize(), cReassemblyBuffer::IsEmpty(), cReassemblyBufferVideo::PopAvPacket(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and cReassemblyBufferAudio::TruncateBufferUntilFirstValidData().
Definition at line 102 of file pes.h.
References m_data.
Referenced by cReassemblyBufferAudio::FindTwoConsecutiveFramesWithSameSyncWord(), cReassemblyBuffer::PopAvPacket(), and cReassemblyBufferAudio::PopAvPacket().
Push data into the PTS tracking buffer.
Appends data to the buffer and associates the PTS with the current buffer position if a valid PTS is provided.
| data | Pointer to data to append |
| size | Size of data in bytes |
| pts | Presentation timestamp, or AV_NOPTS_VALUE if not available |
Definition at line 648 of file pes.cpp.
References AV_NOPTS_VALUE, m_data, and m_pts.
Referenced by cReassemblyBuffer::Push(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().
Definition at line 103 of file pes.h.
Referenced by cReassemblyBuffer::Reset(), and TEST_CASE().
|
private |
Definition at line 107 of file pes.h.
Referenced by Erase(), and GetIdentifier().