# HG changeset patch # User rosfran # Date 1174340622 0 # Node ID 0d3d926bc3741079e38ed2d30475db0964a00a45 # Parent 5c9b6b51eb56ef7efd0602c2dc342565fd9bf14a [svn r419] Fixed compilation problem when compiling to the Maemo platform. diff -r 5c9b6b51eb56 -r 0d3d926bc374 maemo-ui/src/mmyth_tvplayer.c --- a/maemo-ui/src/mmyth_tvplayer.c Mon Mar 19 20:08:55 2007 +0000 +++ b/maemo-ui/src/mmyth_tvplayer.c Mon Mar 19 21:43:42 2007 +0000 @@ -243,10 +243,10 @@ GstElement *videodec, *videosink; GstElement *videocolortrs; #ifndef MAEMO_PLATFORM - GstElement *audiodec, *audioconv; + GstElement *audiodec, *audioconv, *audioqueue2; #endif GstElement *audiosink; - GstElement *videoqueue1, *videoqueue2, *audioqueue1, *audioqueue2; + GstElement *videoqueue1, *videoqueue2, *audioqueue1; g_debug ("MMythTVPlayer: Setting the Gstreamer pipeline\n"); @@ -267,18 +267,18 @@ #endif /* Gstreamer Audio elements */ - audioqueue1 = gst_element_factory_make ("queue", "audio-queue1"); - audioqueue2 = gst_element_factory_make ("queue", "audio-queue2"); + audioqueue1 = gst_element_factory_make ("queue", "audio-queue1"); #ifdef MAEMO_PLATFORM audiosink = gst_element_factory_make ("dspmp3sink", "audio-output"); #else + audioqueue2 = gst_element_factory_make ("queue", "audio-queue2"); audiodec = gst_element_factory_make ("mad", "audio-decoder"); audioconv = gst_element_factory_make ("audioconvert", "audio-converter"); audiosink = gst_element_factory_make ("alsasink", "audio-output"); #endif if (!(pipeline && source && parser && videodec && videosink) || - !(videoqueue1 && videoqueue2 && audioqueue1 && audioqueue2 && audiosink)) { + !(videoqueue1 && videoqueue2 && audioqueue1 && audiosink)) { /* FIXME: hanlde the error correctly */ /* video_alignment is not being created (below) and is causing problems to the ui */ @@ -317,7 +317,10 @@ g_object_ref (tvplayer->videoqueue1); g_object_ref (tvplayer->videoqueue2); g_object_ref (tvplayer->audioqueue1); + +#ifndef MAEMO_PLATFORM g_object_ref (tvplayer->audioqueue2); +#endif //g_object_set (G_OBJECT (videosink), "sync", TRUE, NULL); g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); @@ -326,8 +329,13 @@ bus_call, tvplayer); gst_bin_add_many (GST_BIN (pipeline), source, parser, videoqueue1, - videodec, videoqueue2, videocolortrs, videosink, audioqueue1, - audiodec, audioconv, audioqueue2, audiosink, NULL); + videodec, videoqueue2, videocolortrs, videosink, NULL ); + +#ifndef MAEMO_PLATFORM + gst_bin_add_many ( GST_BIN(pipeline), audioqueue1, audiodec, audioconv, audioqueue2, audiosink, NULL ); +#else + gst_bin_add_many ( GST_BIN(pipeline), audioqueue1, audiosink, NULL); +#endif { // GstCaps *rtpcaps = gst_caps_new_simple ("application/x-rtp", NULL); @@ -336,7 +344,12 @@ gst_element_link (source, parser); gst_element_link_many (videoqueue1, videodec, videoqueue2, videocolortrs, videosink, NULL); - gst_element_link_many (audioqueue1, audiodec, audioconv, audioqueue2, audiosink, NULL); + +#ifndef MAEMO_PLATFORM + gst_element_link_many (videosink, audioqueue1, audiodec, audioconv, audioqueue2, audiosink, NULL); +#else + gst_element_link_many (videosink, audioqueue1, audiosink, NULL); +#endif g_signal_connect (parser, "pad-added", G_CALLBACK (new_pad_cb), tvplayer);