Changeset 32402


Ignore:
Timestamp:
01/13/15 18:05:33 (9 years ago)
Author:
gost
Message:

fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/player.h

    r32401 r32402  
    699699#ifdef EPLAYER4
    700700                int flags = 0x47; //(GST_PLAY_FLAG_VIDEO | GST_PLAY_FLAG_AUDIO | GST_PLAY_FLAG_NATIVE_VIDEO | GST_PLAY_FLAG_TEXT);
    701                 //guint flags;
    702701               
    703702                if(pipeline != NULL)
     
    727726       
    728727                pipeline = gst_element_factory_make("playbin2", "playbin");
    729                
    730                 //g_object_get(G_OBJECT (pipeline), "flags", &flags, NULL);
    731                 //flags |= GST_PLAY_FLAG_NATIVE_VIDEO;
    732728
    733729// enable buffersize start
     
    762758// enable buffersizeend
    763759
     760                g_object_set(G_OBJECT(pipeline), "uri", tmpfile, NULL);
    764761                g_object_set(G_OBJECT(pipeline), "flags", flags, NULL);
    765                 g_object_set(G_OBJECT(pipeline), "uri", tmpfile, NULL);
    766762                free(tmpfile); tmpfile = NULL;
    767763
     
    781777                        g_object_set (G_OBJECT (subsink), "caps", gst_caps_from_string("text/plain; text/x-plain; text/x-raw; text/x-pango-markup; video/x-dvd-subpicture; subpicture/x-pgs"), NULL);
    782778                        g_object_set (G_OBJECT (pipeline), "text-sink", subsink, NULL);
    783                         g_object_set (G_OBJECT (pipeline), "current-text", -1, NULL);
     779                        //g_object_set (G_OBJECT (pipeline), "current-text", -1, NULL);
    784780                }
    785781
     
    834830                data.pipeline = pipeline;
    835831                gst_bus_add_signal_watch (bus);
    836                
    837                 g_object_set (G_OBJECT (pipeline), "current-text", 0, NULL);
    838 //skip         
    839                 unsigned long long pts;
    840                 GstFormat fmt = GST_FORMAT_TIME;
    841                 gint64 pos;
    842                 pts = playergetpts();
    843                 gint64 time_nanoseconds = pts * 11111LL;
    844                 gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME, (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), GST_SEEK_TYPE_SET, time_nanoseconds, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE);
    845 //end skip             
    846                
    847                
    848                
    849832//              g_signal_connect (bus, "message", G_CALLBACK (cb_message), &data);
    850833//              status.prefillbuffer = 1;
     
    20902073#ifdef EPLAYER4
    20912074        if(pipeline != NULL)
    2092                 {
    2093                         g_object_set(G_OBJECT(pipeline), "current-text", -1, NULL);     
    2094                         printf("player: set current text to: %i\n", num);
    2095                         g_object_set(G_OBJECT(pipeline), "current-text", num, NULL);
    2096                         //skip         
    2097                         unsigned long long pts;
    2098                         GstFormat fmt = GST_FORMAT_TIME;
    2099                         gint64 pos;
    2100                         pts = playergetpts();
    2101                         gint64 time_nanoseconds = pts * 11111LL;
    2102                         gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME, (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), GST_SEEK_TYPE_SET, time_nanoseconds, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE);
    2103                         //end skip                     
    2104                 }
     2075                g_object_set(G_OBJECT(pipeline), "current-text", num, NULL);   
    21052076#endif
    21062077}
     
    21252096#ifdef EPLAYER4
    21262097        if(pipeline != NULL)
    2127         {
    2128                 printf("player: stop subtitle\n");
    21292098                g_object_set(G_OBJECT(pipeline), "current-text", -1, NULL);
    2130         }
    21312099#endif
    21322100}
Note: See TracChangeset for help on using the changeset viewer.