GstCaps filter issue
Sérgio Agostinho
sergio.r.agostinho at gmail.com
Thu Jul 23 01:10:51 PDT 2015
Hi,
You're setting a caps filter of type audio/x-raw between the filesource and
the typefind element, but the demuxer you selected (oggdemux) does not
support that on its sink pad.
What are you trying to do?
Cheers
2015-07-23 2:57 GMT+02:00 doon <don-prog at mail.ru>:
> I trying to create filter using caps:
> * GMainLoop *loop;
> GstElement *pipeline, *source, *demuxer, *decoder,
> *typefind, *conv,
> *sink;;
> GstBus *bus;
> guint bus_watch_id;
>
>
> loop = g_main_loop_new(NULL, FALSE);
>
> pipeline = gst_pipeline_new ("audio-player");
> source = gst_element_factory_make ("filesrc",
> "file-source");
> typefind = gst_element_factory_make ("typefind",
> "typefinder");
> demuxer = gst_element_factory_make ("oggdemux",
> "ogg-demuxer");
> decoder = gst_element_factory_make ("vorbisdec",
> "vorbis-decoder");
> conv = gst_element_factory_make ("audioconvert",
> "converter");
> sink = gst_element_factory_make ("autoaudiosink",
> "audio-output");
>
> if (!pipeline || !source || !demuxer || !decoder || !conv
> || !sink) {
> g_printerr ("Не удалось создать один из элементов
> конвейера. Работа
> приложения завершена.\n");
> return -1;
> }
> g_signal_connect (typefind, "have-type", G_CALLBACK
> (cb_typefound), loop);
> g_object_set(G_OBJECT(source), "location", name_of_file,
> NULL);
>
> bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline));
> bus_watch_id = gst_bus_add_watch(bus, bus_call, loop);
> gst_object_unref(bus);
>
> gst_bin_add_many(GST_BIN(pipeline), source, typefind,
> demuxer, decoder,
> conv, sink, NULL);
>
> GstCaps *my_caps = gst_caps_new_simple
> ("audio/x-raw","rate", G_TYPE_INT,
> 384,NULL);
>
>
> gboolean test=false;
> test = gst_element_link_filtered(source,typefind, my_caps);
> test = gst_element_link(typefind, demuxer);
> test = gst_element_link_many(decoder, conv,sink, NULL);
>
>
> g_signal_connect(demuxer, "pad-added",
> G_CALLBACK(on_pad_added),
> decoder);*
>
> But get error:
> *Debug: gsttypefindelement.c(1169): gst_type_find_element_loop ():
> /GstPipeline:a
> udio-player/GstTypeFindElement:typefinder:
> stream stopped, reason not-linked*
>
> Var test == 1 after gst_element_link_filtered(source,typefind, my_caps);
> test == 0 after gst_element_link(typefind, demuxer);
> test == 1 after gst_element_link_many(decoder, conv,sink, NULL);
> If I just change gst_element_link_filtered on gst_element_link all going ok
> and file plays.
> What am I doing wrong?
>
>
>
> --
> View this message in context:
> http://gstreamer-devel.966125.n4.nabble.com/GstCaps-filter-issue-tp4672796.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150723/1a4b8d33/attachment.html>
More information about the gstreamer-devel
mailing list