Problem with scaletempo
Stefan Sauer
ensonic at hora-obscura.de
Tue Apr 17 13:37:58 PDT 2012
On 04/17/2012 01:05 PM, padam wrote:
> Stefan, i have edited my first post.
>
> And here you can see how i build pipeline
This works for me:
gst-launch playbin2 uri=file://$HOME/Music/1.mp3 audio-sink="scaletempo
! audioconvert ! audioresample ! autoaudiosink"
the code below is not complete and thus not enough to reproduce. If you
like some help then please follow my advice and post a complete code
snippet, that can be run.
Stefan
> Player.loop = g_main_loop_new(NULL, FALSE);
> Player.pipeline = gst_element_factory_make("playbin2", "player");
>
> GstCaps *caps;
> GstElement *filter;
> GstElement *format, *resample, *asink;
> GstPad *ghostpad;
> Player.scaletempo = gst_element_factory_make("scaletempo", "scaletempo");
> Player.sink = gst_element_factory_make ("autovideosink", "sink");
>
>
> caps = gst_caps_new_simple ("video/x-raw-rgb",
> "width", G_TYPE_INT, 384,
> "height", G_TYPE_INT, 288,
> "framerate", GST_TYPE_FRACTION, 25, 1,
> "bpp", G_TYPE_INT, 16,
> "depth", G_TYPE_INT, 16,
> "endianness", G_TYPE_INT, G_BYTE_ORDER,
> NULL);
>
> gst_caps_unref(caps);
>
> filter = Player.scaletempo;
> g_object_set(G_OBJECT(Player.pipeline), "video-sink", Player.sink,
> (void*)NULL);
>
> Player.audioSink = gst_bin_new("audioline");
> gst_bin_add(GST_BIN(Player.audioSink), Player.scaletempo);
> MAKE_ELEMENT(Player.audioSink, format, "audioconvert", "format");
> MAKE_ELEMENT(Player.audioSink, resample, "audioresample", "resample");
> MAKE_ELEMENT(Player.audioSink, asink, "autoaudiosink", "audio_sink");
> LINK_ELEMENTS(Player.scaletempo, format);
> LINK_ELEMENTS(format, resample);
> LINK_ELEMENTS(resample, asink);
>
> ghostpad = gst_element_get_pad (filter, "sink");
> gst_element_add_pad (Player.audioSink, gst_ghost_pad_new ("sink",
> ghostpad));
> gst_object_unref (ghostpad);
>
> g_object_set (G_OBJECT (Player.pipeline), "audio-sink", Player.audioSink,
> (void*)NULL);
> MAKE_ELEMENT(NULL, Player.scalerate_line, "autoaudiosink",
> "scaling_audio_sink");
> g_object_ref (Player.audioSink);
> g_object_ref (Player.scalerate_line);
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Problem-with-scaletempo-tp4561625p4564397.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
More information about the gstreamer-devel
mailing list