Commit graph

2600 commits

Author SHA1 Message Date
Tim-Philipp Müller
4343c3bff8 docs: fix up example pipeline 2015-05-10 11:42:21 +01:00
Tim-Philipp Müller
ec5c93f169 docs: update element example pipelines
- gst-launch -> gst-launch-1.0
- use autoaudiosink and audiovideosink more often
- review pipeline examples and descriptions
2015-05-10 11:38:19 +01:00
Jose Antonio Santos Cadenas
8dde6b170b opusheader: Do not include rate in caps if it is 0
As expressed in gst_opus_header_create_caps, value 0 means unset.
Setting rate value to 0 make negotiation with decoder fail.

https://bugzilla.gnome.org/show_bug.cgi?id=748875
2015-05-04 10:50:42 +02:00
Young Han Lee
bd40d2e33f oggdemux: remove unused code
These lines have done nothing for about 10 years.

https://bugzilla.gnome.org/show_bug.cgi?id=748820
2015-05-03 13:33:01 +01:00
Tim-Philipp Müller
97c3e548d6 opus: fix includes and compilation against opus in non-standard prefix
https://bugzilla.gnome.org/show_bug.cgi?id=748594
2015-04-28 17:24:04 +01:00
Mersad Jelacic
443cc3baab opus: don't use deprecated gst_buffer_new_and_alloc
Use the helper function available in the base class instead.

https://bugzilla.gnome.org/show_bug.cgi?id=748585
2015-04-28 16:36:02 +01:00
Tim-Philipp Müller
c680e324bc Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:42:34 +01:00
Stefan Sauer
7e8e020cfd audiovisualizer: fix the license from GPL to LGPL
This was a copy'n'paste buf in the initial commit done by myself.
2015-04-25 18:45:50 +02:00
Guillaume Desmottes
d31472fde7 oggdemux: fix event leaks
gst_event_replace() takes its own reference on the event so we should drop
ours after creating and storing an event using it.

This fix leaks which can be reproduced using the
validate.http.media_check.vorbis_theora_1_ogg scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=748247
2015-04-23 11:02:45 +01:00
Guillaume Desmottes
e9a6cafa13 basetextoverlay: fix buffer leak in chain function
If we don't consume the buffer by passing its reference to
overlay->text_buffer then we need to unref it.

Fix a leak with validate.file.playback.fast_forward.test5_mkv
when running inside Valgrind.

https://bugzilla.gnome.org/show_bug.cgi?id=747602
2015-04-10 10:12:19 +01:00
Vincent Penquerc'h
a44258dbe8 oggdemux: fix wrong duration on partial streams with a skeleton index
When a stream has a skeleton index, the stream time is taken from that
index. However, when part of the stream is captured, the index is
invalid as its offsets are now wrong. To avoid this, we ignore the index
when the last offset points beyond the end of the stream (when its
byte length is known).

https://bugzilla.gnome.org/show_bug.cgi?id=744070
2015-04-03 16:40:04 +01:00
Vincent Penquerc'h
b247001aa9 textoverlay: fix disappearing text with high deltax
When deltax is large enough to cause the text to push past the
width of the frame, it would disappear due to a bug in setting
the layout width.

While there, fix a log printing an incorrect width to set.

https://bugzilla.gnome.org/show_bug.cgi?id=739689
2015-04-03 16:14:23 +01:00
Vincent Penquerc'h
b590a843f4 oggmux: fix deadlock when not pulling a buffer from collectpads
oggmux keeps a cached buffer per pad, and pulls buffers from
collectpads to this cached buffer for all pads before processing
the best pad. In some cases, the move from collectpads buffer
to cached buffer is delayed till next call. However, when there
is only one pad, this can't be delayed till next call as there
will be a deadlock since collectpads has no other pad to push to.

https://bugzilla.gnome.org/show_bug.cgi?id=740565
2015-04-03 15:52:54 +01:00
Arun Raghavan
20af81edb5 opus: Fix incorrect fall-through condition in property getter 2015-04-03 11:47:09 +05:30
Guillaume Desmottes
452d7b04e3 oggdemux: don't use GST_ERROR() for debug messages
Fix https://bugzilla.gnome.org/show_bug.cgi?id=746457
2015-04-01 16:06:42 +01:00
Mark Nauwelaerts
d1f91723be oggdemux: resurrect some flow return handling
https://bugzilla.gnome.org/show_bug.cgi?id=744572
2015-03-29 13:51:05 +02:00
Nicolas Dufresne
6ba8d385e3 Revert "theoradec: Disable usage of crop meta"
This reverts commit da52868f46.
2015-03-24 15:47:20 -04:00
Nicolas Dufresne
da52868f46 theoradec: Disable usage of crop meta
This is a temporary workaround that simply disables usage of crop
meta for now.

https://bugzilla.gnome.org/show_bug.cgi?id=741030
2015-03-24 14:36:12 -04:00
Luis de Bethencourt
56485e3b14 opusenc: fall through switch statement
Adding a comment makes coverity happy and quells the issue.

CID 1291629
2015-03-24 15:14:05 +00:00
Sebastian Dröge
6f33c20b00 opusenc: Set output format immediately after creating the encoder instance
We know the caps by then, there's no need to wait until we actually receive
the first buffer.
2015-03-23 13:15:30 +01:00
Sebastian Dröge
78634dc2c3 opusenc: Remove another unused variable 2015-03-23 13:13:35 +01:00
Sebastian Dröge
37d87bf352 opusenc: Remove useless headers and header_sent variables from the instance struct
They are only used inside a single function.
2015-03-23 13:12:25 +01:00
Sebastian Dröge
dd674942ba opusdec: Take channels and sample rate from the caps if we have no stream header 2015-03-23 12:09:25 +01:00
Sebastian Dröge
65662c8997 opusdec: Reset the decoder if the caps change 2015-03-23 12:09:09 +01:00
Sebastian Dröge
ef29b92990 opusdec: Take output sample rate from the stream headers too
This way we let opusdec do the resampling if needed and don't carry
around buffers with a too high sample rate if not required.

While Opus always uses 48kHz internally, this information from the
header specifies which frequencies are safe to drop.
2015-03-23 11:57:09 +01:00
Sebastian Dröge
e252b13dd0 opusheader: Put number of channels and sample rate into the caps
https://bugzilla.gnome.org/show_bug.cgi?id=746617
2015-03-23 11:56:09 +01:00
Wonchul Lee
b45941219e oggdemux: Fix compiler warning
gstoggdemux.c:1233:11: error: format specifies type 'long' but the argument has type 'ogg_int64_t' (aka 'long long') [-Werror,-Wformat]
          granule);
          ^~~~~~~

https://bugzilla.gnome.org/show_bug.cgi?id=746512
2015-03-23 09:15:02 +01:00
Vincent Penquerc'h
1ee2fccfdf oggdemux: fix playback regression on streams with clipped data at start
The code that was calculating the start granule from packet durations
was interpreting a negative value as an error, but this is actually a
valid case, to indicate clipping of data at start.

https://bugzilla.gnome.org/show_bug.cgi?id=743900
2015-03-16 11:59:19 +00:00
Vincent Penquerc'h
c47004d3db oggdemux: recover from EOS when searching for chain in push mode
If we get EOS when we're trying to build a chain, we disable seeking
and continue instead of posting an error. This can happen for corner
cases such as a stream with a video that stops before the end, for
instance.

https://bugzilla.gnome.org/show_bug.cgi?id=745980
2015-03-12 14:53:32 +00:00
Vincent Penquerc'h
87fd62811d oggdemux: fix seeking in files with a "missing" stream
When looking for pages when seeking, we stop looking for non sparse
streams if we don't find one within a given threshold. This fixes
seeking filling up queues and blocking in corner cases such as an
audio file with a pathological 1 frame video stream (yes, I saw one).

https://bugzilla.gnome.org/show_bug.cgi?id=745980
2015-03-12 14:53:27 +00:00
Vincent Penquerc'h
fcce2fe059 opusenc: replace cbr and constrained-vbr properties with an enum
It was deemed confusing before.

https://bugzilla.gnome.org/show_bug.cgi?id=744909
2015-03-12 14:04:20 +00:00
Jan Schmidt
9a541157cf theoradec: Fix decoding in the presence of GstVideoCropMeta
Store the video info of the internal frame decode width/height
separate to the exposed (cropped) frame info, so that it can be
used for mapping the downstream allocated video frame buffer correctly
when using GstVideoCropMeta.

Fixes playback of files with sizes that aren't a multiple of 16-pixels
width or height.

https://bugzilla.gnome.org/show_bug.cgi?id=741030
2015-03-12 22:38:37 +11:00
Vincent Penquerc'h
e77b60a73f oggdemux: do not send seek events from the streaming thread
This will usually deadlock, despite this patch being in master for
quite some time and working fine. Nevertheless, we deem it to be
not working, disregarding facts.

As such, we fix it by keeping track of seek events, and sending
them upstream from a separate thread. Buffers are then discarded
till we get a new segment with the expected seqnum.
2015-03-11 14:40:49 +00:00
Vincent Penquerc'h
5f3fc5db05 oggdemux: set correct seqnum on segment events after a seek in push mode
There is already a seqnum field for this, which was used to overwrite
the seqnum that was set by the push specific code.
2015-03-11 12:04:23 +00:00
Vincent Penquerc'h
acaf534714 oggdemux: try harder to query duration from upstream
READY->PAUSED can be too early as souphttpsrc can get the HTTP
headers after this. Try again in the chain function.

Also use seeking query to disable seeking if upstream reports
being unseekable.
2015-03-11 12:04:23 +00:00
Vincent Penquerc'h
969cf47a82 oggdemux: add non flushing time seeking in push mode
Some resetting code has to be done in the NEW_SEGMENT
event handler, instead of the missing FLUSH_STOP one.

Segment base was also wrongly accounted for. This was hidden
by the fact that flushing resets the base.

A discontinuity is now also signalled on seeking. We have to
also ensure that the discontinuity "sticks" till a buffer
with a valid timestamp goes out, or the audio decoder base
class will ignore the discontinuity for purposes of keeping
track of the current time.

This allows using non flushing segment seeks for looping
HTML audio in particular, and more generally non flushing seeks.

https://bugzilla.gnome.org/show_bug.cgi?id=729198
2015-03-11 12:04:23 +00:00
Vincent Penquerc'h
ca136e3648 oggdemux: fix wrong first granule
The code was using the first nonnegative granulepos to seed the
granule tracking, which appeared to work since headers have zero
granulepos. However, this does not work for files with a hole at
start, which are common in live streaming.

