mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
manual: use CDATA for code blocks
then we don't have to escape special token anymore.
This commit is contained in:
parent
cadfeb2cd3
commit
cc43752c3c
1 changed files with 12 additions and 6 deletions
|
@ -703,8 +703,10 @@ main (gint argc,
|
||||||
Note how we use the pull mode method of pushing new buffers into
|
Note how we use the pull mode method of pushing new buffers into
|
||||||
appsrc although appsrc is running in push mode.
|
appsrc although appsrc is running in push mode.
|
||||||
</para>
|
</para>
|
||||||
<programlisting><!-- example-begin appsrc.c -->
|
<programlisting>
|
||||||
#include <gst/gst.h>
|
<!-- example-begin appsrc.c -->
|
||||||
|
<![CDATA[
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
static GMainLoop *loop;
|
static GMainLoop *loop;
|
||||||
|
|
||||||
|
@ -733,7 +735,7 @@ cb_need_data (GstElement *appsrc,
|
||||||
|
|
||||||
timestamp += GST_BUFFER_DURATION (buffer);
|
timestamp += GST_BUFFER_DURATION (buffer);
|
||||||
|
|
||||||
g_signal_emit_by_name (appsrc, "push-buffer", buffer, &ret);
|
g_signal_emit_by_name (appsrc, "push-buffer", buffer, &ret);
|
||||||
|
|
||||||
if (ret != GST_FLOW_OK) {
|
if (ret != GST_FLOW_OK) {
|
||||||
/* something wrong, stop pushing */
|
/* something wrong, stop pushing */
|
||||||
|
@ -748,7 +750,7 @@ main (gint argc,
|
||||||
GstElement *pipeline, *appsrc, *conv, *videosink;
|
GstElement *pipeline, *appsrc, *conv, *videosink;
|
||||||
|
|
||||||
/* init GStreamer */
|
/* init GStreamer */
|
||||||
gst_init (&argc, &argv);
|
gst_init (&argc, &argv);
|
||||||
loop = g_main_loop_new (NULL, FALSE);
|
loop = g_main_loop_new (NULL, FALSE);
|
||||||
|
|
||||||
/* setup pipeline */
|
/* setup pipeline */
|
||||||
|
@ -784,8 +786,10 @@ main (gint argc,
|
||||||
g_main_loop_unref (loop);
|
g_main_loop_unref (loop);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
<!-- example-end appsrc.c --></programlisting>
|
]]>
|
||||||
|
<!-- example-end appsrc.c -->
|
||||||
|
</programlisting>
|
||||||
</sect3>
|
</sect3>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
@ -1081,6 +1085,7 @@ main (int argc, char *argv[])
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
/*
|
/*
|
||||||
* Here, you would write the actual plugin code.
|
* Here, you would write the actual plugin code.
|
||||||
*/
|
*/
|
||||||
|
@ -1113,6 +1118,7 @@ my_code_init (void)
|
||||||
|
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</sect1>
|
</sect1>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
Loading…
Reference in a new issue