Commit graph

14556 commits

Author SHA1 Message Date
Kouhei Sutou
ab64b00b48 playback: fix build error for 64bit Windows build by MinGW
Casting to gpointer from gulong generates the following warning with
64bit Windows target MinGW:

    gstplaybin2.c: In function 'pad_added_cb':
    gstplaybin2.c:3476:7: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
           (gpointer) group_id_probe_handler);
           ^
    cc1: all warnings being treated as errors

We should cast to guintptr from gulong before we cast to gpointer.

https://bugzilla.gnome.org/show_bug.cgi?id=754755
2015-09-11 23:28:07 +02:00
Thiago Santos
df931fb0b8 video-format: add missing alpha flag for some formats
Some formats didn't have the alpha flag marked, use the correct
macro so they get it right.

https://bugzilla.gnome.org/show_bug.cgi?id=754808
2015-09-10 07:28:21 -03:00
Sebastian Dröge
8613525301 appsrc: Always take the mutex before flushing the queue
Otherwise the application might push new buffers into the queue while we're
flushing, potentially causing the GQueue data structure to become inconsistent
and causing crashes soon after.

https://bugzilla.gnome.org/show_bug.cgi?id=754597
2015-09-09 12:33:02 +03:00
Vikram Fugro
bbe967a278 appsrc: retain the latest caps in queue when flushing
- Retain the latest caps in the internal queue, when
  flushing.
- Add a unit test case for the same.

https://bugzilla.gnome.org/show_bug.cgi?id=754597
2015-09-09 12:27:40 +03:00
Tim-Philipp Müller
86a1092e59 video: improve GstVideoFormatUnpack docs
https://bugzilla.gnome.org/show_bug.cgi?id=754650
2015-09-07 00:19:09 +01:00
Kouhei Sutou
3e41e784be libs: Fix build error on MinGW where "%ll" is not available
"ll" isn't available on MinGW. We can use G_GINT64_MODIFIER for portable
64bit size data modifier.

https://bugzilla.gnome.org/show_bug.cgi?id=754630
2015-09-06 18:32:16 +03:00
Havard Graff
181845ec1b libs: build rtp after audio
The dependency setup does not seem to work for all systems,
causing the build to fail with:

gstrtpbaseaudiopayload.c:65:0:
fatal error: gst/audio/audio-enumtypes.h: No such file or directory

My setup:
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
autoconf (GNU Autoconf) 2.69
automake (GNU automake) 1.14.1
libtool (GNU libtool) 2.4.2

https://bugzilla.gnome.org/show_bug.cgi?id=754344
2015-09-04 09:53:42 +01:00
Tim-Philipp Müller
c8ce5765a0 libs: rtp is no longer an independent subdir
https://bugzilla.gnome.org/show_bug.cgi?id=754344
2015-09-04 09:53:42 +01:00
Wim Taymans
3d733ad09f videoscale: fix gamma-decode option
We need to use the enum to configure the option now.
2015-09-03 17:56:05 +02:00
Prashant Gotarne
7447736be9 basetextoverlay: FIX crash if padding greater than video size
Skipping rendering of textimage if overlay is completely
outside video frame.

https://bugzilla.gnome.org/show_bug.cgi?id=754429
2015-09-03 10:15:39 -04:00
Philippe Normand
9361f7c576 appsrc: remove duplicate get_size vfunc assignment 2015-08-31 12:11:10 +03:00
George Kiagiadakis
7860060536 allocators: include gstfdmemory.h in the main library header, allocators.h 2015-08-29 21:38:52 +02:00
Tim-Philipp Müller
7dac2e1eb1 audiobasesink: fix misleading error message debug detail
https://bugzilla.gnome.org/show_bug.cgi?id=754260
2015-08-29 10:44:28 +01:00
Thiago Santos
76d26a60bd playsinkconvertbin: implement accept-caps handler
The default one will just go through the internal elements which might
just be identity when it is in passthrough which will lead to the query
being handled by the downstream sink, ignoring all that playsinkconvertbin
could actually handle and convert.

https://bugzilla.gnome.org/show_bug.cgi?id=754235
2015-08-28 09:44:10 -03:00
Carlos Rafael Giani
c95d809a96 audiobasesink: Fix incorrect/missing custom slaving method documentation
https://bugzilla.gnome.org/show_bug.cgi?id=754199
2015-08-28 10:13:44 +03:00
Eunhae Choi
b1f78b5d23 subparse: use g_clear_error instead of g_error_free
To avoid invalid pointer accees the err pointer should be set to NULL.
By using g_clear_error() it calls free and clear the pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=753817
2015-08-19 16:21:25 +03:00
Sebastian Dröge
dc744b05b0 Release 1.5.90 2015-08-19 13:10:23 +03:00
Sebastian Dröge
f05c4816ac Update .po files 2015-08-19 12:39:17 +03:00
Sebastian Dröge
e463d100ea po: Update translations 2015-08-19 11:23:09 +03:00
Vineeth TM
b632b206e1 tools: discoverer: When info is NULL just print error and return
In case discover_uri returns NULL info, passing the info to discoverer APIs
result in critical assertion errors. Hence instead of passing NULL info along,
print the error and return.