The correct behavior is to look for the first granule, and subtract
the duration of all the packets finishing on this page.

The function which does this relies on the fact that the ogg_stream
structure can be duplicated by shallow copy, in order to pull the
packets from the first page(s) on the copy without affecting the
original stream state.
2015-03-11 12:04:23 +00:00
Tim-Philipp Müller
c53ba4beeb Fix double semicolons 2015-03-10 09:27:08 +00:00
Vincent Penquerc'h
b8565d3ab6 opusdec: fix latency query in FEC case
The max latency parameter is "the maximum time an element
synchronizing to the clock is allowed to wait for receiving all
data for the current running time" (docs/design/part-latency.txt).

https://bugzilla.gnome.org/show_bug.cgi?id=744338
2015-03-04 11:04:29 +00:00
Nicolas Dufresne
ace35b78ee textoverlay: Re-render if video size changed
https://bugzilla.gnome.org/show_bug.cgi?id=745554
2015-03-03 16:38:33 -05:00
Sebastian Dröge
db20b21a51 opusenc: Remove g_warnings() for the deprecated audio property
Otherwise there are g_warnings() already when just using gst-inspect or
dumping a pipeline graph.
2015-02-18 17:47:50 +02:00
Tim-Philipp Müller
725906bb71 audiovisualizer: don't use private GMutex implementation details
Don't use private GMutex implementation details to check
whether it has been freed already or not. Just turn dispose
function into finalize function which will only be called
once, that way we can just clear the mutex unconditionally.
2015-02-16 23:54:28 +00:00
Sebastian Dröge
111c831c08 Improve and fix LATENCY query handling
This now follows the design docs everywhere, especially the maximum latency
handling.

https://bugzilla.gnome.org/show_bug.cgi?id=744106
2015-02-11 14:16:21 +01:00
Jan Schmidt
f04afa938f oggmux: Don't pass GstCollectData as a GstObject to GST_DEBUG 2015-02-07 04:08:38 +11:00
Jan Schmidt
d3f6d2b887 oggdemux: Add a little timestamping debug output 2015-02-06 04:05:27 +11:00
Jan Schmidt
f852f3bc75 theora: If no header packets in stream, look for them in the caps
Makes theora work in cases where the header packets are only in the caps
(because theoradec was connected to oggdemux late and missed the
beginning of the stream)
2015-02-06 04:05:27 +11:00
Jan Schmidt
615118dea8 theora: Remove FIXME and return GST_CUSTOM_FLOW_DROP for header packet handling
This FIXME is easily fixed :)
2015-02-06 04:05:27 +11:00
Vincent Penquerc'h
9491157f1a oggdemux: do not throw a flow error on flushing
If the streaming task attempts to read a chain while the pipeline
is stopping (which can happen if the pipeline stops shortly after
start or a new URI being setup in gapless playback case), it will
see a flushing return from upstream, and should then also return
flushing to the caller, rather than emit a flow error.

https://bugzilla.gnome.org/show_bug.cgi?id=722442
2015-01-29 17:58:27 +00:00
Vincent Penquerc'h
da4f7e5387 opusenc: change audio property to audio-type
This is now an enum with values generic (default) and voice.

https://bugzilla.gnome.org/show_bug.cgi?id=740891
2015-01-29 13:23:57 +00:00
Luis de Bethencourt
945afe6cc4 visual: fix caps leak
Fix leak of caps event and of caps objects when setting caps on sink and src
pads. Sync audiovisualizer class implementation to the one in gst-plugins-bad.
This commit matches c5ef1bee73 in that module.

https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-01-21 15:22:15 +00:00
Luis de Bethencourt
684e5e0c87 visual: post QoS messages when dropping frames due to QoS
https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-01-21 14:47:19 +00:00
Sebastian Dröge
2bd4ea6e8e Constify some static arrays everywhere 2015-01-21 09:49:47 +01:00
Sebastian Dröge
69e338d7dd alsa: Constify channel position table 2015-01-21 09:42:35 +01:00
Sebastian Dröge
8e6fb92886 alsa: Fix indention 2015-01-21 09:42:35 +01:00
Thomas Roos
485ad66a11 alsa: Allow to use 8 bit samples with ALSA
8 bit samples have no (0) as endianness, not the native endianness.

https://bugzilla.gnome.org/show_bug.cgi?id=739446
2015-01-21 09:42:35 +01:00
Vincent Penquerc'h
fbff44711a oggmux: fix clipped duration determination for non 0 based segments
https://bugzilla.gnome.org/show_bug.cgi?id=740422
2015-01-16 15:55:10 +00:00
Luis de Bethencourt
4d6f318fc9 visual: cleanup
Shameful fix to a silly mistake in the previous commit. Above email address for
any mockery
2015-01-13 16:58:34 +00:00
Luis de Bethencourt
1bb169410e visual: handle the return of the setup function
Make the baseclass future proof by handling the gboolean return of the setup
function. So if/when a child class uses this the base class is ready.
2015-01-13 16:36:09 +00:00
Luis de Bethencourt
d3a73827e0 Revert "visual: remove unnecessary variable"
This reverts commit a91d521a36.

