Changeset 32402
- Timestamp:
- 01/13/15 18:05:33 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/player.h
r32401 r32402 699 699 #ifdef EPLAYER4 700 700 int flags = 0x47; //(GST_PLAY_FLAG_VIDEO | GST_PLAY_FLAG_AUDIO | GST_PLAY_FLAG_NATIVE_VIDEO | GST_PLAY_FLAG_TEXT); 701 //guint flags;702 701 703 702 if(pipeline != NULL) … … 727 726 728 727 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;732 728 733 729 // enable buffersize start … … 762 758 // enable buffersizeend 763 759 760 g_object_set(G_OBJECT(pipeline), "uri", tmpfile, NULL); 764 761 g_object_set(G_OBJECT(pipeline), "flags", flags, NULL); 765 g_object_set(G_OBJECT(pipeline), "uri", tmpfile, NULL);766 762 free(tmpfile); tmpfile = NULL; 767 763 … … 781 777 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); 782 778 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); 784 780 } 785 781 … … 834 830 data.pipeline = pipeline; 835 831 gst_bus_add_signal_watch (bus); 836 837 g_object_set (G_OBJECT (pipeline), "current-text", 0, NULL);838 //skip839 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 skip846 847 848 849 832 // g_signal_connect (bus, "message", G_CALLBACK (cb_message), &data); 850 833 // status.prefillbuffer = 1; … … 2090 2073 #ifdef EPLAYER4 2091 2074 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); 2105 2076 #endif 2106 2077 } … … 2125 2096 #ifdef EPLAYER4 2126 2097 if(pipeline != NULL) 2127 {2128 printf("player: stop subtitle\n");2129 2098 g_object_set(G_OBJECT(pipeline), "current-text", -1, NULL); 2130 }2131 2099 #endif 2132 2100 }
Note: See TracChangeset
for help on using the changeset viewer.