https://bugzilla.gnome.org/show_bug.cgi?id=753701
2015-08-19 10:20:58 +03:00
Sebastian Dröge
2727ca01f5 Revert "decodebin: Handle the preroll multi-queue size"
This reverts commit 5c8ef0ea05.
2015-08-18 18:47:22 +03:00
Sebastian Dröge
4fe4357188 Revert "decodebin: Store extra_buffer_required per group, not globally"
This reverts commit 1ea81114ea.
2015-08-18 18:47:21 +03:00
Sebastian Dröge
970bc16bf8 Revert "decodebin: If extra buffers are going to be required, we're still prerolling"
This reverts commit a3b24f0241.
2015-08-18 18:47:18 +03:00
Sebastian Dröge
64301f1005 video(en|de)coder: Return TRUE when we consumed a tag event without creating a new event
Fixes spurious flow errors that especially break gst-validate.
2015-08-18 16:28:42 +03:00
Sebastian Dröge
6cda5d3494 audiodecoder: If there are no tags, don't try to do event handling on a NULL event
Fixes some crashes.
2015-08-18 16:01:28 +03:00
Sebastian Dröge
2de91c32e4 audioencoder: If there are no tags, don't try to do event handling on a NULL event
Fixes some crashes.
2015-08-18 15:58:57 +03:00
Vivia Nikolaidou
cca823b490 tools: gst-play: Use g_build_filename instead of g_strconcat
When running gst-play against a directory name, and suffix the path with a
directory separator (e.g. tab completion), gst-play was printing two directory
separators in a row. g_build_filename fixes this, and additionally allows for
both '/' and '\' as separators on Windows.
2015-08-18 15:19:03 +03:00
Sebastian Dröge
a3b24f0241 decodebin: If extra buffers are going to be required, we're still prerolling 2015-08-18 15:19:03 +03:00
Sebastian Dröge
1ea81114ea decodebin: Store extra_buffer_required per group, not globally
It's only relevant for each group, and by storing it in the group
we have locking and everything else like for the other buffering-related
variables. Locking looks a bit fishy still, but it was like that for a long
time already so shouldn't be worse than before.
2015-08-18 15:19:03 +03:00
Myoungsun Lee
5c8ef0ea05 decodebin: Handle the preroll multi-queue size
Overview:
There are some of interleaved streams which has long-term location of audio data.
It mean the audio data is located far away more than multiqueue size.
In this case, because of multiqueue overrun, the pipeline is stopped.
To prevent hanging-like state, the decodebin needs to handle the queue size.

Caused:
The multiqueue size is not enough, the pipeline will stay being stalled status
and decodebin cannot complete to build decode chain.
In this issue file, decodebin did not receive no_more_pads signal or audio data yet.

Steps to Reproduce:
play the high-resolution(4K file) files or some streaming media(push mode).

Actual Results:
There is no audio or subtitle.
We can see only video or infinite loading.

Resolution:
Decodebin detect this problem, and add extra buffer size to multiqueue.
The multiqueue is larger than before, the next data can be pushed the downstream element.

Additional Information:
The max-preroll extra buffer size is set 8MB.
We can use total pre-roll buffer 10MB.
Only first overrun callback can handle multiqueue size.

https://bugzilla.gnome.org/show_bug.cgi?id=733235
2015-08-18 15:19:02 +03:00
Tim-Philipp Müller
c21a972421 videoencoder: fix tag handling
Merge upstream tags with encoder tags and update whenever
any of those changes.

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-18 12:44:04 +01:00
Tim-Philipp Müller
4c00709e22 audioencoder: fix tag handling
Merge upstream tags with encoder tags and update whenever
any of those changes.

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-18 11:46:21 +01:00
Sebastian Dröge
8a736f6e98 typefindfunctions: Add typefinder for TTML+XML
Used in DASH among other things, as SMPTE Timed Text.
2015-08-18 12:56:33 +03:00
Vineeth TM
fd7724b6e1 pbutils: discoverer: Set GError when NULL info is being returned.
When discovering the URI, if info is NULL, then instead of just returning NULL,
set the GError, so the error can be printed and notified.

https://bugzilla.gnome.org/show_bug.cgi?id=753701
2015-08-18 12:13:41 +03:00
Vineeth TM
6ee8b22c40 discoverer: free context and error during failures
When g_option_context_parse or gst_discoverer_new fails, then there will
be memory leaks for ctx and err variables. Free'ing the same.

https://bugzilla.gnome.org/show_bug.cgi?id=753701
2015-08-17 14:11:17 +02:00
Tim-Philipp Müller
135cad5b6e audiodecoder: try harder to avoid sending unnecessary tag updates 2015-08-16 18:28:09 +01:00
Tim-Philipp Müller
30b7cc6670 videodecoder: fix tag handling
Before we just merged everything in pretty much random ways
ad-hoc instead of keeping state properly. In 0.10 that was
how it worked, but in 1.x the tag events sent should always
reflect the latest state and replace any previous tags.

