Commit graph

2593 commits

Author SHA1 Message Date
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
Sebastian Dröge
479a3bab18 dvdemux: Implement SEEKING query so we can actually seek if upstream can't seek in TIME
https://bugzilla.gnome.org/show_bug.cgi?id=767157
2016-06-03 13:13:20 +03:00
Sebastian Dröge
2f4b89fffe dvdemux: Recalculate the frame offsets at the beginning of each BYTE segment and whenever upstream gives us a timestamp
This fixes seeking in DV streams where upstream operates in PUSH mode with a
TIME segment (e.g. avidemux). Without this, we would generate wrong durations
and timestamps after a seek.

https://bugzilla.gnome.org/show_bug.cgi?id=767157
2016-06-03 13:13:20 +03:00
Sebastian Dröge
30c8aafea9 dvdemux: Pass-through buffer DISCONT flags
https://bugzilla.gnome.org/show_bug.cgi?id=767157
2016-06-03 13:13:20 +03:00
Guillaume Desmottes
6fd04b07fc souphttpsrc: fix buffer leak when flushing
When early returning in gst_soup_http_src_read_buffer() because the
element is FLUSHING, we need to unmap and unref the buffer which was just created.

https://bugzilla.gnome.org/show_bug.cgi?id=766718
2016-05-20 17:40:26 +01:00
Sebastian Dröge
e2b2185029 souphttpclientsink: Set sent_buffers and streamheader_buffers to NULL after freeing
Otherwise we might use an already freed list later and crash or worse.
2016-05-19 12:44:17 +03:00
Carlos Rafael Giani
e9a795fa8b souphttpsrc: Use audio/x-unaligned-raw instead of audio/x-raw for L16 data
Directly setting audio/x-raw caps leads to problems when the delivered
data blocks do not align properly at sample boundaries (for example, a
data block with 391 bytes). So, instead, set audio/x-unaligned-raw to
let a parser be autoplugged.

https://bugzilla.gnome.org/show_bug.cgi?id=689460
2016-05-15 13:18:02 +03:00
Thiago Santos
325741d37d souphttpsrc: check if request was cancelled when sending message
It might be that the request was aborted by the application and
we can return immediatelly
2016-05-15 06:40:01 -03:00
Thiago Santos
075a6260fd souphttpsrc: proxy resolver is on by default
Remove from the session creation parameters
2016-05-15 06:36:25 -03:00
Thiago Santos
9b52a5b9af soup: update build to warn about newer deprecated functions
We already depend on 2.48
2016-05-15 06:36:25 -03:00
Thiago Santos
8816764112 souphttpsrc: reduce reading latency by using non-blocking read
Non-blocking read will return the amount of data available without
blocking to wait for the full requested size.

The downside is that now it souphttpsrc needs to have a waiting
mechanism in case there is no data available yet to avoid busy
looping arond the inputstream.
2016-05-15 06:36:25 -03:00
Thiago Santos
183695c61a souphttpsrc: refactor to use Soup's sync API
Replace the async API with the sync API to remove all the extra mainloop
and context handling. Currently it blocks reading until 'blocksize'
bytes are available but that can be improved by using:

https://developer.gnome.org/gio/unstable/GPollableInputStream.html#g-pollable-input-stream-read-nonblocking

https://bugzilla.gnome.org/show_bug.cgi?id=693911
2016-05-14 08:40:12 -03:00
Sebastian Dröge
83d5797a58 dv: Use correct pixel-aspect-ratio values
The previous ones resulted in odd display aspect ratios and were different
from the ones used by e.g. ffmpeg. The new ones now result in display aspect
ratios of 4:3 and 16:9.

https://bugzilla.gnome.org/show_bug.cgi?id=765946
2016-05-05 13:37:27 +03:00
Mario Sanchez Prada
8740313504 vpxenc: Properly handle frames with too low duration
When a frame's duration is too low, calling gst_util_uint64_scale()
to scale its value can result into it being truncated to zero, which
will cause the vpx encoder to return an VPX_CODEC_INVALID_PARAM error
when trying to encode.

