libvdo
vdo-frame.h
Go to the documentation of this file.
1 
14 #ifndef VDO_FRAME_H
15 #define VDO_FRAME_H
16 
17 #include "vdo-map.h"
18 #include "vdo-types.h"
19 
20 #include <unistd.h>
21 #include <glib-object.h>
22 
23 G_BEGIN_DECLS
24 
33 #define VDO_TYPE_FRAME (vdo_frame_get_type())
34 G_DECLARE_FINAL_TYPE(VdoFrame, vdo_frame, VDO, FRAME, GObject)
35 
36 typedef void(*VdoFrameFinalizer)(VdoFrame *self);
37 
50 
62 gboolean vdo_frame_is_key(VdoFrame *self);
63 
74 gboolean vdo_frame_shown(VdoFrame *self);
75 
87 
100 
113 
138 
147 
160 
169 
176 void vdo_frame_set_size(VdoFrame *self, gsize size);
177 
185 
192 void vdo_frame_set_sequence_nbr(VdoFrame *self, guint seqnum);
193 
200 void vdo_frame_set_timestamp(VdoFrame *self, guint64 timestamp);
201 
208 void vdo_frame_set_custom_timestamp(VdoFrame *self, gint64 timestamp);
209 
216 void vdo_frame_set_is_last_buffer(VdoFrame *self, gboolean is_last_buffer);
217 
224 void vdo_frame_set_extra_info(VdoFrame *self, VdoMap *extra_info);
225 
236 void vdo_frame_set_header_size(VdoFrame *self, gssize size);
237 
250 gpointer vdo_frame_memmap(VdoFrame *self);
251 
259 
276 VdoChunk vdo_frame_take_chunk(VdoFrame *self, GError **error);
277 
299 VdoChunk vdo_frame_take_chunk_ex(VdoFrame *self, VdoChunkOption options, GError **error);
300 
301 G_END_DECLS
302 
303 #endif // VDO_FRAME_H
A video frame.
A class representing a dictionary mapping keys to values.
A video chunk.
Definition: vdo-types.h:236
gsize vdo_frame_get_size(VdoFrame *self)
Return the size of this frame.
gboolean vdo_frame_is_key(VdoFrame *self)
Determine whether the frame is a keyframe.
VdoFrameType vdo_frame_get_frame_type(VdoFrame *self)
Return the type of this frame.
guint64 vdo_frame_get_utc_timestamp(VdoFrame *self)
Return the capture utc timestamp of this frame.
gint64 vdo_frame_get_custom_timestamp(VdoFrame *self)
Return a custom timestamp for this frame.
guint vdo_frame_get_sequence_nbr(VdoFrame *self)
Return the sequence number of this frame.
void vdo_frame_set_timestamp(VdoFrame *self, guint64 timestamp)
Set the timestamp of this frame.
guint64 vdo_frame_get_timestamp(VdoFrame *self)
Return the capture timestamp of this frame.
gboolean vdo_frame_shown(VdoFrame *self)
Return whether this frame is shown.
void vdo_frame_set_is_last_buffer(VdoFrame *self, gboolean is_last_buffer)
Mark this frame as the last buffer.
void vdo_frame_unmap(VdoFrame *self)
Unmaps the frame from current process memory.
void vdo_frame_set_custom_timestamp(VdoFrame *self, gint64 timestamp)
Return a custom timestamp of this frame.
gssize vdo_frame_get_header_size(VdoFrame *self)
Return the size of any H264/H265/AV1 headers contained in this frame.
void vdo_frame_set_size(VdoFrame *self, gsize size)
Set the size of this frame.
void vdo_frame_set_frame_type(VdoFrame *self, VdoFrameType type)
Set the type of this frame.
void vdo_frame_set_extra_info(VdoFrame *self, VdoMap *extra_info)
Set the extra info of this frame.
void vdo_frame_set_header_size(VdoFrame *self, gssize size)
Set the header size of this frame, normally used for H26x frames.
VdoMap * vdo_frame_get_extra_info(VdoFrame *self)
Return the extra info of this frame.
VdoChunk vdo_frame_take_chunk(VdoFrame *self, GError **error)
Iterate buffer contents by chunks (with mmap).
void vdo_frame_set_sequence_nbr(VdoFrame *self, guint seqnum)
Set the sequence number of this frame.
gpointer vdo_frame_memmap(VdoFrame *self)
A convenience function that maps the frame into current process memory.
VdoChunk vdo_frame_take_chunk_ex(VdoFrame *self, VdoChunkOption options, GError **error)
Iterate buffer contents by chunks (optional mmap)
A class representing a dictionary mapping keys to values.
VDO common type definitions.
VdoChunkOption
Video chunk options.
Definition: vdo-types.h:228
VdoFrameType
Video frame types.
Definition: vdo-types.h:157