diff options
author | James Doc Livingston <doclivingston@gmail.com> | 2006-07-28 13:56:20 +0000 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2006-07-28 13:56:20 +0000 |
commit | fd2078bb04e171e9715c0d5d0dda7af535ded793 (patch) | |
tree | f82f954a14342f3ef8cc01735b986181e2d1b31e /examples | |
parent | d2372173a0e8871ee4dc207a5c8177a9db4d826f (diff) |
examples/remuxer.py (RemuxBin._do_seek, Remuxer._bus_watch): Use normal seeks instead of segment seeks so that EOS is...
Original commit message from CVS:
2006-07-28 Andy Wingo <wingo@pobox.com>
* examples/remuxer.py (RemuxBin._do_seek, Remuxer._bus_watch): Use
normal seeks instead of segment seeks so that EOS is handled
properly. Patch by James "Doc" Livingston <doclivingston at
gmail.com>. (#348416)
* examples/remuxer.py (RemuxBin._new_demuxed_pad): Increase the
buffer size for dealing with terribly muxed files.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/remuxer.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/remuxer.py b/examples/remuxer.py index 3ec855e543..0e389cbfb5 100644 --- a/examples/remuxer.py +++ b/examples/remuxer.py @@ -441,7 +441,7 @@ class Remuxer(gst.Pipeline): self.response(FAILURE) elif message.type == gst.MESSAGE_WARNING: print 'warning', message - elif message.type == gst.MESSAGE_SEGMENT_DONE: + elif message.type == gst.MESSAGE_EOS: # print 'eos, woot', message.src name = self.touri if name.startswith('file://'): @@ -542,6 +542,7 @@ class RemuxBin(gst.Bin): return queue = gst.element_factory_make('queue', 'queue_' + format) + queue.set_property('max-size-buffers', 1000) parser = gst.element_factory_make(self.parsefactories[format]) self.add(queue) self.add(parser) @@ -552,8 +553,8 @@ class RemuxBin(gst.Bin): parser.link(self.mux) self.parsers.append(parser) - def _do_segment_seek(self): - flags = gst.SEEK_FLAG_SEGMENT | gst.SEEK_FLAG_FLUSH + def _do_seek(self): + flags = gst.SEEK_FLAG_FLUSH # HACK: self.seek should work, should try that at some point return self.demux.seek(1.0, gst.FORMAT_TIME, flags, gst.SEEK_TYPE_SET, self.start_time, @@ -562,7 +563,7 @@ class RemuxBin(gst.Bin): def _no_more_pads(self, element): pads = [x.get_pad('src') for x in self.parsers] set_connection_blocked_async_marshalled(pads, - self._do_segment_seek) + self._do_seek) class PlayerWindow(gtk.Window): |