Hi, I am really new to gstreamer and I am trying to play an .avi file
(for a start). I am able to play the file with gst-launch filesrc location=something.avi ! avidemux name=demuxer demuxer. ! queue ! ffdec_mpeg4 ! ffmpegcolorspace ! sdlvideosink demuxer. ! queue ! mad ! audioconvert ! audioresample ! osssink But I need to do that in a program, so I tried to rewrite it to the code. Here is what I have now (argv[1] is the name of input .avi): ----------- code begins ------------ GMainLoop *loop; GstElement *pipeline, *source, *demuxer, *decoder, *conv,*mpeg_decoder,*mpeg_space, *video_sink,*audio_decoder,*audio_convert,*audio_resample,*audio_sink,*video_bin, *audio_bin, *video_queue,*audio_queue; GstBus *bus; /* Initialisation */ gst_init(&argc, &argv); loop = g_main_loop_new(NULL, FALSE); /* Create gstreamer elements */ pipeline = gst_pipeline_new ("video-player"); source = gst_element_factory_make ("filesrc", "file-source"); // source demuxer = gst_element_factory_make ("avidemux", "avi-demuxer"); // demuxer video_queue = gst_element_factory_make("queue","video_queue"); // video fronta mpeg_decoder = gst_element_factory_make ("ffdec_mpeg4", "mpeg-decoder"); // mpeg decoder mpeg_space = gst_element_factory_make ("ffmpegcolorspace", "color-space"); // color space video_sink = gst_element_factory_make("sdlvideosink", "video_sink"); // vykreslovac audio_queue = gst_element_factory_make("queue","audio_queue"); audio_decoder = gst_element_factory_make ("mad", "audio-decoder"); audio_convert = gst_element_factory_make ("audioconvert", "audio-convert"); audio_resample = gst_element_factory_make("audioresample", "audio_resample"); audio_sink = gst_element_factory_make ("autoaudiosink", "audio-sink"); if (!pipeline || !source || !mpeg_decoder || !mpeg_space || !video_sink || !audio_decoder || !audio_convert || !audio_resample || !audio_sink || !video_queue || !audio_queue){ g_printerr ("One element could not be created. Exiting.\n"); return -1; } /* we set the input filename to the source element */ g_object_set (G_OBJECT (source), "location", argv[1], NULL); video_bin = gst_pipeline_new ("video_bin"); gst_bin_add_many (GST_BIN (video_bin),video_queue, mpeg_decoder, mpeg_space, video_sink, NULL); gst_element_link_many (mpeg_decoder, video_queue,mpeg_space,video_sink, NULL); audio_bin = gst_pipeline_new ("audio_bin"); gst_bin_add_many (GST_BIN (audio_bin), audio_queue,audio_decoder, audio_convert,audio_resample,audio_sink, NULL); gst_element_link_many ( audio_decoder, audio_queue,audio_convert,audio_resample,audio_sink, NULL); /* we add a message handler */ 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,demuxer,NULL); gst_element_link(source,demuxer); gst_bin_add (GST_BIN (pipeline), video_bin); gst_bin_add (GST_BIN (pipeline), audio_bin); gst_element_link(demuxer,video_bin); gst_element_link(demuxer,audio_bin); /* Set the pipeline to "playing" state*/ g_print ("Now playing: %s\n", argv[1]); gst_element_set_state (pipeline, GST_STATE_PLAYING); /* Iterate */ g_print ("Running...\n"); g_main_loop_run (loop); /* Out of the main loop, clean up nicely */ g_print ("Returned, stopping playback\n"); gst_element_set_state (pipeline, GST_STATE_NULL); g_print ("Deleting pipeline\n"); gst_object_unref (GST_OBJECT (pipeline)); ----------- code ends -------------- But this does not work, I always end with this error: gstavidemux.c(3779): gst_avi_demux_loop (): /GstPipeline:video-player/GstAviDemux:avi-demuxer:\nstreaming stopped, reason not-linked" Or, more precisely from the stderr: ---- log begins ----- 0:00:16.645434576 [336m10637[00m 0x7fa59c000b50 [37mLOG [00m [00;01;35m GST_SCHEDULING gstpad.c:4069:gst_pad_push:<avi-demuxer:video_00>[00m pushing, but it was not linked 0:00:16.645442485 [336m10637[00m 0x7fa59c000b50 [37mLOG [00m [00m avidemux gstavidemux.c:3363:gst_avi_demux_combine_flows:<avi-demuxer>[00m cobined return not-linked 0:00:16.645450229 [336m10637[00m 0x7fa59c000b50 [36mDEBUG[00m [00m avidemux gstavidemux.c:3466:gst_avi_demux_process_next_entry:<avi-demuxer>[00m Processed buffer 3: not-linked 0:00:16.645458033 [336m10637[00m 0x7fa59c000b50 [36mDEBUG[00m [00m avidemux gstavidemux.c:3474:gst_avi_demux_process_next_entry:<avi-demuxer>[00m returning not-linked 0:00:16.645464954 [336m10637[00m 0x7fa59c000b50 [32;01mINFO [00m [00m avidemux gstavidemux.c:3736:gst_avi_demux_loop:[00m stream_movi flow: not-linked 0:00:16.645472746 [336m10637[00m 0x7fa59c000b50 [37mLOG [00m [00m avidemux gstavidemux.c:3752:gst_avi_demux_loop:<avi-demuxer>[00m pausing task, reason not-linked 0:00:16.645481639 [336m10637[00m 0x7fa59c000b50 [36mDEBUG[00m [00;01;37;41m GST_PADS gstpad.c:4768:gst_pad_pause_task:<avi-demuxer:sink>[00m pause task 0:00:16.645491405 [336m10637[00m 0x7fa59c000b50 [36mDEBUG[00m [00m task gsttask.c:476:gst_task_pause:<task2>[00m Pausing task 0x9c7940 0:00:16.645609511 [336m10637[00m 0x7fa59c000b50 [33;01mWARN [00m [00m avidemux gstavidemux.c:3779:gst_avi_demux_loop:<avi-demuxer>[00m error: Vnitřní chyba datového proudu. 0:00:16.645619223 [336m10637[00m 0x7fa59c000b50 [33;01mWARN [00m [00m avidemux gstavidemux.c:3779:gst_avi_demux_loop:<avi-demuxer>[00m error: streaming stopped, reason not-linked 0:00:16.645631090 [336m10637[00m 0x7fa59c000b50 [36mDEBUG[00m [00;04m default gstelement.c:1644:gst_element_message_full:<avi-demuxer>[00m start->1 0:00:16.645691274 [336m10637[00m 0x7fa59c000b50 [32;01mINFO [00m [00;01;31;47m GST_ERROR_SYSTEM gstelement.c:1675:gst_element_message_full:<avi-demuxer>[00m posting message: Vnitřní chyba datového proudu. 0:00:16.645704961 [336m10637[00m 0x7fa59c000b50 [37mLOG [00m [00;01;37;41m GST_MESSAGE gstmessage.c:204:gst_message_init:[00m new message 0x92f6c0 0:00:16.645713569 [336m10637[00m 0x7fa59c000b50 [37mLOG [00m [00;01;37;41m GST_MESSAGE gstmessage.c:289:gst_message_new_custom:[00m source avi-demuxer: creating new message 0x92f6c0 error 0:00:16.645740710 [336m10637[00m 0x7fa59c000b50 [36mDEBUG[00m [00;43m GST_BUS gstbus.c:337:gst_bus_post:<bus0>[00m [msg 0x92f6c0] posting on bus, type error, GstMessageError, gerror=(GstGError)(NULL), debug=(string)"gstavidemux.c\(3779\):\ gst_avi_demux_loop\ \(\):\ /GstPipeline:video-player/GstAviDemux:avi-demuxer:\012streaming\ stopped\,\ reason\ not-linked"; from source <avi-demuxer> 0:00:16.645759690 [336m10637[00m 0x7fa59c000b50 [36mDEBUG[00m [00;01m bin gstbin.c:2729:gst_bin_handle_message_func:<video-player>[00m [msg 0x92f6c0] handling child avi-demuxer message of type error ---- log ends ------ Linked against gstreamer v. 0.10.21-42.pm.2, gstreamer-plugins-good v. 0.10.7-38.1 on Opensuse 11 x86-64, 2.6.25.16-0.1-default There is definitely something, what I am doing wrong, but I am unable to find it... Thanks in advance ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
2008/10/12 Štěpán <[hidden email]>
Hi, I am really new to gstreamer and I am trying to play an .avi file You can't link the demuxer to your output bins like that. The demuxer uses 'sometimes' pads. Reading this you certainly help you: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-pads.html
-- Thiago Sousa Santos Embedded Systems and Pervasive Computing Lab (Embedded) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Štěpán Rezek
Hi,
thanks very much for your answer, I studied the given part of manual and found, that somebody before me was facing similar problem. So, I rewrote the code and now it looks like this: -------------- code begins ------------------- #include <gst/gst.h> #include <glib.h> #include <string.h> static GstElement *source, *demuxer, *vdqueue, *adqueue, *vdsink, *adsink, *decvd, *decad; void on_pad_added (GstElement *element, GstPad *pad) { gchar *name; name = gst_pad_get_name (pad); g_debug ("A new pad %s was created\n", name); GstCaps *caps; GstStructure *str; caps = gst_pad_get_caps (pad); g_assert (caps != NULL); str = gst_caps_get_structure (caps, 0); g_assert (str != NULL); if (g_strrstr (gst_structure_get_name (str), "video")) { g_debug ("Linking video pad to dec_vd"); // Link it actually GstPad *targetsink = gst_element_get_pad (decvd, "sink"); g_assert (targetsink != NULL); gst_pad_link (pad, targetsink); gst_object_unref (targetsink); } if (g_strrstr (gst_structure_get_name (str), "audio")) { g_debug ("Linking audio pad to dec_ad"); // Link it actually GstPad *targetsink = gst_element_get_pad (decad, "sink"); g_assert (targetsink != NULL); gst_pad_link (pad, targetsink); gst_object_unref (targetsink); } gst_caps_unref (caps); } 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_printerr ("Error: %s (%s) \n", error->message, debug); g_free (debug); g_error_free (error); g_main_loop_quit (loop); break; } default: break; } return TRUE; } int main (int argc, char *argv[]) { GMainLoop *loop; GstElement *pipeline; GstBus *bus; /* Initialisation */ gst_init (&argc, &argv); loop = g_main_loop_new (NULL, FALSE); /* Check input arguments */ if (argc != 2) { g_printerr ("Usage: %s <AVI filename>\n", argv[0]); return -1; } /* Create gstreamer elements */ pipeline = gst_pipeline_new ("media-player"); source = gst_element_factory_make ("filesrc", "file-source"); demuxer = gst_element_factory_make ("avidemux", "avi-demuxer"); decvd = gst_element_factory_make ("ffdec_mpeg4", "video-decoder"); decad = gst_element_factory_make ("mad", "mp3-decoder"); vdsink = gst_element_factory_make ("autovideosink", "video-sink"); vdqueue = gst_element_factory_make ("queue", "video-queue"); adqueue = gst_element_factory_make ("queue", "audio-queue"); adsink = gst_element_factory_make ("alsasink", "audio-sink"); if (!pipeline || !source || !demuxer || !decvd || !decad || !vdsink || !vdqueue || !adqueue || !adsink) { g_printerr ("One element could not be created. Exiting.\n"); return -1; } /* Set up the pipeline */ /* we set the input filename to the source element */ g_object_set (G_OBJECT (source), "location", argv[1], NULL); /* we add a message handler */ 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, demuxer, decvd, decad, adqueue, vdqueue, vdsink, adsink, NULL); gst_element_link (source, demuxer); gst_element_link (decvd, vdqueue); gst_element_link (vdqueue, vdsink); gst_element_link (decad, adqueue); gst_element_link (adqueue, adsink); g_signal_connect (demuxer, "pad-added", G_CALLBACK (on_pad_added), NULL); /* Set the pipeline to "playing" state*/ g_print ("Now playing: %s\n", argv[1]); gst_element_set_state (pipeline, GST_STATE_PLAYING); /* Iterate */ g_print ("Running...\n"); g_main_loop_run (loop); /* Out of the main loop, clean up nicely */ g_print ("Returned, stopping playback\n"); gst_element_set_state (pipeline, GST_STATE_NULL); g_print ("Deleting pipeline\n"); gst_object_unref (GST_OBJECT (pipeline)); return 0; } ------------ code ends ------------ Now, it does not give me "not-linked", but "not-negotiated" error. More detailed: Now playing: something.avi Running... ** (srtk:15847): DEBUG: A new pad video_00 was created ** (srtk:15847): DEBUG: Linking video pad to dec_vd ** (srtk:15847): DEBUG: A new pad audio_00 was created ** (srtk:15847): DEBUG: Linking audio pad to dec_ad Error: Internal data stream error. (gstavidemux.c(4115): gst_avi_demux_loop (): /GstPipeline:media-player/GstAviDemux:avi-demuxer: streaming stopped, reason not-negotiated) Returned, stopping playback Deleting pipeline My .avi is: something.avi: RIFF (little-endian) data, AVI, 640 x 272, 25.00 fps, video: DivX 4, audio: MPEG-1 Layer 3 (stereo, 48000 Hz) So, I am still stuck :) Thank you, Stepan ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Sun, Oct 12, 2008 at 6:22 PM, Štěpán <[hidden email]> wrote:
> Hi, > thanks very much for your answer, I studied the given part of manual > and found, that somebody before me was facing similar problem. So, I > rewrote the code and now it looks like this: You probably need audioconvert between mad and alsasink. -- Felipe Contreras ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Thanks for your answer, I added
adconvert = gst_element_factory_make ("audioconvert", "audioconvert"); and changed linking to gst_element_link (decad, adconvert); gst_element_link (adconvert, adqueue); gst_element_link (adqueue, adsink); but still the same problem (gstavidemux.c(4115): gst_avi_demux_loop (): /GstPipeline:media-player/GstAviDemux:avi-demuxer: streaming stopped, reason not-negotiated). I still cannot find what "not-negotiated" stand for. Does this means, that the avidemux and ffmpeg cannot cope because of video format? Or is this something else? Thanks, Stepan Felipe Contreras napsal(a): > On Sun, Oct 12, 2008 at 6:22 PM, Štěpán <[hidden email]> wrote: > >> Hi, >> thanks very much for your answer, I studied the given part of manual >> and found, that somebody before me was facing similar problem. So, I >> rewrote the code and now it looks like this: >> > > You probably need audioconvert between mad and alsasink. > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Sun, Oct 12, 2008 at 7:04 PM, Štěpán <[hidden email]> wrote:
> Thanks for your answer, I added > > adconvert = gst_element_factory_make ("audioconvert", "audioconvert"); > > and changed linking to > > gst_element_link (decad, adconvert); > gst_element_link (adconvert, adqueue); > gst_element_link (adqueue, adsink); > > but still the same problem (gstavidemux.c(4115): gst_avi_demux_loop (): > /GstPipeline:media-player/GstAviDemux:avi-demuxer: > streaming stopped, reason not-negotiated). > > I still cannot find what "not-negotiated" stand for. Does this means, > that the avidemux and ffmpeg cannot cope because of video format? Or is > this something else? It meas the caps of two elements didn't match. Take a look at what you are doing: gst-launch-0.10 filesrc ! avidemux name=d d. ! ffdec_mpeg4 ! queue ! autovideosink d. ! mad ! audioconvert ! queue ! alsasink Does that look right? -- Felipe Contreras ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Ah, thank you. I am now able to run the program without errors,
"ffmpegcolorspace" was missing. So, my code is following: ... pipeline = gst_pipeline_new ("media-player"); source = gst_element_factory_make ("filesrc", "file-source"); demuxer = gst_element_factory_make ("avidemux", "avi-demuxer"); decvd = gst_element_factory_make ("ffdec_mpeg4", "video-decoder"); vcolorspace = gst_element_factory_make ("ffmpegcolorspace", "color-space"); decad = gst_element_factory_make ("mad", "mp3-decoder"); vdsink = gst_element_factory_make ("autovideosink", "video-sink"); vdqueue = gst_element_factory_make ("queue", "video-queue"); adqueue = gst_element_factory_make ("queue", "audio-queue"); adconvert = gst_element_factory_make ("audioconvert", "audioconvert"); adsink = gst_element_factory_make ("alsasink", "audio-sink"); ... gst_element_link (source, demuxer); gst_element_link (decvd, vcolorspace); gst_element_link (vcolorspace, vdqueue); gst_element_link (vdqueue, vdsink); gst_element_link (decad, adconvert); gst_element_link (adconvert, adqueue); gst_element_link (adqueue, adsink); g_signal_connect (demuxer, "pad-added", G_CALLBACK (on_pad_added), NULL); The (hopefully last) problem I have now is that I cannot see and hear anything. More precisely, If I remove the part for video, then I can hear the audio. If I remove the part for audio, I can see the video - but I cannot hear and see both. Is there something I forgot about? Again, thanks for your valuable help, Stepan Felipe Contreras napsal(a): > On Sun, Oct 12, 2008 at 7:04 PM, Štěpán <[hidden email]> wrote: > >> Thanks for your answer, I added >> >> adconvert = gst_element_factory_make ("audioconvert", "audioconvert"); >> >> and changed linking to >> >> gst_element_link (decad, adconvert); >> gst_element_link (adconvert, adqueue); >> gst_element_link (adqueue, adsink); >> >> but still the same problem (gstavidemux.c(4115): gst_avi_demux_loop (): >> /GstPipeline:media-player/GstAviDemux:avi-demuxer: >> streaming stopped, reason not-negotiated). >> >> I still cannot find what "not-negotiated" stand for. Does this means, >> that the avidemux and ffmpeg cannot cope because of video format? Or is >> this something else? >> > > It meas the caps of two elements didn't match. > > Take a look at what you are doing: > gst-launch-0.10 filesrc ! avidemux name=d d. ! ffdec_mpeg4 ! queue ! > autovideosink d. ! mad ! audioconvert ! queue ! alsasink > > Does that look right? > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Sun, Oct 12, 2008 at 8:19 PM, Štěpán <[hidden email]> wrote:
> Ah, thank you. I am now able to run the program without errors, > "ffmpegcolorspace" was missing. So, my code is following: > > ... > pipeline = gst_pipeline_new ("media-player"); > source = gst_element_factory_make ("filesrc", "file-source"); > demuxer = gst_element_factory_make ("avidemux", "avi-demuxer"); > decvd = gst_element_factory_make ("ffdec_mpeg4", "video-decoder"); > vcolorspace = gst_element_factory_make ("ffmpegcolorspace", "color-space"); > > decad = gst_element_factory_make ("mad", "mp3-decoder"); > vdsink = gst_element_factory_make ("autovideosink", "video-sink"); > vdqueue = gst_element_factory_make ("queue", "video-queue"); > > adqueue = gst_element_factory_make ("queue", "audio-queue"); > adconvert = gst_element_factory_make ("audioconvert", "audioconvert"); > adsink = gst_element_factory_make ("alsasink", "audio-sink"); > ... > gst_element_link (source, demuxer); > > gst_element_link (decvd, vcolorspace); > gst_element_link (vcolorspace, vdqueue); > gst_element_link (vdqueue, vdsink); > > gst_element_link (decad, adconvert); > gst_element_link (adconvert, adqueue); > gst_element_link (adqueue, adsink); > > g_signal_connect (demuxer, "pad-added", G_CALLBACK (on_pad_added), NULL); > > The (hopefully last) problem I have now is that I cannot see and hear > anything. More precisely, If I remove the part for video, then I can > hear the audio. If I remove the part for audio, I can see the video - > but I cannot hear and see both. Is there something I forgot about? Take a closer look, your queues are in the wrong places. -- Felipe Contreras ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Last problem solved, my compliments to you! Just for future reference,
the correct order is gst_element_link (vdqueue, decvd); gst_element_link (decvd, vcolorspace); gst_element_link (vcolorspace, vdsink); gst_element_link (adqueue, decad); gst_element_link (decad, adconvert); gst_element_link (adconvert, adsink); I am going to focus on plugin writing, my aim now is to write a cairo-based plugin which overlays a graphics on a video stream. I know, it will be a long run, but I can try it at least. Stepan Felipe Contreras napsal(a): > On Sun, Oct 12, 2008 at 8:19 PM, Štěpán <[hidden email]> wrote: > >> Ah, thank you. I am now able to run the program without errors, >> "ffmpegcolorspace" was missing. So, my code is following: >> >> ... >> pipeline = gst_pipeline_new ("media-player"); >> source = gst_element_factory_make ("filesrc", "file-source"); >> demuxer = gst_element_factory_make ("avidemux", "avi-demuxer"); >> decvd = gst_element_factory_make ("ffdec_mpeg4", "video-decoder"); >> vcolorspace = gst_element_factory_make ("ffmpegcolorspace", "color-space"); >> >> decad = gst_element_factory_make ("mad", "mp3-decoder"); >> vdsink = gst_element_factory_make ("autovideosink", "video-sink"); >> vdqueue = gst_element_factory_make ("queue", "video-queue"); >> >> adqueue = gst_element_factory_make ("queue", "audio-queue"); >> adconvert = gst_element_factory_make ("audioconvert", "audioconvert"); >> adsink = gst_element_factory_make ("alsasink", "audio-sink"); >> ... >> gst_element_link (source, demuxer); >> >> gst_element_link (decvd, vcolorspace); >> gst_element_link (vcolorspace, vdqueue); >> gst_element_link (vdqueue, vdsink); >> >> gst_element_link (decad, adconvert); >> gst_element_link (adconvert, adqueue); >> gst_element_link (adqueue, adsink); >> >> g_signal_connect (demuxer, "pad-added", G_CALLBACK (on_pad_added), NULL); >> >> The (hopefully last) problem I have now is that I cannot see and hear >> anything. More precisely, If I remove the part for video, then I can >> hear the audio. If I remove the part for audio, I can see the video - >> but I cannot hear and see both. Is there something I forgot about? >> > > Take a closer look, your queues are in the wrong places. > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Sunday 12 October 2008 19:48:56 Štěpán wrote:
> my aim now is to write a > cairo-based plugin which overlays a graphics on a video stream. I know, > it will be a long run, but I can try it at least. Perhaps you'd be better off using Pigment ( https://code.fluendo.com/pigment/trac ). Docs are not too great (yet) and API is still somewhat in flux, but it already integrates cairo with gstreamer. Regards, Arnout -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: D206 D44B 5155 DF98 550D 3F2A 2213 88AA A1C7 C933 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |