<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hello all,<br>
<br>
I have a problem which is similar to Bernhards (I guess, due to my
limited GS knowledge) ...<br>
The best approach to describe my problem maybe is to create a very
simple example pipeline <br>
like this one:<br>
<br>
"gst-launch-0.10 v4l2src ! queue ! xvimagesink pulsesrc ! queue !
pulsesink"<br>
<br>
<br>
AFAIK one would implement this like the following (<b>pseudo-code</b>)<br>
<br>
bin = gst_pipeline_new("Pipeline");<br>
v4l2src = gst_element_factory_make ("v4l2src", "videosrc");<br>
queue = gst_element_factory_make ("queue", "queue");<br>
xvimagesink = gst_element_factory_make ("xvimagesink", "xvimagesink");<br>
pulsesrc = gst_element_factory_make ("pulsesrc", "audiosrc");<br>
queue2 = gst_element_factory_make ("queue", "queue2");<br>
pulsesink = gst_element_factory_make ("pulsesink", "audiosink");<br>
<br>
Now:<br>
<br>
gst_bin_add_many(GST_BIN(bin), v4l2src, queue, xvimagesink, pulsesrc,
queue2, pulsesink, NULL);<br>
<br>
In the next step one would link the elements and that's when I get
confused - You don't actually "link" the<br>
imagesink to the pulsesrc - How do you implement this pipeline?<br>
<br>
gst_element_link_many(v4l2src, queue, xvimagesink, pulsesrc, queue2,
pulsesink, NULL);<br>
<br>
Doesn't work and produces a SegFault...<br>
<br>
<br>
Thanks in advance, cheers - Florian<br>
<br>
<br>
On 06/03/2011 12:20 PM, Bernhard Graaf wrote:
<blockquote cite="mid:D1006747917C44E183F85CBF86E79735@BernhardPC"
type="cite">
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<div class="Section1">
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">Hi,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">I need help
to generate my own ‚C’-Program
from a running pipe:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">gst-launch-0.10
tcpclientsrc host='192.168.1.3'
port=8080 ! mpegtsdemux name=demux ! queue ! mpeg2dec ! xvimagesink
force-aspect-ratio=TRUE demux. ! queue ! mad ! alsasink<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">With this
pipe, I have no problem. It’s running
very well.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">But if I try
to compile this pipe in my own program,
I’ll get no results.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">-----------------------------<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">#include
<stdio.h><o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">#include
<unistd.h><o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">#include
<gst/gst.h><o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">#include
<glib.h><o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">GstElement
*tv_pipe,
*tv_source, *tv_mux, *tv_queue, *tv_v_dec, *tv_v_sink, *tv_a_dec,
*tv_a_sink;<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">GstBus
*tv_bus;<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">GMainLoop
*loop;<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">static
gboolean<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">tv_bus_call
(GstBus
*tmp_bus,<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
GstMessage
*msg,<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gpointer
data)<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">{<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
GMainLoop
*loop = (GMainLoop *) data;<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
switch
(GST_MESSAGE_TYPE (msg)) {<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
case GST_MESSAGE_EOS:<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
g_print
("End of stream\n");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
break;<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
case GST_MESSAGE_ERROR: {<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gchar
*debug;<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
GError
*error;<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gst_message_parse_error
(msg, &error, &debug);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
g_free
(debug);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
g_printerr
("Error: %s\n", error->message);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
g_error_free
(error);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
break;<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
}<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
default:<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
break;<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"> }<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
return
TRUE;<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">}<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">int
init_gst()<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">{<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gst_init
(0, NULL);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
loop =
g_main_loop_new (NULL, FALSE);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
tv_pipe =
gst_pipeline_new ("TV-Stream");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
if(!tv_pipe) g_printerr("TV-Stream-Pipeline not created\n");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
tv_source = gst_element_factory_make ("tcpclientsrc",
"tv-source");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
if(!tv_source) g_printerr("TV-Source not created\n");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
tv_mux = gst_element_factory_make
("mpegtsdemux", "tv-mux");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
if(!tv_mux) g_printerr("TV-Mux not created\n");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
tv_queue = gst_element_factory_make ("queue",
"tv-queue");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
if(!tv_queue) g_printerr("TV-Queue not created\n");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
tv_v_dec = gst_element_factory_make
("mpeg2dec", "tv-v-dec");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
if(!tv_v_dec) g_printerr("TV-Video-Dec not created\n");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
tv_v_sink = gst_element_factory_make
("xvimagesink", "tv-v-sink");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
if(!tv_v_sink) g_printerr("TV-Video-Sink not created\n");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
tv_a_dec = gst_element_factory_make ("mad",
"tv-a-dec");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
if(!tv_a_dec) g_printerr("TV-Audio-Dec not created\n");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
tv_a_sink = gst_element_factory_make
("alsasink", "tv-a-sink");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
if(!tv_a_sink) g_printerr("TV-Audio-Sink not created\n");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
tv_bus =
gst_pipeline_get_bus (GST_PIPELINE (tv_pipe));<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gst_bus_add_watch (tv_bus, tv_bus_call, loop);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gst_object_unref (tv_bus);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gst_bin_add_many (GST_BIN (tv_pipe), tv_source, tv_mux, tv_queue,
tv_v_dec,
tv_v_sink, tv_a_dec, tv_a_sink, NULL);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gst_element_link (tv_source, tv_mux);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gst_element_link (tv_mux, tv_queue);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gst_element_link (tv_queue, tv_v_dec);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gst_element_link (tv_v_dec, tv_v_sink);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gst_element_link (tv_queue, tv_a_dec);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gst_element_link (tv_a_dec, tv_a_sink);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
return 1;<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">}<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">int
send_tv()<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">{<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gst_element_set_state (tv_pipe, GST_STATE_NULL); <o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
g_object_set (G_OBJECT (tv_source), "host", "192.168.1.3",
NULL);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
g_object_set (G_OBJECT (tv_source), "port", 8080, NULL);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
g_print
("Now playing: TV\n");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
gst_element_set_state (tv_pipe, GST_STATE_PLAYING);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
g_print
("Running...\n");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
return 0;<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">}<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">int
main()<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">{<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
if(!tv_pipe) init_gst();<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
send_tv();<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
g_main_loop_run (loop);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">
return(1);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";" lang="EN-US">}<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">-------------------------<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">I there
anybody how can tell me what’s wrong
with this program?<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">Thank’s a
lot for helping!!!!<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">Bernhard<o:p></o:p></span></font></p>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>