[Libreoffice-commits] core.git: avmedia/source
Simon Danner
danner.simon at gmail.com
Sun Aug 3 00:42:12 PDT 2014
avmedia/source/gstreamer/gstframegrabber.cxx | 2 +-
avmedia/source/gstreamer/gstplayer.cxx | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 8cc566a536eb027bf5818c08526ce51632c63003
Author: Simon Danner <danner.simon at gmail.com>
Date: Sun Aug 3 07:23:35 2014 +0200
avmedia/gstreamer: use GST_SECOND
use GST_SECOND instead of magic value
Change-Id: I992ecbab458f113a75658b1ff69df60068324509
Reviewed-on: https://gerrit.libreoffice.org/10705
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx b/avmedia/source/gstreamer/gstframegrabber.cxx
index acf0252..71f1bf7 100644
--- a/avmedia/source/gstreamer/gstframegrabber.cxx
+++ b/avmedia/source/gstreamer/gstframegrabber.cxx
@@ -112,7 +112,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
if( !mpPipeline )
return xRet;
- gint64 gst_position = llround( fMediaTime * 1E9 );
+ gint64 gst_position = llround( fMediaTime * GST_SECOND );
gst_element_seek_simple(
mpPipeline, GST_FORMAT_TIME,
(GstSeekFlags)(GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_FLUSH),
diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index c89d423..ceea8e2 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -455,7 +455,7 @@ double SAL_CALL Player::getDuration()
double duration = 0.01;
if( mpPlaybin && mnDuration > 0 ) {
- duration = mnDuration / 1E9;
+ duration = mnDuration / GST_SECOND;
}
return duration;
@@ -469,7 +469,7 @@ void SAL_CALL Player::setMediaTime( double fTime )
::osl::MutexGuard aGuard(m_aMutex);
if( mpPlaybin ) {
- gint64 gst_position = llround (fTime * 1E9);
+ gint64 gst_position = llround (fTime * GST_SECOND);
gst_element_seek( mpPlaybin, 1.0,
GST_FORMAT_TIME,
@@ -496,7 +496,7 @@ double SAL_CALL Player::getMediaTime()
// get current position in the stream
gint64 gst_position;
if( wrap_element_query_position( mpPlaybin, GST_FORMAT_TIME, &gst_position ) )
- position = gst_position / 1E9;
+ position = gst_position / GST_SECOND;
}
return position;
More information about the Libreoffice-commits
mailing list