blob: dfe8998b5367582d8ecf093f3ebd0318a9eba516 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GstSample: GStreamer 1.0 Core Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GStreamer 1.0 Core Reference Manual">
<link rel="up" href="libgstreamer.html" title="GStreamer Core Library">
<link rel="prev" href="GstCapsFeatures.html" title="GstCapsFeatures">
<link rel="next" href="GstChildProxy.html" title="GstChildProxy">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#GstSample.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GstSample.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="libgstreamer.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GstCapsFeatures.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GstChildProxy.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GstSample"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GstSample.top_of_page"></a>GstSample</span></h2>
<p>GstSample — A media sample</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GstSample.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstSample.html#gst-sample-get-buffer" title="gst_sample_get_buffer ()">gst_sample_get_buffer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBufferList.html" title="GstBufferList"><span class="returnvalue">GstBufferList</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstSample.html#gst-sample-get-buffer-list" title="gst_sample_get_buffer_list ()">gst_sample_get_buffer_list</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstCaps.html" title="GstCaps"><span class="returnvalue">GstCaps</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstSample.html#gst-sample-get-caps" title="gst_sample_get_caps ()">gst_sample_get_caps</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="GstStructure.html" title="GstStructure"><span class="returnvalue">GstStructure</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstSample.html#gst-sample-get-info" title="gst_sample_get_info ()">gst_sample_get_info</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstSegment.html" title="GstSegment"><span class="returnvalue">GstSegment</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstSample.html#gst-sample-get-segment" title="gst_sample_get_segment ()">gst_sample_get_segment</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstSample.html#gst-sample-set-buffer-list" title="gst_sample_set_buffer_list ()">gst_sample_set_buffer_list</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstSample.html" title="GstSample"><span class="returnvalue">GstSample</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstSample.html#gst-sample-new" title="gst_sample_new ()">gst_sample_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstSample.html" title="GstSample"><span class="returnvalue">GstSample</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstSample.html#gst-sample-ref" title="gst_sample_ref ()">gst_sample_ref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstSample.html#gst-sample-unref" title="gst_sample_unref ()">gst_sample_unref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstSample.html" title="GstSample"><span class="returnvalue">GstSample</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstSample.html#gst-sample-copy" title="gst_sample_copy ()">gst_sample_copy</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstSample.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GstSample.html#GstSample-struct" title="GstSample">GstSample</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstSample.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="https://developer.gnome.org/gobject/unstable/gobject-Boxed-Types.html">GBoxed</a>
<span class="lineart">╰──</span> GstSample
</pre>
</div>
<div class="refsect1">
<a name="GstSample.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gst/gst.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GstSample.description"></a><h2>Description</h2>
<p>A <a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a> is a small object containing data, a type, timing and
extra arbitrary information.</p>
</div>
<div class="refsect1">
<a name="GstSample.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gst-sample-get-buffer"></a><h3>gst_sample_get_buffer ()</h3>
<pre class="programlisting"><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
gst_sample_get_buffer (<em class="parameter"><code><a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a> *sample</code></em>);</pre>
<p>Get the buffer associated with <em class="parameter"><code>sample</code></em>
</p>
<div class="refsect3">
<a name="gst-sample-get-buffer.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>sample</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-sample-get-buffer.returns"></a><h4>Returns</h4>
<p> the buffer of <em class="parameter"><code>sample</code></em>
or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
when there is no buffer. The buffer remains valid as long as
<em class="parameter"><code>sample</code></em>
is valid. If you need to hold on to it for longer than
that, take a ref to the buffer with <a class="link" href="GstBuffer.html#gst-buffer-ref" title="gst_buffer_ref ()"><code class="function">gst_buffer_ref()</code></a>. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-sample-get-buffer-list"></a><h3>gst_sample_get_buffer_list ()</h3>
<pre class="programlisting"><a class="link" href="GstBufferList.html" title="GstBufferList"><span class="returnvalue">GstBufferList</span></a> *
gst_sample_get_buffer_list (<em class="parameter"><code><a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a> *sample</code></em>);</pre>
<p>Get the buffer list associated with <em class="parameter"><code>sample</code></em>
</p>
<div class="refsect3">
<a name="gst-sample-get-buffer-list.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>sample</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-sample-get-buffer-list.returns"></a><h4>Returns</h4>
<p> the buffer list of <em class="parameter"><code>sample</code></em>
or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
when there is no buffer list. The buffer list remains valid as long as
<em class="parameter"><code>sample</code></em>
is valid. If you need to hold on to it for longer than
that, take a ref to the buffer list with <a class="link" href="gstreamer-GstMiniObject.html#gst-mini-object-ref" title="gst_mini_object_ref ()"><code class="function">gst_mini_object_ref()</code></a>. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-sample-get-caps"></a><h3>gst_sample_get_caps ()</h3>
<pre class="programlisting"><a class="link" href="GstCaps.html" title="GstCaps"><span class="returnvalue">GstCaps</span></a> *
gst_sample_get_caps (<em class="parameter"><code><a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a> *sample</code></em>);</pre>
<p>Get the caps associated with <em class="parameter"><code>sample</code></em>
</p>
<div class="refsect3">
<a name="gst-sample-get-caps.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>sample</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-sample-get-caps.returns"></a><h4>Returns</h4>
<p> the caps of <em class="parameter"><code>sample</code></em>
or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
when there is no caps. The caps remain valid as long as <em class="parameter"><code>sample</code></em>
is
valid. If you need to hold on to the caps for longer than that,
take a ref to the caps with <a class="link" href="GstCaps.html#gst-caps-ref" title="gst_caps_ref ()"><code class="function">gst_caps_ref()</code></a>. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-sample-get-info"></a><h3>gst_sample_get_info ()</h3>
<pre class="programlisting">const <a class="link" href="GstStructure.html" title="GstStructure"><span class="returnvalue">GstStructure</span></a> *
gst_sample_get_info (<em class="parameter"><code><a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a> *sample</code></em>);</pre>
<p>Get extra information associated with <em class="parameter"><code>sample</code></em>
.</p>
<div class="refsect3">
<a name="gst-sample-get-info.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>sample</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-sample-get-info.returns"></a><h4>Returns</h4>
<p> the extra info of <em class="parameter"><code>sample</code></em>
.
The info remains valid as long as <em class="parameter"><code>sample</code></em>
is valid. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-sample-get-segment"></a><h3>gst_sample_get_segment ()</h3>
<pre class="programlisting"><a class="link" href="GstSegment.html" title="GstSegment"><span class="returnvalue">GstSegment</span></a> *
gst_sample_get_segment (<em class="parameter"><code><a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a> *sample</code></em>);</pre>
<p>Get the segment associated with <em class="parameter"><code>sample</code></em>
</p>
<div class="refsect3">
<a name="gst-sample-get-segment.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>sample</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-sample-get-segment.returns"></a><h4>Returns</h4>
<p> the segment of <em class="parameter"><code>sample</code></em>
.
The segment remains valid as long as <em class="parameter"><code>sample</code></em>
is valid. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-sample-set-buffer-list"></a><h3>gst_sample_set_buffer_list ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_sample_set_buffer_list (<em class="parameter"><code><a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a> *sample</code></em>,
<em class="parameter"><code><a class="link" href="GstBufferList.html" title="GstBufferList"><span class="type">GstBufferList</span></a> *buffer_list</code></em>);</pre>
<p>Set the buffer list associated with <em class="parameter"><code>sample</code></em>
</p>
<div class="refsect3">
<a name="gst-sample-set-buffer-list.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>sample</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer_list</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBufferList.html" title="GstBufferList"><span class="type">GstBufferList</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-sample-new"></a><h3>gst_sample_new ()</h3>
<pre class="programlisting"><a class="link" href="GstSample.html" title="GstSample"><span class="returnvalue">GstSample</span></a> *
gst_sample_new (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="GstCaps.html" title="GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>,
<em class="parameter"><code>const <a class="link" href="GstSegment.html" title="GstSegment"><span class="type">GstSegment</span></a> *segment</code></em>,
<em class="parameter"><code><a class="link" href="GstStructure.html" title="GstStructure"><span class="type">GstStructure</span></a> *info</code></em>);</pre>
<p>Create a new <a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a> with the provided details.</p>
<p>Free-function: gst_sample_unref</p>
<div class="refsect3">
<a name="gst-sample-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>, or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>caps</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstCaps.html" title="GstCaps"><span class="type">GstCaps</span></a>, or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>segment</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstSegment.html" title="GstSegment"><span class="type">GstSegment</span></a>, or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstStructure.html" title="GstStructure"><span class="type">GstStructure</span></a>, or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-sample-new.returns"></a><h4>Returns</h4>
<p> the new <a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a>. <a class="link" href="GstSample.html#gst-sample-unref" title="gst_sample_unref ()"><code class="function">gst_sample_unref()</code></a>
after usage. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-sample-ref"></a><h3>gst_sample_ref ()</h3>
<pre class="programlisting"><a class="link" href="GstSample.html" title="GstSample"><span class="returnvalue">GstSample</span></a> *
gst_sample_ref (<em class="parameter"><code><a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a> *sample</code></em>);</pre>
<p>Increases the refcount of the given sample by one.</p>
<div class="refsect3">
<a name="gst-sample-ref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>sample</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-sample-ref.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>sample</code></em>
. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-sample-unref"></a><h3>gst_sample_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_sample_unref (<em class="parameter"><code><a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a> *sample</code></em>);</pre>
<p>Decreases the refcount of the sample. If the refcount reaches 0, the
sample will be freed.</p>
<div class="refsect3">
<a name="gst-sample-unref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>sample</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-sample-copy"></a><h3>gst_sample_copy ()</h3>
<pre class="programlisting"><a class="link" href="GstSample.html" title="GstSample"><span class="returnvalue">GstSample</span></a> *
gst_sample_copy (<em class="parameter"><code>const <a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a> *buf</code></em>);</pre>
<p>Create a copy of the given sample. This will also make a newly allocated
copy of the data the source sample contains.</p>
<div class="refsect3">
<a name="gst-sample-copy.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-sample-copy.returns"></a><h4>Returns</h4>
<p> a new copy of <em class="parameter"><code>buf</code></em>
. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix08.html#api-index-1.2">1.2</a></p>
</div>
</div>
<div class="refsect1">
<a name="GstSample.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstSample-struct"></a><h3>GstSample</h3>
<pre class="programlisting">typedef struct _GstSample GstSample;</pre>
<p>The opaque structure of a <a class="link" href="GstSample.html" title="GstSample"><span class="type">GstSample</span></a>. A sample contains a typed memory
block and the associated timing information. It is mainly used to
exchange buffers with an application.</p>
</div>
</div>
<div class="refsect1">
<a name="GstSample.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>, <a class="link" href="GstCaps.html" title="GstCaps"><span class="type">GstCaps</span></a>, <a class="link" href="GstSegment.html" title="GstSegment"><span class="type">GstSegment</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>