Being a base class it is better to check the value instead of ignoring it since
a child class could be created that returns valuable information.
2015-01-13 16:09:49 +00:00
Luis de Bethencourt
a91d521a36 visual: remove unnecessary variable
klass->setup (scope) will always return TRUE since all children of this class
do so, no need to store the return. Besides, the value is overwritten a few
lines down before it is ever used. Save the unnecessary memory and instructions.

CID #1226467
2015-01-13 15:14:38 +00:00
Luis de Bethencourt
7cc048f4df visual: use unused value
ret is assigned but not used and in the next cycle of the loop it is overwritten
with default_prepare_output_buffer (). If there is a flow error the function
should return instead.

CID #1226475
2015-01-12 15:27:18 +00:00
Tim-Philipp Müller
cd45983e86 oggmux: remove unused enum 2015-01-02 15:27:23 +00:00
Tim-Philipp Müller
a4f0be6e33 oggmux: fix silly GQueue iteration code 2015-01-02 15:17:58 +00:00
Thiago Santos
68fcf7ef52 oggmux: only clip by duration if end of buffer is ahead of segment
It might happen that the timestamp is before the segment and the
check would succeed. In this case reducing the duration makes no
sense and would lead to broken results.
2014-12-26 18:56:09 -03:00
Thiago Santos
fb29483259 opusenc: plug ref leak of template caps
the pad template caps is already a new ref. No need to copy.
2014-12-17 22:13:17 -03:00
Sebastian Dröge
46251a7bef pango: Add license/copyright header to header file 2014-12-15 10:35:35 +01:00
Mathieu Duponchelle
4e228e0a1f oggdemux: Fix seeking before the first frame.
The previous code was setting keytarget to target
to make sure the keyframe found for each pad was
indeed before the target.

Then if target == keytarget, it assumed a keyframe had been
found, which was not the case if target was before the first frame
in the file.

This patch checks that a keyframe was indeed found, and if not
seeks to 0, without bisecting again.

Assuming default gst qa assets in $HOME/gst-validate

seek_before_first_frame.scenario:

description, seek=true, handles-states=true
pause, playback-time=0.0
seek, playback-time=0.0, start=0.0, flags=accurate+flush
seek, playback-time=0.0, start=0.01, flags=accurate+flush
seek, playback-time=0.0, start=0.1, flags=accurate+flush

GST_DEBUG=*theoradec*:2 gst-validate-1.0 playbin \
uri=file://$HOME/gst-validate/gst-qa-assets/medias/ogg/vorbis_theora.0.ogg \
--set-scenario seek_before_first_frame.scenario

https://bugzilla.gnome.org/show_bug.cgi?id=741097
2014-12-05 10:13:57 +01:00
Thomas Klausner
a4b94e6c69 alsa: Use EPIPE instead of ESTRPIPE if the latter does not exist
NetBSD does not have ESTRPIPE.

https://bugzilla.gnome.org/show_bug.cgi?id=740952
2014-12-01 09:51:12 +01:00
Sebastian Dröge
90eb93c2ef Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.
2014-12-01 09:51:12 +01:00
Tim-Philipp Müller
b6d49d2a12 alsasrc: debug message fixes
In the same vein as 74e9640a.
2014-11-25 22:01:08 +00:00
Tim-Philipp Müller
6306cce41e timeoverlay: add "time-line" property
So we can also show running time or stream time, not just the
buffer time stamps.
2014-11-25 14:52:47 +00:00
Branislav Katreniak
5e8e6276cd alsa: Change the log messages in xrun_recovery() from DEBUG to WARNING
xrun_recovery() runs when there is an error

https://bugzilla.gnome.org/show_bug.cgi?id=740615
2014-11-24 15:30:32 +00:00
Tim-Philipp Müller
46e727ebde Revert "basetextoverlay: Fix segfault when overlay outside the frame"
This is not correct. overlay->silent is a property and we
should not just flip the property forever because one text
we render is outside of the frame. The next one might not
be, the positioning properties can be changed after all.

The lower layers should handle clipping, and now do.

This reverts commit 1cc311156c.

https://bugzilla.gnome.org/show_bug.cgi?id=738984
https://bugzilla.gnome.org/show_bug.cgi?id=739281
2014-11-17 09:49:54 +00:00
Tim-Philipp Müller
a003423bc3 Revert "basetextoverlay: segfault when xpos >= video size"
This is not right, even if it might avoid a crash. We don't
want to just set xpos/ypos to 0 in those cases. Clipping
should be done properly, see bug #739281 for that.

This reverts commit 900d0267d5.

