class CodecPacket
Defined at line 21 of file ../../src/media/lib/codec_impl/include/lib/media/codec_impl/codec_packet.h
Instances of this class are 1:1 with fuchsia::media::Packet.
Protected Members
const CodecImpl * parent_
const uint64_t buffer_lifetime_ordinal_
const uint32_t allocated_packet_index_
optional protocol_packet_index_
const CodecBuffer * buffer_
optional buffer_keep_alive_
uint32_t start_offset_
uint32_t valid_length_bytes_
bool has_timestamp_ish_
uint64_t timestamp_ish_
bool is_free_
bool is_new_
bool key_frame_
bool key_frame_is_set_
Public Methods
void ~CodecPacket ()
Defined at line 17 of file ../../src/media/lib/codec_impl/codec_packet.cc
uint64_t buffer_lifetime_ordinal ()
Defined at line 23 of file ../../src/media/lib/codec_impl/codec_packet.cc
uint32_t packet_index ()
This will assert in debug if is_supports_dynamic_buffers_ true.
This is deprecated. CodecAdapter(s) should not call this, and should also
not need to call protocol_packet_index or allocated_packet_index (both are
private). The CodecPacket* itself is how CodecImpl and CodecAdapter
communicate regarding a CodecPacket.
Defined at line 25 of file ../../src/media/lib/codec_impl/codec_packet.cc
void SetBuffer (const CodecBuffer * buffer)
Defined at line 32 of file ../../src/media/lib/codec_impl/codec_packet.cc
const CodecBuffer * buffer ()
Defined at line 42 of file ../../src/media/lib/codec_impl/codec_packet.cc
void SetStartOffset (uint32_t start_offset)
Defined at line 44 of file ../../src/media/lib/codec_impl/codec_packet.cc
bool has_start_offset ()
Defined at line 46 of file ../../src/media/lib/codec_impl/codec_packet.cc
uint32_t start_offset ()
Defined at line 48 of file ../../src/media/lib/codec_impl/codec_packet.cc
void SetValidLengthBytes (uint32_t valid_length_bytes)
Defined at line 50 of file ../../src/media/lib/codec_impl/codec_packet.cc
bool has_valid_length_bytes ()
Defined at line 54 of file ../../src/media/lib/codec_impl/codec_packet.cc
uint32_t valid_length_bytes ()
Defined at line 58 of file ../../src/media/lib/codec_impl/codec_packet.cc
void SetTimstampIsh (uint64_t timestamp_ish)
Defined at line 60 of file ../../src/media/lib/codec_impl/codec_packet.cc
void ClearTimestampIsh ()
Sets timestamp_ish() to kTimestampIshNotSet, which also causes
has_timestamp_ish() to return false.
Defined at line 68 of file ../../src/media/lib/codec_impl/codec_packet.cc
bool has_timestamp_ish ()
Defined at line 73 of file ../../src/media/lib/codec_impl/codec_packet.cc
uint64_t timestamp_ish ()
Defined at line 75 of file ../../src/media/lib/codec_impl/codec_packet.cc
void SetFree (bool is_free)
from CodecImpl / protocol point of view; CodecAdapter's point of view can be different for
short time intervals
Defined at line 80 of file ../../src/media/lib/codec_impl/codec_packet.cc
bool is_free ()
Defined at line 87 of file ../../src/media/lib/codec_impl/codec_packet.cc
void SetIsNew (bool is_new)
Defined at line 89 of file ../../src/media/lib/codec_impl/codec_packet.cc
bool is_new ()
Defined at line 91 of file ../../src/media/lib/codec_impl/codec_packet.cc
void SetKeyFrame (bool key_frame)
Defined at line 93 of file ../../src/media/lib/codec_impl/codec_packet.cc
void ClearKeyFrame ()
Defined at line 97 of file ../../src/media/lib/codec_impl/codec_packet.cc
bool has_key_frame ()
Defined at line 98 of file ../../src/media/lib/codec_impl/codec_packet.cc
bool key_frame ()
Defined at line 99 of file ../../src/media/lib/codec_impl/codec_packet.cc
void CacheFlush ()
Defined at line 101 of file ../../src/media/lib/codec_impl/codec_packet.cc
void CacheFlushAndInvalidate ()
Defined at line 103 of file ../../src/media/lib/codec_impl/codec_packet.cc
Protected Methods
void CodecPacket (uint64_t buffer_lifetime_ordinal, uint32_t packet_index)
The buffer ptr is not owned. The buffer lifetime is slightly longer than
the Packet lifetime.
Defined at line 10 of file ../../src/media/lib/codec_impl/codec_packet.cc
void SetParent (const CodecImpl * parent)
This is separate from the constructor because some core codec tests use
CodecPacket but don't have a CodecImpl, and there's no compelling reason to
create a CodecPacketOwner interface.
Defined at line 21 of file ../../src/media/lib/codec_impl/codec_packet.cc
void ClearStartOffset ()
Defined at line 107 of file ../../src/media/lib/codec_impl/codec_packet.cc
void ClearValidLengthBytes ()
Defined at line 109 of file ../../src/media/lib/codec_impl/codec_packet.cc
void SetProtocolPacketIndex (uint32_t protocol_packet_index)
This is intentionally private so that the CodecAdapter can't call this.
CodecImpl handles the protocol packet_index and ensures that the
CodecAdapter can track packets by CodecPacket*, without worrying about the
protocol packet_index.
This is only valid to call when is_free() true, and this will assert in
debug if is_free() false.
In general this value can change as a CodecPacket is associated with
different protocol packet_index values over time.
Defined at line 111 of file ../../src/media/lib/codec_impl/codec_packet.cc
void ClearProtocolPacketIndex ()
Defined at line 116 of file ../../src/media/lib/codec_impl/codec_packet.cc
uint32_t protocol_packet_index ()
Until SetProtocolPacketIndex() is called the first time, this will be the
same value as allocated_packet_index().
Defined at line 121 of file ../../src/media/lib/codec_impl/codec_packet.cc
uint32_t allocated_packet_index ()
This is intentionally private so that the CodecAdapter can't call this.
This is the index within the vector in CodecImpl.active_packets_ of this
CodecPacket. In general this is not the same as protocol_packet_index().
This value doesn't change for a given constructed CodecPacket.
Defined at line 126 of file ../../src/media/lib/codec_impl/codec_packet.cc
void CodecPacket ()
Defined at line 173 of file ../../src/media/lib/codec_impl/include/lib/media/codec_impl/codec_packet.h
void CodecPacket (const CodecPacket & )
Defined at line 174 of file ../../src/media/lib/codec_impl/include/lib/media/codec_impl/codec_packet.h
void CodecPacket (CodecPacket && )
Defined at line 174 of file ../../src/media/lib/codec_impl/include/lib/media/codec_impl/codec_packet.h
CodecPacket & operator= (const CodecPacket & )
Defined at line 174 of file ../../src/media/lib/codec_impl/include/lib/media/codec_impl/codec_packet.h
CodecPacket & operator= (CodecPacket && )
Defined at line 174 of file ../../src/media/lib/codec_impl/include/lib/media/codec_impl/codec_packet.h
Friends
class CodecPacketForTest
class CodecImpl