MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
Mist::inputDTSC Class Reference

#include <input_dtsc.h>

Inheritance diagram for Mist::inputDTSC:
Mist::Input Mist::Input Mist::InOutBase Mist::InOutBase

Public Member Functions

 inputDTSC (Util::Config *cfg)
 
 inputDTSC (Util::Config *cfg)
 
virtual void argumentsParsed ()
 
void bufferFinalize (unsigned long tid)
 Wraps up the buffering of a shared memory data page. More...
 
void bufferLivePacket (JSON::Value &packet)
 Buffers a live packet to a page. More...
 
void bufferLivePacket (DTSC::Packet &packet)
 Buffers a live packet to a page. More...
 
void bufferNext (DTSC::Packet &pack)
 Buffers the next packet on the currently opened page. More...
 
void bufferNext (JSON::Value &pack)
 Buffers the next packet on the currently opened page. More...
 
void bufferRemove (unsigned long tid, unsigned long pageNumber)
 Removes a fully buffered page. More...
 
bool bufferStart (unsigned long tid, unsigned long pageNumber)
 
void initiateMeta ()
 Opens a shared memory page for the stream metadata. More...
 
virtual int run ()
 

Protected Member Functions

virtual bool atKeyFrame ()
 
bool bufferFrame (unsigned int track, unsigned int keyNum)
 
void checkHeaderTimes (std::string streamFile)
 
void continueNegotiate (unsigned long tid)
 
virtual void convert ()
 
virtual void finish ()
 
void getNext (bool smart=true)
 
void getNext (bool smart=true)
 
virtual void parseHeader ()
 
void play (int until=0)
 
void playOnce ()
 
void quitPlay ()
 
bool readHeader ()
 
bool readHeader ()
 
virtual void removeUnused ()
 
void seek (int seekTime)
 
void seek (int seekTime)
 
virtual void serve ()
 The main loop for inputs in stream serving mode. More...
 
bool setup ()
 
bool setup ()
 
void trackSelect (std::string trackSpec)
 
void trackSelect (std::string trackSpec)
 
virtual void userCallback (char *data, size_t len, unsigned int id)
 

Static Protected Member Functions

static void callbackWrapper (char *data, size_t len, unsigned int id)
 

Protected Attributes

unsigned int benchMark
 
JSON::Value capa
 
DTSC::File inFile
 
int initialTime
 Timestamp of the last time we received or sent something. More...
 
bool isBuffer
 
std::map< int, unsigned long long int > iVecs
 
std::string key
 
std::map< int, std::set< int > > keyTimes
 
int lastActive
 Media-timestamp of the last packet. More...
 
DTSC::Meta myMeta
 Stores either the input or output metadata. More...
 
negotiationProxy nProxy
 
unsigned int packTime
 
std::map< unsigned int, std::map< unsigned int, unsigned int > > pageCounter
 
int playing
 
unsigned int playUntil
 
std::set< unsigned long > selectedTracks
 Stores the track id's that are either selected for playback or input. More...
 
bool standAlone
 
std::string streamName
 
DTSC::Packet thisPacket
 
IPC::sharedServer userPage
 

Static Protected Attributes

static Util::Configconfig = NULL
 
static Inputsingleton = NULL
 

Constructor & Destructor Documentation

Mist::inputDTSC::inputDTSC ( Util::Config cfg)
Mist::inputDTSC::inputDTSC ( Util::Config cfg)

Member Function Documentation

virtual void Mist::Input::argumentsParsed ( )
inlinevirtualinherited
bool Mist::Input::atKeyFrame ( )
protectedvirtualinherited

Reimplemented in Mist::inputISMV.

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
tidThe 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
packetThe 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
packetThe packet to buffer
void Mist::InOutBase::bufferNext ( DTSC::Packet pack)
inherited

Buffers the next packet on the currently opened page.

Parameters
packThe packet to buffer
void Mist::InOutBase::bufferNext ( JSON::Value pack)
inherited

Buffers the next packet on the currently opened page.

Parameters
packThe packet to buffer
Note
Internally calls bufferNext(DTSC::Packet & pack)
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
tidThe trackid to remove the page from
pageNumberThe 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

Reimplemented in Mist::inputBuffer.

void Mist::inputDTSC::getNext ( bool  smart = true)
protectedvirtual

Reimplemented from Mist::Input.

void Mist::inputDTSC::getNext ( bool  smart = true)
protectedvirtual

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::inputDTSC::readHeader ( )
protectedvirtual

Implements Mist::Input.

bool Mist::inputDTSC::readHeader ( )
protectedvirtual

Implements Mist::Input.

void Mist::Input::removeUnused ( )
protectedvirtualinherited

Reimplemented in Mist::inputBuffer.

int Mist::Input::run ( )
virtualinherited
void Mist::inputDTSC::seek ( int  seekTime)
protectedvirtual

Reimplemented from Mist::Input.

void Mist::inputDTSC::seek ( int  seekTime)
protectedvirtual

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:
streamname
input name
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:
streamname
input name
bool Mist::inputDTSC::setup ( )
protectedvirtual

Implements Mist::Input.

bool Mist::inputDTSC::setup ( )
protectedvirtual

Implements Mist::Input.

void Mist::inputDTSC::trackSelect ( std::string  trackSpec)
protectedvirtual

Reimplemented from Mist::Input.

void Mist::inputDTSC::trackSelect ( std::string  trackSpec)
protectedvirtual

Reimplemented from Mist::Input.

void Mist::Input::userCallback ( char *  data,
size_t  len,
unsigned int  id 
)
protectedvirtualinherited

Reimplemented in Mist::inputBuffer.

Field Documentation

unsigned int Mist::Input::benchMark
protectedinherited
JSON::Value Mist::Input::capa
protectedinherited
Util::Config * Mist::InOutBase::config = NULL
staticprotectedinherited
DTSC::File Mist::inputDTSC::inFile
protected
int Mist::Input::initialTime
protectedinherited

Timestamp of the last time we received or sent something.

bool Mist::Input::isBuffer
protectedinherited
std::map<int,unsigned long long int> Mist::inputDTSC::iVecs
protected
std::string Mist::inputDTSC::key
protected
std::map<int,std::set<int> > Mist::Input::keyTimes
protectedinherited
int Mist::Input::lastActive
protectedinherited

Media-timestamp of the last packet.

DTSC::Meta Mist::InOutBase::myMeta
protectedinherited

Stores either the input or output metadata.

negotiationProxy Mist::InOutBase::nProxy
protectedinherited
unsigned int Mist::Input::packTime
protectedinherited
std::map<unsigned int, std::map<unsigned int, unsigned int> > Mist::Input::pageCounter
protectedinherited
int Mist::Input::playing
protectedinherited
unsigned int Mist::Input::playUntil
protectedinherited
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
DTSC::Packet Mist::InOutBase::thisPacket
protectedinherited
IPC::sharedServer Mist::Input::userPage
protectedinherited

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