Commit graph

310 commits

Author SHA1 Message Date
Jan Schmidt
436d33b288 splitmuxsink: add the ability to mux auxilliary video streams
The primary video stream is used to select fragment cut points
at keyframe boundaries. Auxilliary video streams may be
broken up at any packet - so fragments may not start with a keyframe
for those streams.
2019-07-15 11:46:36 +00:00
Jan Schmidt
b5d8484b0b splitmuxsrc: Add video_%d pad template.
splitmuxsrc actually supports multiple video pads. Make that clear,
especially since it was already creating pads named "video_0" etc.
2019-07-15 11:46:36 +00:00
Thibault Saunier
ac55681bbf docs: Fix link to strings
We can't link to #gchar* this way.
2019-06-14 17:34:43 -04:00
Mathieu Duponchelle
ddbbe5d277 splitmuxsink: set the same seqnum on flush_start / flush_stop
It's currently not made mandatory by aggregator, but it might
eventually be, and is more consistent behaviour

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/977
2019-06-13 16:44:47 +02:00
Jan Schmidt
f6b91fe303 splitmuxsrc: Protect initial pad configuration with the object lock
gst_splitmux_src_activate_part() configures the pad information
before starting the pad task, but occasionally the changes it makes
to the pad are not seen in the pad task because they're not
protected by the right locking. Use the pad's object lock to
protect those variables.
2019-06-12 02:46:48 +10:00
Jan Schmidt
715c6896a2 splitmuxsrc: Restart pad task on a reconfigure
On a reconfigure event, restart streaming on the pad so
that switching tracks in playbin works cleanly
2019-06-12 02:46:48 +10:00
Jan Schmidt
86c131b668 splitmuxsrc: Use an RW lock instead of a mutex to protect the pad list
Fix a deadlock around the pads list by using an RW lock to
allow simultaneous readers. The pad list doesn't really changes
except at startup and shutdown.
2019-06-12 02:46:48 +10:00
Jan Schmidt
26d6532702 splitmuxsrc: Ignore duplicate seeks
Use the seqnum to ignore duplicated seek events.
2019-06-12 02:46:41 +10:00
Jan Schmidt
18a7c10d4e splitmuxsink: Improve debug output
Make the debug output less confusing by not mentioning a src
pad when doing calculations on the sink pad side.

Improve debug around why a GOP is considered overflowing a fragment
2019-06-06 10:55:42 +10:00
Jan Schmidt
5ae55a4633 splitmuxsink: Give internal queues useful names
Makes debug output more useful
2019-06-06 10:55:42 +10:00
Sebastian Dröge
32c465a537 splitmuxsink: Only set running time on finalizing sink element when in async-finalize mode
There is only a single sink element in async-finalize mode, and we would
keep the running time from previous fragments set in that case. As we
don't ever set the running time for the very last fragment on EOS, this
would mean that the closing time reported for the very last fragment is
the same as the closing time of the previous fragment.
2019-05-28 17:21:06 +03:00
Mathieu Duponchelle
d704790519 doc: fix element section documentations
Element sections were not rendered anymore after the hotdoc
port, fixing this revealed a few incorrect links.
2019-05-25 16:57:31 +02:00
Seungha Yang
d2cac61113 multifilesink: Fix documentation of max-file-duration property
The max-file-duration property works with max-duration mode
2019-05-22 11:03:34 +09:00
Thibault Saunier
af01988534 doc: Port documentation to hotdoc 2019-05-13 11:34:56 -04:00
Thibault Saunier
0a6a62aa76 docs: Port all docstring to gtk-doc markdown 2019-05-13 10:24:40 -04:00
Sebastian Dröge
3537c4d217 splitmuxsrc: Refactor part preparation code and remove "prepared" signal from reader helper object
We don't need a special signal anymore but can directly work with
async-done
2019-01-09 13:35:58 +02:00
Sebastian Dröge
99bb6f44ba splitmuxsrc: Implement state change asynchronously instead of blocking
Blocking in change_state() is a recipe for disaster, even more so if
we wait for another thread that also calls into various element API and
could then lead to deadlocks on e.g. the state lock.
2019-01-09 13:35:58 +02:00
Vivia Nikolaidou
af0e30d545 splitmuxsink: Do not hardcode frames_of_daily_jam
Apart from the obvious drawbacks of hardcoding, the drawback here was
that, if we subtracted 2 frames (instead of 2.6) from the target running
time, we'd request the next keyframe a bit too far into the future,
which would make our files split at the wrong position.

