#include <input_buffer.h>
Mist::inputBuffer::~inputBuffer |
( |
| ) |
|
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::inputBuffer::eraseTrackDataPages |
( |
unsigned long |
tid | ) |
|
|
protected |
void Mist::inputBuffer::finish |
( |
| ) |
|
|
protectedvirtual |
void Mist::inputBuffer::getNext |
( |
bool |
smart = true | ) |
|
|
protectedvirtual |
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::inputBuffer::readHeader |
( |
| ) |
|
|
protectedvirtual |
bool Mist::inputBuffer::removeKey |
( |
unsigned int |
tid | ) |
|
|
protected |
void Mist::inputBuffer::removeUnused |
( |
| ) |
|
|
protectedvirtual |
- Trigger:
- The
"STREAM_TRACK_REMOVE"
trigger is stream-specific, and is ran whenever a track is fully removed from a live strean buffer.
It cannot be cancelled. Its payload is:
- Todo:
- Consider replacing with eraseTrackDataPages(it->first)?
Reimplemented from Mist::Input.
void Mist::inputBuffer::seek |
( |
int |
seekTime | ) |
|
|
protectedvirtual |
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::inputBuffer::setup |
( |
| ) |
|
|
protectedvirtual |
< Contains server configuration and capabilities
Implements Mist::Input.
void Mist::inputBuffer::trackSelect |
( |
std::string |
trackSpec | ) |
|
|
protectedvirtual |
void Mist::inputBuffer::updateMeta |
( |
| ) |
|
|
protected |
- Trigger:
- The
"STREAM_BUFFER"
trigger is stream-specific, and is ran whenever the buffer changes state between playable (FULL) or not (EMPTY).
It cannot be cancelled. It is possible to receive multiple EMPTY calls without FULL calls in between, as EMPTY is always generated when a stream is unloaded from memory, even if this stream never reached playable state in the first place (e.g. a broadcast was cancelled before filling enough buffer to be playable). Its payload is:
streamname
FULL or
EMPTY (depending
on current state)
void Mist::inputBuffer::updateMetaFromPage |
( |
unsigned long |
tNum, |
|
|
unsigned long |
pageNum |
|
) |
| |
|
protected |
void Mist::inputBuffer::updateTrackMeta |
( |
unsigned long |
tNum | ) |
|
|
protected |
void Mist::inputBuffer::userCallback |
( |
char * |
data, |
|
|
size_t |
len, |
|
|
unsigned int |
id |
|
) |
| |
|
protectedvirtual |
- Trigger:
- The
"STREAM_TRACK_ADD"
trigger is stream-specific, and is ran whenever a new track is added to a live strean buffer.
It cannot be cancelled. Its payload is:
- Todo:
- Optimize this part. Find a way to not have to store the metadata in JSON first, but read it from the page immediately
- Todo:
- Maybe switch to a new form of detecting collisions, especially with regards to multiple audio languages and camera angles.
Reimplemented from Mist::Input.
std::set<unsigned long> Mist::inputBuffer::activeTracks |
|
protected |
unsigned int Mist::Input::benchMark |
|
protectedinherited |
std::map<unsigned long, std::map<unsigned long, DTSCPageData> > Mist::inputBuffer::bufferLocations |
|
protected |
Maps trackid to a pagenum->pageData map.
unsigned int Mist::inputBuffer::bufferTime |
|
private |
unsigned int Mist::inputBuffer::cutTime |
|
private |
bool Mist::inputBuffer::hasPush |
|
private |
std::map<unsigned long, std::string> Mist::inputBuffer::initData |
|
protected |
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.
unsigned int Mist::inputBuffer::lastReTime |
|
private |
std::map<unsigned long, unsigned long long> Mist::inputBuffer::lastUpdated |
|
protected |
Stores either the input or output metadata.
std::set<unsigned long> Mist::inputBuffer::negotiatingTracks |
|
protected |
std::map<unsigned long, unsigned long long> Mist::inputBuffer::negotiationTimeout |
|
protected |
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 |
std::map<unsigned long, char *> Mist::inputBuffer::pushLocation |
|
protected |
long long int Mist::inputBuffer::recBpos |
|
protected |
std::ofstream Mist::inputBuffer::recFile |
|
protected |
std::string Mist::inputBuffer::recName |
|
protected |
int Mist::inputBuffer::recordingPid |
|
protected |
bool Mist::inputBuffer::resumeMode |
|
private |
unsigned int Mist::inputBuffer::segmentSize |
|
private |
std::set<unsigned long> Mist::InOutBase::selectedTracks |
|
protectedinherited |
Stores the track id's that are either selected for playback or input.
bool Mist::InOutBase::standAlone |
|
protectedinherited |
std::string Mist::InOutBase::streamName |
|
protectedinherited |
The documentation for this class was generated from the following files: