Commit graph

2580 commits

Author SHA1 Message Date
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
Nirbheek Chauhan e686ec0c97 pulse: Don't leak caps and structures in the device provider 2015-11-05 17:54:48 +00:00
Sebastian Dröge 51adc9d889 souphttpsrc: EOS immediately if we have an empty seek segment
https://bugzilla.gnome.org/show_bug.cgi?id=748316
2015-10-14 16:56:26 +03:00
Stavros Vagionitis 21c6da6764 souphttpsrc: Make non-inclusive segment boundaries inclusive
The problem is that the filesrc and souphttpsrc are behaving
differently regarding the calculation of the segment boundaries. The
filesrc is using a non-inclusive boundaries, while the souphttpsrc
uses inclusive. Currently the hlsdemux calculates the boundaries as
inclusive, so for this reason there is no problem with the souphttpsrc,
but there is an issue in the filesrc.

The GstSegment is non-inclusive, so the proposed solution is to use
non-inclusive boundaries in the hlsdemux in order to be consistent.
Make the change in the hlsdemux, will break the souphttpsrc, which
will expect inclusive boundaries, but the hlsdemux will offer
non-inclusive. This change makes sure that the non-inclusive
boundaries are converted to inclusive.

https://bugzilla.gnome.org/show_bug.cgi?id=748316
2015-10-14 16:56:22 +03:00
Graham Leggett af25e3cc93 souphttpclientsink: Add the retry and retry-delay properties
These allow a failed request to be retried after the given number of seconds
instead of failing the pipeline. Take account of the Retry-After header if
present. Add retries parameter that controls the number of times an HTTP
request will be retried before failing.

https://bugzilla.gnome.org/show_bug.cgi?id=756318
2015-10-14 15:23:00 +03:00
Vineeth TM 6eb8db8afd souphttpclientsink: Check if soup message is created
If soup message is not created then the same should not be passed
on, which is resulting in segfault. Hence throwing a warning message
and returning

https://bugzilla.gnome.org/show_bug.cgi?id=755326
2015-10-12 16:53:29 +03:00
Vineeth TM 2ee7b2b94d souphttpclientsink: Check if location being set is valid
Adding a check in set_property to find if the location uri is valid
and printing warning if not valid.

https://bugzilla.gnome.org/show_bug.cgi?id=755326
2015-10-12 16:53:28 +03:00
Vineeth TM cece69003c souphttpclientsink: Fix memory leaks during failures
freeing streamheader_buffers and sent_buffers during failure cases.

https://bugzilla.gnome.org/show_bug.cgi?id=755326
2015-10-12 16:53:28 +03:00
Vineeth TM b1d4e7e222 souphttpclientsink: Replace redundant free_buffer_list function
Removing free_buffer_list and replacing it with already available function
g_list_free_full

https://bugzilla.gnome.org/show_bug.cgi?id=755326
2015-10-12 16:53:28 +03:00
Vineeth TM 4000d97a81 gdkpixbufdec: Fix pixbuf_loader leak during failures
https://bugzilla.gnome.org/show_bug.cgi?id=756219
2015-10-08 15:01:53 +01:00
Tim-Philipp Müller d77891406d gdkpixbufsink: don't leak old pixel buffer when setting a new overlay
https://bugzilla.gnome.org/show_bug.cgi?id=755773
2015-09-29 11:12:48 +01:00
Tim-Philipp Müller 6c09710292 flacenc: avoid potential string overflow
We don't necessarily have full control over the input tags, so
it's possible that the ISRC tag contains a longer string than
expected, in which case we'd write over the end of the static-size
13 byte buffer that is FLAC__StreamMetadata_CueSheet_Track::isrc.
Make sure to only copy the ISRC if it's not too long, and make
sure the buffer we write to is always NUL-terminated by using
g_strlcpy().

CID 1324931.
2015-09-28 20:25:22 +01:00
Jan Schmidt 866c86dd37 Fix some compiler warnings when building with G_DISABLE_ASSERT
Touches rtpmanager and gdkpixbufsink
2015-09-26 22:18:26 +10:00
Vineeth TM 1d23930cd7 wavpackdec: fix taglist memory leak
When passing the taglist to gst_audio_decoder_merge_tags, the reference is increased
by audiodecoder and the caller should free the taglist being passed.

https://bugzilla.gnome.org/show_bug.cgi?id=753903
2015-08-21 10:22:14 +03:00