https://bugzilla.gnome.org/show_bug.cgi?id=797293
2018-10-16 16:06:47 +03:00
Vivia Nikolaidou
faee020994 splitmuxsink: Fix if condition in drop-frame timecode wrap-around
Was previously: if ( x | y && a == b). Changed it into if ((x & y) && (a
== b)).
2018-10-11 13:58:34 +03:00
Vivia Nikolaidou
1219712da0 splitmuxsink: Subtract daily jam offset when day wraps around
For drop-frame framerates, when the expected next max timecode wraps
around at the end of the day, we have to subtract the offset of the
daily jam, otherwise we end up with a duration that's a few frames too
long.

https://bugzilla.gnome.org/show_bug.cgi?id=797270
2018-10-11 13:51:08 +03:00
Peter Körner
4b570026aa splitmuxsink: accept pads named 'sink' on the muxer, handle static pads as well
https://bugzilla.gnome.org/show_bug.cgi?id=797241
2018-10-03 23:24:26 +03:00
John Nikolaides
6fe214e7a9 splitmuxsink: Added a split-at-running-time action signal
The video file can now be split at an arbitrary time, given by the user
as an argument to the action signal.

https://bugzilla.gnome.org/show_bug.cgi?id=787922
2018-09-28 16:53:29 +03:00
Mathieu Duponchelle
9605028a71 splitmuxsink: Implement split-after
The behaviour of split-now is to output the current GOP after
starting a new file.

The newly-added split-after signal will output the current GOP
to the old file if possible once a new GOP is opened.

https://bugzilla.gnome.org/show_bug.cgi?id=796982
2018-09-21 16:31:34 +02:00
Mathieu Duponchelle
bfcddb7125 mp4 robust muxing: improve documentation and logging 2018-08-16 19:43:50 +02:00
Jan Schmidt
5da08a21c6 splitmuxsink: Don't leak old muxer/sink in async mode
Make sure to clear the reference taken earlier in the function
when switching muxer/sink asynchronously so they don't leak
2018-08-15 02:28:20 +10:00
Jan Schmidt
f8076e208b splitmuxsink: Fix reference counting loop
The stream context was holding a reference to the
internal queue and pads, with pad probes that were
in turn holding references to the stream context.

This lead to a leak if the request pads weren't explicitly
released.

https://bugzilla.gnome.org/show_bug.cgi?id=796893
2018-08-15 02:12:53 +10:00
Jan Schmidt
f672116c72 splitmux: Improve handling of repeated timestamps
When handling input with timestamps that repeat, sometimes
splitmuxsink would get confused and ignore a keyframe.

The logic in question is a holdover from before the cmd queue
moved the file cutting to the multiqueue output side and made
it deterministic, so it's no longer needed on the input
here.

https://bugzilla.gnome.org/show_bug.cgi?id=796773
2018-07-17 10:57:42 +10:00
Jan Schmidt
f667ab05d2 Revert "splitmuxsrc: Make sure events are writable"
This reverts commit 3ac5430311.

There's no need to make a freshly created event writable,
and the other half of this patch was already fixed
and pushed in f2f15a1
2018-07-17 01:33:55 +10:00
Jan Schmidt
3ac5430311 splitmuxsrc: Make sure events are writable
Before setting the seqnum on events sent downstream,
make sure they are writable.
2018-07-17 00:17:18 +10:00
Sebastian Dröge
f2f15a119f splitmuxsrc: Make sure events are writable before setting their seqnum 2018-06-18 12:13:48 +03:00
Vivia Nikolaidou
d11339d616 splitmuxsink: Added new async-finalize mode
This mode is useful for muxers that can take a long time to finalize a
file. Instead of blocking the whole upstream pipeline while the muxer is
doing its stuff, we can unlink it and spawn a new muxer+sink combination
to continue running normally.

