[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
eric at webkit.org
eric at webkit.org
Thu Dec 3 13:31:01 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 9482a56df8cf298ad31ac001a2073c912e669716
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 10 11:34:48 2009 +0000
2009-11-10 Philippe Normand <pnormand at igalia.com>
Reviewed by Eric Seidel.
https://bugs.webkit.org/show_bug.cgi?id=31047
[GTK] Failing test media/video-played-ranges-1.html
WebKit coding style fixes.
* platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mediaPlayerPrivateMessageCallback):
(WebCore::MediaPlayerPrivate::naturalSize):
(WebCore::MediaPlayerPrivate::paint):
(WebCore::mimeTypeCache):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 66fcd85..c76d4ad 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-11-10 Philippe Normand <pnormand at igalia.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31047
+ [GTK] Failing test media/video-played-ranges-1.html
+
+ WebKit coding style fixes.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mediaPlayerPrivateMessageCallback):
+ (WebCore::MediaPlayerPrivate::naturalSize):
+ (WebCore::MediaPlayerPrivate::paint):
+ (WebCore::mimeTypeCache):
+
2009-11-10 Oliver Hunt <oliver at apple.com>
Remove build failure introduced by earlier build fix.
diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
index 459ef5a..34c6d88 100644
--- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
+++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
@@ -66,11 +66,11 @@ gboolean mediaPlayerPrivateMessageCallback(GstBus* bus, GstMessage* message, gpo
LOG_VERBOSE(Media, "Error: %d, %s", err->code, err->message);
error = MediaPlayer::Empty;
- if (err->code == GST_STREAM_ERROR_CODEC_NOT_FOUND ||
- err->code == GST_STREAM_ERROR_WRONG_TYPE ||
- err->code == GST_STREAM_ERROR_FAILED ||
- err->code == GST_CORE_ERROR_MISSING_PLUGIN ||
- err->code == GST_RESOURCE_ERROR_NOT_FOUND)
+ if (err->code == GST_STREAM_ERROR_CODEC_NOT_FOUND
+ || err->code == GST_STREAM_ERROR_WRONG_TYPE
+ || err->code == GST_STREAM_ERROR_FAILED
+ || err->code == GST_CORE_ERROR_MISSING_PLUGIN
+ || err->code == GST_RESOURCE_ERROR_NOT_FOUND)
error = MediaPlayer::FormatError;
else if (err->domain == GST_STREAM_ERROR)
error = MediaPlayer::DecodeError;
@@ -335,10 +335,10 @@ IntSize MediaPlayerPrivate::naturalSize() const
gfloat pixelAspectRatio;
gint pixelAspectRatioNumerator, pixelAspectRatioDenominator;
- if (!GST_IS_CAPS(caps) || !gst_caps_is_fixed(caps) ||
- !gst_video_format_parse_caps(caps, NULL, &width, &height) ||
- !gst_video_parse_caps_pixel_aspect_ratio(caps, &pixelAspectRatioNumerator,
- &pixelAspectRatioDenominator)) {
+ if (!GST_IS_CAPS(caps) || !gst_caps_is_fixed(caps)
+ || !gst_video_format_parse_caps(caps, 0, &width, &height)
+ || !gst_video_parse_caps_pixel_aspect_ratio(caps, &pixelAspectRatioNumerator,
+ &pixelAspectRatioDenominator)) {
gst_object_unref(GST_OBJECT(pad));
return IntSize();
}
@@ -695,10 +695,10 @@ void MediaPlayerPrivate::paint(GraphicsContext* context, const IntRect& rect)
double scale, gapHeight, gapWidth;
GstVideoFormat format;
- GstCaps *caps = gst_buffer_get_caps(m_buffer);
+ GstCaps* caps = gst_buffer_get_caps(m_buffer);
- if (G_UNLIKELY(!gst_video_format_parse_caps(caps, &format, &width, &height) ||
- !gst_video_parse_caps_pixel_aspect_ratio(caps, &pixelAspectRatioNumerator, &pixelAspectRatioDenominator))) {
+ if (G_UNLIKELY(!gst_video_format_parse_caps(caps, &format, &width, &height)
+ || !gst_video_parse_caps_pixel_aspect_ratio(caps, &pixelAspectRatioNumerator, &pixelAspectRatioDenominator))) {
gst_caps_unref(caps);
return;
}
@@ -728,7 +728,7 @@ void MediaPlayerPrivate::paint(GraphicsContext* context, const IntRect& rect)
displayHeight *= doublePixelAspectRatioDenominator / doublePixelAspectRatioNumerator;
// Calculate the largest scale factor that would fill the target surface
- scale = MIN(rect.width() / displayWidth, rect.height() / displayHeight);
+ scale = std::min(rect.width() / displayWidth, rect.height() / displayHeight);
// And calculate the new display width/height
displayWidth *= scale;
displayHeight *= scale;
@@ -795,15 +795,15 @@ static HashSet<String> mimeTypeCache()
// by default. In that case, we should not consider these types supportable by GStreamer.
// Examples of what GStreamer can support but should not be added:
// text/plain, text/html, image/jpeg, application/xml
- if (g_str_equal(mimetype[0], "audio") ||
- g_str_equal(mimetype[0], "video") ||
- (g_str_equal(mimetype[0], "application") &&
- !ignoredApplicationSubtypes.contains(String(mimetype[1])))) {
+ if (g_str_equal(mimetype[0], "audio")
+ || g_str_equal(mimetype[0], "video")
+ || (g_str_equal(mimetype[0], "application")
+ && !ignoredApplicationSubtypes.contains(String(mimetype[1])))) {
cache.add(String(capability[0]));
// These formats are supported by GStreamer, but not correctly advertised
- if (g_str_equal(capability[0], "video/x-h264") ||
- g_str_equal(capability[0], "audio/x-m4a")) {
+ if (g_str_equal(capability[0], "video/x-h264")
+ || g_str_equal(capability[0], "audio/x-m4a")) {
cache.add(String("video/mp4"));
cache.add(String("audio/aac"));
}
@@ -818,7 +818,7 @@ static HashSet<String> mimeTypeCache()
// This is what we are handling: mpegversion=(int)1, layer=(int)[ 1, 3 ]
gchar** versionAndLayer = g_strsplit(capability[1], ",", 2);
- if (g_str_has_suffix (versionAndLayer[0], "(int)1")) {
+ if (g_str_has_suffix(versionAndLayer[0], "(int)1")) {
for (int i = 0; versionAndLayer[1][i] != '\0'; i++) {
if (versionAndLayer[1][i] == '1')
cache.add(String("audio/mp1"));
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list