Commit graph

2308 commits

Author SHA1 Message Date
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
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 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
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
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
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