Pepper_31_C++_interfaces
|
Interface allowing NaCl applicaton to implement its own stream demuxer. More...
#include <stream_parser_samsung.h>
Public Member Functions | |
StreamParser_Samsung (Instance *instance) | |
Creates StreamParser_Samsung associated with given |instance|. More... | |
virtual | ~StreamParser_Samsung () |
Destructor. More... | |
bool | RegisterParser (const char *type) |
bool | Init (int32_t stream_id, bool result, PP_MicrosecondsDelta duration) |
bool | NewAudioConfig (int32_t stream_id, const PP_SP_AudioDecoderConfig &) |
bool | NewVideoConfig (int32_t stream_id, const PP_SP_VideoDecoderConfig &) |
bool | NewBuffers (int32_t stream_id, PP_StreamType type, int32_t track_id, PP_Resource buffer, uint32_t frames_count, const struct PP_Frames frames[]) |
void | NewMediaSegment (int32_t stream_id, PP_MicrosecondsDelta timestamp) |
void | EndOfSegment (int32_t stream_id) |
Signals end of segment for given |stream_id|. More... | |
bool | NeedKey (int32_t stream_id, const Var &type, uint32_t init_data_size, uint8_t *init_data) |
virtual bool | Init (int32_t stream_id)=0 |
virtual void | Flush (int32_t stream_id)=0 |
virtual bool | Parse (int32_t stream_id, Buffer_Dev data)=0 |
virtual void | Close (int32_t stream_id)=0 |
Called when a parser must be "closed". Used for flushes the current parser. More... | |
Interface allowing NaCl applicaton to implement its own stream demuxer.
Definition at line 19 of file stream_parser_samsung.h.
|
explicit |
Creates StreamParser_Samsung associated with given |instance|.
|
inlinevirtual |
Destructor.
Definition at line 26 of file stream_parser_samsung.h.
|
pure virtual |
Called when a parser must be "closed". Used for flushes the current parser.
void pp::StreamParser_Samsung::EndOfSegment | ( | int32_t | stream_id | ) |
Signals end of segment for given |stream_id|.
|
pure virtual |
Called when a seek occurs. This flushes the current parser state and puts the parser in a state where it can receive data for the new seek point.
bool pp::StreamParser_Samsung::Init | ( | int32_t | stream_id, |
bool | result, | ||
PP_MicrosecondsDelta | duration | ||
) |
Indicates completion of parser initialization. |stream_id| it's a id of stream, that Browser request to parse, if Borwser request parsing more that one stream of that type, it's allows to recognize that stream. On success, |result| is set to PP_OK, or PP_FALSE if an error occurred. If initialization is success, the |duration| contains stream duration (in microseconds).
Initialize the parser. Must be called before any data is passed to Parse(). |stream_type| describe type of stream to parse (should be one of type, passed in PPB RegisterParser). |stream_id| it's a id of stream to parse.
bool pp::StreamParser_Samsung::NeedKey | ( | int32_t | stream_id, |
const Var & | type, | ||
uint32_t | init_data_size, | ||
uint8_t * | init_data | ||
) |
A new potentialy encrypted stream has been parsed. |type| describes type of the initialization data |init_data| associated with the stream.
bool pp::StreamParser_Samsung::NewAudioConfig | ( | int32_t | stream_id, |
const PP_SP_AudioDecoderConfig & | |||
) |
Indicates when new audio configuration have been parsed, |config| it's a configuration struct
bool pp::StreamParser_Samsung::NewBuffers | ( | int32_t | stream_id, |
PP_StreamType | type, | ||
int32_t | track_id, | ||
PP_Resource | buffer, | ||
uint32_t | frames_count, | ||
const struct PP_Frames | frames[] | ||
) |
New stream buffers have been parsed, |type| indicates type of track it's enum defined in pp_stream_parser_samsung.h, |track_id| it's id of track, useful if is more that one track of that type
void pp::StreamParser_Samsung::NewMediaSegment | ( | int32_t | stream_id, |
PP_MicrosecondsDelta | timestamp | ||
) |
Signals the beginning od a new media segment, |timestamp| the earliest timestamp of all the streams in the segment
bool pp::StreamParser_Samsung::NewVideoConfig | ( | int32_t | stream_id, |
const PP_SP_VideoDecoderConfig & | |||
) |
Indicates when new video configuration have been parsed, |config| it's a configuration struct
|
pure virtual |
Called when there is new data to parse. |data| contains stream to parse.
Return PP_OK if the parse succeds
bool pp::StreamParser_Samsung::RegisterParser | ( | const char * | type | ) |
Used for registering stream parser in Browser. |type| is a MIME type of stream, to witch parser be registered.