This requires us to receive the muxer and sink (if needed) as factories,
optionally accompanied by their respective properties structures. Also
added the muxer-added and sink-added signals, in case custom code has to
be called for them.

https://bugzilla.gnome.org/show_bug.cgi?id=783754
2018-05-24 12:47:24 +03:00
Vivia Nikolaidou
498ebc5503 splitmuxsink: Added caption_%u pad template
For closed-caption-enabled muxers (e.g. qtmux)
2018-05-11 16:39:46 +03:00
Xavier Claessens
edd9c8f6b8 Meson: Generate pc file for all plugins in good
https://bugzilla.gnome.org/show_bug.cgi?id=794568
2018-04-25 11:07:06 +01:00
Vivia Nikolaidou
7d7c90bf5c splitmuxsink: Don't send fragment-opened-closed message if the reference ctx is NULL
It can happen during teardown that the reference context becomes NULL.
In that case, trying to send the fragment-opened-closed message would
lead to a crash.
2018-04-11 17:59:21 +03:00
Sebastian Dröge
6d7242925b splitmuxsink: Run gst_iterator_foreach() as long as it returns GST_ITERATOR_RESYNC
CID 1434160
2018-04-11 09:21:19 +02:00
Sebastian Dröge
0f1770f2bd splitmuxsink: Add new reset-muxer property
With this the muxer is not set to NULL after each segment but instead
only flush events are sent to it to reset the EOS state.

As a result, the muxer will keep stream state and e.g. mpegtsmux will
keep the packet continuity counter continuous between segments as needed
by hlssink2.

https://bugzilla.gnome.org/show_bug.cgi?id=794816
2018-04-03 14:37:44 +03:00
Sebastian Dröge
42f5f3d1be splitmuxsink: Allow splitting at exactly the time/bytes threshold
76e458a119 changed the conditions from
"queued > threshold" to "queued >= threshold", which broke hlssink2 and
resulting in too small fragments being created although keyframes would
be at *exactly* the configured threshold.

https://bugzilla.gnome.org/show_bug.cgi?id=794440
2018-03-19 12:23:47 +02:00
Jan Schmidt
d61066e6b5 splitmuxsrc: Improve not-linked handling.
Don't report not-linked unless all pads have
returned not-linked.
2018-02-16 17:02:31 +11:00
Justin Kim
ad8a6cb639 qtmux: send stream warning when refusing video caps
If codec_data is changed, the stream is no longer valid.
Rather than keeping running when refusing new caps,
this patch send a warning  to the bus.

Also fix up splitmuxsink to ignore this warning while changing caps.

https://bugzilla.gnome.org/show_bug.cgi?id=790000
2018-02-01 10:12:46 +00:00
Tim-Philipp Müller
ddd4fe680f splitmuxsrc: properly set total duration on outgoing segment
We would accidentally pass through the duration value from the
demuxer from a single fragment, which causes problems when
feeding the stream from splitmuxsrc to rtsp-server. Streaming
would stop after one fragment due to that.

https://bugzilla.gnome.org/show_bug.cgi?id=792861
2018-01-29 11:29:24 +00:00
Tim-Philipp Müller
07ae64118d splitmuxsrc: don't respond to duration query with CLOCK_TIME_NONE
total_duration is initialised to CLOCK_TIME_NONE, not 0, so check
for that as well in order not to return an invalid duration to
a duration query. Doesn't fix anything particular observed in
practice, just seemed inconsistent.
2018-01-29 11:29:24 +00:00
Tim-Philipp Müller
a5b5451d93 multifilesrc: fix up uri handler a little
Fix path escaping when creating URI from location in get_uri().

Return FALSE with an error when URI can't be parsed in set_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=783581
2018-01-23 18:38:26 +00:00
Dimitrios Katsaros
dccfaf2e91 multifilesrc: implement uri handler
With this patch we can now provide a set of files
created by multifilesink as a source for uri elements.

e.g. gst-launch-1.0 playbin uri=multifile://img%25d.ppm

Note that for the %d pattern you need to replace % with %25.
This is to be compliant with URL naming standards.

https://bugzilla.gnome.org/show_bug.cgi?id=783581
2018-01-23 18:05:49 +00:00
Tim-Philipp Müller
dfb27b44bc multifilesink: document unit of "max-file-duration" property 2018-01-16 13:19:29 +00:00
John Nikolaides
91dfc20a04 splitmuxsink: added a "split now" action signal
Now, the video file can be split at an arbitrary time chosen by the user.

https://bugzilla.gnome.org/show_bug.cgi?id=787922
2017-12-08 21:16:15 +02:00
Jan Schmidt
76e458a119 splitmuxsink: Use muxer reserved space properties if present.
If the use-robust-muxing property is set, check if the
assigned muxer has reserved-max-duration and
reserved-duration-remaining properties, and if so set
the configured maximum duration to the reserved-max-duration
property, and monitor the remaining space to start
a new file if the reserved header space is about to run out -
even though it never ought to.
2017-11-25 00:56:11 +11:00
Jan Schmidt
3a813a0dcc splitmux: Fix file switch-on-caps-change.
Switching to a new fragment because the input caps have
changed didn't properly end the previous file. Use the normal
EOS sequence to ensure that happens. Add a test that it works.
2017-11-24 16:56:03 +11:00
Jan Schmidt
97e8fd8272 splitmuxsrc: Don't return FALSE from event handling.
Returning FALSE because we drop an event means that
internal sources like qtdemux might throw an error
and break the whole pipeline. The only time it can
happen is either flushing or shutdown, and those
will be handled anyway.
2017-11-18 02:33:00 +11:00
Reynaldo H. Verdejo Pinochet
0ddb65dec7 Use proper GtkDoc notation for NULL/FALSE/TRUE 2017-10-03 16:30:10 -07:00
Tim-Philipp Müller
07dd3dba6f multifilesink: use new gst_buffer_list_calculate_size() 2017-09-17 12:50:30 +01:00
Vivia Nikolaidou
96cd941788 splitmux: Drop allocation queries
They can cause us to deadlock, while we're waiting for a new frame and
upstream is waiting for the allocation query to be answered before
sending a frame

https://bugzilla.gnome.org/show_bug.cgi?id=783753
2017-06-13 18:29:37 +03:00
Tim-Philipp Müller
e67a5a9f18 multifile: remove some cruft 2017-05-21 10:33:43 +01:00
Luis de Bethencourt
fb00a357cd multifilesink: fix property name in example pipeline
Since the move from CVS the property name of the documentation example
has been filename instead of location. Users trying the gst-launch
command as is will get:
no property name "filename" in element

Fixing it.
2017-05-20 11:51:33 +01:00
Nicolas Dufresne
b68d936ae0 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:41:19 -04:00
Vivia Nikolaidou
a910329f6d splitmuxsink: Add alignment-threshold argument
If a non-reference stream is behind the reference stream by an amount of
time smaller than the alignment threshold (in nsec), it counts as being
after it.

https://bugzilla.gnome.org/show_bug.cgi?id=782563
2017-05-16 15:30:52 +03:00
Sebastian Dröge
fe77e2efe8 splitmuxsink: Don't use an explicit name for requesting audio pads
... unless the muxer uses the same audio pad template name as
splitmuxsink. We can't request a pad called "audio_0" on a muxer that
wants pads to be "sink_%d".
2017-04-20 13:17:33 +01:00
Xavier Claessens
6b42569ded splitmuxsink: Correctly catch FLUSH events in probes
https://bugzilla.gnome.org/show_bug.cgi?id=767498
2017-04-20 20:17:35 +10:00
Jan Schmidt
7c0a9cb585 splitmuxsrc: Fix reverse playback
Fix the check for whether the start time of the segment has
been reached when playing in reverse. Otherwise, playback
stops after reaching the start of any file part, instead of
continuing until all parts within the segment have played
2017-03-04 00:35:32 +11:00
George Kiagiadakis
9b84513337 splitmuxpartreader: ignore sparse streams when calculating the end offset of a part
A sparse stream's ending timestamp can be considerably smaller
than the ending timestamps of the other streams, which can lead
to skipping considerable time from the next part.

