Native Player  1.0
ElementaryStreamPacket Class Reference

This class is a wrapper for both Samsung::NaClPlayer::ESPacket and encryption information. More...

#include <elementary_stream_packet.h>

Public Member Functions

 ElementaryStreamPacket (uint8_t *data, uint32_t size)
 
 ElementaryStreamPacket (const ElementaryStreamPacket &)=delete
 
 ElementaryStreamPacket (ElementaryStreamPacket &&other)=default
 
 ~ElementaryStreamPacket ()=default
 Destroys ElementaryStreamPacket object. More...
 
ElementaryStreamPacketoperator= (const ElementaryStreamPacket &)=delete
 
ElementaryStreamPacketoperator= (ElementaryStreamPacket &&other)=default
 
const Samsung::NaClPlayer::ESPacket & GetESPacket () const
 Returns Elementary Stream Packet. More...
 
const Samsung::NaClPlayer::ESPacketEncryptionInfo & GetEncryptionInfo () const
 Returns Encryption information. More...
 
bool IsEncrypted () const
 Returns true if packet is encrypted, otherwise false. More...
 
bool IsKeyFrame () const
 
uint32_t GetDataSize () const
 Returns size of packet's data. More...
 
Samsung::NaClPlayer::TimeTicks GetPts () const
 
Samsung::NaClPlayer::TimeTicks GetDts () const
 
Samsung::NaClPlayer::TimeTicks GetDuration () const
 
void SetKeyFrame (bool key_frame)
 
void SetPts (Samsung::NaClPlayer::TimeTicks pts)
 
void SetDts (Samsung::NaClPlayer::TimeTicks dts)
 
void SetDuration (Samsung::NaClPlayer::TimeTicks duration)
 
void SetKeyId (uint8_t *key_id, uint32_t key_id_size)
 
void SetIv (uint8_t *iv, uint32_t iv_size)
 
void ClearSubsamples ()
 Clears the subsample information about encrypted bytes in packet. More...
 
void AddSubsample (uint32_t clear_bytes, uint32_t cipher_bytes)
 

Detailed Description

This class is a wrapper for both Samsung::NaClPlayer::ESPacket and encryption information.

ElementaryStreamPacket is used to extract data from StreamDemuxer and can be used to pass it further.

See also
Samsung::NaClPlayer::ESPacket
Samsung::NaClPlayer::EncryptedSubsampleDescription
Samsung::NaClPlayer::ESPacketEncryptionInfo

Definition at line 46 of file elementary_stream_packet.h.

Constructor & Destructor Documentation

ElementaryStreamPacket::ElementaryStreamPacket ( uint8_t *  data,
uint32_t  size 
)

Constructs ElementaryStreamPacket and initialize Samsung::NaClPlayer::ESPacket with given data.

Parameters
[in]dataA byte array which helds data of elementary stream packet. It is copied to the internal byte array.
[in]sizeA size of data array in bytes.
See also
Samsung::NaClPlayer::ESPacket
ElementaryStreamPacket::ElementaryStreamPacket ( const ElementaryStreamPacket )
delete
ElementaryStreamPacket::ElementaryStreamPacket ( ElementaryStreamPacket &&  other)
default

Move-constructs a ElementaryStreamPacket object, making it point at the same object that other was pointing to.

ElementaryStreamPacket::~ElementaryStreamPacket ( )
default

Destroys ElementaryStreamPacket object.

Member Function Documentation

void ElementaryStreamPacket::AddSubsample ( uint32_t  clear_bytes,
uint32_t  cipher_bytes 
)

Adds a subsample information about encrypted bytes in packet.

Parameters
[in]clear_bytesA count of unencrypted bytes in elementary stream packet.
[in]cipher_bytesA count of encrypted bytes in elementary stream packet.
void ElementaryStreamPacket::ClearSubsamples ( )

Clears the subsample information about encrypted bytes in packet.

uint32_t ElementaryStreamPacket::GetDataSize ( ) const
inline

Returns size of packet's data.

Definition at line 87 of file elementary_stream_packet.h.

Samsung::NaClPlayer::TimeTicks ElementaryStreamPacket::GetDts ( ) const
inline

Returns the decode timestamp.

See also
Samsung::NaClPlayer::ESPacket::dts

Definition at line 95 of file elementary_stream_packet.h.

Samsung::NaClPlayer::TimeTicks ElementaryStreamPacket::GetDuration ( ) const
inline

Returns the packet's duration.

See also
Samsung::NaClPlayer::ESPacket::duration

Definition at line 99 of file elementary_stream_packet.h.

const Samsung::NaClPlayer::ESPacketEncryptionInfo& ElementaryStreamPacket::GetEncryptionInfo ( ) const

Returns Encryption information.

const Samsung::NaClPlayer::ESPacket& ElementaryStreamPacket::GetESPacket ( ) const

Returns Elementary Stream Packet.

Samsung::NaClPlayer::TimeTicks ElementaryStreamPacket::GetPts ( ) const
inline

Returns the presentation timestamp.

See also
Samsung::NaClPlayer::ESPacket::pts

Definition at line 91 of file elementary_stream_packet.h.

bool ElementaryStreamPacket::IsEncrypted ( ) const

Returns true if packet is encrypted, otherwise false.

bool ElementaryStreamPacket::IsKeyFrame ( ) const
inline

Returns true if packet is a key frame, otherwise false.

See also
Samsung::NaClPlayer::ESPacket::is_key_frame

Definition at line 84 of file elementary_stream_packet.h.

ElementaryStreamPacket& ElementaryStreamPacket::operator= ( const ElementaryStreamPacket )
delete
ElementaryStreamPacket& ElementaryStreamPacket::operator= ( ElementaryStreamPacket &&  other)
default

Move-assigns other to this ElementaryStreamPacket object.

void ElementaryStreamPacket::SetDts ( Samsung::NaClPlayer::TimeTicks  dts)
inline

Allows to set a decode timestamp.

See also
Samsung::NaClPlayer::ESPacket::dts

Definition at line 113 of file elementary_stream_packet.h.

void ElementaryStreamPacket::SetDuration ( Samsung::NaClPlayer::TimeTicks  duration)
inline

Allows to set a packet's duration.

See also
Samsung::NaClPlayer::ESPacket::duration

Definition at line 117 of file elementary_stream_packet.h.

void ElementaryStreamPacket::SetIv ( uint8_t *  iv,
uint32_t  iv_size 
)

Sets an initialization vector for encrypted data needed to decrypt it.

Parameters
[in]ivAn byte array which helds data of initialization vector. It is copied to the internal byte array.
[in]iv_sizeA size of iv array in bytes.
void ElementaryStreamPacket::SetKeyFrame ( bool  key_frame)
inline

Allows to set if packet is a key frame or not.

See also
Samsung::NaClPlayer::ESPacket::is_key_frame

Definition at line 105 of file elementary_stream_packet.h.

void ElementaryStreamPacket::SetKeyId ( uint8_t *  key_id,
uint32_t  key_id_size 
)

Sets a key id for encrypted data needed to decrypt it.

Parameters
[in]key_idAn byte array which helds data of key id. It is copied to the internal byte array.
[in]key_id_sizeA size of key_id array in bytes.
void ElementaryStreamPacket::SetPts ( Samsung::NaClPlayer::TimeTicks  pts)
inline

Allows to set a presentation timestamp.

See also
Samsung::NaClPlayer::ESPacket::pts

Definition at line 109 of file elementary_stream_packet.h.


The documentation for this class was generated from the following file: