Shaka Player Embedded
|
#include <demuxer_thread.h>
Public Member Functions | |
DemuxerThread (const std::string &mime, Demuxer::Client *client, ElementaryStream *stream) | |
~DemuxerThread () | |
SHAKA_NON_COPYABLE_OR_MOVABLE_TYPE (DemuxerThread) | |
void | Stop () |
void | AppendData (double timestamp_offset, double window_start, double window_end, const uint8_t *data, size_t data_size, std::function< void(bool)> on_complete) |
Handles the thread that demuxes input content. This handles synchronizing the threads and connecting the Demuxer to the Stream.
All callbacks given to this object will be called on the event thread.
Definition at line 41 of file demuxer_thread.h.
shaka::media::DemuxerThread::DemuxerThread | ( | const std::string & | mime, |
Demuxer::Client * | client, | ||
ElementaryStream * | stream | ||
) |
Creates a new Demuxer instance that pushes to the given stream.
mime | The full MIME type this will read from. |
client | A client interface object for events. |
stream | The stream to push frames to. |
Definition at line 43 of file demuxer_thread.cc.
shaka::media::DemuxerThread::~DemuxerThread | ( | ) |
Definition at line 60 of file demuxer_thread.cc.
void shaka::media::DemuxerThread::AppendData | ( | double | timestamp_offset, |
double | window_start, | ||
double | window_end, | ||
const uint8_t * | data, | ||
size_t | data_size, | ||
std::function< void(bool)> | on_complete | ||
) |
Appends the given data to be demuxed.
timestamp_offset | The number of seconds to move the media timestamps forward. |
window_start | The time (in seconds) to start the append window. Any frames outside the append window are ignored. |
window_end | The time (in seconds) to end the append window. |
data | The data pointer; it must remain alive until a call to either on_complete or on_error. |
data_size | The number of bytes in |data|. |
on_complete | The callback to invoke once the append completes. |
Definition at line 71 of file demuxer_thread.cc.
shaka::media::DemuxerThread::SHAKA_NON_COPYABLE_OR_MOVABLE_TYPE | ( | DemuxerThread | ) |
void shaka::media::DemuxerThread::Stop | ( | ) |
Stops the background thread and joins it.
Definition at line 65 of file demuxer_thread.cc.