Commit graph

2633 commits

Author SHA1 Message Date
Sebastian Dröge
b1ba5f10ce souphttpsrc: Include GStreamer souphttpsrc version in default User-Agent string 2017-03-16 13:53:16 +02:00
Nicolas Dufresne
ca0ed8a134 Fix plugin filenames to match plugin names
- libgstpulse.so becomes libgstpulseaudio.so
- libgstsouphttpsrc.so becomes libgstsoup.so
- libgstoss4audio.so becomes libgstoss4.so

https://bugzilla.gnome.org/show_bug.cgi?id=779344
2017-03-08 20:04:20 -05:00
Seungha Yang
804f238b3e souphttpsrc: Extract redirection uri on libsoup's restarted callback
Let libsoup handle redirection automatically.
And then, to figure out redirection uri, extract it on "restarted"
callback which will be fired before soup_session_send() is returned.

https://bugzilla.gnome.org/show_bug.cgi?id=778428
2017-02-22 16:15:22 +02:00
Arnaud Vrac
03db374144 souphttpsrc: retry request on early termination from the server
Fix a regression introduced by commit 183695c61a (refactor to use
Soup's sync API). The code previously attempted to reconnect when the
server closed the connection early, for example when the stream was put
in pause for some time.

Reintroduce this feature by checking if EOS is received before the
expected content size is downloaded. In this case, do the request
starting at the previous read position.

https://bugzilla.gnome.org/show_bug.cgi?id=776720
2017-01-26 15:59:46 +02:00
Arnaud Vrac
c08a0493ff souphttpsrc: report a useful error message when soup_session_send fails
This helps to understand cases where libsoup doesn't set the message
status code after running soup_session_send.

https://bugzilla.gnome.org/show_bug.cgi?id=777222
2017-01-23 12:54:17 +02:00
Arnaud Vrac
c4cf67cfe5 souphttpsrc: properly check that seek range was respected
This check must be done only when we are sure the request was
successfully sent. soup_session_send() might fail without setting the
status code. In this case status code is 0 so we would only catch the
error after the seek range check. In this case we would report an error
saying that the seek range was not respected, instead of reporting the
underlying error that triggered the soup_session_send() failure.

https://bugzilla.gnome.org/attachment.cgi?bugid=777222
2017-01-23 12:54:17 +02:00
Mark Nauwelaerts
24b2422bf3 gdkpixbufoverlay: add a positioning coefficient pair
... so as to allow one clearly defined (absolute) positioning mode
that can cater for a variety of absolute but also relative positioning
with respect to edge or center.
2017-01-22 10:18:27 +01:00
Mark Nauwelaerts
387da78da3 gdkpixbufoverlay: update composition in _before_transform
... since we need to determine passthrough mode for buffer preparation before
calling into _transform_ip.
2017-01-22 10:18:27 +01:00
Mark Nauwelaerts
2715daebf3 gdkpixbufoverlay: handle setting NULL gdkpixbuf
... which is a clearer way to clear any current overlay, other than
fiddling with alpha or positioning properties to make it virtually go away.
2017-01-22 10:18:27 +01:00
Edward Hervey
41fa3fc499 souphttpsrc: Initialize return variable
In the normal use-case we would end up with ret being unitialized
causing havoc.

https://bugzilla.gnome.org/show_bug.cgi?id=777222
2017-01-19 08:38:45 +01:00
Arnaud Vrac
02317496c6 souphttpsrc: make flow return values handling clearer
The flow return values was stored in the element before because the
result had to be set from callbacks. This is not the case anymore, we
can return the flow result directly from functions, making the code
easier to understand.

https://bugzilla.gnome.org/show_bug.cgi?id=777222
2017-01-17 22:16:15 -03:00
Arnaud Vrac
9b23732559 souphttpsrc: properly track redirections
The current code configures libsoup to handle redirections
transparently, without informing the caller, thus preventing the element
to record the redirect code and location uri.

Fix this by always setting the SOUP_MESSAGE_NO_REDIRECT, preventing
libsoup from handling the redirection. When we receive a redirection
request and libsoup can safely handle it, return a custom error which
triggers a retry with the new URI.

https://bugzilla.gnome.org/show_bug.cgi?id=777222
2017-01-17 22:16:15 -03:00
Tim-Philipp Müller
7717d08835 flacenc: fix other icon counter check
It's never going to be 0 if we first increment and then check.
2017-01-14 15:27:37 +00:00
Tim-Philipp Müller
bc6a9327f4 flacenc: also set PICTURE tag width and height if available 2017-01-14 15:05:36 +00:00
Tim-Philipp Müller
23fb9ead5d flacenc: fix encoder init error with some GST_TAG_PREVIEW_IMAGEs
The encoder fails to initialise when we try to set GST_TAG_PREVIEW_IMAGEs
sent to use by qtdemux from iTunes-generated m4a files. We should
not just blindly translate the PREVIEW tag to file icon image types,
but check if the specific conditions required are met (i.e. image
type 1 must be a 32x32 PNG icon, and what we're getting is 500x500).

https://bugzilla.gnome.org/show_bug.cgi?id=776962
2017-01-14 14:58:52 +00:00
Thibault Saunier
9d1942f286 meson: Install presets files 2017-01-05 09:49:21 -03:00
Reynaldo H. Verdejo Pinochet
6c8c9a6492 shout2: fix 404 in package origin 2016-12-14 14:16:53 -08:00
Nirbheek Chauhan
6df682c6f9 Revert "meson: dv plugin now works on MSVC"
This reverts commit 05a89613fe.

Let's not put in stuff that needs unreleased Meson. This can go in
for the next cycle.
2016-11-28 19:57:55 +05:30
Sebastian Dröge
37f991f06e souphttpsrc: Handle non-UTF8 headers and error reasons more gracefully
Especially don't put them into GstStructures in one way or another, just
ignore them or error out cleanly depending on the importance of their
content.
2016-11-28 12:00:09 +02:00
Sebastian Dröge
ae2dd54a24 vpxdec: libvpx's release buffer is sometimes called with fb->priv==NULL
Don't assert on this but just ignore these cases.
2016-11-22 20:33:29 +02:00
Sebastian Dröge
f32603bcf8 dvdec: Fix handling of negotiation failures
Return NOT_NEGOTIATED if sending the caps event fails, or FLUSHING if
the pad was flushing at that point.

https://bugzilla.gnome.org/show_bug.cgi?id=774623
2016-11-18 12:04:45 +02:00
Jagadish
d94287c047 gdkpixbufoverlay: Fixing x and y offset computation
While computing the x and y offsets, it's the video resolution and
resized overlay resolution to be used instead of actual overlay image
resoltuion. Due to this, the overlay image used to get wrongly overlayed
in undesired location

https://bugzilla.gnome.org/show_bug.cgi?id=757292
2016-11-01 20:09:32 +02:00
Sebastian Dröge
60d30db912 Revert "souphttpsrc: reduce reading latency by using non-blocking read"
This reverts commit 8816764112.

It causes issues with the timeouts, and causes connections to be closed
without actual reason. Needs further investigation.

https://bugzilla.gnome.org/show_bug.cgi?id=773509
2016-10-31 18:00:07 +02:00
Nirbheek Chauhan
05a89613fe meson: dv plugin now works on MSVC
Needs a Meson patch to filter out the useless -lpthread

https://github.com/mesonbuild/meson/pull/962
2016-10-27 22:49:09 +05:30
Michael Olbrich
8666b7d871 souphttpsrc: reset read_position when reading fails
souphttpsrc maintains two variables for the position:
 * 'request_position' is where we want to be
 * 'read_position' is where we are
During Normal operations both are updated in sync when data arrives. A seek
changes 'request_position' but not 'read_position'.
When the two positions get out of sync, then a new request is send and the
'Range' header is adjusted to the current 'request_position'.

Without this patch, if reading fails, then the source is destroyed. This
triggers a new request, but the range remains unchanged. As a result, the
old range is used and old data will be read.

Changing the 'read_position' to -1 makes it explicitly different from
'request_position' and as a result the 'Range' header is updated correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=773509
2016-10-26 16:57:28 +03:00
Tim-Philipp Müller
787f47604d meson: add unit tests
Only works properly in an installed setup currently, most
likely won't work with a subprojects setup yet.
2016-09-26 14:31:09 +01:00
Arun Raghavan
4833f02e47 pulsesrc: Don't negotiate to less than two segments
GstAudioRingBuffer doesn't needs us to have at least 2 segments. We make
sure that if our buffer parameters are such that the maxlength is not at
least 2x fragsize, we still request the ringbuffer to keep that much
space so it continues to work.

https://bugzilla.gnome.org/show_bug.cgi?id=770446
2016-09-25 01:20:14 +05:30
Tim-Philipp Müller
2179b9b9d6 meson: fix build with vpx 1.3.x
vpx >= 1.4.0 is optional
2016-09-18 20:55:31 +01:00
Tim-Philipp Müller
cae9ec0ad8 ext, gst: fix indentation 2016-09-15 09:53:07 +01:00
Thomas Scheuermann
1215849e69 jack: Fix pipeline hang when jack changes sample rate or buffer size
If jackd changes the buffer size or sample rate, jackaudiosink hangs
and can't be stopped. This also happens if jack is configured as slave
and a gstreamer pipeline is started on the slave machine while the jack
master isn't running yet. If the the jack master is started it changes
the buffer size / sample rate and jackaudiosink can't be stopped.

This fix calls jack_shutdown_cb when jack_sample_rate_cb or
jack_buffer_size_cb is called.

https://bugzilla.gnome.org/show_bug.cgi?id=771272
2016-09-13 14:19:47 +02:00
Sebastian Dröge
720c3525de dvdemux: Fix timestamping in reverse playback mode
This is only supported right now if after a demuxer that supports reverse
playback, e.g. with DV container inside AVI container.
2016-09-06 14:26:23 +03: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
Stian Selnes
195d181828 vp9enc: Fix leak of vpx_image_t 2016-08-26 11:57:15 -04: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
Vincent Penquerc'h
f94c4c00c8 souphttpsrc: include http-status-code in error message details
https://bugzilla.gnome.org/show_bug.cgi?id=763038
2016-07-25 11:17:20 +01:00
Edward Hervey
1d55fbce86 souphttpsrc: Don't drop final bytes of a range request
At the end of a range request, we don't want to return GST_FLOW_EOS otherwise
the last bytes we just read will be dropped by basesrc.

Instead just return GST_FLOW_OK (which was set just before) and let basesrc
handle the fact we are at the end of the segment.
2016-07-12 07:41:59 +02:00
Sebastian Dröge
e6823e4df4 souphttpsrc: At the end of a range request, read another time to finalize the request
If we're at the end of a range request, read again to let libsoup
finalize the request. This allows to reuse the connection again later,
otherwise we would have to cancel the message and close the connection.
2016-07-12 00:42:58 +03:00
Sebastian Dröge
b1edc28695 souphttpsrc: Fix keep-alive handling
We have to get rid of the message on EOS when the complete stream is read to
remember that we successfully finished handling this specific message.
Otherwise we will cancel it later and close the connection instead of reusing
it at a later time.

It might also make sense to reuse connections if a non-200 response is
received. As long as there was no connection error, the HTTP connection should
be re-usable.
2016-07-11 19:59:22 +03:00
Thomas Scheuermann
187d8acd5e jack: don't wait for callbacks if the jack server shut down
Otherwise we'll wait forever.

https://bugzilla.gnome.org/show_bug.cgi?id=747275
2016-07-08 16:52:04 +03:00
Edward Hervey
14978d9229 dvdemux: Let upstream events go through upstream
There's no real reason to avoid sending QOS/NAVIGATION events upstrea.
Some elements might want to have that information.

Also remove downstream-only CAPS event handling and minimize code
2016-07-08 15:00:27 +02:00
Sebastian Dröge
9abc31df1a shout2: Use a non-timer GstPoll
Otherwise set_flushing() will have undefined semantics and nowadays causes a
g_critical() to warn about that.
2016-06-29 23:31:20 +02:00
Thiago Santos
11c61f14bf souphttpsrc: dynamically adjust blocksize
Update the blocksize depending on how much is obtained from a read
of the input stream. This avoids doing too many reads in small chunks
when larger amounts of data are available and also prevents using
a very large memory area to read a small chunk of data.

https://bugzilla.gnome.org/show_bug.cgi?id=767833
2016-06-29 09:51:02 -03:00
Tim-Philipp Müller
33fb50b308 soup: work around frequent deadlocks in GLib type initialisation
.. by registering the types from the plugin init function. This
seems to help, but we'll see if it's enough (might need similar
things elsewhere).

https://bugzilla.gnome.org/show_bug.cgi?id=693911
https://bugzilla.gnome.org/show_bug.cgi?id=674885
2016-06-17 19:59:13 +01:00
Nicolas Dufresne
7af9271c85 pngdec: Wait for segment event before checking it
The heuristic to choose between packetise or not was changed to use the
segment format. The problem is that this change is reading the segment
during the caps event handling. The segment event will only be sent
after. That prevented the decoder to go in packetize mode, and avoid
useless parsing.

https://bugzilla.gnome.org/show_bug.cgi?id=736252
2016-06-07 20:53:34 -04:00
Nicolas Dufresne
a6008fde65 jpegdec: Wait for segment event before checking it
The heuristic to choose between packetise or not was change to use the
segment format. The problem is that this change is reading the segment
during the caps event handling. The segment event will only be sent
after. That prevented the decoder to go in packetize mode, and avoid
useless parsing.

https://bugzilla.gnome.org/show_bug.cgi?id=736252
2016-06-07 20:36:26 -04:00
Sebastian Dröge
4a2455b744 Revert "WIP revert soup"
This reverts commit fdac3a7a23.

Was not supposed to be pushed but a local workaround for
https://bugzilla.gnome.org/show_bug.cgi?id=693911#c13
2016-06-06 10:47:52 +03:00
Sebastian Dröge
fdac3a7a23 WIP revert soup 2016-06-03 13:25:38 +03:00
Sebastian Dröge
cfaedbc265 dvdemux: Unref seek event in any case
It would be leaked if no seek handler was currently set.
2016-06-03 13:18:31 +03:00
Sebastian Dröge
d62115e15e dvdemux: Properly set event/message sequence numbers based on the previous seek
See https://bugzilla.gnome.org/show_bug.cgi?id=765935

https://bugzilla.gnome.org/show_bug.cgi?id=767157
2016-06-03 13:13:21 +03:00
Sebastian Dröge
26b37c7acb dvdemux: Remember if upstream had a time segment and if not properly create time segments
Previously the segment.time was wrong, and the position was not updated
correctly, resulting in seeks in PUSH mode with upstream providing a BYTES
segment to not work at all.

https://bugzilla.gnome.org/show_bug.cgi?id=767157
2016-06-03 13:13:21 +03:00