https://bugzilla.gnome.org/show_bug.cgi?id=738984
https://bugzilla.gnome.org/show_bug.cgi?id=739281
2014-11-17 09:48:42 +00:00
Vincent Penquerc'h
fe6a1d5b88 opusenc: update output segment stop time to match clipped samples
This will let oggmux generate a granpos on the last page that properly
represents the clipped samples at the end of the stream.
2014-10-30 14:41:44 +00:00
Vincent Penquerc'h
a16cd5d2a5 vorbisenc: push an updated segment stop time when we know it
When encoding, libvorbis will tell us how many samples are encoded
in the buffer it returns. This number may be less than the maximum
of samples in the block, if this is the last packet. In we have no
segment end time, we set it to the end time of that last sample to
tell downstream that the buffer contains less samples.
2014-10-30 14:28:39 +00:00
Vincent Penquerc'h
aa5b5b9085 oggmux: set correct granpos on last page when samples are clipped
Samples may be clipped at the end, and this is conveyed by a
granulepos that's smaller than it would otherwise be. Use the
segment stop time to detect this, and calculate the right
granulepos.
2014-10-30 14:28:39 +00:00
Vincent Penquerc'h
a93cc13d42 oggdemux: fix last buffer timestamp when samples are clipped
The end of a stream can be clipped by setting the granulepos of
the last page to a lower value that it otherwise would be.
2014-10-30 14:28:39 +00:00
Vineeth T M
900d0267d5 basetextoverlay: segfault when xpos >= video size
When the xpos is given as greater than or equal to the video size,
we get a segfault, due to improper condition.
Hence adding proper conditions.

https://bugzilla.gnome.org/show_bug.cgi?id=738984
2014-10-27 10:29:15 +00:00
Thibault Saunier
0eea730523 basetextoverlay: Make GstBaseTextOverlay::font-desc readable 2014-10-23 11:32:47 +02:00
Luis de Bethencourt
1cc311156c basetextoverlay: Fix segfault when overlay outside the frame
When the textoverlay is set outside the video frame by deltax or deltay the
calculation segfaults, but it is also  unnecessary since it doesn't need to be
displayed. So we should clip the text.

https://bugzilla.gnome.org/show_bug.cgi?id=738242
2014-10-11 19:06:03 +01:00
Aurélien Zanelli
b7ab2f0b08 vorbisdec: don't reorder streams with channels count greater than eight
vorbis_reorder_map is defined for eight channels max. If we have more
than eight channels, it's the application which shall define the order.
Since we set audio position to none, we just interleave all the channels
without any particular reordering.

https://bugzilla.gnome.org/show_bug.cgi?id=737742
2014-10-02 10:42:40 +03:00
Thiago Santos
3ecb8bea22 basetextoverlay: Do not fail the negotiation if query fails
The allocation query failure doesn't mean that the negotiation
has failed as the element can allocate buffers itself.

Instead, only fail if the pads are flushing and the allocation
query failed.

https://bugzilla.gnome.org/show_bug.cgi?id=735844
2014-09-18 12:40:17 -03:00
Tim-Philipp Müller
ebe01db234 Fix up one-element lists in template caps 2014-09-10 17:24:39 +01:00
Arnaud Vrac
f47c2442fe basetextoverlay: get framerate from previously parsed video info 2014-09-05 11:09:30 +03:00
Arnaud Vrac
267a8c24af basetextoverlay: do not ask for a bufferpool when checking for composition meta 2014-09-05 11:08:59 +03:00
Arnaud Vrac
76ce112994 basetextoverlay: schedule reconfigure on source pad when negotiation fails
The source pad might be flushing while negotiating, resulting in
set_caps or the ALLOCATION query failing. In this case set the
reconfigure flag on the source pad so that negotiation is retried on the
next buffer.
2014-09-05 11:08:49 +03:00
Arnaud Vrac
ef5823cc9b basetextoverlay: just forward the seek event to sink pads like other events
https://bugzilla.gnome.org/show_bug.cgi?id=735844
2014-09-05 11:08:04 +03:00
Nicola Murino
501a295fa1 basetextoverlay: remove unneeded cairo transparence setting
he code here:

http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/pango/gstbasetextoverlay.c#n1554

should make transparent the box that contains the text, I think this code is
not correct, it should be:

if (overlay->want_shading) {
    double alpha = overlay->shading_value / 255.0;
    cairo_paint_with_alpha (cr, alpha);
  }

however I think this code could be removed, we already do a shaded background,
why shade the box behind the text with cairo too? only one shading is needed so
we must shade with cairo or with methods like these:

http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/pango/gstbasetextoverlay.c#n1642

not both

https://bugzilla.gnome.org/show_bug.cgi?id=736028
2014-09-04 14:13:55 +03:00
Nicola Murino
ad16f15ee4 basetextoverlay: Make shading_value a property
https://bugzilla.gnome.org/show_bug.cgi?id=735879
2014-09-04 11:17:55 +03:00
Thiago Santos
a65b307349 basetextoverlay: properly fallback to non-overlay caps
When downstream claims to accept the overlay meta but fails to
provide it in the allocation query, properly fallback to setting
a new caps without the overlay meta as that is not going to be used.

Only do this if the original caps doesn't have the overlay already,
otherwise there isn't much that can be done.