So save the upstream (stream) tags, and save the tags set
by the decoder subclass with merge mode, and then update
the merged tags whenever either of those two changes.

This slightly changes the behaviour of gst_video_decoder_merge_tags()
in case it is called multiple times, since now any call replaces
the previously-set tags. However, it leads to much more predictable
outcomes, and also we are not aware of any subclass which sets this
multiple times and expects all the tags set to be merged.

If more complex tag merging scenarios are required, we'll have
to add a new vfunc for that or the subclass has to intercept
the upstream tags itself and send merged tags itself.

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 18:23:07 +01:00
Tim-Philipp Müller
917ea30aaf tests: audiodecoder: add unit test for tag handling
https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 16:34:31 +01:00
Tim-Philipp Müller
5ccc8432e0 audiodecoder: fix tag handling
Before we just merged everything in pretty much random ways
ad-hoc instead of keeping state properly. In 0.10 that was
how it worked, but in 1.x the tag events sent should always
reflect the latest state and replace any previous tags.

So save the upstream (stream) tags, and save the tags set
by the decoder subclass with merge mode, and then update
the merged tags whenever either of those two changes.

This slightly changes the behaviour of gst_audio_decoder_merge_tags()
in case it is called multiple times, since now any call replaces
the previously-set tags. However, it leads to much more predictable
outcomes, and also we are not aware of any subclass which sets this
multiple times and expects all the tags set to be merged.

If more complex tag merging scenarios are required, we'll have
to add a new vfunc for that or the subclass has to intercept
the upstream tags itself and send merged tags itself.

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 16:34:31 +01:00
Thiago Santos
14867e4ebb vorbisenc: use template subset check for accept-caps
It is faster than doing a query that propagates downstream and
should be enough
2015-08-16 12:30:30 -03:00
Thiago Santos
6a26a42ffd vorbisenc: use more accurate sink pad template caps
Removes the need for custom caps query handling and makes it more
correct from the beginning on the template. It is a bit uglier
to read because there is 1 entry per channel but makes code easier
to maintain.
2015-08-16 12:30:30 -03:00
Thiago Santos
cd7c7dba70 theoraenc: use template subset check for accept-caps
It is faster than doing a query that propagates downstream and
should be enough
2015-08-16 12:30:30 -03:00
Thiago Santos
5a0bee3f13 audioencoder: add src and sink query methods
Allows subclasses to do their own handling of GstQuery and still
chain up to the parent class to handle the ones that they don't want
to handle
2015-08-16 08:14:35 -03:00
Edward Hervey
7fc856ff5c decodebin: Fix list iteration
We were using the wrong variable ...

CID #1316477
2015-08-16 12:53:23 +02:00
Edward Hervey
eaf9ca90c7 decodebin2: Handle flushing with multiple decode groups
When an upstream element wants to flush downstream, we need to take
all chains/groups into consideration.

To that effect, when a FLUSH_START event is seen, after having it
sent downstream we mark all those chains/groups as "drained" (as if
they had seen a EOS event on the endpads).

When a FLUSH_STOP event is received, we check if we need to switch groups.
This is done by checking if there are next groups. If so, we will switch
over to the latest next_group. The actual switch will be done when
that group is blocked.

https://bugzilla.gnome.org/show_bug.cgi?id=606382
2015-08-15 18:50:06 +02:00
Edward Hervey
2d3743e37d decodebin2: Forward event/queries for unlinked groups
When upstream events/queries reach sinkpads of unlinked groups (i.e.
no longer linked to the upstream demuxer), this patch attempts to find
the linked group and forward it upstream of that group.

This is done by adding upstream event/query probes on new group sinkpads
and then:
* Checking if the pad is linked or not (has a peer or not)
* If there is a peer, just let the event/query follow through normally
* If there is no peer, we find a pad to which to proxy it and return
  GST_PROBE_HANDLED if it succeeded (allowing the event/query to be properly
  returned to the initial called)

Note that this is definitely not thread-safe for the time being

https://bugzilla.gnome.org/show_bug.cgi?id=606382
2015-08-15 18:50:06 +02:00
Thiago Santos
d19f347223 Revert "audiodecoder: expose default query handling function"
Apparently I forgot how gobject works, there is no need to expose
it directly as one can call it from the parent_class pointer

This reverts commit 8a64592481.
2015-08-15 13:44:35 -03:00
Thiago Santos
c63db0e104 Revert "videodecoder: expose default query handling function"
Apparently I forgot how gobject works, there is no need to expose
it directly as one can call it from the parent_class pointer

This reverts commit ea9b6a7e3c.
2015-08-15 13:44:35 -03:00
Thiago Santos
065968c3fc vorbisdec: use default pad accept-caps handling
Avoids useless check of downstream caps when handling an
accept-caps query
2015-08-15 13:44:35 -03:00
Thiago Santos
0ea4430522 theoradec: use default pad accept-caps handling
Avoids useless check of downstream caps when handling an
accept-caps query
2015-08-15 13:44:35 -03:00