To prevent this from happening, we simply ignore the duration when
encoding if it becomes zero after scaling, logging a warning message.

https://bugzilla.gnome.org/show_bug.cgi?id=765391
2016-04-23 13:56:56 +01:00
Jan Schmidt
46a3c9ac8b Revert "pulsesink: uncork if needed upon commit"
This reverts commit 0dd46accf6.

With some audiosinks, starting the ringbuffer on the first commit
causes audio glitches at startup by starting to output segments
from the ringbuffer before it has been filled / fully prerolled. This
doesn't usually happen with pulsesink because we map the pulseaudio
ringbuffer directly, but we should keep things consistent with
other sinks with regards to startup latency, plus it gives more
headway to avoid glitching, should the initial 2nd segment take
more than 10ms to generate.

https://bugzilla.gnome.org/show_bug.cgi?id=657076
2016-04-16 02:21:14 +10:00
Sebastian Dröge
bc2d4c4c31 souphttpclientsink: If no proxy is set by properties, use the default libsoup proxy resolver
That is, use whatever system settings there might exist. This is the same
behaviour we use in the HTTP source.
2016-04-15 11:36:36 +03:00
Nicolas Dufresne
284d723a9a vpxdec: Use threads on multi-core systems
This is a redo of commit b848c1b6ff. The
code was lost when the elements where ported to use a baseclass.

https://bugzilla.gnome.org/show_bug.cgi?id=764169
2016-03-24 19:30:44 -04:00
Vineeth TM
1071309870 good: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763076
2016-03-24 14:32:20 +02:00
Sebastian Dröge
49f4631909 gst: Handle gst_pad_get_current_caps() returning NULL gracefully 2016-02-23 18:27:47 +02:00
Dave Craig
211c8492b3 gst: Don't assume that get_current_caps() returns non-NULL caps after has_current_caps()
Remove calls to gst_pad_has_current_caps() which then go on to call
gst_pad_get_current_caps() as the caps can go to NULL in between. Instead just
use gst_pad_get_current_caps() and check for NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=759539
2016-02-23 18:11:42 +02:00
Nicolas Dufresne
905e28a0f3 jpegdec: Don't pass the same data over and over
We already pass the entire frame to the decoder. If the decoder ask for
more data, don't pass the same data again as this leads to infinit loop.
Instead, simply fail the fill function to signal the problem with that
frame. It will then be skipped properly.

https://bugzilla.gnome.org/show_bug.cgi?id=761670
2016-02-08 10:19:31 -05:00
Sebastian Dröge
70db210315 vp8enc: Ensure that we always have valid frame user data before using it
Otherwise we're going to dereference NULL pointers.
2016-01-20 13:41:33 +02:00
Sebastian Dröge
7eee775d5f vpxdec: Unref frame in all code paths of handle_frame()
https://bugzilla.gnome.org/show_bug.cgi?id=760666
2016-01-20 10:02:48 +02:00
Thibault Saunier
01f995b8dd vpxenc: Unref frame on ERROR
All code paths for handle_frame() must somehow take ownership of the frame, be
it by actually unreffing, forwarding the frame elsewhere or storing it for
later.

http://bugzilla.gnome.org/show_bug.cgi?id=760666
2016-01-20 10:02:44 +02:00
Thibault Saunier
17838829eb vp8enc: Return FLOW_ERROR when an error accures
FALSE would mean FLOW_OK

https://bugzilla.gnome.org/show_bug.cgi?id=760666
2016-01-16 08:58:48 +01:00
Sebastian Dröge
bed1f0a0a6 vpxdec: Initialize buffer variable to NULL
False positive but trivial to fix and possibly causing compiler warnings at
some point in the future too.

CID 1346535
2015-12-29 17:58:38 +02:00
Ravi Kiran K N
58fcc0a0ab dvdec: Remove unused fields
Remove unused fields frame_len and space

