Commit graph

12 commits

Author SHA1 Message Date
Jan Schmidt
359f8ff2d7 splitmuxsrc: Fix extra unref handling queries
https://bugzilla.gnome.org/show_bug.cgi?id=772138
2016-10-01 00:12:41 +10:00
Jan Schmidt
f8d7a2a0af splitmuxsrc: Avoid stall when parts get out of sync
When one part moves ahead of the others - due to excessive
downstream queueing, or really small input files - then
we can end up activating parts more than once. That can lead to
effects like shutting down pad tasks prematurely.

https://bugzilla.gnome.org/show_bug.cgi?id=772138
2016-10-01 00:12:41 +10:00
Jan Schmidt
d7eb97393c splitmuxsrc: Connect to demux signals before activating
Fix a race in splitmuxsrc by properly connecting to the
demuxer signals we're interested in *before* setting it running.
2016-05-15 22:09:04 +10:00
George Kiagiadakis
eafa9f08f7 splitmuxsrc: print potentially negative offset with a sign 2016-01-25 15:36:29 +01:00
Vineeth TM
b0114bacdb splitmuxpartreader: Fix GCond leak
inactive_cond is not being cleared resulting in memory leak.

https://bugzilla.gnome.org/show_bug.cgi?id=757924
2015-11-11 15:38:05 +01:00
Jan Schmidt
e7ec32801a splitmuxsrc: Use a separate lock to delay typefind.
Don't hold the main splitmux part lock over
the parent state change function, as it prevents
posting error messages that happen. Since the purpose
is to prevent typefinding from proceeding, use a
separate mutex just for that.
2015-07-29 23:03:18 +10:00
Jan Schmidt
600bab0056 splitmuxsrc: Fix startup and shutdown races.
Fix 2 startup races when things happen too quickly, and 1
at shutdown by holding a ref to the pads in use until the
loop functions exit.

Handle errors activating file parts and publish them on
the bus.

https://bugzilla.gnome.org/show_bug.cgi?id=750747
2015-06-23 12:03:14 +10:00
Jan Schmidt
3f39d06338 splitmuxsink: Take released-but-not-yet-output bytes into account
When deciding whether it's time to switch to a new file, take into
account data that's been released for pushing, but hasn't yet
been pushed - because downstream is slow or the threads haven't been
scheduled.

Fixes a race in the unit test and probably in practice - sometimes
failing to switch when it should for an extra GOP or two.

Also fix a problem in splitmuxsrc where playback sometimes
stalls at startup if types are found too quickly.

https://bugzilla.gnome.org/show_bug.cgi?id=750747
2015-06-12 01:57:36 +10:00
Jan Schmidt
8ceb58122e splitmux: Add unit test for file splitting
Add a unit test for file splitting, and fix the leaks in the
splitmuxsink it found
2015-02-07 03:58:30 +11:00
Jan Schmidt
aa4c29c5d6 splitmux: Fix memory leaks until the test valgrinds clean 2015-02-07 00:19:36 +11:00
Jan Schmidt
ace6be8abb splitmux: Handle early EOS during part preparation
Handle the case where a short file reaches EOS while we're still
waiting for no-more-pads, and make sure we continue to the internal
READY state for real playback to work properly later.
2015-02-06 06:42:17 +11:00
Jan Schmidt
5e2214d309 splitmux: Implement new elements for splitting files at mux level.
Implement 2 new elements - splitmuxsink and splitmuxsrc.

splitmuxsink is a bin which wraps a muxer and takes 1 video stream,
plus audio/subtitle streams, and starts a new file
whenever necessary to avoid overrunning a threshold of either bytes
or time. New files are started at a keyframe, and corresponding audio
and subtitle streams are split at packet boundaries to match
video GOP timestamps.

splitmuxsrc is a corresponding source element which handles
the splitmux:// URL and plays back all component files,
reconstructing the original elementary streams as it goes.
2015-02-06 04:26:59 +11:00