https://bugzilla.gnome.org/show_bug.cgi?id=735800
2014-09-01 15:23:09 -03:00
Guillaume Desmottes
be1b5b3de7 oggdemux: don't set segment.base in pad_submit_packet()
Setting segment.base in the segment sent from gst_ogg_demux_handle_page() is
enough to ensure that chained oggs are played corretly (see bgo#706569).

Tweaking the base in gst_ogg_pad_submit_packet() as well result in delays when
playing a file with start != -1.

https://bugzilla.gnome.org/show_bug.cgi?id=735808
2014-09-01 16:26:29 +03:00
Sebastian Dröge
e783a366cb textoverlay: Don't hold any mutexes while calling negotiate
It's not done in any other code calling negotiate and will cause deadlocks
as it is sending events and queries in the pipeline.

Specifically this pipeline was deadlocking:
gst-launch-1.0 videotestsrc ! textoverlay ! textoverlay ! fakesink
2014-09-01 12:28:24 +03:00
Guillaume Desmottes
3c8d3465bf oggdemux: accumulate base time
Base time should be accumulated so non flushing seeks have the expected base.
Not accumulating result in segments appearing as "too late" and so are not
played by the sink.

https://bugzilla.gnome.org/show_bug.cgi?id=735509
2014-09-01 12:21:03 +03:00
Tim-Philipp Müller
5fc94da399 textoverlay: remove code that can't be reached
If this code could ever be reached, it would leak
memory (CID 1231978), but gst_caps_get_features()
never returns NULL, so that can't happen.
2014-08-29 19:18:55 +01:00
Thiago Santos
6bf3356967 basetextoverlay: fix caps negotiation filter 2014-08-13 11:22:52 -03:00
Thiago Santos
a080c0ebbf basetextoverlay: rework caps negotiation
Make textoverlay negotiate caps more correctly.

1) Check what caps we received in the video-sink
2) If it already has the overlay meta -> use it directly
3) If it doesn't, textoverlay try adding the overlay meta and using it,
   if downstream doesn't support it, just use what is received in the
   video-sink
4) Check if the allocation query also supports the meta to enable
   really using it

Before it wasn't really doing renegotiation of any kind, just
re-checking if it should use the overlay meta or not

Also had to update the caps in the test as memory:SystemMemory seems
to be required when you use a caps feature otherwise intersection/subset
checks will fail.

https://bugzilla.gnome.org/show_bug.cgi?id=733916
2014-08-11 11:40:44 -03:00
Thiago Santos
c20e044ef0 basetextoverlay: always intersect with the filter caps
Avoids returning values that upstream can't produce

https://bugzilla.gnome.org/show_bug.cgi?id=733916
2014-08-11 10:30:58 -03:00
Sebastian Rasmussen
d8b6375e01 opusenc: Unref pad template caps after usage
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734517
2014-08-11 15:31:45 +03:00
Sebastian Rasmussen
6e48675dfc opus: Improve annotation of internal function
https://bugzilla.gnome.org/show_bug.cgi?id=734543
2014-08-10 11:26:17 +01:00
Sebastian Rasmussen
58ec221608 vorbisenc: Improve annotation of internal function
https://bugzilla.gnome.org/show_bug.cgi?id=734541
2014-08-10 10:43:26 +01:00
Sebastian Rasmussen
1da3df79cf oggdemux: Unref peer pad after use in error case
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734350
2014-08-06 13:48:42 +02:00
Edward Hervey
52b6fb7322 libvisual: Remove < 0.4 support
And remove the version guards that went along with it

https://bugzilla.gnome.org/show_bug.cgi?id=733046
2014-07-11 10:21:20 +02:00
Philip Withnall
01d2956c4e opus: Fix a double-unref in the Opus header code
The headers were never getting reffed when being added to the headers
list, which is later unreffed-and-freed by the caller (e.g.
gst_opus_parse_parse_frame()).

https://bugzilla.gnome.org/show_bug.cgi?id=733013
2014-07-11 09:05:32 +02:00
Sebastian Dröge
1db76ee66e libvisual: Rename get_type() function to prevent conflicts with static linking
https://bugzilla.gnome.org/show_bug.cgi?id=728443
2014-06-28 17:08:06 +02:00
Vincent Penquerc'h
c1b42827c1 oggdemux: allow unset seek stop time in push mode 2014-06-11 17:59:47 +01:00
Edward Hervey
8810ada4cd theoraenc: Remove unneeded check
running timestamps are guaranteed to be positive and valid since the
GstVideoEncoder base class will clip incoming buffers

CID #1139797
2014-06-09 10:53:03 +02:00
Edward Hervey
23996adf5c vorbisenc: add missing va_end in variadic function
Coverity 1139944
2014-06-09 10:38:53 +02:00
Vincent Penquerc'h
b444d8ba97 alsasink: make gst-ident happy 2014-06-03 15:17:20 +01:00
Vincent Penquerc'h
3b2d583373 alsasink: fix occasional crash intersecting invalid values
When a pipeline using alsasink and push mode upstream fails
to preroll, the following state will be the case:
- A loop upstream will be PAUSED, pushing a first buffer
- alsasink will be READY, pending PAUSED, because async

On error, the pipeline will switch to NULL. alsasink is in
READY, so goes to NULL immediately. It zeroes its cached
caps. Meanwhile, the upstream loop can cause a caps query,
conccurent with the state change. This will use those cached
caps. If the zeroing happens between the NULL test and the
dereferencing, GStreamer will critical down in the GstValue
code.

Since it appears that such a gap between states (PAUSED
and pushing upstream, and NULL downstream) is expected, we
need to protect the read/write access to the cached caps.

This fixes the critical.