https://bugzilla.gnome.org/show_bug.cgi?id=761086
2017-02-27 12:58:21 +02:00
George Kiagiadakis
99728792cd splitmuxpartreader: identify sparse streams 2017-02-27 12:58:21 +02:00
Olivier Crête
d8868c6339 splitmuxsink: Change files on incompatible caps
https://bugzilla.gnome.org/show_bug.cgi?id=761761
2017-02-17 15:11:02 -05:00
Olivier Crête
f79a7afac2 splitmuxsink: Reset ready_for_output on state change
https://bugzilla.gnome.org/show_bug.cgi?id=761761
2017-02-17 15:11:02 -05:00
Olivier Crête
5059b9b8c9 splitmuxsink: Remove unused next_max_out_running_time
https://bugzilla.gnome.org/show_bug.cgi?id=761761
2017-02-17 15:11:02 -05:00
Olivier Crête
c98d932fb8 splitmuxsink: Remove unused muxed_out_time
https://bugzilla.gnome.org/show_bug.cgi?id=761761
2017-02-17 15:11:02 -05:00
Jan Schmidt
2849ec2963 splitmuxsrc: Allow for buffers before the segment when measuring
Used signed calculations when measuring the max_ts of an input
fragment, so as to calculate the correct duration and offset
when buffers have timestamps preceding their segment
2017-02-07 13:11:30 +11:00
Vivia Nikolaidou
05db87de21 splitmuxsink: Add option for timecode-based split
If this option is given, it will calculate the next split point based on
timecode difference.

https://bugzilla.gnome.org/show_bug.cgi?id=774209
2017-01-13 10:37:32 +11:00
Vivia Nikolaidou
394be2c318 splitmuxsink: Return a bin with a "location" property as a sink
Splitmuxsink might be called with a custom bin as a sink. If it has a
"location" property, it can be used.
2017-01-03 01:34:02 +11:00
Jan Schmidt
335c9f28d6 splitmux: Rewrite buffer collection and scheduling
Majorly change the way that splitmuxsink collects
incoming data and sends it to the output, so that it
makes all decisions about when / where to split files
on the input side.

Use separate queues for each stream, so they can be
grown individually and kept as small as possible.

This removes raciness I observed where sometimes
some data would end up put in a different output file
over multiple runs with the same input.

Also fixes hangs with input queues getting full
and causing muxing to stall out.
2017-01-03 01:34:02 +11:00
Jan Schmidt
f7009eb5d7 splitmuxsink: Add format-location-full signal
Add a new signal for formatting the filename, which receives
a GstSample containing the first buffer from the reference
stream that will be muxed into that file.

Useful for creating filenames that are based on the
running time or other attributes of the buffer.

To make it work, opening of files and setting filenames is
now deferred until there is some data to write to it,
which also requires some changes to how async state changes
and gap events are handled.
2017-01-03 01:34:02 +11:00
Jan Schmidt
389dd4e3d0 splitmuxsrc: Pass seek flags when activating.
Pass all seek flags when activating a part
based on a seek, so that SNAP flags are preserved.
2017-01-03 01:34:02 +11:00
Jan Schmidt
6a16f8ef2e splitmux: Fix a small race in the splitmuxsrc
Make sure the state of the parser is set to
collecting streams before chaining up to the
parent change_state() method, to close a
small window that can cause playback to
never commence.
2017-01-03 01:34:02 +11:00
Tim-Philipp Müller
eb5ee5b7a3 multifilesink: refactor max_files handling a bit
Use GQueue instead of a GSList so we don't have to traverse
the whole list to append something every time. And it also
keeps track of the number of items in it for us.

Add a function to add filenames to the list of old files and
use it in more places, so that memory doesn't build up in
other modes either if no max_files limit is specified.

https://bugzilla.gnome.org/show_bug.cgi?id=766991
2016-12-31 09:58:40 +00:00
Ursula Maplehurst
a10c1cc060 multifilesink: don't leak memory when no max-files limit is set
Technically we weren't leaking the memory, just storing it internally
and never using it until the element is freed. But we'd still use more
and more memory over time, so this is not good over longer periods
of time. Only keep track of files if there's actually a limit set,
so that we will prune the list from time to time.

