Hi, If I don't use the
_______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
unsubscribe
_______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by BGraaf
On Fri, Feb 18, 2011 at 1:22 PM, Bernhard Graaf <[hidden email]> wrote:
> Hi, > > I'm a new gstreamer developer and have a small problem with a simple pipe. > If I'm use the pipe: > "gst-launch-0.10 -m dvbbasebin adapter=1 frequency=12544000 > program-numbers=17501 polarity=h symbol-rate=22000 ! tcpserversink > port=8080" > > Then I can see the program (for e.g. with vlc tcp://192.168.1.102:8080) > > If I try to do the same in C-code > -------- > int > main () > { > GMainLoop *loop; > > GstElement *pipeline, *source, *sink; > GstBus *bus; > > gst_init (NULL, NULL); > > loop = g_main_loop_new (NULL, FALSE); > > pipeline = gst_pipeline_new ("DVB-Streamer"); > source = gst_element_factory_make ("dvbbasebin", "dvb-source"); > sink = gst_element_factory_make ("tcpserversink", "tcp-output"); > > if (!pipeline || !source || !sink) { > g_printerr ("One element could not be created. Exiting.\n"); > if(!pipeline) g_printerr("Pipeline not created\n"); > else if(!source) g_printerr("Source not created\n"); > else if(!sink) g_printerr("Sink not created\n"); > return -1; > } > > g_object_set (G_OBJECT (source), "adapter", 1, NULL); > g_object_set (G_OBJECT (source), "frequency", 12544000, NULL); > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); So gst-inspect-0.10 tells me that the program-numbers property is a string with the following definition... program-numbers : Colon separated list of programs flags: readable, writable String. Default: "" Current: "" In your manual pipeline above you set it as a int 17501 instead of a string "17501". Does it work with the string version? Are these meant to be program names or process id's? Luis > g_object_set (G_OBJECT (source), "polarity", "h", NULL); > g_object_set (G_OBJECT (source), "symbol-rate", 22000, NULL); > g_object_set (G_OBJECT (sink), "port", 8080, NULL); > > bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); > gst_bus_add_watch (bus, bus_call, loop); > gst_object_unref (bus); > > gst_bin_add_many (GST_BIN (pipeline), > source, sink, NULL); > > gst_element_link (source, sink); > > g_print ("Now playing: "); > gst_element_set_state (pipeline, GST_STATE_PLAYING); > > g_print ("Running...\n"); > g_main_loop_run (loop); > > return 0; > } > > ---- > > I got the error: > > Now playing: Running... > Error: Interner Fehler im Datenfluss. > (sorry for the German error. it's call something like "Internal error in > data stream") > > If I don't use the > > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); > > It's running well, but I need this parameter > > Thanks a lot for helping!! > > > . > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Luis,
Yes, it seems to be correct, because if I use the value as 'int' I'll get a 'Segmentation fault' at runtime. But thanks a lot for answering!! -----Ursprüngliche Nachricht----- Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email] [mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]] Im Auftrag von Luis de Bethencourt Gesendet: Freitag, 18. Februar 2011 18:25 An: Discussion of the development of and with GStreamer Betreff: Re: dvbbasebin and tcpserversink On Fri, Feb 18, 2011 at 1:22 PM, Bernhard Graaf <[hidden email]> wrote: > Hi, > > I'm a new gstreamer developer and have a small problem with a simple pipe. > If I'm use the pipe: > "gst-launch-0.10 -m dvbbasebin adapter=1 frequency=12544000 > program-numbers=17501 polarity=h symbol-rate=22000 ! tcpserversink > port=8080" > > Then I can see the program (for e.g. with vlc tcp://192.168.1.102:8080) > > If I try to do the same in C-code > -------- > int > main () > { > GMainLoop *loop; > > GstElement *pipeline, *source, *sink; > GstBus *bus; > > gst_init (NULL, NULL); > > loop = g_main_loop_new (NULL, FALSE); > > pipeline = gst_pipeline_new ("DVB-Streamer"); > source = gst_element_factory_make ("dvbbasebin", "dvb-source"); > sink = gst_element_factory_make ("tcpserversink", "tcp-output"); > > if (!pipeline || !source || !sink) { > g_printerr ("One element could not be created. Exiting.\n"); > if(!pipeline) g_printerr("Pipeline not created\n"); > else if(!source) g_printerr("Source not created\n"); > else if(!sink) g_printerr("Sink not created\n"); > return -1; > } > > g_object_set (G_OBJECT (source), "adapter", 1, NULL); > g_object_set (G_OBJECT (source), "frequency", 12544000, NULL); > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); So gst-inspect-0.10 tells me that the program-numbers property is a string with the following definition... program-numbers : Colon separated list of programs flags: readable, writable String. Default: "" Current: "" In your manual pipeline above you set it as a int 17501 instead of a string "17501". Does it work with the string version? Are these meant to be program names or process id's? Luis > g_object_set (G_OBJECT (source), "polarity", "h", NULL); > g_object_set (G_OBJECT (source), "symbol-rate", 22000, NULL); > g_object_set (G_OBJECT (sink), "port", 8080, NULL); > > bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); > gst_bus_add_watch (bus, bus_call, loop); > gst_object_unref (bus); > > gst_bin_add_many (GST_BIN (pipeline), > source, sink, NULL); > > gst_element_link (source, sink); > > g_print ("Now playing: "); > gst_element_set_state (pipeline, GST_STATE_PLAYING); > > g_print ("Running...\n"); > g_main_loop_run (loop); > > return 0; > } > > ---- > > I got the error: > > Now playing: Running... > Error: Interner Fehler im Datenfluss. > (sorry for the German error. it's call something like "Internal error in > data stream") > > If I don't use the > > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); > > It's running well, but I need this parameter > > Thanks a lot for helping!! > > > . > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Luis,
not the right answer for your question: Yes it works with the pipe (I'm wondering also) giving the pipe a int value. It works with 17501 and "17501". -------- Original-Nachricht -------- > Datum: Fri, 18 Feb 2011 18:52:11 +0100 > Von: "Bernhard Graaf" <[hidden email]> > An: "\'Discussion of the development of and with GStreamer\'" <[hidden email]> > Betreff: AW: dvbbasebin and tcpserversink > Hi Luis, > > Yes, it seems to be correct, because if I use the value as 'int' I'll get > a > 'Segmentation fault' at runtime. > > But thanks a lot for answering!! > > -----Ursprüngliche Nachricht----- > Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email] > [mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]] > Im Auftrag von Luis de Bethencourt > Gesendet: Freitag, 18. Februar 2011 18:25 > An: Discussion of the development of and with GStreamer > Betreff: Re: dvbbasebin and tcpserversink > > On Fri, Feb 18, 2011 at 1:22 PM, Bernhard Graaf <[hidden email]> > wrote: > > Hi, > > > > I'm a new gstreamer developer and have a small problem with a simple > pipe. > > If I'm use the pipe: > > "gst-launch-0.10 -m dvbbasebin adapter=1 frequency=12544000 > > program-numbers=17501 polarity=h symbol-rate=22000 ! tcpserversink > > port=8080" > > > > Then I can see the program (for e.g. with vlc tcp://192.168.1.102:8080) > > > > If I try to do the same in C-code > > -------- > > int > > main () > > { > > GMainLoop *loop; > > > > GstElement *pipeline, *source, *sink; > > GstBus *bus; > > > > gst_init (NULL, NULL); > > > > loop = g_main_loop_new (NULL, FALSE); > > > > pipeline = gst_pipeline_new ("DVB-Streamer"); > > source = gst_element_factory_make ("dvbbasebin", > "dvb-source"); > > sink = gst_element_factory_make ("tcpserversink", > "tcp-output"); > > > > if (!pipeline || !source || !sink) { > > g_printerr ("One element could not be created. Exiting.\n"); > > if(!pipeline) g_printerr("Pipeline not created\n"); > > else if(!source) g_printerr("Source not created\n"); > > else if(!sink) g_printerr("Sink not created\n"); > > return -1; > > } > > > > g_object_set (G_OBJECT (source), "adapter", 1, NULL); > > g_object_set (G_OBJECT (source), "frequency", 12544000, NULL); > > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); > > So gst-inspect-0.10 tells me that the program-numbers property is a > string with the following definition... > program-numbers : Colon separated list of programs > flags: readable, writable > String. Default: "" Current: "" > > In your manual pipeline above you set it as a int 17501 instead of a > string "17501". > Does it work with the string version? > Are these meant to be program names or process id's? > > Luis > > > > g_object_set (G_OBJECT (source), "polarity", "h", NULL); > > g_object_set (G_OBJECT (source), "symbol-rate", 22000, NULL); > > g_object_set (G_OBJECT (sink), "port", 8080, NULL); > > > > bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); > > gst_bus_add_watch (bus, bus_call, loop); > > gst_object_unref (bus); > > > > gst_bin_add_many (GST_BIN (pipeline), > > source, sink, NULL); > > > > gst_element_link (source, sink); > > > > g_print ("Now playing: "); > > gst_element_set_state (pipeline, GST_STATE_PLAYING); > > > > g_print ("Running...\n"); > > g_main_loop_run (loop); > > > > return 0; > > } > > > > ---- > > > > I got the error: > > > > Now playing: Running... > > Error: Interner Fehler im Datenfluss. > > (sorry for the German error. it's call something like "Internal error in > > data stream") > > > > If I don't use the > > > > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); > > > > It's running well, but I need this parameter > > > > Thanks a lot for helping!! > > > > > > . > > > > _______________________________________________ > > gstreamer-devel mailing list > > [hidden email] > > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > > > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Luis de Bethencourt
Hi,
a new fact fort his problem: If I try to use the pipe "gst-launch-0.10 -m dvbbasebin adapter=1 frequency=12544000 program-numbers=17501 polarity=h symbol-rate=22000 ! tcpserversink port=8080" without the '-m', then a get the same error as in my C-Prog. Is there anyone who can tell what the '-m' do and how I can use it in my own prog? Thanks a lot for helping!!!! -----Ursprüngliche Nachricht----- Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email] [mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]] Im Auftrag von Luis de Bethencourt Gesendet: Freitag, 18. Februar 2011 18:25 An: Discussion of the development of and with GStreamer Betreff: Re: dvbbasebin and tcpserversink On Fri, Feb 18, 2011 at 1:22 PM, Bernhard Graaf <[hidden email]> wrote: > Hi, > > I'm a new gstreamer developer and have a small problem with a simple pipe. > If I'm use the pipe: > "gst-launch-0.10 -m dvbbasebin adapter=1 frequency=12544000 > program-numbers=17501 polarity=h symbol-rate=22000 ! tcpserversink > port=8080" > > Then I can see the program (for e.g. with vlc tcp://192.168.1.102:8080) > > If I try to do the same in C-code > -------- > int > main () > { > GMainLoop *loop; > > GstElement *pipeline, *source, *sink; > GstBus *bus; > > gst_init (NULL, NULL); > > loop = g_main_loop_new (NULL, FALSE); > > pipeline = gst_pipeline_new ("DVB-Streamer"); > source = gst_element_factory_make ("dvbbasebin", "dvb-source"); > sink = gst_element_factory_make ("tcpserversink", "tcp-output"); > > if (!pipeline || !source || !sink) { > g_printerr ("One element could not be created. Exiting.\n"); > if(!pipeline) g_printerr("Pipeline not created\n"); > else if(!source) g_printerr("Source not created\n"); > else if(!sink) g_printerr("Sink not created\n"); > return -1; > } > > g_object_set (G_OBJECT (source), "adapter", 1, NULL); > g_object_set (G_OBJECT (source), "frequency", 12544000, NULL); > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); So gst-inspect-0.10 tells me that the program-numbers property is a string with the following definition... program-numbers : Colon separated list of programs flags: readable, writable String. Default: "" Current: "" In your manual pipeline above you set it as a int 17501 instead of a string "17501". Does it work with the string version? Are these meant to be program names or process id's? Luis > g_object_set (G_OBJECT (source), "polarity", "h", NULL); > g_object_set (G_OBJECT (source), "symbol-rate", 22000, NULL); > g_object_set (G_OBJECT (sink), "port", 8080, NULL); > > bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); > gst_bus_add_watch (bus, bus_call, loop); > gst_object_unref (bus); > > gst_bin_add_many (GST_BIN (pipeline), > source, sink, NULL); > > gst_element_link (source, sink); > > g_print ("Now playing: "); > gst_element_set_state (pipeline, GST_STATE_PLAYING); > > g_print ("Running...\n"); > g_main_loop_run (loop); > > return 0; > } > > ---- > > I got the error: > > Now playing: Running... > Error: Interner Fehler im Datenfluss. > (sorry for the German error. it's call something like "Internal error in > data stream") > > If I don't use the > > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); > > It's running well, but I need this parameter > > Thanks a lot for helping!! > > > . > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
from 'man gst-launch-0.10'
-m, --messages Output messages posted on the pipeline's bus This shouldn't fix your problems but let you view a little bit of what is going. Also try debugging modes... http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-checklist-debug.html On Sun, Feb 20, 2011 at 9:25 AM, Bernhard Graaf <[hidden email]> wrote: > Hi, > > a new fact fort his problem: > If I try to use the pipe > "gst-launch-0.10 -m dvbbasebin adapter=1 frequency=12544000 > program-numbers=17501 polarity=h symbol-rate=22000 ! tcpserversink > port=8080" > without the '-m', then a get the same error as in my C-Prog. > Is there anyone who can tell what the '-m' do and how I can use it in my own > prog? > > Thanks a lot for helping!!!! > > -----Ursprüngliche Nachricht----- > Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email] > [mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]] > Im Auftrag von Luis de Bethencourt > Gesendet: Freitag, 18. Februar 2011 18:25 > An: Discussion of the development of and with GStreamer > Betreff: Re: dvbbasebin and tcpserversink > > On Fri, Feb 18, 2011 at 1:22 PM, Bernhard Graaf <[hidden email]> > wrote: >> Hi, >> >> I'm a new gstreamer developer and have a small problem with a simple pipe. >> If I'm use the pipe: >> "gst-launch-0.10 -m dvbbasebin adapter=1 frequency=12544000 >> program-numbers=17501 polarity=h symbol-rate=22000 ! tcpserversink >> port=8080" >> >> Then I can see the program (for e.g. with vlc tcp://192.168.1.102:8080) >> >> If I try to do the same in C-code >> -------- >> int >> main () >> { >> GMainLoop *loop; >> >> GstElement *pipeline, *source, *sink; >> GstBus *bus; >> >> gst_init (NULL, NULL); >> >> loop = g_main_loop_new (NULL, FALSE); >> >> pipeline = gst_pipeline_new ("DVB-Streamer"); >> source = gst_element_factory_make ("dvbbasebin", "dvb-source"); >> sink = gst_element_factory_make ("tcpserversink", "tcp-output"); >> >> if (!pipeline || !source || !sink) { >> g_printerr ("One element could not be created. Exiting.\n"); >> if(!pipeline) g_printerr("Pipeline not created\n"); >> else if(!source) g_printerr("Source not created\n"); >> else if(!sink) g_printerr("Sink not created\n"); >> return -1; >> } >> >> g_object_set (G_OBJECT (source), "adapter", 1, NULL); >> g_object_set (G_OBJECT (source), "frequency", 12544000, NULL); >> g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); > > So gst-inspect-0.10 tells me that the program-numbers property is a > string with the following definition... > program-numbers : Colon separated list of programs > flags: readable, writable > String. Default: "" Current: "" > > In your manual pipeline above you set it as a int 17501 instead of a > string "17501". > Does it work with the string version? > Are these meant to be program names or process id's? > > Luis > > >> g_object_set (G_OBJECT (source), "polarity", "h", NULL); >> g_object_set (G_OBJECT (source), "symbol-rate", 22000, NULL); >> g_object_set (G_OBJECT (sink), "port", 8080, NULL); >> >> bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); >> gst_bus_add_watch (bus, bus_call, loop); >> gst_object_unref (bus); >> >> gst_bin_add_many (GST_BIN (pipeline), >> source, sink, NULL); >> >> gst_element_link (source, sink); >> >> g_print ("Now playing: "); >> gst_element_set_state (pipeline, GST_STATE_PLAYING); >> >> g_print ("Running...\n"); >> g_main_loop_run (loop); >> >> return 0; >> } >> >> ---- >> >> I got the error: >> >> Now playing: Running... >> Error: Interner Fehler im Datenfluss. >> (sorry for the German error. it's call something like "Internal error in >> data stream") >> >> If I don't use the >> >> g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); >> >> It's running well, but I need this parameter >> >> Thanks a lot for helping!! >> >> >> . >> >> _______________________________________________ >> gstreamer-devel mailing list >> [hidden email] >> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel >> >> > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by BGraaf
On Fri, Feb 18, 2011 at 12:22 PM, Bernhard Graaf <[hidden email]> wrote:
> Hi, > > I'm a new gstreamer developer and have a small problem with a simple pipe. > If I'm use the pipe: > "gst-launch-0.10 -m dvbbasebin adapter=1 frequency=12544000 > program-numbers=17501 polarity=h symbol-rate=22000 ! tcpserversink > port=8080" > > Then I can see the program (for e.g. with vlc tcp://192.168.1.102:8080) > > If I try to do the same in C-code > -------- > int > main () > { > GMainLoop *loop; > > GstElement *pipeline, *source, *sink; > GstBus *bus; > > gst_init (NULL, NULL); > > loop = g_main_loop_new (NULL, FALSE); > > pipeline = gst_pipeline_new ("DVB-Streamer"); > source = gst_element_factory_make ("dvbbasebin", "dvb-source"); > sink = gst_element_factory_make ("tcpserversink", "tcp-output"); > > if (!pipeline || !source || !sink) { > g_printerr ("One element could not be created. Exiting.\n"); > if(!pipeline) g_printerr("Pipeline not created\n"); > else if(!source) g_printerr("Source not created\n"); > else if(!sink) g_printerr("Sink not created\n"); > return -1; > } > > g_object_set (G_OBJECT (source), "adapter", 1, NULL); > g_object_set (G_OBJECT (source), "frequency", 12544000, NULL); > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); > g_object_set (G_OBJECT (source), "polarity", "h", NULL); > g_object_set (G_OBJECT (source), "symbol-rate", 22000, NULL); > g_object_set (G_OBJECT (sink), "port", 8080, NULL); > > bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); > gst_bus_add_watch (bus, bus_call, loop); > gst_object_unref (bus); > > gst_bin_add_many (GST_BIN (pipeline), > source, sink, NULL); > > gst_element_link (source, sink); > > g_print ("Now playing: "); > gst_element_set_state (pipeline, GST_STATE_PLAYING); > > g_print ("Running...\n"); > g_main_loop_run (loop); > > return 0; > } > > ---- > > I got the error: > > Now playing: Running... > Error: Interner Fehler im Datenfluss. > (sorry for the German error. it's call something like "Internal error in > data stream") > > If I don't use the > > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); > > It's running well, but I need this parameter > > Thanks a lot for helping!! > > You need to connect to the sometimes pad generated by dvbbasebin. It will be named program_17501 Read the chapter http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-pads.html section 8.1.1 on how you connect to sometimes pads. gst-launch does this work behind the scenes and that is why it works in a gst-launch command line but not in your code. Zaheer _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Zaheer,
Thats sounds good! I will try it this evening and replay it to you Thanks a Lot for help! Gesendet mit BlackBerry von Vodafone -----Original Message----- From: Zaheer Merali <[hidden email]> Sender: gstreamer-devel-bounces+bernhard.graaf=[hidden email] Date: Tue, 22 Feb 2011 13:35:08 To: Discussion of the development of and with GStreamer<[hidden email]> Reply-To: Discussion of the development of and with GStreamer <[hidden email]> Cc: Bernhard Graaf<[hidden email]> Subject: Re: dvbbasebin and tcpserversink On Fri, Feb 18, 2011 at 12:22 PM, Bernhard Graaf <[hidden email]> wrote: > Hi, > > I'm a new gstreamer developer and have a small problem with a simple pipe. > If I'm use the pipe: > "gst-launch-0.10 -m dvbbasebin adapter=1 frequency=12544000 > program-numbers=17501 polarity=h symbol-rate=22000 ! tcpserversink > port=8080" > > Then I can see the program (for e.g. with vlc tcp://192.168.1.102:8080) > > If I try to do the same in C-code > -------- > int > main () > { > GMainLoop *loop; > > GstElement *pipeline, *source, *sink; > GstBus *bus; > > gst_init (NULL, NULL); > > loop = g_main_loop_new (NULL, FALSE); > > pipeline = gst_pipeline_new ("DVB-Streamer"); > source = gst_element_factory_make ("dvbbasebin", "dvb-source"); > sink = gst_element_factory_make ("tcpserversink", "tcp-output"); > > if (!pipeline || !source || !sink) { > g_printerr ("One element could not be created. Exiting.\n"); > if(!pipeline) g_printerr("Pipeline not created\n"); > else if(!source) g_printerr("Source not created\n"); > else if(!sink) g_printerr("Sink not created\n"); > return -1; > } > > g_object_set (G_OBJECT (source), "adapter", 1, NULL); > g_object_set (G_OBJECT (source), "frequency", 12544000, NULL); > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); > g_object_set (G_OBJECT (source), "polarity", "h", NULL); > g_object_set (G_OBJECT (source), "symbol-rate", 22000, NULL); > g_object_set (G_OBJECT (sink), "port", 8080, NULL); > > bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); > gst_bus_add_watch (bus, bus_call, loop); > gst_object_unref (bus); > > gst_bin_add_many (GST_BIN (pipeline), > source, sink, NULL); > > gst_element_link (source, sink); > > g_print ("Now playing: "); > gst_element_set_state (pipeline, GST_STATE_PLAYING); > > g_print ("Running...\n"); > g_main_loop_run (loop); > > return 0; > } > > ---- > > I got the error: > > Now playing: Running... > Error: Interner Fehler im Datenfluss. > (sorry for the German error. it's call something like "Internal error in > data stream") > > If I don't use the > > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); > > It's running well, but I need this parameter > > Thanks a lot for helping!! > > You need to connect to the sometimes pad generated by dvbbasebin. It will be named program_17501 Read the chapter http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-pads.html section 8.1.1 on how you connect to sometimes pads. gst-launch does this work behind the scenes and that is why it works in a gst-launch command line but not in your code. Zaheer _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Zaheer,
Sorry for late answering! I tried to understand your proposal, but I don't understand that. I take a lock with the gst-inspect command at dvbbasebin, but I couldn't see anything about the pad (pad: none). But I had tried to follow the docs. That's my code, but it doesn't work (that the problem if I should do something without any understanding): ---------------------- #include <stdio.h> #include <unistd.h> #include <gst/gst.h> #include <glib.h> static gboolean bus_call (GstBus *bus, GstMessage *msg, gpointer data) { GMainLoop *loop = (GMainLoop *) data; switch (GST_MESSAGE_TYPE (msg)) { case GST_MESSAGE_EOS: g_print ("End of stream\n"); g_main_loop_quit (loop); break; case GST_MESSAGE_ERROR: { gchar *debug; GError *error; gst_message_parse_error (msg, &error, &debug); g_free (debug); g_printerr ("Error: %s\n", error->message); g_error_free (error); g_main_loop_quit (loop); break; } default: break; } return TRUE; } static void on_pad_added (GstElement *element, GstPad *pad, gpointer data) { GstPad *sourcepad; GstElement *source = (GstElement *) data; gchar *name; name = gst_pad_get_name (pad); g_print ("A new pad %s was created\n", name); g_free (name); sourcepad = gst_element_get_static_pad (source, "program_17501"); gst_pad_link (pad, sourcepad); gst_object_unref (sourcepad); } int main () { GMainLoop *loop; GstElement *pipeline, *source, *sink; GstBus *bus; gst_init (0, NULL); loop = g_main_loop_new (NULL, FALSE); pipeline = gst_pipeline_new ("DVB-Streamer"); source = gst_element_factory_make ("dvbbasebin", "dvb-source"); sink = gst_element_factory_make ("tcpserversink", "tcp-output"); if (!pipeline || !source || !sink) { g_printerr ("One element could not be created. Exiting.\n"); if(!pipeline) g_printerr("Pipeline not created\n"); else if(!source) g_printerr("Source not created\n"); else if(!sink) g_printerr("Sink not created\n"); return -1; } g_object_set (G_OBJECT (source), "adapter", 1, NULL); g_object_set (G_OBJECT (source), "frequency", 12544000, NULL); g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); g_object_set (G_OBJECT (source), "polarity", "h", NULL); g_object_set (G_OBJECT (source), "symbol-rate", 22000, NULL); g_object_set (G_OBJECT (sink), "port", 8080, NULL); bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); gst_bus_add_watch (bus, bus_call, loop); gst_object_unref (bus); gst_bin_add_many (GST_BIN (pipeline), source, sink, NULL); gst_element_link (source, sink); gst_element_link_pads (source, "src", sink, "sink"); g_signal_connect (source, "program_17501", G_CALLBACK (on_pad_added), source); g_print ("Now playing: "); gst_element_set_state (pipeline, GST_STATE_PLAYING); g_print ("Running...\n"); g_main_loop_run (loop); return 0; } --------------------- (Sorry for that big mail) Hop you can help me!!!!!! Regards Bernhard -----Ursprüngliche Nachricht----- Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email] [mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]] Im Auftrag von Bernhard Graaf Gesendet: Dienstag, 22. Februar 2011 14:43 An: Discussion of the development of and with GStreamer Betreff: AW: Re: dvbbasebin and tcpserversink Hi Zaheer, Thats sounds good! I will try it this evening and replay it to you Thanks a Lot for help! Gesendet mit BlackBerry von Vodafone -----Original Message----- From: Zaheer Merali <[hidden email]> Sender: gstreamer-devel-bounces+bernhard.graaf=[hidden email] Date: Tue, 22 Feb 2011 13:35:08 To: Discussion of the development of and with GStreamer<[hidden email]> Reply-To: Discussion of the development of and with GStreamer <[hidden email]> Cc: Bernhard Graaf<[hidden email]> Subject: Re: dvbbasebin and tcpserversink On Fri, Feb 18, 2011 at 12:22 PM, Bernhard Graaf <[hidden email]> wrote: > Hi, > > I'm a new gstreamer developer and have a small problem with a simple pipe. > If I'm use the pipe: > "gst-launch-0.10 -m dvbbasebin adapter=1 frequency=12544000 > program-numbers=17501 polarity=h symbol-rate=22000 ! tcpserversink > port=8080" > > Then I can see the program (for e.g. with vlc tcp://192.168.1.102:8080) > > If I try to do the same in C-code > -------- > int > main () > { > GMainLoop *loop; > > GstElement *pipeline, *source, *sink; > GstBus *bus; > > gst_init (NULL, NULL); > > loop = g_main_loop_new (NULL, FALSE); > > pipeline = gst_pipeline_new ("DVB-Streamer"); > source = gst_element_factory_make ("dvbbasebin", "dvb-source"); > sink = gst_element_factory_make ("tcpserversink", "tcp-output"); > > if (!pipeline || !source || !sink) { > g_printerr ("One element could not be created. Exiting.\n"); > if(!pipeline) g_printerr("Pipeline not created\n"); > else if(!source) g_printerr("Source not created\n"); > else if(!sink) g_printerr("Sink not created\n"); > return -1; > } > > g_object_set (G_OBJECT (source), "adapter", 1, NULL); > g_object_set (G_OBJECT (source), "frequency", 12544000, NULL); > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); > g_object_set (G_OBJECT (source), "polarity", "h", NULL); > g_object_set (G_OBJECT (source), "symbol-rate", 22000, NULL); > g_object_set (G_OBJECT (sink), "port", 8080, NULL); > > bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); > gst_bus_add_watch (bus, bus_call, loop); > gst_object_unref (bus); > > gst_bin_add_many (GST_BIN (pipeline), > source, sink, NULL); > > gst_element_link (source, sink); > > g_print ("Now playing: "); > gst_element_set_state (pipeline, GST_STATE_PLAYING); > > g_print ("Running...\n"); > g_main_loop_run (loop); > > return 0; > } > > ---- > > I got the error: > > Now playing: Running... > Error: Interner Fehler im Datenfluss. > (sorry for the German error. it's call something like "Internal error in > data stream") > > If I don't use the > > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); > > It's running well, but I need this parameter > > Thanks a lot for helping!! > > will be named program_17501 Read the chapter http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter -pads.html section 8.1.1 on how you connect to sometimes pads. gst-launch does this work behind the scenes and that is why it works in a gst-launch command line but not in your code. Zaheer _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel hallo_world6.c (3K) Download Attachment |
Is there anybody, who can help me?
-----Ursprüngliche Nachricht----- Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email] [mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]] Im Auftrag von Bernhard Graaf Gesendet: Freitag, 8. April 2011 11:32 An: [hidden email]; 'Discussion of the development of and with GStreamer' Betreff: AW: Re: dvbbasebin and tcpserversink Hi Zaheer, Sorry for late answering! I tried to understand your proposal, but I don't understand that. I take a lock with the gst-inspect command at dvbbasebin, but I couldn't see anything about the pad (pad: none). But I had tried to follow the docs. That's my code, but it doesn't work (that the problem if I should do something without any understanding): ---------------------- #include <stdio.h> #include <unistd.h> #include <gst/gst.h> #include <glib.h> static gboolean bus_call (GstBus *bus, GstMessage *msg, gpointer data) { GMainLoop *loop = (GMainLoop *) data; switch (GST_MESSAGE_TYPE (msg)) { case GST_MESSAGE_EOS: g_print ("End of stream\n"); g_main_loop_quit (loop); break; case GST_MESSAGE_ERROR: { gchar *debug; GError *error; gst_message_parse_error (msg, &error, &debug); g_free (debug); g_printerr ("Error: %s\n", error->message); g_error_free (error); g_main_loop_quit (loop); break; } default: break; } return TRUE; } static void on_pad_added (GstElement *element, GstPad *pad, gpointer data) { GstPad *sourcepad; GstElement *source = (GstElement *) data; gchar *name; name = gst_pad_get_name (pad); g_print ("A new pad %s was created\n", name); g_free (name); sourcepad = gst_element_get_static_pad (source, "program_17501"); gst_pad_link (pad, sourcepad); gst_object_unref (sourcepad); } int main () { GMainLoop *loop; GstElement *pipeline, *source, *sink; GstBus *bus; gst_init (0, NULL); loop = g_main_loop_new (NULL, FALSE); pipeline = gst_pipeline_new ("DVB-Streamer"); source = gst_element_factory_make ("dvbbasebin", "dvb-source"); sink = gst_element_factory_make ("tcpserversink", "tcp-output"); if (!pipeline || !source || !sink) { g_printerr ("One element could not be created. Exiting.\n"); if(!pipeline) g_printerr("Pipeline not created\n"); else if(!source) g_printerr("Source not created\n"); else if(!sink) g_printerr("Sink not created\n"); return -1; } g_object_set (G_OBJECT (source), "adapter", 1, NULL); g_object_set (G_OBJECT (source), "frequency", 12544000, NULL); g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); g_object_set (G_OBJECT (source), "polarity", "h", NULL); g_object_set (G_OBJECT (source), "symbol-rate", 22000, NULL); g_object_set (G_OBJECT (sink), "port", 8080, NULL); bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); gst_bus_add_watch (bus, bus_call, loop); gst_object_unref (bus); gst_bin_add_many (GST_BIN (pipeline), source, sink, NULL); gst_element_link (source, sink); gst_element_link_pads (source, "src", sink, "sink"); g_signal_connect (source, "program_17501", G_CALLBACK (on_pad_added), source); g_print ("Now playing: "); gst_element_set_state (pipeline, GST_STATE_PLAYING); g_print ("Running...\n"); g_main_loop_run (loop); return 0; } --------------------- (Sorry for that big mail) Hop you can help me!!!!!! Regards Bernhard -----Ursprüngliche Nachricht----- Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email] [mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]] Im Auftrag von Bernhard Graaf Gesendet: Dienstag, 22. Februar 2011 14:43 An: Discussion of the development of and with GStreamer Betreff: AW: Re: dvbbasebin and tcpserversink Hi Zaheer, Thats sounds good! I will try it this evening and replay it to you Thanks a Lot for help! Gesendet mit BlackBerry von Vodafone -----Original Message----- From: Zaheer Merali <[hidden email]> Sender: gstreamer-devel-bounces+bernhard.graaf=[hidden email] Date: Tue, 22 Feb 2011 13:35:08 To: Discussion of the development of and with GStreamer<[hidden email]> Reply-To: Discussion of the development of and with GStreamer <[hidden email]> Cc: Bernhard Graaf<[hidden email]> Subject: Re: dvbbasebin and tcpserversink On Fri, Feb 18, 2011 at 12:22 PM, Bernhard Graaf <[hidden email]> wrote: > Hi, > > I'm a new gstreamer developer and have a small problem with a simple pipe. > If I'm use the pipe: > "gst-launch-0.10 -m dvbbasebin adapter=1 frequency=12544000 > program-numbers=17501 polarity=h symbol-rate=22000 ! tcpserversink > port=8080" > > Then I can see the program (for e.g. with vlc tcp://192.168.1.102:8080) > > If I try to do the same in C-code > -------- > int > main () > { > GMainLoop *loop; > > GstElement *pipeline, *source, *sink; > GstBus *bus; > > gst_init (NULL, NULL); > > loop = g_main_loop_new (NULL, FALSE); > > pipeline = gst_pipeline_new ("DVB-Streamer"); > source = gst_element_factory_make ("dvbbasebin", "dvb-source"); > sink = gst_element_factory_make ("tcpserversink", "tcp-output"); > > if (!pipeline || !source || !sink) { > g_printerr ("One element could not be created. Exiting.\n"); > if(!pipeline) g_printerr("Pipeline not created\n"); > else if(!source) g_printerr("Source not created\n"); > else if(!sink) g_printerr("Sink not created\n"); > return -1; > } > > g_object_set (G_OBJECT (source), "adapter", 1, NULL); > g_object_set (G_OBJECT (source), "frequency", 12544000, NULL); > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); > g_object_set (G_OBJECT (source), "polarity", "h", NULL); > g_object_set (G_OBJECT (source), "symbol-rate", 22000, NULL); > g_object_set (G_OBJECT (sink), "port", 8080, NULL); > > bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); > gst_bus_add_watch (bus, bus_call, loop); > gst_object_unref (bus); > > gst_bin_add_many (GST_BIN (pipeline), > source, sink, NULL); > > gst_element_link (source, sink); > > g_print ("Now playing: "); > gst_element_set_state (pipeline, GST_STATE_PLAYING); > > g_print ("Running...\n"); > g_main_loop_run (loop); > > return 0; > } > > ---- > > I got the error: > > Now playing: Running... > Error: Interner Fehler im Datenfluss. > (sorry for the German error. it's call something like "Internal error in > data stream") > > If I don't use the > > g_object_set (G_OBJECT (source), "program-numbers", "17501", NULL); > > It's running well, but I need this parameter > > Thanks a lot for helping!! > > You need to connect to the sometimes pad generated by dvbbasebin. It will be named program_17501 Read the chapter http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter -pads.html section 8.1.1 on how you connect to sometimes pads. gst-launch does this work behind the scenes and that is why it works in a gst-launch command line but not in your code. Zaheer _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |