AP4_Sample Class Reference
#include <Ap4Sample.h>
Public Member Functions | |
AP4_Sample () | |
Default constructor. | |
AP4_Sample (const AP4_Sample &other) | |
Copy constructor. | |
AP4_Sample (AP4_ByteStream &data_stream, AP4_Position offset, AP4_Size size, AP4_UI32 duration, AP4_Ordinal description_index, AP4_UI64 dts, AP4_UI32 cts_delta, bool sync_flag) | |
Construct an AP4_Sample referencing a data stream. | |
~AP4_Sample () | |
AP4_Sample & | operator= (const AP4_Sample &other) |
AP4_Result | ReadData (AP4_DataBuffer &data) |
AP4_Result | ReadData (AP4_DataBuffer &data, AP4_Size size, AP4_Size offset=0) |
AP4_ByteStream * | GetDataStream () |
void | SetDataStream (AP4_ByteStream &stream) |
AP4_Position | GetOffset () const |
void | SetOffset (AP4_Position offset) |
AP4_Size | GetSize () |
void | SetSize (AP4_Size size) |
AP4_Ordinal | GetDescriptionIndex () const |
void | SetDescriptionIndex (AP4_Ordinal index) |
AP4_UI64 | GetDts () const |
Get the DTS (Decoding Time Stamp) of the sample in the timescale of the media. | |
void | SetDts (AP4_UI64 dts) |
Set the DTS (Decoding Time Stamp) of the sample in the timescale of the media. | |
AP4_UI64 | GetCts () const |
Get the CTS (Composition Time Stamp) of the sample in the timescale of the media. | |
void | SetCts (AP4_UI64 cts) |
Set the CTS (Composition Time Stamp) of the sample in the timescale of the media. | |
AP4_UI32 | GetCtsDelta () const |
Get the CTS Delta (difference between the CTS (Composition Time Stamp) and DTS (Decoding Time Stamp) of the sample in the timescale of the media. | |
void | SetCtsDelta (AP4_UI32 delta) |
Set the CTS Delta (difference between the CTS (Composition Time Stamp) and DTS (Decoding Time Stamp) of the sample in the timescale of the media. | |
AP4_UI32 | GetDuration () const |
Get the duration of the sample in the timescale of the media. | |
void | SetDuration (AP4_UI32 duration) |
Set the duration of the sample in the timescale of the media. | |
bool | IsSync () const |
Return whether the sample is a sync (random-access point) sample or not. | |
void | SetSync (bool is_sync) |
Set whether the sample is a sync (random-access point) sample or not. | |
void | Reset () |
Resets the sample: will also release any data stream reference. | |
Protected Attributes | |
AP4_ByteStream * | m_DataStream |
AP4_Position | m_Offset |
AP4_Size | m_Size |
AP4_UI32 | m_Duration |
AP4_Ordinal | m_DescriptionIndex |
AP4_UI64 | m_Dts |
AP4_SI32 | m_CtsDelta |
bool | m_IsSync |
Detailed Description
Definition at line 46 of file Ap4Sample.h.
Constructor & Destructor Documentation
AP4_Sample::AP4_Sample | ( | ) |
Default constructor.
AP4_Sample::AP4_Sample | ( | const AP4_Sample & | other | ) |
Copy constructor.
AP4_Sample::AP4_Sample | ( | AP4_ByteStream & | data_stream, | |
AP4_Position | offset, | |||
AP4_Size | size, | |||
AP4_UI32 | duration, | |||
AP4_Ordinal | description_index, | |||
AP4_UI64 | dts, | |||
AP4_UI32 | cts_delta, | |||
bool | sync_flag | |||
) |
Construct an AP4_Sample referencing a data stream.
- Parameters:
-
data_stream The byte stream that contains the sample data. The sample object added to the track will keep a reference to that byte stream offset Position of the first byte of sample data within the stream size Size in bytes of the sample data description_index Index of the sample description that applies to this sample dts Decoding timestamp of the sample cts_delta Difference between the CTS (composition/display timestamp) and the DTS (decoding timestamp), in the timescale of the media. sync_flag Boolean flag indicating whether this is a sync sample or not
AP4_Sample::~AP4_Sample | ( | ) |
Member Function Documentation
AP4_UI64 AP4_Sample::GetCts | ( | ) | const [inline] |
Get the CTS (Composition Time Stamp) of the sample in the timescale of the media.
Definition at line 118 of file Ap4Sample.h.
References m_CtsDelta, and m_Dts.
AP4_UI32 AP4_Sample::GetCtsDelta | ( | ) | const [inline] |
Get the CTS Delta (difference between the CTS (Composition Time Stamp) and DTS (Decoding Time Stamp) of the sample in the timescale of the media.
Definition at line 129 of file Ap4Sample.h.
References m_CtsDelta.
AP4_ByteStream* AP4_Sample::GetDataStream | ( | ) |
AP4_Ordinal AP4_Sample::GetDescriptionIndex | ( | ) | const [inline] |
Definition at line 102 of file Ap4Sample.h.
References m_DescriptionIndex.
AP4_UI64 AP4_Sample::GetDts | ( | ) | const [inline] |
Get the DTS (Decoding Time Stamp) of the sample in the timescale of the media.
Definition at line 108 of file Ap4Sample.h.
References m_Dts.
AP4_UI32 AP4_Sample::GetDuration | ( | ) | const [inline] |
Get the duration of the sample in the timescale of the media.
Definition at line 140 of file Ap4Sample.h.
References m_Duration.
AP4_Position AP4_Sample::GetOffset | ( | ) | const [inline] |
Definition at line 98 of file Ap4Sample.h.
References m_Offset.
AP4_Size AP4_Sample::GetSize | ( | ) | [inline] |
Definition at line 100 of file Ap4Sample.h.
References m_Size.
Referenced by AP4_SampleDecrypter::GetDecryptedSampleSize(), AP4_Processor::FragmentHandler::GetProcessedSampleSize(), and AP4_Processor::TrackHandler::GetProcessedSampleSize().
bool AP4_Sample::IsSync | ( | ) | const [inline] |
Return whether the sample is a sync (random-access point) sample or not.
Definition at line 150 of file Ap4Sample.h.
References m_IsSync.
AP4_Sample& AP4_Sample::operator= | ( | const AP4_Sample & | other | ) |
AP4_Result AP4_Sample::ReadData | ( | AP4_DataBuffer & | data, | |
AP4_Size | size, | |||
AP4_Size | offset = 0 | |||
) |
AP4_Result AP4_Sample::ReadData | ( | AP4_DataBuffer & | data | ) |
void AP4_Sample::Reset | ( | ) |
Resets the sample: will also release any data stream reference.
void AP4_Sample::SetCts | ( | AP4_UI64 | cts | ) | [inline] |
Set the CTS (Composition Time Stamp) of the sample in the timescale of the media.
Definition at line 123 of file Ap4Sample.h.
References m_CtsDelta, and m_Dts.
void AP4_Sample::SetCtsDelta | ( | AP4_UI32 | delta | ) | [inline] |
Set the CTS Delta (difference between the CTS (Composition Time Stamp) and DTS (Decoding Time Stamp) of the sample in the timescale of the media.
Definition at line 135 of file Ap4Sample.h.
References m_CtsDelta.
void AP4_Sample::SetDataStream | ( | AP4_ByteStream & | stream | ) |
void AP4_Sample::SetDescriptionIndex | ( | AP4_Ordinal | index | ) | [inline] |
Definition at line 103 of file Ap4Sample.h.
References m_DescriptionIndex.
void AP4_Sample::SetDts | ( | AP4_UI64 | dts | ) | [inline] |
Set the DTS (Decoding Time Stamp) of the sample in the timescale of the media.
Definition at line 113 of file Ap4Sample.h.
References m_Dts.
void AP4_Sample::SetDuration | ( | AP4_UI32 | duration | ) | [inline] |
Set the duration of the sample in the timescale of the media.
Definition at line 145 of file Ap4Sample.h.
References m_Duration.
void AP4_Sample::SetOffset | ( | AP4_Position | offset | ) | [inline] |
Definition at line 99 of file Ap4Sample.h.
References m_Offset.
void AP4_Sample::SetSize | ( | AP4_Size | size | ) | [inline] |
Definition at line 101 of file Ap4Sample.h.
References m_Size.
void AP4_Sample::SetSync | ( | bool | is_sync | ) | [inline] |
Set whether the sample is a sync (random-access point) sample or not.
Definition at line 155 of file Ap4Sample.h.
References m_IsSync.
Member Data Documentation
AP4_SI32 AP4_Sample::m_CtsDelta [protected] |
Definition at line 169 of file Ap4Sample.h.
Referenced by GetCts(), GetCtsDelta(), SetCts(), and SetCtsDelta().
AP4_ByteStream* AP4_Sample::m_DataStream [protected] |
Definition at line 163 of file Ap4Sample.h.
AP4_Ordinal AP4_Sample::m_DescriptionIndex [protected] |
Definition at line 167 of file Ap4Sample.h.
Referenced by GetDescriptionIndex(), and SetDescriptionIndex().
AP4_UI64 AP4_Sample::m_Dts [protected] |
AP4_UI32 AP4_Sample::m_Duration [protected] |
Definition at line 166 of file Ap4Sample.h.
Referenced by GetDuration(), and SetDuration().
bool AP4_Sample::m_IsSync [protected] |
Definition at line 170 of file Ap4Sample.h.
AP4_Position AP4_Sample::m_Offset [protected] |
Definition at line 164 of file Ap4Sample.h.
Referenced by GetOffset(), and SetOffset().
AP4_Size AP4_Sample::m_Size [protected] |
Definition at line 165 of file Ap4Sample.h.
The documentation for this class was generated from the following file:
Generated on Thu May 13 16:37:46 2010 for Bento4 MP4 SDK by
