[longomatch] Make use of STEP events for frame stepping
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Make use of STEP events for frame stepping
- Date: Tue, 7 Sep 2010 20:21:53 +0000 (UTC)
commit 87ef15f2706e2c2c0ba3a67ad3e882d700240bdf
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Mon Aug 23 21:30:21 2010 +0200
Make use of STEP events for frame stepping
libcesarplayer/src/bacon-video-widget-gst-0.10.c | 36 +--------------------
1 files changed, 2 insertions(+), 34 deletions(-)
---
diff --git a/libcesarplayer/src/bacon-video-widget-gst-0.10.c b/libcesarplayer/src/bacon-video-widget-gst-0.10.c
index 24bafc9..0f810da 100644
--- a/libcesarplayer/src/bacon-video-widget-gst-0.10.c
+++ b/libcesarplayer/src/bacon-video-widget-gst-0.10.c
@@ -3238,7 +3238,6 @@ gboolean
bacon_video_widget_seek_to_next_frame (BaconVideoWidget * bvw, gfloat rate,
gboolean in_segment)
{
-
gint fps;
gint64 pos;
gint64 final_pos;
@@ -3248,43 +3247,12 @@ bacon_video_widget_seek_to_next_frame (BaconVideoWidget * bvw, gfloat rate,
g_return_val_if_fail (BACON_IS_VIDEO_WIDGET (bvw), FALSE);
g_return_val_if_fail (GST_IS_ELEMENT (bvw->priv->play), FALSE);
-
-
- //Round framerate to the nearest integer
- fps = (bvw->priv->video_fps_n + bvw->priv->video_fps_d / 2) /
- bvw->priv->video_fps_d;
- pos = bacon_video_widget_get_accurate_current_time (bvw);
- if (pos == 0)
- return FALSE;
- final_pos = pos * GST_MSECOND + 1 * GST_SECOND / fps;
-
-/*#ifdef WIN32
- bacon_video_widget_play(bvw);
-#endif*/
-
- if (bacon_video_widget_is_playing (bvw))
- bacon_video_widget_pause (bvw);
- if (in_segment)
- ret = gst_element_seek (bvw->priv->play, rate,
- GST_FORMAT_TIME,
- GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE |
- GST_SEEK_FLAG_SEGMENT, GST_SEEK_TYPE_SET,
- final_pos, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE);
-
- else
- ret = gst_element_seek (bvw->priv->play, rate,
- GST_FORMAT_TIME,
- GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE,
- GST_SEEK_TYPE_SET, final_pos, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE);
+ gst_element_send_event(bvw->priv->play,
+ gst_event_new_step (GST_FORMAT_BUFFERS, 1, 1.0, TRUE, FALSE));
gst_x_overlay_expose (bvw->priv->xoverlay);
-/*#ifdef WIN32
- bacon_video_widget_pause(bvw);
-#endif
-*/
return ret;
-
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]