summaryrefslogtreecommitdiff
path: root/avmedia
diff options
context:
space:
mode:
authorSimon Danner <danner.simon@gmail.com>2014-08-03 07:23:35 +0200
committerDavid Tardon <dtardon@redhat.com>2014-08-03 07:41:49 +0000
commit8cc566a536eb027bf5818c08526ce51632c63003 (patch)
tree28cb6c55ed9211e70e69704add891c06b2bf32d8 /avmedia
parentc2cd1132ef7974387f403dabeeec8fba54c7d041 (diff)
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@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'avmedia')
-rw-r--r--avmedia/source/gstreamer/gstframegrabber.cxx2
-rw-r--r--avmedia/source/gstreamer/gstplayer.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx b/avmedia/source/gstreamer/gstframegrabber.cxx
index acf025248506..71f1bf7b3298 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 c89d423a64cd..ceea8e21e774 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;