1 #ifndef cachestream_HEADER_GUARD 2 #define cachestream_HEADER_GUARD 61 slot(slot), framefilter(framefilter) {}
143 long int getMinTime_() {
return this->mintime_;}
144 long int getMaxTime_() {
return this->maxtime_;}
145 bool hasDeltaFrames() {
return this->has_delta_frames;}
152 virtual bool writeCopy(
Frame* f,
bool wait=
false);
157 int seek(
long int ms_streamtime_);
158 int keySeek(
long int ms_streamtime_);
159 Frame *pullNextFrame();
186 void go(
Frame* frame);
229 void (*callback)(
long int mstimestamp);
254 void dumpPlayCache();
257 void stopStreams(
bool send_state =
true);
258 void playStreams(
bool send_state =
true);
259 void setRefTimeAndStop(
bool send_state =
true);
260 void seekStreams(
long int mstimestamp,
bool clear,
bool send_state =
true);
265 void handleSignals();
266 int safeGetSlot(SlotNumber slot,
FrameFilter*& ff);
271 void setCallback(
void func(
long int));
278 void setPyCallback(PyObject* pobj);
286 void setPyCallback2(PyObject* pobj);
297 void requestStopCall();
299 void stopStreamsCall();
300 void playStreamsCall();
310 void seekStreamsCall(
long int mstimestamp,
bool clear =
false);
std::vector< FrameFilter * > slots_
Slot number => output framefilter mapping.
Definition: cachestream.h:241
Signal information for FileCacheThread.
Definition: cachestream.h:71
signal to AVThread or OpenGLThread. Also custom signals to custom Threads
Thread safe system of fifo and a stack.
long int reftime
walltime = frametime_ + reftime
Definition: cachestream.h:234
std::deque< FileCacheSignalContext > signal_fifo
Redefinition of signal fifo.
Definition: cachestream.h:240
PyObject * pyfunc2
Python callback that emits current loaded time limits.
Definition: cachestream.h:231
bool has_delta_frames
Does the cache have streams with key-frame, delta-frame sequences.
Definition: cachestream.h:131
Definition: cachestream.h:59
FrameCacheContext ctx
Parameters defining the cache.
Definition: cachestream.h:128
undefined (initial value)
Definition: usbthread.h:143
Cache::iterator state
The state of the queue.
Definition: cachestream.h:135
PyObject * pyfunc
Python callback that emits current time.
Definition: cachestream.h:230
Thread that caches frames and streams them into output at play speed.
Definition: cachestream.h:212
std::condition_variable ready_condition
The Event/Flag for FrameFifo::ready_mutex.
Definition: cachestream.h:140
ForkFrameFilter fork
Write incoming frames here.
Definition: cachestream.h:219
Cache cache
The queue.
Definition: cachestream.h:134
Passes through frames of certain type only.
Definition: framefilter.h:454
FileStreamContext file_stream_ctx
< Identifies the stream
Definition: cachestream.h:73
long int mintime_
smallest frame timestamp (frametime)
Definition: cachestream.h:129
Passes frame to one of the two terminals.
Definition: framefilter.h:425
SetupFrame state_setupframe
SetupFrame for sending the stream state (seek, play, etc.)
Definition: cachestream.h:237
FrameCache * tmp_cache
Points to current cache receiving frames.
Definition: cachestream.h:228
std::condition_variable condition
The Event/Flag.
Definition: cachestream.h:139
std::vector< std::vector< SetupFrame * > > setup_frames
Slot number, subsession_index => SetupFrame mapping. Book-keeping of SetupFrames. ...
Definition: cachestream.h:243
long int mstimestamp
Seek: use existing frames for seek or clear the state.
Definition: cachestream.h:75
long int maxtime_
biggest frame timestamp (frametime)
Definition: cachestream.h:130
Setup frame.
Definition: frame.h:270
Encapsulate data sent to FileCacheThread.
Definition: cachestream.h:102
long int target_mstimestamp_
We should be at this time instant (streamtime)
Definition: cachestream.h:232
FileCacheSignal
Signals for FileCacheThread.
Definition: cachestream.h:84
Frame: An abstract queueable class.
Definition: frame.h:108
std::mutex mutex
The Lock.
Definition: cachestream.h:138
Passes frames to a FrameCache.
Definition: cachestream.h:172
FrameCache works like FrameFifo, but frames are not pre-reserved.
Definition: cachestream.h:118
This class uses AbstractFileStream(s)
Definition: filestream.h:136
AbstractFileState
Describes the state of a stream.
Definition: threadsignal.h:43
The mother class of all frame filters! FrameFilters are used to create "filter chains".
Definition: framefilter.h:46
Replicates frame flow to two filters Use this frame filter to create frame filter tree structures...
Definition: framefilter.h:149
FrameCache * play_cache
Points to the current play cache (default frame_cache_2)
Definition: cachestream.h:227
Definition: cachestream.h:109