ext/ffmpeg/gstffmpegprotocol.c: Implement seeking for WRITE "gst" protocol.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_seek):
Implement seeking for WRITE "gst" protocol.
This allows muxers to properly seek and output correctly muxed files.
This commit is contained in:
Edward Hervey 2006-10-05 15:54:12 +00:00
parent 8e52c43291
commit dd1339334d
3 changed files with 23 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2006-10-05 Edward Hervey <edward@fluendo.com>
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_seek):
Implement seeking for WRITE "gst" protocol.
This allows muxers to properly seek and output correctly muxed files.
2006-10-05 Edward Hervey <edward@fluendo.com>
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_change_state):

2
common

@ -1 +1 @@
Subproject commit 9991f6fa61ee11475c390dd6675ef7952f079e43
Subproject commit a4af1b8542911352e29d53fba47e2c3d7231ebdb

View file

@ -220,7 +220,22 @@ gst_ffmpegdata_seek (URLContext * h, offset_t pos, int whence)
case URL_WRONLY:
{
/* srcpad */
/* FIXME : implement */
switch (whence) {
case SEEK_SET:
info->offset = (guint64) pos;
gst_pad_push_event (info->pad,gst_event_new_new_segment
(TRUE, 1.0, GST_FORMAT_BYTES, info->offset,
GST_CLOCK_TIME_NONE, info->offset));
break;
case SEEK_CUR:
info->offset += pos;
gst_pad_push_event (info->pad,gst_event_new_new_segment
(TRUE, 1.0, GST_FORMAT_BYTES, info->offset,
GST_CLOCK_TIME_NONE, info->offset));
break;
default:
break;
}
newpos = info->offset;
}
break;