This class contains all functions needed to implement TS Input.
More...
#include <input_ts.h>
This class contains all functions needed to implement TS Input.
Mist::inputTS::~inputTS |
( |
| ) |
|
virtual void Mist::Input::argumentsParsed |
( |
| ) |
|
|
inlinevirtualinherited |
bool Mist::Input::atKeyFrame |
( |
| ) |
|
|
protectedvirtualinherited |
void Mist::InOutBase::bufferFinalize |
( |
unsigned long |
tid | ) |
|
|
inherited |
Wraps up the buffering of a shared memory data page.
Registers the data page on the track index page as well
- Parameters
-
tid | The trackid of the page to finalize |
bool Mist::Input::bufferFrame |
( |
unsigned int |
track, |
|
|
unsigned int |
keyNum |
|
) |
| |
|
protectedinherited |
void Mist::InOutBase::bufferLivePacket |
( |
JSON::Value & |
packet | ) |
|
|
inherited |
Buffers a live packet to a page.
Handles both buffering and creation of new pages
Initiates/continues negotiation with the buffer as well
- Parameters
-
packet | The packet to buffer |
void Mist::InOutBase::bufferLivePacket |
( |
DTSC::Packet & |
packet | ) |
|
|
inherited |
Buffers a live packet to a page.
Handles both buffering and creation of new pages
Initiates/continues negotiation with the buffer as well
- Parameters
-
packet | The packet to buffer |
Buffers the next packet on the currently opened page.
- Parameters
-
void Mist::InOutBase::bufferRemove |
( |
unsigned long |
tid, |
|
|
unsigned long |
pageNumber |
|
) |
| |
|
inherited |
Removes a fully buffered page.
Does not do anything if the process is not standalone, in this case the master process will have an overloaded version of this function.
- Parameters
-
tid | The trackid to remove the page from |
pageNumber | The number of the page to remove |
bool Mist::InOutBase::bufferStart |
( |
unsigned long |
tid, |
|
|
unsigned long |
pageNumber |
|
) |
| |
|
inherited |
void Mist::Input::callbackWrapper |
( |
char * |
data, |
|
|
size_t |
len, |
|
|
unsigned int |
id |
|
) |
| |
|
staticprotectedinherited |
void Mist::Input::checkHeaderTimes |
( |
std::string |
streamFile | ) |
|
|
protectedinherited |
void Mist::InOutBase::continueNegotiate |
( |
unsigned long |
tid | ) |
|
|
protectedinherited |
void Mist::Input::convert |
( |
| ) |
|
|
protectedvirtualinherited |
void Mist::Input::finish |
( |
| ) |
|
|
protectedvirtualinherited |
void Mist::inputTS::getNext |
( |
bool |
smart = true | ) |
|
|
protectedvirtual |
Gets the next packet that is to be sent At the moment, the logic of sending the last packet that was finished has been implemented, but the seeking and finding data is not yet ready.
- Todo:
- Finish the implementation
Reimplemented from Mist::Input.
void Mist::InOutBase::initiateMeta |
( |
| ) |
|
|
inherited |
Opens a shared memory page for the stream metadata.
Assumes myMeta contains the metadata to write.
void Mist::Input::parseHeader |
( |
| ) |
|
|
protectedvirtualinherited |
void Mist::Input::play |
( |
int |
until = 0 | ) |
|
|
protectedinherited |
void Mist::Input::playOnce |
( |
| ) |
|
|
protectedinherited |
void Mist::Input::quitPlay |
( |
| ) |
|
|
protectedinherited |
bool Mist::inputTS::readHeader |
( |
| ) |
|
|
protectedvirtual |
Reads headers from a TS stream, and saves them into metadata It works by going through the entire TS stream, and every time It encounters a new PES start, it writes the currently found PES data for a specific track to metadata.
After the entire stream has been read, it writes the remaining metadata.
- Todo:
- Find errors, perhaps parts can be made more modular
Implements Mist::Input.
void Mist::inputTS::readPMT |
( |
| ) |
|
|
protected |
void Mist::Input::removeUnused |
( |
| ) |
|
|
protectedvirtualinherited |
void Mist::inputTS::seek |
( |
int |
seekTime | ) |
|
|
protectedvirtual |
Seeks to a specific time.
Reimplemented from Mist::Input.
void Mist::Input::serve |
( |
| ) |
|
|
protectedvirtualinherited |
The main loop for inputs in stream serving mode.
- Trigger:
- The
"STREAM_READY"
trigger is stream-specific, and is ran whenever an input finished loading and started serving a stream. If cancelled, the input is immediately shut down again. Its payload is: The "STREAM_UNLOAD"
trigger is stream-specific, and is ran right before an input shuts down and stops serving a stream. If cancelled, the shut down is delayed. Its payload is:
bool Mist::inputTS::setup |
( |
| ) |
|
|
protectedvirtual |
void Mist::inputTS::trackSelect |
( |
std::string |
trackSpec | ) |
|
|
protectedvirtual |
Track selector of TS Input.
- trackSpec specifies which tracks are to be selected
- Todo:
- test whether selecting a subset of tracks work
Reimplemented from Mist::Input.
void Mist::Input::userCallback |
( |
char * |
data, |
|
|
size_t |
len, |
|
|
unsigned int |
id |
|
) |
| |
|
protectedvirtualinherited |
unsigned int Mist::Input::benchMark |
|
protectedinherited |
FILE* Mist::inputTS::inFile |
|
protected |
The input file with ts data.
int Mist::Input::initialTime |
|
protectedinherited |
Timestamp of the last time we received or sent something.
bool Mist::Input::isBuffer |
|
protectedinherited |
std::map<int,std::set<int> > Mist::Input::keyTimes |
|
protectedinherited |
int Mist::Input::lastActive |
|
protectedinherited |
Media-timestamp of the last packet.
Stores either the input or output metadata.
unsigned int Mist::Input::packTime |
|
protectedinherited |
std::map<unsigned int, std::map<unsigned int, unsigned int> > Mist::Input::pageCounter |
|
protectedinherited |
unsigned int Mist::Input::playUntil |
|
protectedinherited |
bool Mist::inputTS::pushing |
|
protected |
std::set<unsigned long> Mist::InOutBase::selectedTracks |
|
protectedinherited |
Stores the track id's that are either selected for playback or input.
Input * Mist::Input::singleton = NULL |
|
staticprotectedinherited |
bool Mist::InOutBase::standAlone |
|
protectedinherited |
std::string Mist::InOutBase::streamName |
|
protectedinherited |
Used for parsing the incoming ts stream.
std::string Mist::inputTS::udpDataBuffer |
|
protected |
The documentation for this class was generated from the following files: