Changeset 138364 in webkit
- Timestamp:
- Dec 21, 2012 2:46:53 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r138361 r138364 1 2012-12-21 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 3 [GStreamer] Buffering ranges are reported incorrectly with GStreamer 1.0 4 https://bugs.webkit.org/show_bug.cgi?id=105319 5 6 Reviewed by Philippe Normand. 7 8 We add the gPercentMax constant to select between 100 and 9 GST_FORMAT_PERCENT_MAX depending if we are compiling against 10 GStreamer 0.10 or 1.0 and we use that in the corresponding method. 11 12 Current tests should suffice. 13 14 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 15 (WebCore::MediaPlayerPrivateGStreamer::buffered): Added the use of 16 gPercentMax constant instead of 100 to have the different code 17 paths for GStreamer 0.10 and 1.0. 18 1 19 2012-12-21 Tim Horton <timothy_horton@apple.com> 2 20 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r137925 r138364 76 76 } GstPlayFlags; 77 77 78 // gPercentMax is used when parsing buffering ranges with 79 // gst_query_parse_nth_buffering_range as there was a bug in GStreamer 80 // 0.10 that was using 100 instead of GST_FORMAT_PERCENT_MAX. This was 81 // corrected in 1.0. gst_query_parse_buffering_range worked as 82 // expected with GST_FORMAT_PERCENT_MAX in both cases. 78 83 #ifdef GST_API_VERSION_1 79 84 static const char* gPlaybinName = "playbin"; 85 static const gint64 gPercentMax = GST_FORMAT_PERCENT_MAX; 80 86 #else 81 87 static const char* gPlaybinName = "playbin2"; 88 static const gint64 gPercentMax = 100; 82 89 #endif 83 90 … … 759 766 } 760 767 761 gint64 rangeStart = 0, rangeStop = 0;762 768 for (guint index = 0; index < gst_query_get_n_buffering_ranges(query); index++) { 769 gint64 rangeStart = 0, rangeStop = 0; 763 770 if (gst_query_parse_nth_buffering_range(query, index, &rangeStart, &rangeStop)) 764 timeRanges->add(static_cast<float>((rangeStart * mediaDuration) / 100),765 static_cast<float>((rangeStop * mediaDuration) / 100));771 timeRanges->add(static_cast<float>((rangeStart * mediaDuration) / gPercentMax), 772 static_cast<float>((rangeStop * mediaDuration) / gPercentMax)); 766 773 } 767 774
Note: See TracChangeset
for help on using the changeset viewer.