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 #ifndef AXISOS_13_PREVIEW
170 gint vdo_frame_get_fd(VdoFrame *self);
171 #endif
172 
181 
190 #ifndef AXISOS_13_PREVIEW
191 gpointer vdo_frame_get_opaque(VdoFrame *self);
192 #endif
193 
202 #ifdef AXISOS_13_PREVIEW
203 [[gnu::deprecated("Prefer vdo_buffer_is_complete")]]
204 #endif
206 
213 void vdo_frame_set_size(VdoFrame *self, gsize size);
214 
222 
229 void vdo_frame_set_sequence_nbr(VdoFrame *self, guint seqnum);
230 
237 void vdo_frame_set_timestamp(VdoFrame *self, guint64 timestamp);
238 
245 void vdo_frame_set_custom_timestamp(VdoFrame *self, gint64 timestamp);
246 
253 void vdo_frame_set_is_last_buffer(VdoFrame *self, gboolean is_last_buffer);
254 
261 void vdo_frame_set_extra_info(VdoFrame *self, VdoMap *extra_info);
262 
273 void vdo_frame_set_header_size(VdoFrame *self, gssize size);
274 
287 gpointer vdo_frame_memmap(VdoFrame *self);
288 
296 
313 VdoChunk vdo_frame_take_chunk(VdoFrame *self, GError **error);
314 
336 VdoChunk vdo_frame_take_chunk_ex(VdoFrame *self, VdoChunkOption options, GError **error);
337 
338 G_END_DECLS
339 
340 #endif
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.
gboolean vdo_frame_get_is_last_buffer(VdoFrame *self)
Return a pointer to the opaque data 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 a file descriptor for 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