See https://bugzilla.gnome.org/show_bug.cgi?id=731121
2014-06-03 15:17:20 +01:00
Vincent Penquerc'h
716987063c oggstream: consider all opus packets as "keyframes"
This lets oggdemux determine they are not delta units, and removes
spurious per packet warnings about being unable to determine the
packet's keyframeness.
2014-06-02 12:40:27 +01:00
Thiago Santos
d3ca7271dc oggdemux: use new gstutils helper GstFlowCombiner
Fixes the handling of GST_FLOW_EOS by using the helper object
from gstutils that does the correct combination of flow returns.

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 19:26:43 -03:00
Miguel París Díaz
fd77bb1eff opusenc: Use aux vars to minimize critical region
This avoid dead lock between gst_audio_encoder_finish_frame() and
gst_opus_enc_get_property().
Also, now bytes var is set into protected section.

https://bugzilla.gnome.org/show_bug.cgi?id=729882
2014-05-26 09:23:42 +02:00
Vincent Penquerc'h
74e9640a22 alsasink: pass correct error to g_strerror
The error we get is a negated errno.

While there, fix a couple typos in messages.
2014-05-19 13:57:41 +01:00
Thibault Saunier
7f9aac386f pango: Do not try to add a feature to a caps features ANY
It does not makes sense and asserts
2014-05-11 00:12:30 +02:00
Luis de Bethencourt
43ae5a17ce oggmux: push eos event when empty pad data
If gst_ogg_mux_queue_pads returns NULL it means we are at EOS, because we get a
NULL buffer and this function never sets bestpad.

https://bugzilla.gnome.org/show_bug.cgi?id=729315
2014-05-06 16:21:18 -04:00
Tim-Philipp Müller
bcb8068e27 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 23:28:57 +01:00
Sebastian Dröge
3e2a693ca9 pango: Make static caps actually static to fix a memory leak 2014-04-15 13:57:08 +02:00
Sebastian Dröge
02e613b6e3 oggmux: Clear Ogg streams before initing them
They might've been inited before, in which case we leak
memory when initing them again without clearing.
2014-04-15 13:39:39 +02:00
Josep Torra
40c2d3c088 textrender: push segment event after caps event
Fixes warning "Sticky event misordering, got 'segment' before 'caps'".
2014-04-11 10:43:39 +02:00
Vincent Penquerc'h
1791799d71 oggstream: use G_GUINT64_CONSTANT instead of ll suffix
Thanks slomo for pointing out it's not standard.
2014-04-10 16:08:29 +01:00
Vincent Penquerc'h
e7c261ff31 theoraenc: fix comparison to unset timestamp
Also rejects negative timestamps that aren't GST_CLOCK_TIME_NONE.

Coverity 1139797
2014-04-10 11:06:00 +01:00
Vincent Penquerc'h
55f98974a8 oggstream: fix a few left shifts operations on 32 bits cast to 64 bits
This should not cause any actual bug since Theora and Daala have
a maximum shift of 31, and a packet duration of 2^31 seems very
implausible. But it fixes:

Coverity 1139804, 1139803, 1139802
2014-04-10 11:06:00 +01:00
Vincent Penquerc'h
2c07c54b8a oggstream: remove NULL test after dereference
And add NULLness asserts at top of function. The only call
to this passes local variable pointers, so non NULL.

Coverity 206375
2014-04-10 11:06:00 +01:00
Vincent Penquerc'h
1b0f13ebf2 oggmux: test for failure to return tag
It should really not happen unless the tag list it corrupt,
but the API returns a failure code so we may as well use it.

Coverity 1139595
2014-04-10 11:06:00 +01:00
Vincent Penquerc'h
54f38edd15 oggdemux: do not dereference NULL pad in warning message
Coverity 1197695
2014-04-10 11:06:00 +01:00
Vincent Penquerc'h
16042fac2b opus: add missing va_end in variadic function
Coverity 1139944
2014-04-09 11:03:17 +01:00
Thiago Santos
a2633b7cf1 oggmux: implement vp8 granulepos function
Add an extra function to the oggstream map to inform it about
the incoming buffers. This way oggmux can keep a count on the
vp8 invisible frames and calculate the granulepos correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=722682
2014-03-11 12:28:49 -03:00
Thiago Santos
e00c306571 oggmux: create vp8 header data if not provided in caps
vp8 stream header shouldn't be assumed to be provided in caps always
as this would repeat the same code in all demuxers/encoders. Instead,
make oggmux generate them if they are not supplied.

https://bugzilla.gnome.org/show_bug.cgi?id=722682
2014-03-11 12:28:49 -03:00
Adrien Schwartzentruber
a9d98c57a4 pango: demote debug WARNING to LOG for variable framerate video input
No need why we need to warn about that, it's perfectly allowed.

https://bugzilla.gnome.org/show_bug.cgi?id=725837
2014-03-06 17:51:11 +00:00
Matthieu Bouron
ed8e7d4275 pango: basetextoverlay: handle video/x-raw(ANY) if downstream supports the GstVideoOverlayCompositionMeta API
https://bugzilla.gnome.org/show_bug.cgi?id=721953
2014-03-05 20:38:53 +01:00
Thiago Santos
b0985365af oggdemux: allow file to go until the end in push mode
When seeking back to original state after duration seeks, let
upstream know that we want the whole file, including the last
byte that wasn't requested on the duration seeks.

https://bugzilla.gnome.org/show_bug.cgi?id=724633
2014-02-20 00:24:02 -03:00
Thiago Santos
ef547c3eb5 oggdemux: remove unused instance variable event
It is never set to anything
2014-02-20 00:23:49 -03:00
Thiago Santos
a6890ec7ef oggmux: properly flush when seeking at the beginning
Reset all internal status when collect pads forwards a flush-stop
from the pads to be able to start the stream again.
2014-02-13 16:03:01 -03:00
Sebastian Dröge
437d11f5a0 oggmux: Fix typo in header include guard
clang does not like this.
2014-02-08 17:02:45 +01:00
Sebastian Dröge
d3e0381d3d alsa: Make clang happy with our g_strdup_vprintf() wrapper 2014-02-08 17:01:38 +01:00
Thiago Santos
ec7724c095 basetextoverlay: use correct segment for text
video time uses the 'segment' and the text time should use
the 'text_segment'.

If different segments are used for video and text it would
lead to out of sync video/subtitles.
2014-02-07 02:14:52 -03:00
Vincent Penquerc'h
b532ce16a5 oggdemux: fix broken seeking reading the whole file
A change in gst_ogg_demux_do_seek caused oggdemux to wait for
a page for each of the streams, including a skeleton stream if
one was present. Since Skeleton only has header pages, that
was never going to end well.

Also, the code was skipping CMML streams when looking for pages,
so would also have broken on CMML streams.

Thus, we change the code to disregard Skeleton streams, as well
as discontinuous streams (such as CMML and Kate). While it may
be desirable to consider Kate streams too (in order to avoid
losing a subtitle starting near the seek point), this may be
a performance drag when seeking where no subtitles are. Maybe
one could add a "give up" threshold for such discontinuous
streams, so we'd get any page if there is one, but do not end
up reading preposterous amounts of data otherwise.

In any case, it is important that the code that determines
the amount of streams to look pages for remains consistent with
the "early out" conditions of the code that actually parses
the incoming pages, lest we never decrease the pending counter
to zero.

This fixes seeking on a file with a skeleton track reading all
the file on each seek.

https://bugzilla.gnome.org/show_bug.cgi?id=719615
2014-01-14 12:48:45 +00:00
Vincent Penquerc'h
25bf5a13f0 oggdemux: use an adaptive chunksize for performance reasons
Ogg data is read chunk by chunk, and the chunk size used was
originally taken from libvorbisfile. However, this value leads
to poor performance when used on an Ogg file with large pages
(Ogg pages can be close to 64 KB).

We can't just use a larger chunk size, since this will decrease
performance on small page streams, so we use an adaptive scheme
where the chunk size is twice the largest page size we've seen
so far in the stream. For "typical" Ogg/Vorbis, this gives us
almost the same chunk size (a bit lower), and this lets us get
better performance on streams with large pages.
2014-01-14 12:48:45 +00:00
Tim-Philipp Müller
448c006b02 textoverlay: don't leak GAP events 2014-01-10 11:17:04 +00:00
Vincent Penquerc'h
80df2cb063 opusenc: increase max payload size to 4000 bytes
1275 is the maximum size of a frame, but the encoder may return
up to 3 frames, and we need a few extra bytes for TOC, etc. We
use 4000, which is a bit more, and suggested in the libopus docs.
2013-12-27 14:29:46 +00:00
Sebastian Dröge
0c301bfee7 opusdec: Require caps to be set before any data processing 2013-12-05 12:04:59 +01:00
Sebastian Dröge
4a37d90e9d theoradec: Use new gst_video_decoder_set_needs_format() API 2013-12-05 11:39:07 +01:00
Sebastian Dröge
1d4cf74e0b theoraparse: Fix event handling
Send CAPS event before any SEGMENT events or any other events
that must come in order after the CAPS event.
2013-11-29 13:33:45 +01:00
Tim-Philipp Müller
b1ff48c1a1 docs: remove old 0.10 Since markers
They're just confusing.
2013-11-16 16:10:07 +00:00
Stefan Sauer
2055f2b7de oggdemux: fix copy'n'paste in comment 2013-10-15 09:53:30 +02:00
Thibault Saunier
508245dfa6 theoraenc: Do nothing when flushing the encoder when no caps were set
In case we receive a flush event before having our caps set, we will
end up trying to create a theora encoder even though we are not ready.
Avoid that situation making sure we are initialized before accepting to
be flushed.

https://bugzilla.gnome.org/show_bug.cgi?id=709858
2013-10-14 17:49:59 -03:00
Takashi Iwai
76d807893c alsa: Add channel map API support
The initial support for the new ALSA chmap API.
Just translate the current chmap to GstAudioChannelPosition during the
setup.  No function to specify the channel map manually yet, so still
impossible to assign any non-standard positions or to configure in a
different order even if the hardware allows.

https://bugzilla.gnome.org/show_bug.cgi?id=709755
2013-10-09 19:05:53 +02:00
Thiago Santos
1618084bc8 oggdemux: check for full eos after a pad goes eos in push mode
After a pad is on EOS, verify if all pads are EOS and return
upstream, avoiding keeping the buffer flow without having more
data to push
2013-09-10 12:14:47 -03:00
Thiago Santos
7ecd5b1108 oggdemux: properly handle stop position at seeks in push mode
Store the seek stop and seqnum and properly restore them when
receiving the corresponding Segment from upstream. Also fixes
seqnum for converted seek events.
2013-09-10 12:14:47 -03:00