dvbbasebin and tcpserversink
Luis de Bethencourt
luis at debethencourt.com
Fri Feb 18 09:25:24 PST 2011
On Fri, Feb 18, 2011 at 1:22 PM, Bernhard Graaf <bernhard.graaf at gmx.de> 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
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list