g_value_set_object() increases the refcount of the sink, which is not needed
because the object should already be refcounted. Make sure this is always the
case and use g_value_take_object().
Fixes: #592884
Before, SEEK events would be sent to the video sink, which wouldn't
be linked in any way to the subtitle part of the pipeline and
subparse would never see the SEEK event. This would then seek
the audio/video but the subtitles would continue from the old
position instead.
Fixes bug #591664.
The problem with an error message is, that it will stop playback completely
while it could be that only a audio decoder plugin is missing and the video
could be played with the available plugins.
See bug #591677.
Before we had STREAM/WRONG_TYPE but it's really CORE/MISSING_PLUGIN
because a plugin is missing and nothing else is wrong.
Also make it an error instead of a warning.
Really fixes bug #591677.
Don't do fallbacks if application specified a sink element. When doing the
fallback use configured default elements instead of hardcoded linux only
elements. Improve error messages accordingly.
If a downstream element returns an error while upstream has already
put all data into queue2 (including EOS), upstream will no longer
chain into queue2, so it is up to queue2 to perform some
EOS handling / message posting in such cases. See #589991.
This later allows to handle interlaced AVPicture different than
progressive ones which is needed for horizontally subsampled YUV
formats, see bug #589242.
There are flac-in-ogg files without the usual flac packet framing
and these files just have a 4-byte fLaC ID packet as first packet.
We need to recognise the type just from these four bytes if we
want oggdemux to recognise these streams correctly.
Rename the GType of the pads of playbin's internal stream selector
element so they don't use the same type name as input-selector's
pads. Fixes#589622.
We can't call gst_element_send_event() from a streaming thread as it gets the
state lock. Instead call the send_event method directly until we have a nice API
for this in basesrc.
Fixes#588746
Keep track of the max requested position and compare this to the write position
in the temp file to get the current amount of buffered data.
Fix memleak of all incomming buffers.
Fixes#588551
We shouldn't really depend on elements from -bad for stream
selection in playbin2, so use a private copy of input-selector
until the selector plugin is ready to be moved to -base or -good.
Fixes#586356.
Differentiate subtitle streams and lyrics/cracktastic/complex streams via
the category string in the headers. This seems like a useful distinction
to make, and also seems more future-proof. See #525743.
Don't flush the file by closing and opening it but instead use g_freopen. This
avoids a deadlock in shutdown because we emit the temp-location property change
with the wrong lock held.
Fix the construction of the temporary filename construction as the application
name can be NULL and we don't want a separator between the prgname and the
template.
Add a download property that will attempt to configure queue2 into progressive
download buffering.
Make sure we only enable download buffering for quicktime and flv formats.
Add a new temp-template property so that queue2 can securely allocate a
temporary filename. Deprecate the temp-location property for setting the
location but still use it to notify the allocated temp file.
Adder can only handle one common format accross the pads. Thus one needed to add
a capsfilter afterwards and manage the caps. Now one can simply set the caps on
the property.
If READY->PAUSED failed in the source element we would've swapped
the current and next group already. To allow READY->PAUSED to succeed
after the first failure we have to swap the current and next group
back again. This also ensure that we're again in the same state
as before the failed state change and not at the next group.
This was especially a problem for playbin2 pipelines that use the
new mounting support in giosrc as the source would fail for READY->PAUSED
the first time, the application mounts the location and then tries
to go READY->PAUSED again (and this time it would succeed).
Fixes bug #588078.
This ensures that collectpads' cookie is properly updated so that when the streaming
threads will restart and be checking for the flushing status of all pads there will
be no inconsistent state.
This patch adds support for stationary white Gaussian noise.
The Box-Muller algorithm is used to generate pairs of independent
normally-distributed random numbers.
Fixes bug #586519.
When a seek failed upstream, make sure the adder sinkpad is set unflushing again
so that streaming can continue.
We only have a pending segment when we flushed.
Set the flush_stop_pending flag inside the appropriate locks and before we
attempt to perform the upstream seek.
Add some more comments.
Use the right lock to protect the flags in flush_stop.
See #585708
Set the target state of the newly added uridecodebins to somthing else that
PAUSED so that we keep their state in sync with the playsink state.
Fixes#585268
At least do the fix to sent the flush_stop when seeking failed to ensure we
keep no pads flushing. before it was send when the seeking worked which is just
plain wrong and was not the intention.
When no flush-stop has been sent by upstream, we have to send one ourselves to
continue playback. Do this as soon as the collect function is called instead of
after we possibly pushed segment events (that got then flushed out)
uridecodebin expects the passed connection-speed value in kbps, so we
need to divide the value stored in bps by 1000. Also, lower the upper
limit on the properties to the value that we can actually store in our
internal guint (which is plenty high enough)
Be even less restrictive in what we accept for .srt timestamps when
typefinding and parsing subrip subtitles and add a unit test for
the 'new' format. Fixes#585197.
When we are probing for streams, we want to set the queue size in such a way
that we can scan a maximum amount of data without consuming too much memory.
Therefore, remove the time limit on the queue and only stop scanning after 2MB
of data.
See #584104.
Recognise PGS subpicture streams and connect them to the SPU pad
in playsink. Unfortunately this fails badly with negotiation errors
if the SPU is not recent enough to support the stream. I'm not sure
how to add format negotiation in yet.
When using an audio sink without a "volume" property, volume control
would only work for the first song. For the next song, we'd try to
re-use the existing audio chain, but inadvertently set chain->volume
to NULL instead of to the existing volume element.
playbin2 inadvertently used autoaudiosink and autovideosink up to now,
since it would overwrite the sinks configured via the "audio-sink"
and "video-sink" properties with the stream-specific group sinks when
configuring the outputs. Those are usually NULL however, so that would
overwrite the configured sinks with NULL which makes playbin2 then
default to the auto sinks. Fix this by keeping a reference to each
configured sink in playbin2 and setting up the right sinks depending
on whether there is a stream-specific sink or not.
Fixes#584020.
Use two flags to remember volume/mute changes at times when we don't have the
audiochain yet (e.g. construction). Only set values when they were actualy
changed. This makes pulseaudio's stream restore functional.
Adder was relying that something else sends a flush stop. When using adder with
a livesource it was not getting a flush_stop and thus all pads downstream where
keept flushing. Mark a pending flush_stop and send it when we are working on
the new segment back in the streaming thread.
Add a queue2 after the raw output pads of certain sources such as those for uris
like cdda://
No tuning of the queue is done yet as the defaults seem to work fine for me.
Fixes#582528
The enum nick should be 'sine-table', not 'sine table'. Technically this is
an API/ABI change I guess, but anyone who was using this and didn't report
it deserves this.
Handle buffers with -1 timestamps better by keeping track of the en time of the
previous buffer and assuming the -1 timestamp buffer goes right after the
previous one.
when we have two buffers that are equally good, output the oldest buffer once to
minimize latency.
don't try to calculate latency when the input framerate is unknown.
Keep track of the autoplugged custom sinks and configure them in the playsink
element when we have collected all streams.
Also make sure that we only select one custom sink.
When unreffing the internal sink, we don't need to change the state to NULL.
mp3_type_find could suggest already when only a single valid header
was found, if it ran out of data before the end of the next frame.
Therefore, ignore the last found frame if it was incomplete.
Fixes bug #579692.
Make playsink go async to the PAUSED state instead of relying on uridecodebin
for async behaviour in playbin. This solves some problems (mainly with DVD)
where the pipeline would go to PLAYING before preroll completed, failing to
select the audiosink clock.
Fixes#581727
When calculating the input/output buffer sizes in the transform_size function,
take the number of channels into account, so we don't end up calculating
a buffer size that only contains a partial number of audio frames.
Also, when going from output size to input size, round down rather than
up, so as to calculate the minimum number of samples that *might* yield
a buffer of the intended destination size.
Fixes: #580470 and #580952
When videorate duplicates a buffer with a DISCONT flag, it copies the discont on
the first pushed buffer but fails to clear it for subsequent buffers. This
causes theoraenc!oggmux and possibly other elements to consider this a discont
stream.
Fix videorate to produce discont as the first buffer and after a flushing seek.
Fixes#580271.
The 2s limit is way too small for a lot of files (which have an interleave
in time of between 3 and 5s). Instead, leave it to the initial 5s value
and reduce the other limits (allowing us to stay memory-efficient).
First check the pad caps if they are raw before setting the raw_decoding_mode to
TRUE. Fixes playback of transport streams and other streams that require large
queues.
Fixes#579734
Adds a new property in multifdsink, resend-streamheader.
If this property is false, the multifdsink will not send the streamheader if
there's already one set for a particular client.
There are some formats in which every stream needs to start with a certain
blob, but you can't inject this blob at leisure. If the producer wants to
change the blob in question and sets in as the streamheader on the outgoing
buffers' caps, new clients of multifdsink will get the new streamheader, but
old clients will break, because they'll see the blob in the middle of the
stream.
The property is true by default, so existing code will not see any difference.
Fixes#578118.
Add a property to disable listening to client writes. This property is usefull
when other code will deal with reading from the client socket.
API: GstMultiFdSink::handle-read property
Clear the target of our ghostpads before we remove the pad from the element.
This to make sure that the internal pad is not left linked to whatever pad we
were ghosted to. This should only be a problem when we leak the ghostpads.
Also release our subpicture pads.
Fixes#577288.