/usr/share/gtk-doc/html/gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstaudiocdsrc.html is in gstreamer1.0-plugins-base-doc 1.2.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gstaudiocdsrc</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual">
<link rel="up" href="gstreamer-audio.html" title="Audio Library">
<link rel="prev" href="gst-plugins-base-libs-gstaudiometa.html" title="gstaudiometa">
<link rel="next" href="gst-plugins-base-libs-gstaudioclock.html" title="gstaudioclock">
<meta name="generator" content="GTK-Doc V1.19 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="gst-plugins-base-libs-gstaudiometa.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="gstreamer-audio.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GStreamer Base Plugins 1.0 Library Reference Manual</th>
<td><a accesskey="n" href="gst-plugins-base-libs-gstaudioclock.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gst-plugins-base-libs-gstaudiocdsrc.synopsis" class="shortcut">Top</a>
|
<a href="#gst-plugins-base-libs-gstaudiocdsrc.description" class="shortcut">Description</a>
|
<a href="#gst-plugins-base-libs-gstaudiocdsrc.object-hierarchy" class="shortcut">Object Hierarchy</a>
|
<a href="#gst-plugins-base-libs-gstaudiocdsrc.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
|
<a href="#gst-plugins-base-libs-gstaudiocdsrc.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry">
<a name="gst-plugins-base-libs-gstaudiocdsrc"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gst-plugins-base-libs-gstaudiocdsrc.top_of_page"></a>gstaudiocdsrc</span></h2>
<p>gstaudiocdsrc — Base class for Audio CD sources</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gst-plugins-base-libs-gstaudiocdsrc.synopsis"></a><h2>Synopsis</h2>
<a name="GstAudioCdSrc"></a><pre class="synopsis">
#include <gst/audio/gstaudiocdsrc.h>
struct <a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrc-struct" title="struct GstAudioCdSrc">GstAudioCdSrc</a>;
struct <a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrcClass" title="struct GstAudioCdSrcClass">GstAudioCdSrcClass</a>;
struct <a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrcTrack" title="struct GstAudioCdSrcTrack">GstAudioCdSrcTrack</a>;
enum <a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrcMode" title="enum GstAudioCdSrcMode">GstAudioCdSrcMode</a>;
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#gst-audio-cd-src-add-track" title="gst_audio_cd_src_add_track ()">gst_audio_cd_src_add_track</a> (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrc"><span class="type">GstAudioCdSrc</span></a> *src</code></em>,
<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrcTrack" title="struct GstAudioCdSrcTrack"><span class="type">GstAudioCdSrcTrack</span></a> *track</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gstaudiocdsrc.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+----<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
+----<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html">GstObject</a>
+----<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html">GstElement</a>
+----<a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstBaseSrc.html">GstBaseSrc</a>
+----<a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstPushSrc.html">GstPushSrc</a>
+----GstAudioCdSrc
</pre>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gstaudiocdsrc.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GstAudioCdSrc implements
<a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstUriHandler.html#GstURIHandler">GstURIHandler</a>.</p>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gstaudiocdsrc.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrc--device" title='The "device" property'>device</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
"<a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrc--mode" title='The "mode" property'>mode</a>" <a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrcMode" title="enum GstAudioCdSrcMode"><span class="type">GstAudioCdSrcMode</span></a> : Read / Write
"<a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrc--track" title='The "track" property'>track</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write
</pre>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gstaudiocdsrc.description"></a><h2>Description</h2>
<p>
</p>
<p>
Provides a base class for CD digital audio (CDDA) sources, which handles
things like seeking, querying, discid calculation, tags, and buffer
timestamping.
</p>
<p>
</p>
<div class="refsect2">
<a name="id-1.2.6.5.7.2.2"></a><h3>Using GstAudioCdSrc-based elements in applications</h3>
<p>
GstAudioCdSrc registers two <a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a>s of its own, namely
the "track" format and the "sector" format. Applications will usually
only find the "track" format interesting. You can retrieve that <a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a>
for use in seek events or queries with gst_format_get_by_nick("track").
</p>
<p>
In order to query the number of tracks, for example, an application would
set the CDDA source element to READY or PAUSED state and then query the
the number of tracks via <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#gst-element-query-duration"><code class="function">gst_element_query_duration()</code></a> using the track
format acquired above. Applications can query the currently playing track
in the same way.
</p>
<p>
Alternatively, applications may retrieve the currently playing track and
the total number of tracks from the taglist that will posted on the bus
whenever the CD is opened or the currently playing track changes. The
taglist will contain GST_TAG_TRACK_NUMBER and GST_TAG_TRACK_COUNT tags.
</p>
<p>
Applications playing back CD audio using playbin and cdda://n URIs should
issue a seek command in track format to change between tracks, rather than
setting a new cdda://n+1 URI on playbin (as setting a new URI on playbin
involves closing and re-opening the CD device, which is much much slower).
</p>
<div class="refsect2"><a name="id-1.2.6.5.7.2.2.6"></a></div>
<p>
CDDA sources will automatically emit a number of tags, details about which
can be found in the libgsttag documentation. Those tags are:
<a class="link" href="gst-plugins-base-libs-gsttag.html#GST-TAG-CDDA-CDDB-DISCID:CAPS" title="GST_TAG_CDDA_CDDB_DISCID"><span class="type">GST_TAG_CDDA_CDDB_DISCID</span></a>, <a class="link" href="gst-plugins-base-libs-gsttag.html#GST-TAG-CDDA-CDDB-DISCID-FULL:CAPS" title="GST_TAG_CDDA_CDDB_DISCID_FULL"><span class="type">GST_TAG_CDDA_CDDB_DISCID_FULL</span></a>,
<a class="link" href="gst-plugins-base-libs-gsttag.html#GST-TAG-CDDA-MUSICBRAINZ-DISCID:CAPS" title="GST_TAG_CDDA_MUSICBRAINZ_DISCID"><span class="type">GST_TAG_CDDA_MUSICBRAINZ_DISCID</span></a>, <a class="link" href="gst-plugins-base-libs-gsttag.html#GST-TAG-CDDA-MUSICBRAINZ-DISCID-FULL:CAPS" title="GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL"><span class="type">GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL</span></a>,
among others.
</p>
</div>
<p>
</p>
<hr>
<div class="refsect2">
<a name="id-1.2.6.5.7.2.3"></a><h3>Tracks and Table of Contents (TOC)</h3>
<p>
Applications will be informed of the available tracks via a TOC message
on the pipeline's <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBus.html"><span class="type">GstBus</span></a>. The <a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstToc.html#GstToc"><span class="type">GstToc</span></a> will contain a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstToc.html#GstTocEntry"><span class="type">GstTocEntry</span></a> for
each track, with information about each track. The duration for each
track can be retrieved via the <a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstTagList.html#GST-TAG-DURATION:CAPS"><span class="type">GST_TAG_DURATION</span></a> tag from each entry's
tag list, or calculated via <a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstToc.html#gst-toc-entry-get-start-stop-times"><code class="function">gst_toc_entry_get_start_stop_times()</code></a>.
The track entries in the TOC will be sorted by track number.
</p>
</div>
<p>
</p>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gstaudiocdsrc.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GstAudioCdSrc-struct"></a><h3>struct GstAudioCdSrc</h3>
<pre class="programlisting">struct GstAudioCdSrc;</pre>
</div>
<hr>
<div class="refsect2">
<a name="GstAudioCdSrcClass"></a><h3>struct GstAudioCdSrcClass</h3>
<pre class="programlisting">struct GstAudioCdSrcClass {
GstPushSrcClass pushsrc_class;
/* open/close the CD device */
gboolean (*open) (GstAudioCdSrc *src, const gchar *device);
void (*close) (GstAudioCdSrc *src);
/* read one sector (LBA) */
GstBuffer * (*read_sector) (GstAudioCdSrc *src, gint sector);
#if 0
/* return default device or NULL (optional) */
gchar * (*get_default_device) (GstAudioCdSrc *src);
/* return NULL-terminated string array of CD devices, or NULL (optional) */
/* FIXME 0.11: reconsider for new probing/device discovery API, remove if in doubt */
gchar ** (*probe_devices) (GstAudioCdSrc *src);
#endif
};
</pre>
<p>
Audio CD source base class.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><span class="type">GstPushSrcClass</span> <em class="structfield"><code><a name="GstAudioCdSrcClass.pushsrc-class"></a>pushsrc_class</code></em>;</span></p></td>
<td>the parent class</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstAudioCdSrcClass.open"></a>open</code></em> ()</span></p></td>
<td>opening the device</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstAudioCdSrcClass.close"></a>close</code></em> ()</span></p></td>
<td>closing the device</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstAudioCdSrcClass.read-sector"></a>read_sector</code></em> ()</span></p></td>
<td>reading a sector</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstAudioCdSrcClass.get-default-device"></a>get_default_device</code></em> ()</span></p></td>
<td>getting the default device</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstAudioCdSrcClass.probe-devices"></a>probe_devices</code></em> ()</span></p></td>
<td>probing possible devices</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GstAudioCdSrcTrack"></a><h3>struct GstAudioCdSrcTrack</h3>
<pre class="programlisting">struct GstAudioCdSrcTrack {
gboolean is_audio; /* TRUE if this is an audio track */
guint num; /* real track number (usually starts from 1) */
guint start; /* first sector of track (LBA, not LSN!) */
guint end; /* last sector of track (LBA, not LSN!) */
GstTagList *tags; /* NULL or tags for track (e.g. from cd-text) */
};
</pre>
<p>
CD track abstraction to communicate TOC entries to the base class.
</p>
<p>
This structure is only for use by sub-classed in connection with
<a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#gst-audio-cd-src-add-track" title="gst_audio_cd_src_add_track ()"><code class="function">gst_audio_cd_src_add_track()</code></a>.
</p>
<p>
Applications will be informed of the available tracks via a TOC message
on the pipeline's <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBus.html"><span class="type">GstBus</span></a> instead.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="GstAudioCdSrcTrack.is-audio"></a>is_audio</code></em>;</span></p></td>
<td>Whether this is an audio track</td>
</tr>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstAudioCdSrcTrack.num"></a>num</code></em>;</span></p></td>
<td>Track number in TOC (usually starts from 1, but not always)</td>
</tr>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstAudioCdSrcTrack.start"></a>start</code></em>;</span></p></td>
<td>The first sector of this track (LBA)</td>
</tr>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstAudioCdSrcTrack.end"></a>end</code></em>;</span></p></td>
<td>The last sector of this track (LBA)</td>
</tr>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstTagList.html#GstTagList"><span class="type">GstTagList</span></a> *<em class="structfield"><code><a name="GstAudioCdSrcTrack.tags"></a>tags</code></em>;</span></p></td>
<td>Track-specific tags (e.g. from cd-text information), or NULL</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GstAudioCdSrcMode"></a><h3>enum GstAudioCdSrcMode</h3>
<pre class="programlisting">typedef enum {
GST_AUDIO_CD_SRC_MODE_NORMAL, /* stream = one track */
GST_AUDIO_CD_SRC_MODE_CONTINUOUS /* stream = whole disc */
} GstAudioCdSrcMode;
</pre>
<p>
Mode in which the CD audio source operates. Influences timestamping,
EOS handling and seeking.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="GST-AUDIO-CD-SRC-MODE-NORMAL:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_CD_SRC_MODE_NORMAL</code></span></p></td>
<td>each single track is a stream
</td>
</tr>
<tr>
<td><p><a name="GST-AUDIO-CD-SRC-MODE-CONTINUOUS:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_CD_SRC_MODE_CONTINUOUS</code></span></p></td>
<td>the entire disc is a single stream
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-audio-cd-src-add-track"></a><h3>gst_audio_cd_src_add_track ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_audio_cd_src_add_track (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrc"><span class="type">GstAudioCdSrc</span></a> *src</code></em>,
<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrcTrack" title="struct GstAudioCdSrcTrack"><span class="type">GstAudioCdSrcTrack</span></a> *track</code></em>);</pre>
<p>
CDDA sources use this function from their start vfunc to announce the
available data and audio tracks to the base source class. The caller
should allocate <em class="parameter"><code>track</code></em> on the stack, the base source will do a shallow
copy of the structure (and take ownership of the taglist if there is one).
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
<td>a <a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrc"><span class="type">GstAudioCdSrc</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>track</code></em> :</span></p></td>
<td>address of <a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrcTrack" title="struct GstAudioCdSrcTrack"><span class="type">GstAudioCdSrcTrack</span></a> to add</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>FALSE on error, otherwise TRUE.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gstaudiocdsrc.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GstAudioCdSrc--device"></a><h3>The <code class="literal">"device"</code> property</h3>
<pre class="programlisting"> "device" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre>
<p>CD device location.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="GstAudioCdSrc--mode"></a><h3>The <code class="literal">"mode"</code> property</h3>
<pre class="programlisting"> "mode" <a class="link" href="gst-plugins-base-libs-gstaudiocdsrc.html#GstAudioCdSrcMode" title="enum GstAudioCdSrcMode"><span class="type">GstAudioCdSrcMode</span></a> : Read / Write</pre>
<p>Mode.</p>
<p>Default value: Stream consists of a single track</p>
</div>
<hr>
<div class="refsect2">
<a name="GstAudioCdSrc--track"></a><h3>The <code class="literal">"track"</code> property</h3>
<pre class="programlisting"> "track" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre>
<p>Track.</p>
<p>Allowed values: [1,99]</p>
<p>Default value: 1</p>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.19</div>
</body>
</html>
|