https://bugzilla.gnome.org/show_bug.cgi?id=759614
2015-12-18 11:30:19 +01:00
Luis de Bethencourt
2c54ea5ba9 dv1394: log error if failed to set socket status flag
Log an error message if failed to set write or read socket as
non-blocking.

CID 1139608
CID 1139609
2015-12-16 11:48:30 +00:00
Nicolas Dufresne
9808cff566 vpx: Add missing headers in Makefile.am
This fixes distcheck.

https://bugzilla.gnome.org/show_bug.cgi?id=755510
2015-12-15 14:27:22 -05:00
Prashant Gotarne
5c7eb0f886 vpx: created common baseclass GstVPXEnc
GstVP8Enc and GstVP9Enc has almost 80% code in common.
created common baseclass GstVPXEnc for GstVP8Enc and GstVP9Enc

https://bugzilla.gnome.org/show_bug.cgi?id=755510
2015-12-15 14:03:29 -05:00
Nicolas Dufresne
90dcc3921a vpxdec: Remove unneeded add video_meta
This also remove copies for VP8, which was not correctly in place
in previous related patch.
2015-12-15 12:57:53 -05:00
Prashant Gotarne
75fb614c1e vpx: created common base class GstVPXdec for vpx decoders
Base class for the vp8dec and vp9dec.

https://bugzilla.gnome.org/show_bug.cgi?id=755510
2015-12-15 12:06:45 -05:00
Xavier Claessens
10044b1d0f souphttpsrc: Add GTlsInteraction property
https://bugzilla.gnome.org/show_bug.cgi?id=750709
2015-12-14 14:56:02 -05:00
Nicolas Dufresne
189c291805 vpxdec: Use GstMemory to avoid copies
With the VPX decoders it's not simple to use downstream buffer pool,
because we don't know the image size and alignment when buffers get
allocated. We can though use GstAllocator (for downstream, or the system
allocator) to avoid a copy before pushing if downstream supports
GstVideoMeta. This would still cause a copy for sink that requires
specialized memory and does not have a GstAllocator for that, though
it will greatly improve performance for sink like glimagesink and
cluttersink. To avoid allocating for every buffer, we also use a
internal buffer pool.

https://bugzilla.gnome.org/show_bug.cgi?id=745372
2015-12-04 17:29:15 -05:00
Vineeth TM
bd701b8ee5 souphttpclientsink: Fix error leak and handle error
g_thread_try_new allows for possiblity of failures. In case it fails,
error is not handled and leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=758260
2015-11-18 09:31:42 +02:00
Nicolas Dufresne
b848c1b6ff vpxdec: Use threads on multi-core systems
This adds an automatic mode to the threads property of vpxdec in order to
use as many threads as there is CPU on the platform. This brings back
GStreamer VPX decoding performance closer to what is achieved by other
players, including Chromium.

https://bugzilla.gnome.org/show_bug.cgi?id=758195
2015-11-17 12:27:31 -05:00
Reynaldo H. Verdejo Pinochet
f58841c24e shout2: remove unnecessary NULL checks before g_free() 2015-11-15 01:43:08 -08:00
Reynaldo H. Verdejo Pinochet
2b7a1b4bb9 vp9enc: remove unnecessary NULL check before g_free() 2015-11-15 01:43:08 -08:00
Reynaldo H. Verdejo Pinochet
97a94b02ae vp8enc: remove unnecessary NULL check before g_free() 2015-11-15 01:43:08 -08:00
Reynaldo H. Verdejo Pinochet
c9039751f1 souphttpsrc: remove unnecessary NULL checks before g_free() 2015-11-15 01:43:08 -08:00
Vineeth TM
7ef9dd3761 jpegdec: fix output state memory leak
When jpeg_finish_decompress is called, output state reference is being created.
But if there is any failures in finishing decompress, it jumps to setjmp,
and at that point state was not referenced. Resulting in leak of output state.
Hence adding another setjmp after output state is referenced.
Similarly adding another setjmp to unmap the frame in case error happens before
finish_decompress

https://bugzilla.gnome.org/show_bug.cgi?id=753087
2015-11-10 07:54:08 -03:00