Valkka
1.6.1
OpenSource Video Management
|
This class in analogous to the Connection class in live streams. More...
#include <avfilethread.h>
Public Member Functions | |
FileStream (FileContext &ctx) | |
Default constructor. More... | |
~FileStream () | |
Default destructor. More... | |
SlotNumber | getSlot () |
void | setRefMstime (long int ms_streamtime_) |
Creates a correspondence with the current wallclock time and a desider stream time, by calculating FileStream::reftime. See Presention timing and playing. | |
void | seek (long int ms_streamtime_) |
Seek to a desider stream time. | |
void | play () |
Start playing the stream. | |
void | stop () |
Stop playing the strem. | |
long int | update (long int mstimestamp) |
Tries to achieve mstimestamp: calculates FileStream::target_mstimestamp_ and calls pullNextFrame. Returns the timeout for the next frame. | |
long int | pullNextFrame () |
Tries to achieve FileStream::target_mstimestamp_ . Sends frames whose timestamps are less than that to the filterchain (e.g. to FileContext::framefilter). Returns timeout to the next frame. More... | |
Public Attributes | |
FileContext & | ctx |
FileContext describing this stream. | |
AVFormatContext * | input_context |
std::vector< AVBitStreamFilterContext * > | filters |
SetupFrame | setupframe |
Setup frame written to the filterchain. | |
BasicFrame | out_frame |
This frame is written to the filterchain (i.e. to FileStream::ctx and there to FileContext::framefilter) | |
long int | duration |
Duration of the stream. | |
long int | reftime |
Relation between the stream time and wallclock time. See Presention timing and playing. | |
long int | target_mstimestamp_ |
Where the stream would like to be (underscore means stream time) | |
long int | frame_mstimestamp_ |
Timestamp of previous frame sent, -1 means there was no previous frame (underscore means stream time) | |
FileState | state |
Decribes the FileStream state: errors, stopped, playing, etc. | |
AVPacket * | avpkt |
Data for the next frame in ffmpeg AVPacket format. | |
This class in analogous to the Connection class in live streams.
Instances of this class are placed in slots in FileThread.
This class "keeps the books" for each file stream, in particular:
In variable names, underscore means stream time. See Presention timing and playing
FileStream::FileStream | ( | FileContext & | ctx | ) |
FileStream::~FileStream | ( | ) |
Default destructor.
long int FileStream::pullNextFrame | ( | ) |
Tries to achieve FileStream::target_mstimestamp_ . Sends frames whose timestamps are less than that to the filterchain (e.g. to FileContext::framefilter). Returns timeout to the next frame.