mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
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.
This commit is contained in:
parent
d2372173a0
commit
fd2078bb04
3 changed files with 17 additions and 6 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
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>.
|
||||||
|
|
||||||
|
* examples/remuxer.py (RemuxBin._new_demuxed_pad): Increase the
|
||||||
|
buffer size for dealing with terribly muxed files.
|
||||||
|
|
||||||
2006-07-20 Edward Hervey <edward@fluendo.com>
|
2006-07-20 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
* configure.ac:
|
* configure.ac:
|
||||||
|
@ -331,7 +341,7 @@
|
||||||
* examples/remuxer.py (PlayerWindow.update_scale_cb): Fix a race
|
* examples/remuxer.py (PlayerWindow.update_scale_cb): Fix a race
|
||||||
condition getting the initial cutin time via inserting whitespace.
|
condition getting the initial cutin time via inserting whitespace.
|
||||||
(all over): UI fixes to make Mike happy.
|
(all over): UI fixes to make Mike happy.
|
||||||
|
|
||||||
* examples/remuxer.py: Updates! Nothing gstreamery, it's all ui,
|
* examples/remuxer.py: Updates! Nothing gstreamery, it's all ui,
|
||||||
so I won't bother you with the details.
|
so I won't bother you with the details.
|
||||||
|
|
||||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit 53ecdc0c97a2992e5abeddd41d514bc142401e5d
|
Subproject commit ef97fb3278d98a1fdb32e5c6b2a7467116ffc160
|
|
@ -441,7 +441,7 @@ class Remuxer(gst.Pipeline):
|
||||||
self.response(FAILURE)
|
self.response(FAILURE)
|
||||||
elif message.type == gst.MESSAGE_WARNING:
|
elif message.type == gst.MESSAGE_WARNING:
|
||||||
print 'warning', message
|
print 'warning', message
|
||||||
elif message.type == gst.MESSAGE_SEGMENT_DONE:
|
elif message.type == gst.MESSAGE_EOS:
|
||||||
# print 'eos, woot', message.src
|
# print 'eos, woot', message.src
|
||||||
name = self.touri
|
name = self.touri
|
||||||
if name.startswith('file://'):
|
if name.startswith('file://'):
|
||||||
|
@ -542,6 +542,7 @@ class RemuxBin(gst.Bin):
|
||||||
return
|
return
|
||||||
|
|
||||||
queue = gst.element_factory_make('queue', 'queue_' + format)
|
queue = gst.element_factory_make('queue', 'queue_' + format)
|
||||||
|
queue.set_property('max-size-buffers', 1000)
|
||||||
parser = gst.element_factory_make(self.parsefactories[format])
|
parser = gst.element_factory_make(self.parsefactories[format])
|
||||||
self.add(queue)
|
self.add(queue)
|
||||||
self.add(parser)
|
self.add(parser)
|
||||||
|
@ -552,8 +553,8 @@ class RemuxBin(gst.Bin):
|
||||||
parser.link(self.mux)
|
parser.link(self.mux)
|
||||||
self.parsers.append(parser)
|
self.parsers.append(parser)
|
||||||
|
|
||||||
def _do_segment_seek(self):
|
def _do_seek(self):
|
||||||
flags = gst.SEEK_FLAG_SEGMENT | gst.SEEK_FLAG_FLUSH
|
flags = gst.SEEK_FLAG_FLUSH
|
||||||
# HACK: self.seek should work, should try that at some point
|
# HACK: self.seek should work, should try that at some point
|
||||||
return self.demux.seek(1.0, gst.FORMAT_TIME, flags,
|
return self.demux.seek(1.0, gst.FORMAT_TIME, flags,
|
||||||
gst.SEEK_TYPE_SET, self.start_time,
|
gst.SEEK_TYPE_SET, self.start_time,
|
||||||
|
@ -562,7 +563,7 @@ class RemuxBin(gst.Bin):
|
||||||
def _no_more_pads(self, element):
|
def _no_more_pads(self, element):
|
||||||
pads = [x.get_pad('src') for x in self.parsers]
|
pads = [x.get_pad('src') for x in self.parsers]
|
||||||
set_connection_blocked_async_marshalled(pads,
|
set_connection_blocked_async_marshalled(pads,
|
||||||
self._do_segment_seek)
|
self._do_seek)
|
||||||
|
|
||||||
|
|
||||||
class PlayerWindow(gtk.Window):
|
class PlayerWindow(gtk.Window):
|
||||||
|
|
Loading…
Reference in a new issue