[svn r419] Fixed compilation problem when compiling to the Maemo platform. trunk
authorrosfran
Mon Mar 19 21:43:42 2007 +0000 (2007-03-19)
branchtrunk
changeset 4140d3d926bc374
parent 413 5c9b6b51eb56
child 415 c44e40bb613c
[svn r419] Fixed compilation problem when compiling to the Maemo platform.
maemo-ui/src/mmyth_tvplayer.c
     1.1 --- a/maemo-ui/src/mmyth_tvplayer.c	Mon Mar 19 20:08:55 2007 +0000
     1.2 +++ b/maemo-ui/src/mmyth_tvplayer.c	Mon Mar 19 21:43:42 2007 +0000
     1.3 @@ -243,10 +243,10 @@
     1.4      GstElement *videodec, *videosink;
     1.5      GstElement *videocolortrs;
     1.6  #ifndef MAEMO_PLATFORM    
     1.7 -    GstElement *audiodec, *audioconv;
     1.8 +    GstElement *audiodec, *audioconv, *audioqueue2;
     1.9  #endif
    1.10      GstElement *audiosink;
    1.11 -    GstElement *videoqueue1, *videoqueue2, *audioqueue1, *audioqueue2;
    1.12 +    GstElement *videoqueue1, *videoqueue2, *audioqueue1;
    1.13  
    1.14      g_debug ("MMythTVPlayer: Setting the Gstreamer pipeline\n");
    1.15  	
    1.16 @@ -267,18 +267,18 @@
    1.17  #endif
    1.18      
    1.19      /* Gstreamer Audio elements */
    1.20 -    audioqueue1 = gst_element_factory_make ("queue", "audio-queue1");    
    1.21 -    audioqueue2 = gst_element_factory_make ("queue", "audio-queue2");
    1.22 +    audioqueue1 = gst_element_factory_make ("queue", "audio-queue1");
    1.23  #ifdef MAEMO_PLATFORM    
    1.24      audiosink = gst_element_factory_make ("dspmp3sink", "audio-output");
    1.25  #else    
    1.26 +		audioqueue2 = gst_element_factory_make ("queue", "audio-queue2");
    1.27      audiodec = gst_element_factory_make ("mad", "audio-decoder");
    1.28      audioconv = gst_element_factory_make ("audioconvert", "audio-converter");
    1.29      audiosink = gst_element_factory_make ("alsasink", "audio-output");
    1.30  #endif    
    1.31      
    1.32      if (!(pipeline && source && parser && videodec && videosink) ||
    1.33 -    	!(videoqueue1 && videoqueue2 && audioqueue1 && audioqueue2 && audiosink)) {
    1.34 +    	!(videoqueue1 && videoqueue2 && audioqueue1 && audiosink)) {
    1.35          /* FIXME: hanlde the error correctly */
    1.36          /* video_alignment is not being created (below) 
    1.37             and is causing problems to the ui */
    1.38 @@ -317,7 +317,10 @@
    1.39      g_object_ref (tvplayer->videoqueue1);
    1.40      g_object_ref (tvplayer->videoqueue2);
    1.41      g_object_ref (tvplayer->audioqueue1);
    1.42 +    
    1.43 +#ifndef MAEMO_PLATFORM
    1.44      g_object_ref (tvplayer->audioqueue2);
    1.45 +#endif
    1.46    	
    1.47      //g_object_set (G_OBJECT (videosink), "sync", TRUE, NULL);
    1.48      g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
    1.49 @@ -326,8 +329,13 @@
    1.50                         bus_call, tvplayer);
    1.51  
    1.52      gst_bin_add_many (GST_BIN (pipeline), source, parser, videoqueue1,
    1.53 -    			videodec, videoqueue2, videocolortrs, videosink, audioqueue1, 
    1.54 -			audiodec, audioconv, audioqueue2, audiosink, NULL);
    1.55 +    			videodec, videoqueue2, videocolortrs, videosink, NULL );
    1.56 +
    1.57 +#ifndef MAEMO_PLATFORM
    1.58 +			gst_bin_add_many ( GST_BIN(pipeline), audioqueue1, audiodec, audioconv, audioqueue2, audiosink, NULL );
    1.59 +#else
    1.60 +			gst_bin_add_many ( GST_BIN(pipeline), audioqueue1, audiosink, NULL);
    1.61 +#endif
    1.62  
    1.63      {
    1.64  //        GstCaps *rtpcaps = gst_caps_new_simple ("application/x-rtp", NULL);
    1.65 @@ -336,7 +344,12 @@
    1.66      
    1.67      gst_element_link (source, parser);
    1.68      gst_element_link_many (videoqueue1, videodec, videoqueue2, videocolortrs, videosink, NULL);
    1.69 -    gst_element_link_many (audioqueue1, audiodec, audioconv, audioqueue2, audiosink, NULL);
    1.70 +    
    1.71 +#ifndef MAEMO_PLATFORM
    1.72 +    gst_element_link_many (videosink, audioqueue1, audiodec, audioconv, audioqueue2, audiosink, NULL);
    1.73 +#else
    1.74 +		gst_element_link_many (videosink, audioqueue1, audiosink, NULL);
    1.75 +#endif
    1.76      
    1.77      g_signal_connect (parser, "pad-added", G_CALLBACK (new_pad_cb), tvplayer);
    1.78