https://bugzilla.gnome.org/show_bug.cgi?id=766991
2016-12-31 09:58:28 +00:00
Vinod Kesti
11fd0e6120 splitmuxsink: pad request fails for flvmux
splitmuxsink requests pad from element using pad template like "video_%u", "audio_%u" and "sink_%d". This is true for most of the muxers.
But splitmuxsink not able to request pad to flvmux as flvmux has "audio" and "video" as pad templates.
fix: splitmuxsink should fallback to "audio" and  "video" when template not found.

https://bugzilla.gnome.org/show_bug.cgi?id=774507
2016-11-17 23:19:44 +11:00
Scott D Phillips
70e1d1bcd4 splitfilesrc: update uri_get_type to match the prototype in GstURIHandlerInterface
https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-12 10:52:24 +02:00
Vivia Nikolaidou
bbd4dd2fb1 splitmuxsink: Use first buffer TS as mux start time
Do not use last buffer TS + buffer duration because buffer duration
might be inaccurate, especially for frame rates like 30fps where a
rounding error is observed.

https://bugzilla.gnome.org/show_bug.cgi?id=773785
2016-11-08 21:09:12 +11:00
Jan Schmidt
8ff5dd8029 splitmuxsink: Fix GObject warnings on shutdown.
Commit 83e718 added a pad template to splitmux request
pads, which means that GstElement now releases the pads on
dispose, but after having removed all elements in the bin
and unlinked them. Make sure we can handle cleanup in that case
without throwing assertions.

https://bugzilla.gnome.org/show_bug.cgi?id=773784
2016-11-02 11:02:12 +11:00
Jan Schmidt
afc440e906 splitmuxsrc: Store seek seqnum and send it on EOS / segment events.
GES relies on the EOS event having the seqnum of the seek that
caused it.
2016-11-02 11:02:12 +11:00
Jan Schmidt
f609986c34 splitmuxsrc: Forward a not-linked error on the bus
Handle not-linked as for other fatal errors and post it
onto the bus so the app knows
2016-11-02 11:02:12 +11:00
Jan Schmidt
5067d7254f splitmuxsink: Only allow one video request pad
The pacing of the overall muxing is controlled
by the video GOPs arriving, so we can only handle
1 video stream, and the request pad is named accordingly.

Ignore a request for a 2nd video pad if there's already
an active one.
2016-10-26 20:17:40 +11:00
Jan Schmidt
917776730d splitmuxsink: Take ownership of floating refs
sink the floating ref when handed a muxer or sink to use so
we clearly take ownership.
2016-10-26 20:17:40 +11:00
Jan Schmidt
a80265d65a splitmuxsink: Set child elements to NULL when removing.
Make sure that elements are in the NULL state when removing.
Fixes critical warnings when errors occur early on in starting up.
2016-10-26 20:17:40 +11:00
Jan Schmidt
83e7182b30 splitmuxsink: Set pad template on request sink pads
Ensure that the ghost pad returned as a request pad
has the template that was requested
2016-10-26 20:17:40 +11:00
Nirbheek Chauhan
3c53d0f38c meson: Add missing pbutils dependency to multifile
Found via the Jenkins CI:

FAILED: subprojects/gst-plugins-good/gst/multifile/gstmultifile@sha/gstsplitmuxsink.c.o
[...]
In file included from ../subprojects/gst-plugins-good/gst/multifile/gstsplitmuxsink.h:24:0,
                 from ../subprojects/gst-plugins-good/gst/multifile/gstsplitmuxsink.c:59:
../subprojects/gst-plugins-base/gst-libs/gst/pbutils/pbutils.h:30:43: fatal error: gst/pbutils/pbutils-enumtypes.h: No such file or directory
 #include <gst/pbutils/pbutils-enumtypes.h>
                                           ^
compilation terminated.

https://ci.gstreamer.net/job/GStreamer-master-meson/263/console
2016-10-16 02:18:22 +05:30
Jan Schmidt
00d20b044c splitmuxsrc: Handle stop point from segment
If the seek stop point (or start, during reverse play)
was within the segment we just finished, go EOS immediately
instead of proceeding through all other parts and sending
0 length seeks to them.

