33
30
<h2><span class="refentrytitle"><a name="gst-plugins-base-libs-gstvideoutils.top_of_page"></a>gstvideoutils</span></h2>
34
31
<p>gstvideoutils</p>
36
<td valign="top" align="right"></td>
33
<td class="gallery_image" valign="top" align="right"></td>
37
34
</tr></table></div>
38
<div class="refsynopsisdiv">
39
<a name="gst-plugins-base-libs-gstvideoutils.synopsis"></a><h2>Synopsis</h2>
40
<pre class="synopsis">struct <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame">GstVideoCodecFrame</a>;
41
enum <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrameFlags" title="enum GstVideoCodecFrameFlags">GstVideoCodecFrameFlags</a>;
42
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-FLAGS:CAPS" title="GST_VIDEO_CODEC_FRAME_FLAGS()">GST_VIDEO_CODEC_FRAME_FLAGS</a> (frame)
43
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-FLAG-IS-SET:CAPS" title="GST_VIDEO_CODEC_FRAME_FLAG_IS_SET()">GST_VIDEO_CODEC_FRAME_FLAG_IS_SET</a> (frame,
45
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-FLAG-SET:CAPS" title="GST_VIDEO_CODEC_FRAME_FLAG_SET()">GST_VIDEO_CODEC_FRAME_FLAG_SET</a> (frame,
47
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-FLAG-UNSET:CAPS" title="GST_VIDEO_CODEC_FRAME_FLAG_UNSET()">GST_VIDEO_CODEC_FRAME_FLAG_UNSET</a> (frame,
49
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-IS-DECODE-ONLY:CAPS" title="GST_VIDEO_CODEC_FRAME_IS_DECODE_ONLY()">GST_VIDEO_CODEC_FRAME_IS_DECODE_ONLY</a>(frame)
50
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-IS-FORCE-KEYFRAME:CAPS" title="GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME()">GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME</a>(frame)
51
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-IS-FORCE-KEYFRAME-HEADERS:CAPS" title="GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME_HEADERS()">GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME_HEADERS</a>(frame)
52
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-IS-SYNC-POINT:CAPS" title="GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT()">GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT</a> (frame)
53
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-SET-DECODE-ONLY:CAPS" title="GST_VIDEO_CODEC_FRAME_SET_DECODE_ONLY()">GST_VIDEO_CODEC_FRAME_SET_DECODE_ONLY</a>(frame)
54
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-SET-FORCE-KEYFRAME:CAPS" title="GST_VIDEO_CODEC_FRAME_SET_FORCE_KEYFRAME()">GST_VIDEO_CODEC_FRAME_SET_FORCE_KEYFRAME</a>(frame)
55
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-SET-FORCE-KEYFRAME-HEADERS:CAPS" title="GST_VIDEO_CODEC_FRAME_SET_FORCE_KEYFRAME_HEADERS()">GST_VIDEO_CODEC_FRAME_SET_FORCE_KEYFRAME_HEADERS</a>(frame)
56
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-SET-SYNC-POINT:CAPS" title="GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT()">GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT</a>(frame)
57
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-UNSET-FORCE-KEYFRAME:CAPS" title="GST_VIDEO_CODEC_FRAME_UNSET_FORCE_KEYFRAME()">GST_VIDEO_CODEC_FRAME_UNSET_FORCE_KEYFRAME</a>(frame)
58
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-UNSET-FORCE-KEYFRAME-HEADERS:CAPS" title="GST_VIDEO_CODEC_FRAME_UNSET_FORCE_KEYFRAME_HEADERS()">GST_VIDEO_CODEC_FRAME_UNSET_FORCE_KEYFRAME_HEADERS</a>(frame)
59
#define <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-UNSET-SYNC-POINT:CAPS" title="GST_VIDEO_CODEC_FRAME_UNSET_SYNC_POINT()">GST_VIDEO_CODEC_FRAME_UNSET_SYNC_POINT</a>(frame)
60
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="returnvalue">GstVideoCodecFrame</span></a> * <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#gst-video-codec-frame-ref" title="gst_video_codec_frame_ref ()">gst_video_codec_frame_ref</a> (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>);
61
<span class="returnvalue">void</span> <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#gst-video-codec-frame-unref" title="gst_video_codec_frame_unref ()">gst_video_codec_frame_unref</a> (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>);
62
<span class="returnvalue">void</span> <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#gst-video-codec-frame-set-user-data" title="gst_video_codec_frame_set_user_data ()">gst_video_codec_frame_set_user_data</a> (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>,
63
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
64
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);
65
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#gst-video-codec-frame-get-user-data" title="gst_video_codec_frame_get_user_data ()">gst_video_codec_frame_get_user_data</a> (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>);
66
struct <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecState" title="struct GstVideoCodecState">GstVideoCodecState</a>;
67
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="returnvalue">GstVideoCodecState</span></a> * <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#gst-video-codec-state-ref" title="gst_video_codec_state_ref ()">gst_video_codec_state_ref</a> (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a> *state</code></em>);
68
<span class="returnvalue">void</span> <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#gst-video-codec-state-unref" title="gst_video_codec_state_unref ()">gst_video_codec_state_unref</a> (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a> *state</code></em>);
35
<div class="refsect1">
36
<a name="gst-plugins-base-libs-gstvideoutils.functions"></a><h2>Functions</h2>
37
<div class="informaltable"><table width="100%" border="0">
39
<col width="150px" class="functions_return">
40
<col class="functions_name">
44
<td class="define_keyword">#define</td>
45
<td class="function_name">
46
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-FLAGS:CAPS" title="GST_VIDEO_CODEC_FRAME_FLAGS()">GST_VIDEO_CODEC_FRAME_FLAGS</a><span class="c_punctuation">()</span>
50
<td class="define_keyword">#define</td>
51
<td class="function_name">
52
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-FLAG-IS-SET:CAPS" title="GST_VIDEO_CODEC_FRAME_FLAG_IS_SET()">GST_VIDEO_CODEC_FRAME_FLAG_IS_SET</a><span class="c_punctuation">()</span>
56
<td class="define_keyword">#define</td>
57
<td class="function_name">
58
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-FLAG-SET:CAPS" title="GST_VIDEO_CODEC_FRAME_FLAG_SET()">GST_VIDEO_CODEC_FRAME_FLAG_SET</a><span class="c_punctuation">()</span>
62
<td class="define_keyword">#define</td>
63
<td class="function_name">
64
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-FLAG-UNSET:CAPS" title="GST_VIDEO_CODEC_FRAME_FLAG_UNSET()">GST_VIDEO_CODEC_FRAME_FLAG_UNSET</a><span class="c_punctuation">()</span>
68
<td class="define_keyword">#define</td>
69
<td class="function_name">
70
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-IS-DECODE-ONLY:CAPS" title="GST_VIDEO_CODEC_FRAME_IS_DECODE_ONLY()">GST_VIDEO_CODEC_FRAME_IS_DECODE_ONLY</a><span class="c_punctuation">()</span>
74
<td class="define_keyword">#define</td>
75
<td class="function_name">
76
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-IS-FORCE-KEYFRAME:CAPS" title="GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME()">GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME</a><span class="c_punctuation">()</span>
80
<td class="define_keyword">#define</td>
81
<td class="function_name">
82
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-IS-FORCE-KEYFRAME-HEADERS:CAPS" title="GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME_HEADERS()">GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME_HEADERS</a><span class="c_punctuation">()</span>
86
<td class="define_keyword">#define</td>
87
<td class="function_name">
88
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-IS-SYNC-POINT:CAPS" title="GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT()">GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT</a><span class="c_punctuation">()</span>
92
<td class="define_keyword">#define</td>
93
<td class="function_name">
94
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-SET-DECODE-ONLY:CAPS" title="GST_VIDEO_CODEC_FRAME_SET_DECODE_ONLY()">GST_VIDEO_CODEC_FRAME_SET_DECODE_ONLY</a><span class="c_punctuation">()</span>
98
<td class="define_keyword">#define</td>
99
<td class="function_name">
100
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-SET-FORCE-KEYFRAME:CAPS" title="GST_VIDEO_CODEC_FRAME_SET_FORCE_KEYFRAME()">GST_VIDEO_CODEC_FRAME_SET_FORCE_KEYFRAME</a><span class="c_punctuation">()</span>
104
<td class="define_keyword">#define</td>
105
<td class="function_name">
106
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-SET-FORCE-KEYFRAME-HEADERS:CAPS" title="GST_VIDEO_CODEC_FRAME_SET_FORCE_KEYFRAME_HEADERS()">GST_VIDEO_CODEC_FRAME_SET_FORCE_KEYFRAME_HEADERS</a><span class="c_punctuation">()</span>
110
<td class="define_keyword">#define</td>
111
<td class="function_name">
112
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-SET-SYNC-POINT:CAPS" title="GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT()">GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT</a><span class="c_punctuation">()</span>
116
<td class="define_keyword">#define</td>
117
<td class="function_name">
118
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-UNSET-FORCE-KEYFRAME:CAPS" title="GST_VIDEO_CODEC_FRAME_UNSET_FORCE_KEYFRAME()">GST_VIDEO_CODEC_FRAME_UNSET_FORCE_KEYFRAME</a><span class="c_punctuation">()</span>
122
<td class="define_keyword">#define</td>
123
<td class="function_name">
124
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-UNSET-FORCE-KEYFRAME-HEADERS:CAPS" title="GST_VIDEO_CODEC_FRAME_UNSET_FORCE_KEYFRAME_HEADERS()">GST_VIDEO_CODEC_FRAME_UNSET_FORCE_KEYFRAME_HEADERS</a><span class="c_punctuation">()</span>
128
<td class="define_keyword">#define</td>
129
<td class="function_name">
130
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GST-VIDEO-CODEC-FRAME-UNSET-SYNC-POINT:CAPS" title="GST_VIDEO_CODEC_FRAME_UNSET_SYNC_POINT()">GST_VIDEO_CODEC_FRAME_UNSET_SYNC_POINT</a><span class="c_punctuation">()</span>
134
<td class="function_type">
135
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="returnvalue">GstVideoCodecFrame</span></a> *
137
<td class="function_name">
138
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#gst-video-codec-frame-ref" title="gst_video_codec_frame_ref ()">gst_video_codec_frame_ref</a> <span class="c_punctuation">()</span>
142
<td class="function_type">
143
<span class="returnvalue">void</span>
145
<td class="function_name">
146
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#gst-video-codec-frame-unref" title="gst_video_codec_frame_unref ()">gst_video_codec_frame_unref</a> <span class="c_punctuation">()</span>
150
<td class="function_type">
151
<span class="returnvalue">void</span>
153
<td class="function_name">
154
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#gst-video-codec-frame-set-user-data" title="gst_video_codec_frame_set_user_data ()">gst_video_codec_frame_set_user_data</a> <span class="c_punctuation">()</span>
158
<td class="function_type">
159
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
161
<td class="function_name">
162
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#gst-video-codec-frame-get-user-data" title="gst_video_codec_frame_get_user_data ()">gst_video_codec_frame_get_user_data</a> <span class="c_punctuation">()</span>
166
<td class="function_type">
167
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="returnvalue">GstVideoCodecState</span></a> *
169
<td class="function_name">
170
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#gst-video-codec-state-ref" title="gst_video_codec_state_ref ()">gst_video_codec_state_ref</a> <span class="c_punctuation">()</span>
174
<td class="function_type">
175
<span class="returnvalue">void</span>
177
<td class="function_name">
178
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#gst-video-codec-state-unref" title="gst_video_codec_state_unref ()">gst_video_codec_state_unref</a> <span class="c_punctuation">()</span>
184
<div class="refsect1">
185
<a name="gst-plugins-base-libs-gstvideoutils.other"></a><h2>Types and Values</h2>
186
<div class="informaltable"><table width="100%" border="0">
188
<col width="150px" class="name">
189
<col class="description">
193
<td class="datatype_keyword">struct</td>
194
<td class="function_name"><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame">GstVideoCodecFrame</a></td>
197
<td class="datatype_keyword">enum</td>
198
<td class="function_name"><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrameFlags" title="enum GstVideoCodecFrameFlags">GstVideoCodecFrameFlags</a></td>
201
<td class="datatype_keyword">struct</td>
202
<td class="function_name"><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecState" title="struct GstVideoCodecState">GstVideoCodecState</a></td>
207
<div class="refsect1">
208
<a name="gst-plugins-base-libs-gstvideoutils.object-hierarchy"></a><h2>Object Hierarchy</h2>
71
212
<div class="refsect1">
72
213
<a name="gst-plugins-base-libs-gstvideoutils.description"></a><h2>Description</h2>
74
215
<div class="refsect1">
75
<a name="gst-plugins-base-libs-gstvideoutils.details"></a><h2>Details</h2>
76
<div class="refsect2">
77
<a name="GstVideoCodecFrame"></a><h3>struct GstVideoCodecFrame</h3>
78
<pre class="programlisting">struct GstVideoCodecFrame {
79
guint32 system_frame_number; /* ED */
80
guint32 decode_frame_number; /* ED */
81
guint32 presentation_frame_number; /* ED */
83
GstClockTime dts; /* ED */
84
GstClockTime pts; /* ED */
85
GstClockTime duration; /* ED */
87
int distance_from_sync; /* ED */
89
GstBuffer *input_buffer; /* ED */
90
GstBuffer *output_buffer; /* ED */
92
GstClockTime deadline; /* D */
96
A <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> represents a video frame both in raw and
99
<div class="variablelist"><table border="0" class="variablelist">
101
<col align="left" valign="top">
106
<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="GstVideoCodecFrame.system-frame-number"></a>system_frame_number</code></em>;</span></p></td>
107
<td>Unique identifier for the frame. Use this if you need
108
to get hold of the frame later (like when data is being decoded).
109
Typical usage in decoders is to set this on the opaque value provided
110
to the library and get back the frame using <a class="link" href="gst-plugins-base-libs-GstVideoDecoder.html#gst-video-decoder-get-frame" title="gst_video_decoder_get_frame ()"><code class="function">gst_video_decoder_get_frame()</code></a>
114
<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="GstVideoCodecFrame.decode-frame-number"></a>decode_frame_number</code></em>;</span></p></td>
118
<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="GstVideoCodecFrame.presentation-frame-number"></a>presentation_frame_number</code></em>;</span></p></td>
122
<td><p><span class="term"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstVideoCodecFrame.dts"></a>dts</code></em>;</span></p></td>
123
<td>Decoding timestamp</td>
126
<td><p><span class="term"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstVideoCodecFrame.pts"></a>pts</code></em>;</span></p></td>
127
<td>Presentation timestamp</td>
130
<td><p><span class="term"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstVideoCodecFrame.duration"></a>duration</code></em>;</span></p></td>
131
<td>Duration of the frame</td>
134
<td><p><span class="term"><span class="type">int</span> <em class="structfield"><code><a name="GstVideoCodecFrame.distance-from-sync"></a>distance_from_sync</code></em>;</span></p></td>
135
<td>Distance in frames from the last synchronization point.</td>
138
<td><p><span class="term"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> *<em class="structfield"><code><a name="GstVideoCodecFrame.input-buffer"></a>input_buffer</code></em>;</span></p></td>
139
<td>the input <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> that created this frame. The buffer is owned
140
by the frame and references to the frame instead of the buffer should</td>
143
<td><p><span class="term"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> *<em class="structfield"><code><a name="GstVideoCodecFrame.output-buffer"></a>output_buffer</code></em>;</span></p></td>
144
<td>the output <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a>. Implementations should set this either
145
directly, or by using the <em class="parameter"><code><code class="function">gst_video_decoder_alloc_output_frame()</code></code></em> or
146
<em class="parameter"><code><code class="function">gst_video_decoder_alloc_output_buffer()</code></code></em> methods. The buffer is owned
147
by the frame and references to the frame instead of the buffer should
151
<td><p><span class="term"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstVideoCodecFrame.deadline"></a>deadline</code></em>;</span></p></td>
152
<td>Running time when the frame will be used.</td>
158
<div class="refsect2">
159
<a name="GstVideoCodecFrameFlags"></a><h3>enum GstVideoCodecFrameFlags</h3>
160
<pre class="programlisting">typedef enum {
161
GST_VIDEO_CODEC_FRAME_FLAG_DECODE_ONLY = (1<<0),
162
GST_VIDEO_CODEC_FRAME_FLAG_SYNC_POINT = (1<<1),
163
GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME = (1<<2),
164
GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME_HEADERS = (1<<3)
165
} GstVideoCodecFrameFlags;
168
Flags for <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>
170
<div class="variablelist"><table border="0" class="variablelist">
172
<col align="left" valign="top">
177
<td><p><a name="GST-VIDEO-CODEC-FRAME-FLAG-DECODE-ONLY:CAPS"></a><span class="term"><code class="literal">GST_VIDEO_CODEC_FRAME_FLAG_DECODE_ONLY</code></span></p></td>
178
<td>is the frame only meant to be decoded
182
<td><p><a name="GST-VIDEO-CODEC-FRAME-FLAG-SYNC-POINT:CAPS"></a><span class="term"><code class="literal">GST_VIDEO_CODEC_FRAME_FLAG_SYNC_POINT</code></span></p></td>
183
<td>is the frame a synchronization point (keyframe)
187
<td><p><a name="GST-VIDEO-CODEC-FRAME-FLAG-FORCE-KEYFRAME:CAPS"></a><span class="term"><code class="literal">GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME</code></span></p></td>
188
<td>should the output frame be made a keyframe
192
<td><p><a name="GST-VIDEO-CODEC-FRAME-FLAG-FORCE-KEYFRAME-HEADERS:CAPS"></a><span class="term"><code class="literal">GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME_HEADERS</code></span></p></td>
193
<td>should the encoder output stream headers
216
<a name="gst-plugins-base-libs-gstvideoutils.functions_details"></a><h2>Functions</h2>
200
217
<div class="refsect2">
201
218
<a name="GST-VIDEO-CODEC-FRAME-FLAGS:CAPS"></a><h3>GST_VIDEO_CODEC_FRAME_FLAGS()</h3>
202
219
<pre class="programlisting">#define GST_VIDEO_CODEC_FRAME_FLAGS(frame) ((frame)->flags)
205
The entire set of flags for the <em class="parameter"><code>frame</code></em>
221
<p>The entire set of flags for the <em class="parameter"><code>frame</code></em>
207
<div class="variablelist"><table border="0" class="variablelist">
223
<div class="refsect3">
224
<a name="id-1.2.14.14.7.2.5"></a><h4>Parameters</h4>
225
<div class="informaltable"><table width="100%" border="0">
209
<col align="left" valign="top">
227
<col width="150px" class="parameters_name">
228
<col class="parameters_description">
229
<col width="200px" class="parameters_annotations">
213
<td><p><span class="term"><em class="parameter"><code>frame</code></em> :</span></p></td>
214
<td>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>
232
<td class="parameter_name"><p>frame</p></td>
233
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td>
234
<td class="parameter_annotations"> </td>
220
240
<div class="refsect2">
221
241
<a name="GST-VIDEO-CODEC-FRAME-FLAG-IS-SET:CAPS"></a><h3>GST_VIDEO_CODEC_FRAME_FLAG_IS_SET()</h3>
222
242
<pre class="programlisting">#define GST_VIDEO_CODEC_FRAME_FLAG_IS_SET(frame,flag) !!(GST_VIDEO_CODEC_FRAME_FLAGS(frame) & (flag))
225
Checks whether the given <em class="parameter"><code>flag</code></em> is set
227
<div class="variablelist"><table border="0" class="variablelist">
244
<p>Checks whether the given <em class="parameter"><code>flag</code></em>
246
<div class="refsect3">
247
<a name="id-1.2.14.14.7.3.5"></a><h4>Parameters</h4>
248
<div class="informaltable"><table width="100%" border="0">
229
<col align="left" valign="top">
250
<col width="150px" class="parameters_name">
251
<col class="parameters_description">
252
<col width="200px" class="parameters_annotations">
234
<td><p><span class="term"><em class="parameter"><code>frame</code></em> :</span></p></td>
235
<td>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>
256
<td class="parameter_name"><p>frame</p></td>
257
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td>
258
<td class="parameter_annotations"> </td>
239
<td><p><span class="term"><em class="parameter"><code>flag</code></em> :</span></p></td>
240
<td>a flag to check for</td>
261
<td class="parameter_name"><p>flag</p></td>
262
<td class="parameter_description"><p>a flag to check for</p></td>
263
<td class="parameter_annotations"> </td>
246
270
<div class="refsect2">
247
271
<a name="GST-VIDEO-CODEC-FRAME-FLAG-SET:CAPS"></a><h3>GST_VIDEO_CODEC_FRAME_FLAG_SET()</h3>
248
272
<pre class="programlisting">#define GST_VIDEO_CODEC_FRAME_FLAG_SET(frame,flag) (GST_VIDEO_CODEC_FRAME_FLAGS(frame) |= (flag))
251
This macro sets the given bits
253
<div class="variablelist"><table border="0" class="variablelist">
274
<p>This macro sets the given bits</p>
275
<div class="refsect3">
276
<a name="id-1.2.14.14.7.4.5"></a><h4>Parameters</h4>
277
<div class="informaltable"><table width="100%" border="0">
255
<col align="left" valign="top">
279
<col width="150px" class="parameters_name">
280
<col class="parameters_description">
281
<col width="200px" class="parameters_annotations">
260
<td><p><span class="term"><em class="parameter"><code>frame</code></em> :</span></p></td>
261
<td>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>
285
<td class="parameter_name"><p>frame</p></td>
286
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td>
287
<td class="parameter_annotations"> </td>
265
<td><p><span class="term"><em class="parameter"><code>flag</code></em> :</span></p></td>
266
<td>Flag to set, can be any number of bits in guint32.</td>
290
<td class="parameter_name"><p>flag</p></td>
291
<td class="parameter_description"><p>Flag to set, can be any number of bits in guint32.</p></td>
292
<td class="parameter_annotations"> </td>
272
299
<div class="refsect2">
273
300
<a name="GST-VIDEO-CODEC-FRAME-FLAG-UNSET:CAPS"></a><h3>GST_VIDEO_CODEC_FRAME_FLAG_UNSET()</h3>
274
301
<pre class="programlisting">#define GST_VIDEO_CODEC_FRAME_FLAG_UNSET(frame,flag) (GST_VIDEO_CODEC_FRAME_FLAGS(frame) &= ~(flag))
277
This macro usets the given bits.
279
<div class="variablelist"><table border="0" class="variablelist">
303
<p>This macro usets the given bits.</p>
304
<div class="refsect3">
305
<a name="id-1.2.14.14.7.5.5"></a><h4>Parameters</h4>
306
<div class="informaltable"><table width="100%" border="0">
281
<col align="left" valign="top">
308
<col width="150px" class="parameters_name">
309
<col class="parameters_description">
310
<col width="200px" class="parameters_annotations">
286
<td><p><span class="term"><em class="parameter"><code>frame</code></em> :</span></p></td>
287
<td>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>
314
<td class="parameter_name"><p>frame</p></td>
315
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td>
316
<td class="parameter_annotations"> </td>
291
<td><p><span class="term"><em class="parameter"><code>flag</code></em> :</span></p></td>
292
<td>Flag to unset</td>
319
<td class="parameter_name"><p>flag</p></td>
320
<td class="parameter_description"><p>Flag to unset</p></td>
321
<td class="parameter_annotations"> </td>
298
328
<div class="refsect2">
299
329
<a name="GST-VIDEO-CODEC-FRAME-IS-DECODE-ONLY:CAPS"></a><h3>GST_VIDEO_CODEC_FRAME_IS_DECODE_ONLY()</h3>
300
330
<pre class="programlisting">#define GST_VIDEO_CODEC_FRAME_IS_DECODE_ONLY(frame) (GST_VIDEO_CODEC_FRAME_FLAG_IS_SET(frame, GST_VIDEO_CODEC_FRAME_FLAG_DECODE_ONLY))
303
Tests if the buffer should only be decoded but not sent downstream.
305
<div class="variablelist"><table border="0" class="variablelist">
332
<p>Tests if the buffer should only be decoded but not sent downstream.</p>
333
<div class="refsect3">
334
<a name="id-1.2.14.14.7.6.5"></a><h4>Parameters</h4>
335
<div class="informaltable"><table width="100%" border="0">
307
<col align="left" valign="top">
337
<col width="150px" class="parameters_name">
338
<col class="parameters_description">
339
<col width="200px" class="parameters_annotations">
311
<td><p><span class="term"><em class="parameter"><code>frame</code></em> :</span></p></td>
312
<td>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>
342
<td class="parameter_name"><p>frame</p></td>
343
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td>
344
<td class="parameter_annotations"> </td>
318
350
<div class="refsect2">
319
351
<a name="GST-VIDEO-CODEC-FRAME-IS-FORCE-KEYFRAME:CAPS"></a><h3>GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME()</h3>
320
352
<pre class="programlisting">#define GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME(frame) (GST_VIDEO_CODEC_FRAME_FLAG_IS_SET(frame, GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME))
323
Tests if the frame must be encoded as a keyframe. Applies only to
324
frames provided to encoders. Decoders can safely ignore this field.
326
<div class="variablelist"><table border="0" class="variablelist">
354
<p>Tests if the frame must be encoded as a keyframe. Applies only to
355
frames provided to encoders. Decoders can safely ignore this field.</p>
356
<div class="refsect3">
357
<a name="id-1.2.14.14.7.7.5"></a><h4>Parameters</h4>
358
<div class="informaltable"><table width="100%" border="0">
328
<col align="left" valign="top">
360
<col width="150px" class="parameters_name">
361
<col class="parameters_description">
362
<col width="200px" class="parameters_annotations">
332
<td><p><span class="term"><em class="parameter"><code>frame</code></em> :</span></p></td>
333
<td>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>
365
<td class="parameter_name"><p>frame</p></td>
366
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td>
367
<td class="parameter_annotations"> </td>
339
373
<div class="refsect2">
340
374
<a name="GST-VIDEO-CODEC-FRAME-IS-FORCE-KEYFRAME-HEADERS:CAPS"></a><h3>GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME_HEADERS()</h3>
341
375
<pre class="programlisting">#define GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME_HEADERS(frame) (GST_VIDEO_CODEC_FRAME_FLAG_IS_SET(frame, GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME_HEADERS))
344
Tests if encoder should output stream headers before outputting the
345
resulting encoded buffer for the given frame.
348
Applies only to frames provided to encoders. Decoders can safely
351
<div class="variablelist"><table border="0" class="variablelist">
377
<p>Tests if encoder should output stream headers before outputting the
378
resulting encoded buffer for the given frame.</p>
379
<p>Applies only to frames provided to encoders. Decoders can safely
380
ignore this field.</p>
381
<div class="refsect3">
382
<a name="id-1.2.14.14.7.8.6"></a><h4>Parameters</h4>
383
<div class="informaltable"><table width="100%" border="0">
353
<col align="left" valign="top">
385
<col width="150px" class="parameters_name">
386
<col class="parameters_description">
387
<col width="200px" class="parameters_annotations">
357
<td><p><span class="term"><em class="parameter"><code>frame</code></em> :</span></p></td>
358
<td>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>
390
<td class="parameter_name"><p>frame</p></td>
391
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td>
392
<td class="parameter_annotations"> </td>
364
398
<div class="refsect2">
365
399
<a name="GST-VIDEO-CODEC-FRAME-IS-SYNC-POINT:CAPS"></a><h3>GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT()</h3>
366
400
<pre class="programlisting">#define GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT(frame) (GST_VIDEO_CODEC_FRAME_FLAG_IS_SET(frame, GST_VIDEO_CODEC_FRAME_FLAG_SYNC_POINT))
369
Tests if the frame is a synchronization point (like a keyframe).
372
Decoder implementations can use this to detect keyframes.
374
<div class="variablelist"><table border="0" class="variablelist">
402
<p>Tests if the frame is a synchronization point (like a keyframe).</p>
403
<p>Decoder implementations can use this to detect keyframes.</p>
404
<div class="refsect3">
405
<a name="id-1.2.14.14.7.9.6"></a><h4>Parameters</h4>
406
<div class="informaltable"><table width="100%" border="0">
376
<col align="left" valign="top">
408
<col width="150px" class="parameters_name">
409
<col class="parameters_description">
410
<col width="200px" class="parameters_annotations">
380
<td><p><span class="term"><em class="parameter"><code>frame</code></em> :</span></p></td>
381
<td>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>
413
<td class="parameter_name"><p>frame</p></td>
414
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td>
415
<td class="parameter_annotations"> </td>
387
421
<div class="refsect2">
388
422
<a name="GST-VIDEO-CODEC-FRAME-SET-DECODE-ONLY:CAPS"></a><h3>GST_VIDEO_CODEC_FRAME_SET_DECODE_ONLY()</h3>
389
423
<pre class="programlisting">#define GST_VIDEO_CODEC_FRAME_SET_DECODE_ONLY(frame) (GST_VIDEO_CODEC_FRAME_FLAG_SET(frame, GST_VIDEO_CODEC_FRAME_FLAG_DECODE_ONLY))
392
Sets the buffer to not be sent downstream.
395
Decoder implementation can use this if they have frames that
396
are not meant to be displayed.
399
Encoder implementation can safely ignore this field.
401
<div class="variablelist"><table border="0" class="variablelist">
425
<p>Sets the buffer to not be sent downstream.</p>
426
<p>Decoder implementation can use this if they have frames that
427
are not meant to be displayed.</p>
428
<p>Encoder implementation can safely ignore this field.</p>
429
<div class="refsect3">
430
<a name="id-1.2.14.14.7.10.7"></a><h4>Parameters</h4>
431
<div class="informaltable"><table width="100%" border="0">
403
<col align="left" valign="top">
433
<col width="150px" class="parameters_name">
434
<col class="parameters_description">
435
<col width="200px" class="parameters_annotations">
407
<td><p><span class="term"><em class="parameter"><code>frame</code></em> :</span></p></td>
408
<td>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>
438
<td class="parameter_name"><p>frame</p></td>
439
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td>
440
<td class="parameter_annotations"> </td>
414
446
<div class="refsect2">
415
447
<a name="GST-VIDEO-CODEC-FRAME-SET-FORCE-KEYFRAME:CAPS"></a><h3>GST_VIDEO_CODEC_FRAME_SET_FORCE_KEYFRAME()</h3>
471
501
<div class="refsect2">
472
<a name="gst-video-codec-frame-ref"></a><h3>gst_video_codec_frame_ref ()</h3>
473
<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="returnvalue">GstVideoCodecFrame</span></a> * gst_video_codec_frame_ref (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>);</pre>
475
Increases the refcount of the given frame by one.
477
<div class="variablelist"><table border="0" class="variablelist">
479
<col align="left" valign="top">
484
<td><p><span class="term"><em class="parameter"><code>frame</code></em> :</span></p></td>
485
<td>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>
489
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
490
<td><em class="parameter"><code>buf</code></em></td>
496
<div class="refsect2">
497
<a name="gst-video-codec-frame-unref"></a><h3>gst_video_codec_frame_unref ()</h3>
498
<pre class="programlisting"><span class="returnvalue">void</span> gst_video_codec_frame_unref (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>);</pre>
500
Decreases the refcount of the frame. If the refcount reaches 0, the frame
503
<div class="variablelist"><table border="0" class="variablelist">
505
<col align="left" valign="top">
509
<td><p><span class="term"><em class="parameter"><code>frame</code></em> :</span></p></td>
510
<td>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>
516
<div class="refsect2">
517
<a name="gst-video-codec-frame-set-user-data"></a><h3>gst_video_codec_frame_set_user_data ()</h3>
518
<pre class="programlisting"><span class="returnvalue">void</span> gst_video_codec_frame_set_user_data (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>,
519
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
520
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
522
Sets <em class="parameter"><code>user_data</code></em> on the frame and the <a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> that will be called when
523
the frame is freed. Allows to attach private data by the subclass to frames.
526
If a <em class="parameter"><code>user_data</code></em> was previously set, then the previous set <em class="parameter"><code>notify</code></em> will be called
527
before the <em class="parameter"><code>user_data</code></em> is replaced.
529
<div class="variablelist"><table border="0" class="variablelist">
531
<col align="left" valign="top">
536
<td><p><span class="term"><em class="parameter"><code>frame</code></em> :</span></p></td>
537
<td>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>
541
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
542
<td>private data</td>
545
<td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
546
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym> user_data]</span>
553
<div class="refsect2">
554
<a name="gst-video-codec-frame-get-user-data"></a><h3>gst_video_codec_frame_get_user_data ()</h3>
555
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> gst_video_codec_frame_get_user_data (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>);</pre>
557
Gets private data set on the frame by the subclass via
558
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#gst-video-codec-frame-set-user-data" title="gst_video_codec_frame_set_user_data ()"><code class="function">gst_video_codec_frame_set_user_data()</code></a> previously.
560
<div class="variablelist"><table border="0" class="variablelist">
562
<col align="left" valign="top">
567
<td><p><span class="term"><em class="parameter"><code>frame</code></em> :</span></p></td>
568
<td>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>
572
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
573
<td>The previously set user_data. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
502
<a name="gst-video-codec-frame-ref"></a><h3>gst_video_codec_frame_ref ()</h3>
503
<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="returnvalue">GstVideoCodecFrame</span></a> *
504
gst_video_codec_frame_ref (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>);</pre>
505
<p>Increases the refcount of the given frame by one.</p>
506
<div class="refsect3">
507
<a name="id-1.2.14.14.7.17.5"></a><h4>Parameters</h4>
508
<div class="informaltable"><table width="100%" border="0">
510
<col width="150px" class="parameters_name">
511
<col class="parameters_description">
512
<col width="200px" class="parameters_annotations">
515
<td class="parameter_name"><p>frame</p></td>
516
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td>
517
<td class="parameter_annotations"> </td>
521
<div class="refsect3">
522
<a name="id-1.2.14.14.7.17.6"></a><h4>Returns</h4>
523
<p> <em class="parameter"><code>buf</code></em>
529
<div class="refsect2">
530
<a name="gst-video-codec-frame-unref"></a><h3>gst_video_codec_frame_unref ()</h3>
531
<pre class="programlisting"><span class="returnvalue">void</span>
532
gst_video_codec_frame_unref (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>);</pre>
533
<p>Decreases the refcount of the frame. If the refcount reaches 0, the frame
535
<div class="refsect3">
536
<a name="id-1.2.14.14.7.18.5"></a><h4>Parameters</h4>
537
<div class="informaltable"><table width="100%" border="0">
539
<col width="150px" class="parameters_name">
540
<col class="parameters_description">
541
<col width="200px" class="parameters_annotations">
544
<td class="parameter_name"><p>frame</p></td>
545
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td>
546
<td class="parameter_annotations"> </td>
552
<div class="refsect2">
553
<a name="gst-video-codec-frame-set-user-data"></a><h3>gst_video_codec_frame_set_user_data ()</h3>
554
<pre class="programlisting"><span class="returnvalue">void</span>
555
gst_video_codec_frame_set_user_data (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>,
556
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
557
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
558
<p>Sets <em class="parameter"><code>user_data</code></em>
559
on the frame and the <a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> that will be called when
560
the frame is freed. Allows to attach private data by the subclass to frames.</p>
561
<p>If a <em class="parameter"><code>user_data</code></em>
562
was previously set, then the previous set <em class="parameter"><code>notify</code></em>
564
before the <em class="parameter"><code>user_data</code></em>
566
<div class="refsect3">
567
<a name="id-1.2.14.14.7.19.6"></a><h4>Parameters</h4>
568
<div class="informaltable"><table width="100%" border="0">
570
<col width="150px" class="parameters_name">
571
<col class="parameters_description">
572
<col width="200px" class="parameters_annotations">
576
<td class="parameter_name"><p>frame</p></td>
577
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td>
578
<td class="parameter_annotations"> </td>
581
<td class="parameter_name"><p>user_data</p></td>
582
<td class="parameter_description"><p>private data</p></td>
583
<td class="parameter_annotations"> </td>
586
<td class="parameter_name"><p>notify</p></td>
587
<td class="parameter_description"><p> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a>. </p></td>
588
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym> user_data]</span></td>
595
<div class="refsect2">
596
<a name="gst-video-codec-frame-get-user-data"></a><h3>gst_video_codec_frame_get_user_data ()</h3>
597
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
598
gst_video_codec_frame_get_user_data (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>);</pre>
599
<p>Gets private data set on the frame by the subclass via
600
<a class="link" href="gst-plugins-base-libs-gstvideoutils.html#gst-video-codec-frame-set-user-data" title="gst_video_codec_frame_set_user_data ()"><code class="function">gst_video_codec_frame_set_user_data()</code></a> previously.</p>
601
<div class="refsect3">
602
<a name="id-1.2.14.14.7.20.5"></a><h4>Parameters</h4>
603
<div class="informaltable"><table width="100%" border="0">
605
<col width="150px" class="parameters_name">
606
<col class="parameters_description">
607
<col width="200px" class="parameters_annotations">
610
<td class="parameter_name"><p>frame</p></td>
611
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td>
612
<td class="parameter_annotations"> </td>
616
<div class="refsect3">
617
<a name="id-1.2.14.14.7.20.6"></a><h4>Returns</h4>
618
<p> The previously set user_data. </p>
619
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
623
<div class="refsect2">
624
<a name="gst-video-codec-state-ref"></a><h3>gst_video_codec_state_ref ()</h3>
625
<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="returnvalue">GstVideoCodecState</span></a> *
626
gst_video_codec_state_ref (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a> *state</code></em>);</pre>
627
<p>Increases the refcount of the given state by one.</p>
628
<div class="refsect3">
629
<a name="id-1.2.14.14.7.21.5"></a><h4>Parameters</h4>
630
<div class="informaltable"><table width="100%" border="0">
632
<col width="150px" class="parameters_name">
633
<col class="parameters_description">
634
<col width="200px" class="parameters_annotations">
637
<td class="parameter_name"><p>state</p></td>
638
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a></p></td>
639
<td class="parameter_annotations"> </td>
643
<div class="refsect3">
644
<a name="id-1.2.14.14.7.21.6"></a><h4>Returns</h4>
645
<p> <em class="parameter"><code>buf</code></em>
651
<div class="refsect2">
652
<a name="gst-video-codec-state-unref"></a><h3>gst_video_codec_state_unref ()</h3>
653
<pre class="programlisting"><span class="returnvalue">void</span>
654
gst_video_codec_state_unref (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a> *state</code></em>);</pre>
655
<p>Decreases the refcount of the state. If the refcount reaches 0, the state
657
<div class="refsect3">
658
<a name="id-1.2.14.14.7.22.5"></a><h4>Parameters</h4>
659
<div class="informaltable"><table width="100%" border="0">
661
<col width="150px" class="parameters_name">
662
<col class="parameters_description">
663
<col width="200px" class="parameters_annotations">
666
<td class="parameter_name"><p>state</p></td>
667
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a></p></td>
668
<td class="parameter_annotations"> </td>
674
<div class="refsect1">
675
<a name="gst-plugins-base-libs-gstvideoutils.other_details"></a><h2>Types and Values</h2>
676
<div class="refsect2">
677
<a name="GstVideoCodecFrame"></a><h3>struct GstVideoCodecFrame</h3>
678
<pre class="programlisting">struct GstVideoCodecFrame {
679
guint32 system_frame_number; /* ED */
680
guint32 decode_frame_number; /* ED */
681
guint32 presentation_frame_number; /* ED */
683
GstClockTime dts; /* ED */
684
GstClockTime pts; /* ED */
685
GstClockTime duration; /* ED */
687
int distance_from_sync; /* ED */
689
GstBuffer *input_buffer; /* ED */
690
GstBuffer *output_buffer; /* ED */
692
GstClockTime deadline; /* D */
695
<p>A <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> represents a video frame both in raw and
697
<div class="refsect3">
698
<a name="id-1.2.14.14.8.2.5"></a><h4>Members</h4>
699
<div class="informaltable"><table width="100%" border="0">
701
<col width="300px" class="struct_members_name">
702
<col class="struct_members_description">
703
<col width="200px" class="struct_members_annotations">
707
<td class="struct_member_name"><p><span class="type">guint32</span> <em class="structfield"><code><a name="GstVideoCodecFrame.system-frame-number"></a>system_frame_number</code></em>;</p></td>
708
<td class="struct_member_description"><p>Unique identifier for the frame. Use this if you need
709
to get hold of the frame later (like when data is being decoded).
710
Typical usage in decoders is to set this on the opaque value provided
711
to the library and get back the frame using <a class="link" href="gst-plugins-base-libs-GstVideoDecoder.html#gst-video-decoder-get-frame" title="gst_video_decoder_get_frame ()"><code class="function">gst_video_decoder_get_frame()</code></a></p></td>
712
<td class="struct_member_annotations"> </td>
715
<td class="struct_member_name"><p><span class="type">guint32</span> <em class="structfield"><code><a name="GstVideoCodecFrame.decode-frame-number"></a>decode_frame_number</code></em>;</p></td>
720
<td class="struct_member_name"><p><span class="type">guint32</span> <em class="structfield"><code><a name="GstVideoCodecFrame.presentation-frame-number"></a>presentation_frame_number</code></em>;</p></td>
725
<td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstVideoCodecFrame.dts"></a>dts</code></em>;</p></td>
726
<td class="struct_member_description"><p>Decoding timestamp</p></td>
727
<td class="struct_member_annotations"> </td>
730
<td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstVideoCodecFrame.pts"></a>pts</code></em>;</p></td>
731
<td class="struct_member_description"><p>Presentation timestamp</p></td>
732
<td class="struct_member_annotations"> </td>
735
<td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstVideoCodecFrame.duration"></a>duration</code></em>;</p></td>
736
<td class="struct_member_description"><p>Duration of the frame</p></td>
737
<td class="struct_member_annotations"> </td>
740
<td class="struct_member_name"><p><span class="type">int</span> <em class="structfield"><code><a name="GstVideoCodecFrame.distance-from-sync"></a>distance_from_sync</code></em>;</p></td>
741
<td class="struct_member_description"><p>Distance in frames from the last synchronization point.</p></td>
742
<td class="struct_member_annotations"> </td>
745
<td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> *<em class="structfield"><code><a name="GstVideoCodecFrame.input-buffer"></a>input_buffer</code></em>;</p></td>
746
<td class="struct_member_description"><p>the input <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> that created this frame. The buffer is owned
747
by the frame and references to the frame instead of the buffer should</p></td>
748
<td class="struct_member_annotations"> </td>
751
<td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> *<em class="structfield"><code><a name="GstVideoCodecFrame.output-buffer"></a>output_buffer</code></em>;</p></td>
752
<td class="struct_member_description"><p>the output <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a>. Implementations should set this either
753
directly, or by using the <em class="parameter"><code><code class="function">gst_video_decoder_alloc_output_frame()</code></code></em>
755
<em class="parameter"><code><code class="function">gst_video_decoder_alloc_output_buffer()</code></code></em>
756
methods. The buffer is owned
757
by the frame and references to the frame instead of the buffer should
759
<td class="struct_member_annotations"> </td>
762
<td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstVideoCodecFrame.deadline"></a>deadline</code></em>;</p></td>
763
<td class="struct_member_description"><p>Running time when the frame will be used.</p></td>
764
<td class="struct_member_annotations"> </td>
771
<div class="refsect2">
772
<a name="GstVideoCodecFrameFlags"></a><h3>enum GstVideoCodecFrameFlags</h3>
773
<p>Flags for <a class="link" href="gst-plugins-base-libs-gstvideoutils.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p>
774
<div class="refsect3">
775
<a name="id-1.2.14.14.8.3.4"></a><h4>Members</h4>
776
<div class="informaltable"><table width="100%" border="0">
778
<col width="300px" class="enum_members_name">
779
<col class="enum_members_description">
780
<col width="200px" class="enum_members_annotations">
784
<td class="enum_member_name"><p><a name="GST-VIDEO-CODEC-FRAME-FLAG-DECODE-ONLY:CAPS"></a>GST_VIDEO_CODEC_FRAME_FLAG_DECODE_ONLY</p></td>
785
<td class="enum_member_description">
786
<p>is the frame only meant to be decoded</p>
788
<td class="enum_member_annotations"> </td>
791
<td class="enum_member_name"><p><a name="GST-VIDEO-CODEC-FRAME-FLAG-SYNC-POINT:CAPS"></a>GST_VIDEO_CODEC_FRAME_FLAG_SYNC_POINT</p></td>
792
<td class="enum_member_description">
793
<p>is the frame a synchronization point (keyframe)</p>
795
<td class="enum_member_annotations"> </td>
798
<td class="enum_member_name"><p><a name="GST-VIDEO-CODEC-FRAME-FLAG-FORCE-KEYFRAME:CAPS"></a>GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME</p></td>
799
<td class="enum_member_description">
800
<p>should the output frame be made a keyframe</p>
802
<td class="enum_member_annotations"> </td>
805
<td class="enum_member_name"><p><a name="GST-VIDEO-CODEC-FRAME-FLAG-FORCE-KEYFRAME-HEADERS:CAPS"></a>GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME_HEADERS</p></td>
806
<td class="enum_member_description">
807
<p>should the encoder output stream headers</p>
809
<td class="enum_member_annotations"> </td>
580
816
<div class="refsect2">