1 #ifndef frame_HEADER_GUARD 2 #define frame_HEADER_GUARD 39 #include "threadsignal.h" 125 virtual void print(std::ostream &os)
const;
126 virtual std::string dumpPayload();
127 virtual void dumpPayloadToFile(std::ofstream &fout);
128 virtual void updateAux();
129 virtual void update();
130 virtual void reset();
131 virtual bool isSeekable();
134 void copyMetaFrom(
Frame *f);
145 inline std::ostream &operator<<(std::ostream &os,
const Frame &f)
176 virtual void print(std::ostream &os)
const;
177 virtual std::string dumpPayload();
178 virtual void dumpPayloadToFile(std::ofstream &fout);
179 virtual void reset();
180 virtual bool isSeekable();
183 void reserve(std::size_t n_bytes);
184 void resize(std::size_t n_bytes);
208 void fillAVPacket(AVPacket *
avpkt);
209 void copyFromAVPacket(AVPacket *
avpkt);
210 void filterFromAVPacket(AVPacket *
avpkt, AVCodecContext *codec_ctx, AVBitStreamFilterContext *filter);
213 std::size_t calcSize();
214 bool dump(IdNumber device_id,
RaWriter &raw_writer);
287 virtual void print(std::ostream &os)
const;
288 virtual void reset();
330 virtual std::string dumpPayload();
331 virtual void print(std::ostream &os)
const;
332 virtual void reset();
371 virtual std::string dumpPayload();
372 virtual void print(std::ostream &os)
const;
373 virtual void reset();
375 virtual void updateAux();
376 virtual void update();
377 virtual void reserve(
int width,
int height);
440 virtual void reserve(
int width,
int height);
443 virtual std::string dumpPayload();
444 virtual void print(std::ostream &os)
const;
521 virtual std::string dumpPayload();
522 virtual void print(std::ostream &os)
const;
523 virtual void reset();
539 RGBFrame(
int max_width,
int max_height);
545 int max_width, max_height;
549 virtual std::string dumpPayload();
550 virtual void print(std::ostream &os)
const;
551 virtual void reset();
557 typedef std::vector<Frame *> Reservoir;
558 typedef std::deque<Frame *> Stack;
559 typedef std::deque<Frame *> Fifo;
560 typedef std::deque<Frame *> Cache;
562 typedef std::vector<YUVFrame *> YUVReservoir;
563 typedef std::deque<YUVFrame *> YUVStack;
564 typedef std::vector<RGBFrame *> RGBReservoir;
565 typedef std::deque<RGBFrame *> RGBStack;
598 virtual void print(std::ostream &os)
const;
599 virtual void reset();
AVMediaType media_type
For subtype stream_init.
Definition: frame.h:293
uint8_t * u_payload
shortcut to AVMediaFrame::av_frame->data[1]
Definition: frame.h:383
signal to AVThread or OpenGLThread. Also custom signals to custom Threads
Custom payload Frame.
Definition: frame.h:160
A GPU YUV frame.
Definition: frame.h:485
FrameClass frameclass
Declares frametype for correct typecast. Used by Frame::getFrameClass()
Definition: frame.h:137
Encapsulates data sent by the signal.
Definition: threadsignal.h:130
data at ffmpeg av_frame and ffmpeg av_codec_context
Constant/default values, version numbers.
For AVBitmapFrames, linesizes are the widths + padding bytes.
Definition: constant.h:129
std::vector< uint8_t > payload
Raw payload data (use .data() to get the pointer from std::vector)
Definition: frame.h:187
virtual void print(std::ostream &os) const
Produces frame output.
Definition: frame.cpp:68
Codec definitions (slightly outdated)
OpenGL calls for reserving PBOs and TEXtures, plus some auxiliary routines.
TimeCorrectionType
Methods to correct frame timestamps.
Definition: frame.h:83
undefined (initial value)
Definition: usbthread.h:143
GLuint y_index
internal OpenGL/GPU index
Definition: frame.h:511
Redefinition of characteristic signal contexts (info that goes with the signal) for AVThread thread...
Definition: threadsignal.h:78
OpenGLSignalContext opengl_signal_ctx
Thread commands to OpenGLThread.
Definition: frame.h:580
bool fs_end
Filesystem start / end // this controlled better at the python level.
Definition: frame.h:602
AVPixelFormat av_pixel_format
From AVCodecContext .. this class implies YUV420P so this is not really required ..
Definition: frame.h:380
GLubyte * v_payload
direct memory access memory address, returned by GPU
Definition: frame.h:518
std::vector< uint8_t > payload
RGB24 data as continuous bytes. 3 bytes per pixel.
Definition: frame.h:544
H264Pars h264_pars
H264 parameters, extracted from the payload.
Definition: frame.h:201
GLubyte * y_payload
direct memory access memory address, returned by GPU
Definition: frame.h:516
Encapsulate data sent in the ValkkaFSReaderSignal.
Definition: threadsignal.h:196
bool tm_end
Transmission start / end.
Definition: frame.h:603
AVMediaType media_type
Type of the media (video/audio)
Definition: frame.h:188
GLuint v_index
internal OpenGL/GPU index
Definition: frame.h:513
FrameClass
Enumeration of Frame classes used by Valkka.
Definition: frame.h:51
our own RGB24 data structure
GLuint u_index
internal OpenGL/GPU index
Definition: frame.h:512
BitmapPars bmpars
Calculated bitmap plane dimensions, data sizes, etc.
Definition: frame.h:381
SetupFrameType
A muxed packet (in some container format)
Definition: frame.h:251
uint8_t * v_payload
shortcut to AVMediaFrame::av_frame->data[2]
Definition: frame.h:384
Used when sending blocks of frames: mark filesystem and block start and end.
List of common ffmpeg/libav header files. Definition of some functions to call FFmpeg API directly fr...
AVCodecID codec_id
AVCodeCID of the media.
Definition: frame.h:189
Decoded YUV/RGB frame in FFMpeg format.
Definition: frame.h:354
Encapsulate data sent in the ValkkaFSWriterSignal.
Definition: threadsignal.h:163
Setup frame.
Definition: frame.h:270
A frame signaling internal thread commands, states of recorded video, etc.
Definition: frame.h:570
Decoded YUV frame in a non-planar format (thus "NP")
Definition: frame.h:430
Write directly to files and devices with POSIX O_DIRECT.
void * custom_signal_ctx
For extensions: thread commands for any thread. TODO: migrate all signal contexes here...
Definition: frame.h:584
Frame: An abstract queueable class.
Definition: frame.h:108
GLubyte * u_payload
direct memory access memory address, returned by GPU
Definition: frame.h:517
List of common header files.
int subsession_index
Media subsession index.
Definition: frame.h:141
AVCodecID codec_id
For subtype stream_init.
Definition: frame.h:294
rgb interpolated from yuv
ValkkaFSWriterSignalContext valkkafswriter_signal_ctx
Thread commands to ValkkFSWriterThread.
Definition: frame.h:582
uint8_t * y_payload
shortcut to AVMediaFrame::av_frame->data[0]
Definition: frame.h:382
AbstractFileState stream_state
For subtype stream_state.
Definition: frame.h:296
AbstractFileState
Describes the state of a stream.
Definition: threadsignal.h:43
ValkkaFSReaderSignalContext valkkafsreader_signal_ctx
Thread commands to ValkkaFSReaderThread.
Definition: frame.h:583
long int mstimestamp
Presentation time stamp (PTS) in milliseconds.
Definition: frame.h:142
SetupFrameType sub_type
Type of the SetupFrame.
Definition: frame.h:291
AVSignalContext av_signal_ctx
Thread commands to AVThread.
Definition: frame.h:581
Our own RGB24 structure.
Definition: frame.h:535
SlotNumber n_slot
Slot number identifying the media source.
Definition: frame.h:140