Changeset 50736 in webkit
- Timestamp:
- Nov 10, 2009 3:34:48 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r50734 r50736 1 2009-11-10 Philippe Normand <pnormand@igalia.com> 2 3 Reviewed by Eric Seidel. 4 5 https://bugs.webkit.org/show_bug.cgi?id=31047 6 [GTK] Failing test media/video-played-ranges-1.html 7 8 WebKit coding style fixes. 9 10 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: 11 (WebCore::mediaPlayerPrivateMessageCallback): 12 (WebCore::MediaPlayerPrivate::naturalSize): 13 (WebCore::MediaPlayerPrivate::paint): 14 (WebCore::mimeTypeCache): 15 1 16 2009-11-10 Oliver Hunt <oliver@apple.com> 2 17 -
trunk/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
r50726 r50736 67 67 68 68 error = MediaPlayer::Empty; 69 if (err->code == GST_STREAM_ERROR_CODEC_NOT_FOUND ||70 err->code == GST_STREAM_ERROR_WRONG_TYPE ||71 err->code == GST_STREAM_ERROR_FAILED ||72 err->code == GST_CORE_ERROR_MISSING_PLUGIN ||73 err->code == GST_RESOURCE_ERROR_NOT_FOUND)69 if (err->code == GST_STREAM_ERROR_CODEC_NOT_FOUND 70 || err->code == GST_STREAM_ERROR_WRONG_TYPE 71 || err->code == GST_STREAM_ERROR_FAILED 72 || err->code == GST_CORE_ERROR_MISSING_PLUGIN 73 || err->code == GST_RESOURCE_ERROR_NOT_FOUND) 74 74 error = MediaPlayer::FormatError; 75 75 else if (err->domain == GST_STREAM_ERROR) … … 336 336 gint pixelAspectRatioNumerator, pixelAspectRatioDenominator; 337 337 338 if (!GST_IS_CAPS(caps) || !gst_caps_is_fixed(caps) ||339 !gst_video_format_parse_caps(caps, NULL, &width, &height) ||340 !gst_video_parse_caps_pixel_aspect_ratio(caps, &pixelAspectRatioNumerator,341 338 if (!GST_IS_CAPS(caps) || !gst_caps_is_fixed(caps) 339 || !gst_video_format_parse_caps(caps, 0, &width, &height) 340 || !gst_video_parse_caps_pixel_aspect_ratio(caps, &pixelAspectRatioNumerator, 341 &pixelAspectRatioDenominator)) { 342 342 gst_object_unref(GST_OBJECT(pad)); 343 343 return IntSize(); … … 696 696 GstVideoFormat format; 697 697 698 GstCaps *caps = gst_buffer_get_caps(m_buffer);699 700 if (G_UNLIKELY(!gst_video_format_parse_caps(caps, &format, &width, &height) ||701 !gst_video_parse_caps_pixel_aspect_ratio(caps, &pixelAspectRatioNumerator, &pixelAspectRatioDenominator))) {698 GstCaps* caps = gst_buffer_get_caps(m_buffer); 699 700 if (G_UNLIKELY(!gst_video_format_parse_caps(caps, &format, &width, &height) 701 || !gst_video_parse_caps_pixel_aspect_ratio(caps, &pixelAspectRatioNumerator, &pixelAspectRatioDenominator))) { 702 702 gst_caps_unref(caps); 703 703 return; … … 729 729 730 730 // Calculate the largest scale factor that would fill the target surface 731 scale = MIN(rect.width() / displayWidth, rect.height() / displayHeight);731 scale = std::min(rect.width() / displayWidth, rect.height() / displayHeight); 732 732 // And calculate the new display width/height 733 733 displayWidth *= scale; … … 796 796 // Examples of what GStreamer can support but should not be added: 797 797 // text/plain, text/html, image/jpeg, application/xml 798 if (g_str_equal(mimetype[0], "audio") ||799 g_str_equal(mimetype[0], "video") ||800 (g_str_equal(mimetype[0], "application") &&801 798 if (g_str_equal(mimetype[0], "audio") 799 || g_str_equal(mimetype[0], "video") 800 || (g_str_equal(mimetype[0], "application") 801 && !ignoredApplicationSubtypes.contains(String(mimetype[1])))) { 802 802 cache.add(String(capability[0])); 803 803 804 804 // These formats are supported by GStreamer, but not correctly advertised 805 if (g_str_equal(capability[0], "video/x-h264") ||806 g_str_equal(capability[0], "audio/x-m4a")) {805 if (g_str_equal(capability[0], "video/x-h264") 806 || g_str_equal(capability[0], "audio/x-m4a")) { 807 807 cache.add(String("video/mp4")); 808 808 cache.add(String("audio/aac")); … … 819 819 gchar** versionAndLayer = g_strsplit(capability[1], ",", 2); 820 820 821 if (g_str_has_suffix 821 if (g_str_has_suffix(versionAndLayer[0], "(int)1")) { 822 822 for (int i = 0; versionAndLayer[1][i] != '\0'; i++) { 823 823 if (versionAndLayer[1][i] == '1')
Note: See TracChangeset
for help on using the changeset viewer.