https://bugzilla.gnome.org/show_bug.cgi?id=772138
2016-10-01 00:12:41 +10:00
Jan Schmidt
1a17ce9705 splitmuxsrc: Drop lock shutting down pads
Avoid a sporadic deadlock on shutdown by dropping
the splitmux lock around pad shutdown

https://bugzilla.gnome.org/show_bug.cgi?id=772138
2016-10-01 00:12:41 +10:00
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
Tim-Philipp Müller
023998dd76 Revert "multifilesink: streamline the file-switch code a bit"
This reverts commit f1ceaab02f.

This broke atomic file writes in "buffer" mode. It did make
sure that any streamheaders are prepended to each file in
buffer mode as well, but that's not really needed in practice,
whereas atomic file writes are, so let's restore the status
quo ante for now since this was primarily a code cleanup anyway,
and if anyone needs to streamheaders in buffer mode too they
can make a patch to implement that differently. Re-implementing
the atomic writes in the element also seems way too much work.

https://bugzilla.gnome.org/show_bug.cgi?id=766990
2016-09-27 10:23:38 +01:00
Tim-Philipp Müller
6ab88a7f78 Revert "multifilesink: close file on write error with next-file mode is set to buffer"
This reverts commit 84e441d268.

This will no longer be needed once we revert f1ceaab02.
2016-09-27 10:22:57 +01:00
Thibault Saunier
150edef830 Use the new API to post flow ERROR messages on the bus
https://bugzilla.gnome.org/show_bug.cgi?id=770158
2016-08-26 19:23:26 -03:00
Tim-Philipp Müller
78bb4cc7e2 splitmuxsink: fix printf format compiler warning in debug message
On 32-bit x86: gstsplitmuxsink.c:966:31: warning: format ‘%u’ expects
argument of type ‘unsigned int’, but argument 9 has type
‘guint64 {aka long long unsigned int}’
2016-08-22 00:07:51 +01:00
Nirbheek Chauhan
b09f478e80 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:21:12 +01:00
Jie Jiang
655856deee Fixed splitmuxsink 32-bit overflow bug
Extend the byte tracking counters to 64-bit on
all platforms, instead of using gsize, which overflows
after 4GB.

https://bugzilla.gnome.org/show_bug.cgi?id=770019
2016-08-20 19:53:11 +10:00
Vivia Nikolaidou
b9a8188704 splitmuxsink: Add option to split at exactly max-size-time
Will try to request a keyframe from the encoder to be sent at the target
running time.

https://bugzilla.gnome.org/show_bug.cgi?id=769664
2016-08-17 17:42:55 +10:00
Vivia Nikolaidou
369d37d227 splitmuxsink: Allow time and bytes to reach their respective thresholds
https://bugzilla.gnome.org/show_bug.cgi?id=769664
2016-08-17 17:42:55 +10:00
Jan Schmidt
75b601bbd4 splitmux: Fix typo converting to running time.
Use the correct collected timestamp.
2016-08-08 13:49:19 +10:00
Jan Schmidt
5a71334fb0 Revert "splitmuxsink: Use GstBin async-handling instead of our own."
This reverts commit fa008f271a.

async-handling in GstBin causes the pipeline to spin at 100%
CPU as the top-level pipeline tries to change that state
to PLAYING constantly. This is a workaround for a core
problem, essentially, but an improvement in this case for now.
2016-08-08 03:07:34 +10:00
Jan Schmidt
89af379ff0 splitmux: Recheck state after unlocking mutex.
After dropping the splitmux lock, re-check the state,
don't just fall through and sleep unconditionally,
as we may have already missed the wakeup.

https://bugzilla.gnome.org/show_bug.cgi?id=769514
2016-08-08 00:56:38 +10:00
Jan Schmidt
69df65fabe splitmuxsrc: Don't stop and error on EOS flow return
Don't immediately halt on EOS flow return from downstream
due to out of segment. Let the demuxer handle it and send
EOS.
2016-08-06 01:41:06 +10:00