Title: [168681] trunk/Source/WebCore
- Revision
- 168681
- Author
- [email protected]
- Date
- 2014-05-13 08:20:19 -0700 (Tue, 13 May 2014)
Log Message
[GStreamer] Move toGstClockTime to utilities
https://bugs.webkit.org/show_bug.cgi?id=132702
Reviewed by Philippe Normand.
toGstClockTime should be in GStreamerUtilities and corrected typo
in getGstPlayFlag.
No new tests needed.
* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::getGstPlayFlag): Renamed from getGstPlaysFlag.
(WebCore::toGstClockTime): Moved from MediaPlayerPrivateGStreamer.
(WebCore::getGstPlaysFlag): Deleted.
* platform/graphics/gstreamer/GStreamerUtilities.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
Corrected getGstPlayFlag typo.
(WebCore::toGstClockTime): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (168680 => 168681)
--- trunk/Source/WebCore/ChangeLog 2014-05-13 14:44:50 UTC (rev 168680)
+++ trunk/Source/WebCore/ChangeLog 2014-05-13 15:20:19 UTC (rev 168681)
@@ -1,3 +1,25 @@
+2014-05-13 Xabier Rodriguez Calvar <[email protected]>
+
+ [GStreamer] Move toGstClockTime to utilities
+ https://bugs.webkit.org/show_bug.cgi?id=132702
+
+ Reviewed by Philippe Normand.
+
+ toGstClockTime should be in GStreamerUtilities and corrected typo
+ in getGstPlayFlag.
+
+ No new tests needed.
+
+ * platform/graphics/gstreamer/GStreamerUtilities.cpp:
+ (WebCore::getGstPlayFlag): Renamed from getGstPlaysFlag.
+ (WebCore::toGstClockTime): Moved from MediaPlayerPrivateGStreamer.
+ (WebCore::getGstPlaysFlag): Deleted.
+ * platform/graphics/gstreamer/GStreamerUtilities.h:
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
+ Corrected getGstPlayFlag typo.
+ (WebCore::toGstClockTime): Deleted.
+
2014-05-12 Darin Adler <[email protected]>
Make a few icon database improvements
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp (168680 => 168681)
--- trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp 2014-05-13 14:44:50 UTC (rev 168680)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp 2014-05-13 15:20:19 UTC (rev 168681)
@@ -134,7 +134,7 @@
return gstInitialized;
}
-unsigned getGstPlaysFlag(const char* nick)
+unsigned getGstPlayFlag(const char* nick)
{
static GFlagsClass* flagsClass = static_cast<GFlagsClass*>(g_type_class_ref(g_type_from_name("GstPlayFlags")));
ASSERT(flagsClass);
@@ -146,6 +146,18 @@
return flag->value;
}
+GstClockTime toGstClockTime(float time)
+{
+ // Extract the integer part of the time (seconds) and the fractional part (microseconds). Attempt to
+ // round the microseconds so no floating point precision is lost and we can perform an accurate seek.
+ float seconds;
+ float microSeconds = modff(time, &seconds) * 1000000;
+ GTimeVal timeValue;
+ timeValue.tv_sec = static_cast<glong>(seconds);
+ timeValue.tv_usec = static_cast<glong>(roundf(microSeconds / 10000) * 10000);
+ return GST_TIMEVAL_TO_TIME(timeValue);
}
+}
+
#endif // USE(GSTREAMER)
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.h (168680 => 168681)
--- trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.h 2014-05-13 14:44:50 UTC (rev 168680)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.h 2014-05-13 15:20:19 UTC (rev 168681)
@@ -72,6 +72,7 @@
void mapGstBuffer(GstBuffer*);
void unmapGstBuffer(GstBuffer*);
bool initializeGStreamer();
-unsigned getGstPlaysFlag(const char* nick);
+unsigned getGstPlayFlag(const char* nick);
+GstClockTime toGstClockTime(float time);
}
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (168680 => 168681)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2014-05-13 14:44:50 UTC (rev 168680)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2014-05-13 15:20:19 UTC (rev 168681)
@@ -124,18 +124,6 @@
player->handlePluginInstallerResult(result);
}
-static GstClockTime toGstClockTime(float time)
-{
- // Extract the integer part of the time (seconds) and the fractional part (microseconds). Attempt to
- // round the microseconds so no floating point precision is lost and we can perform an accurate seek.
- float seconds;
- float microSeconds = modf(time, &seconds) * 1000000;
- GTimeVal timeValue;
- timeValue.tv_sec = static_cast<glong>(seconds);
- timeValue.tv_usec = static_cast<glong>(roundf(microSeconds / 10000) * 10000);
- return GST_TIMEVAL_TO_TIME(timeValue);
-}
-
void MediaPlayerPrivateGStreamer::setAudioStreamProperties(GObject* object)
{
if (g_strcmp0(G_OBJECT_TYPE_NAME(object), "GstPulseSink"))
@@ -1769,7 +1757,7 @@
unsigned flags;
g_object_get(m_playBin.get(), "flags", &flags, NULL);
- unsigned flagDownload = getGstPlaysFlag("download");
+ unsigned flagDownload = getGstPlayFlag("download");
// We don't want to stop downloading if we already started it.
if (flags & flagDownload && m_readyState > MediaPlayer::HaveNothing && !m_resetPipeline)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes