A packet that holds encoded data frame data. More...
#include <cvb/codec_bridge/packet.hpp>
Public Member Functions | |
size_t | Size () const |
Get the size of the packet. More... | |
void * | BasePtr () const |
Get the pointer to the packet content. More... | |
Cvb::optional< int > | StreamIndex () const |
Get the stream index this packet belongs to, if any. More... | |
int64_t | PresentationTimeStamp () const |
Get the presentation time stamp for this packet. More... | |
Rational | TimeBase () const |
Get time base that was used for encoding this packet. More... | |
A packet that holds encoded data frame data.
|
inline |
Get the pointer to the packet content.
Any | exception derived from std::exception including CvbException. |
The memory of a packet is always contiguous.
|
inline |
Get the presentation time stamp for this packet.
Any | exception derived from std::exception including CvbException. |
The presentation time stamp can be used to for streaming encoded data, to ensure proper timing on the receiver side.
|
inline |
Get the size of the packet.
Any | exception derived from std::exception including CvbException. |
|
inline |
Get the stream index this packet belongs to, if any.
Any | exception derived from std::exception including CvbException. |
Packets that are read from container files have a stream index. The index can be used to sort out packets that contain audio or subtitle data as such packets have a different index that the video stream.
|
inline |
Get time base that was used for encoding this packet.
Any | exception derived from std::exception including CvbException. |