Commit graph

14703 commits

Author SHA1 Message Date
Arun Raghavan
5c2f041286 osxaudiosink: Move device caps probing to get_caps()
This should be preferred to running the probe at device open time.

https://bugzilla.gnome.org/show_bug.cgi?id=740987
2014-12-15 11:19:51 +05:30
Arun Raghavan
945aaa0a35 osxaudio: Make some debug code compile conditionally
https://bugzilla.gnome.org/show_bug.cgi?id=740987
2014-12-15 11:19:51 +05:30
Arun Raghavan
b06ae28061 osxaudio: Move device selection to ringbuffer->open_device()
This is conceptually the right thing to do, and allows us to correctly
catch errors in device selection as well, which we could not do while
creating the ringbuffer.

https://bugzilla.gnome.org/show_bug.cgi?id=740987
2014-12-15 11:19:51 +05:30
Arun Raghavan
199461bb2e osxaudio: Consolidate input and output code paths a bit
https://bugzilla.gnome.org/show_bug.cgi?id=740987
2014-12-15 11:19:51 +05:30
Thibault Saunier
76944350c0 Deinterlace: in query_caps return only supported formats if filter is interlaced
In some cases the currently set GstVideoInfo is not interlaced, but
upstream caps are interlaced and the info is passed in the filter,
we should take that info into account and make sure that we do not
consider that case as a "pass through" case.

https://bugzilla.gnome.org/show_bug.cgi?id=741407
2014-12-14 12:41:16 +01:00
Edward Hervey
6b69ef24a1 qtdemux: Fix debug statement
It was using the non-increasing offset variable, which made that statement
not so useful :)
2014-12-12 11:06:17 +01:00
Edward Hervey
d1ae39d6d6 qtdemux: Add macros for the various timescale conversions
This helps make the code more readable and avoid future bad usage of
scaling function argument order.
2014-12-12 11:03:15 +01:00
Patrick Radizi
0a359cdbdc rtph264pay: fix potential crash when shutting down
A race condition in the state change function may cause buffers
to be unreffed while they are still used by the streaming thread
in gst_rtp_h264_pay_send_sps_pps() resulting in a crash. Chain
up to the parent class first in the state change function to
make sure streaming has stopped and only then free those buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=741381
2014-12-11 14:00:19 +00:00
Jan Schmidt
de8d00348e qtdemux: Copy flags of the overall segment to output segments
Preserve the segment flags of the overall demux segment on the output
segments for each pad.
2014-12-12 00:56:49 +11:00
Matej Knopp
2505e343b1 qtmux: use 64bit chunk_offset
https://bugzilla.gnome.org/show_bug.cgi?id=741279
2014-12-10 18:42:30 -03:00
Edward Hervey
9a903c994f qtdemux: Fix rounding errors in duration update
Make sure we store updated segment stop/duration with the same
granularity as the duration timescale.

And add more debug
2014-12-10 17:39:17 +01:00
Edward Hervey
b40cfcfffb qtdemux: Update duration when we get more information
When dealing with fragmented files, we will get more accurate duration
information via the mfra and moof atoms.

In order for playback to not stop at the initial duration (from the
moov atom), we need to check and update the various duration variables
when we find more information.

Fixes playback of fragmented files in pull mode
2014-12-10 16:55:44 +01:00
Edward Hervey
799609583e qtdemux: Remove variable assignments never read
As detected by clang/scan-build
2014-12-10 15:09:25 +01:00
Edward Hervey
7828f73516 qtdemux: Use GstClockTime for nanosecond-based time variables/fields
Avoids confusion with timescaled-based variables and bytes (offset)
variables.
And use GST_CLOCK_TIME_NONE where applicable
2014-12-10 15:09:25 +01:00
Edward Hervey
0a381b9edd pushfilesrc: Add TIME SEGMENT capability
Adds a new set of properties to make pushfilesrc output a TIME SEGMENT
(instead of the filesrc BYTE SEGMENT).

When time-segment is set to True the following will happen:
* Seeks are refused (data starts from the beginning of the file)
* The BYTE segment will be replaced by a TIME segment with the values
  specified in the various properties
* The first outgoing buffer will have a timestamp set on it (by default
  it has a value of GST_CLOCK_TIME_NONE)
2014-12-10 15:09:25 +01:00
Sebastian Dröge
f5d26af3c9 aacparse: Also only unref caps if they're not NULL 2014-12-10 11:35:29 +01:00
Sebastian Dröge
6d6c6aac13 aacparse: gst_pad_get_allowed_caps() will return NULL if there is no peer 2014-12-10 11:35:02 +01:00
Thibault Saunier
7874bba773 vpXenc: CLOCK_TIME_NONE is not a valid min_latency value
We should just use 0 if we do not have the information
2014-12-09 20:38:22 +01:00
Thibault Saunier
52a1773b40 rtpsession: Use an empty iterator in iterate_internal_link when no links
And not a NULL Iterator, so it is consistent with the way it usually
works and avoid user to need a different code paths to handle that.
2014-12-09 20:38:22 +01:00
Aurélien Zanelli
62193129c5 v4l2bufferpool: set buffer interlace flags when field is V4L2_FIELD_INTERLACED
If v4l2_buffer.field is V4L2_FIELD_INTERLACED, we set corresponding
GstVideoBuffer flags depending on the video standard.
According to V4L2 specification, M/NTSC transmits the bottom field
first, all other standards the top field first.

https://bugzilla.gnome.org/show_bug.cgi?id=737603
2014-12-09 11:00:28 -05:00
Patrick Radizi
fef1a8d88a rtph264pay: Fixes buffer leak when using SPS/PPS
Fixes a buffer leak that would occurr if the pipeline was shutdown
while a SPS/PPS header was being created.

https://bugzilla.gnome.org/show_bug.cgi?id=741271
2014-12-09 09:47:23 +01:00
Mathieu Duponchelle
a5694b213a agingtv: fix memcpy when no color aging requested.
video_size is the size in pixels, actual size of the memcpy
has to be stride * height.
2014-12-09 04:44:40 +01:00
Nicolas Dufresne
eb1dcd841a v4l2: Workaround libv4l2 RW emulation bug
When libv4l2 emulates RW mode on top of MMAP devices, the queues are
only initialized on first read. The problem is that poll() will fail
if called before the queues are initialized and streaming. Workaround
this by doing a zero size read when pool is started in that IO mode.

https://bugzilla.gnome.org/show_bug.cgi?id=740633
2014-12-07 17:43:01 -05:00
Nicolas Dufresne
0e05faf91a v4l2: Fix RW io mode
In RW, allocator can be null, max_buffers can be zero, and we need not
to wait while the queue is empty since there is no queue.

https://bugzilla.gnome.org/show_bug.cgi?id=740633
2014-12-07 17:42:48 -05:00
Nicolas Dufresne
d328eea5f2 v4l2bufferpool: Cleanup uneeded check and cases
There is nothing in between the break and the "done:" anymore, plus
USERPTR and DMABUF_IMPORT case is exactly the same.
2014-12-04 17:00:25 -05:00
Nicolas Dufresne
319efc3e20 v4l2pool: Fix CREATE_BUFS support for capture
This patch fixes CREATE_BUFS support for capture devices. Initially we
would only try and allocate more buffers when the copy threshold
is reached. When the threshold was not set (needed) it would never
happen. Another problem is that on capture side, acquire returns
filled buffer, hence need to pool. We need to set a special flag to
force allocation to happen.

https://bugzilla.gnome.org/show_bug.cgi?id=741134
2014-12-04 17:00:25 -05:00
Nicolas Dufresne
b80edd2ee2 v4l2allocator: Fix CREATE_BUF probing
Current for every memory type we where probing MMAP CREATE_BUFS ioct.

https://bugzilla.gnome.org/show_bug.cgi?id=741134
2014-12-04 17:00:25 -05:00
Nicola Murino
c466ff4748 matroskademux: set framerate 0/1 when duration is not known
https://bugzilla.gnome.org/show_bug.cgi?id=740130
2014-12-04 18:20:37 +01:00
Jan Schmidt
f4ca3c255a qtdemux: More fixes for reverse playback
When seeking or finding the previous keyframe, do
comparisons against targets and segments using composition time
to correctly decide which sample times match.
2014-12-04 22:53:07 +11:00
Thibault Saunier
aa89278ade rtpjitterbuffer: Use an empty iterator in iterate_internal_link when no links
We used to setup an iterator with 1 GValue set with a NULL object
pointer which is not the normal way to do that. Instead we should make
sure that the first call to gst_iterator_next returns GST_ITERATOR_DONE.
2014-12-03 11:17:11 +01:00
Jan Schmidt
b3d1ab5267 qtdemux: Handle seeks past EOS as a seek to the end
Fix reverse playback of every frame by making seeks past/to EOS
find the last segment and start there.
2014-12-03 13:23:35 +11:00
Olivier Crête
e3b0fb2a5d rtpmpadepay: Relax caps to allow any clock-rate
Some Wowza setups seem to send an invalid non-90000 clock-rate.
2014-12-02 15:33:25 -05:00
Thiago Santos
148da6210a qtdemux: don't use GST_CLOCK_TIME_NONE in non GstClockTime variables
Use -1 instead as those are gint64/guint64 variables and not GstClockTime
2014-12-02 00:46:35 -03:00
Aurélien Zanelli
114b84c1a3 v4l2allocator: fix gst_v4l2_allocator_stop prototype
gst_v4l2_allocator_stop returns a GstV4l2Return, not a gboolean.

https://bugzilla.gnome.org/show_bug.cgi?id=739792
2014-12-01 10:08:54 -05:00
Aurélien Zanelli
74eb903727 v4l2bufferpool: unref pool when v4l2_allocator_new() fails
https://bugzilla.gnome.org/show_bug.cgi?id=739791
2014-12-01 10:08:40 -05:00
Nicolas Dufresne
cfa5a9d938 v4l2: Remove last include to linux/videodev2.h
We now use and update our internal copy so we no longer have to ifdef
the entire code for features and defines that where added over the
years.

https://bugzilla.gnome.org/show_bug.cgi?id=740905
2014-11-30 17:55:19 -05:00
Tim-Philipp Müller
d65c3bbe7e qtdemux: implement seeking in fragmented mp4 files in pull mode based on the mfra table 2014-11-30 15:33:13 +00:00
Tim-Philipp Müller
77f37a6b22 qtdemux: use track fragment decoding time (tfdt) in parse_trun() for interpolation
As fallback if we don't have any existing samples
as reference point yet.

Based on patch by David Corvoysier <david.corvoysier@orange.com>
2014-11-30 15:33:13 +00:00
Tim-Philipp Müller
e24f903b13 qtdemux: parse mfra random access box for fragmented mp4 files
If it's present, and we operate in pull mode.
2014-11-30 15:33:13 +00:00
Tim-Philipp Müller
8a0f4e74e4 qtdemux: stop parsing headers for fragmented mp4s at the first moof
Currently during header parsing, we scan through the entire file
and skip every moof+mdat chunk for fragmented mp4s, which makes
start-up incredibly slow. Instead, just stop at the first moof
chunk when have a moov, and start exposing the streams, so we
can go and start handling the moofs for real.
2014-11-30 15:30:04 +00:00
Tim-Philipp Müller
75917de294 tests: add interactive gdkpixbufoverlay test
Just need to fix the coordinate system now so
that negative offsets are actually negative
and not flipped to position things from the
opposite border.
2014-11-30 14:35:08 +00:00
Tim-Philipp Müller
8c2d55d1e9 gdkpixbufoverlay: add "pixbuf" property
So we can set a GdkPixbuf directly instead of
reading it from an image file on the file system.
2014-11-30 14:35:06 +00:00
Tim-Philipp Müller
35f10e4630 gdkpixbuf: remove pixbufscale code that was never ported
Don't think we'll need this again.
2014-11-30 14:34:08 +00:00
Olivier Crête
ccac1f8c0b rtprtxreceive: Use offset when copying header
The header is not always at the start of the packet, so we need to compute
the offset first.
2014-11-29 18:38:12 -05:00
Tim-Philipp Müller
023a1637d9 apev2mux: write APE tags at end for wavpack files
http://www.wavpack.com/file_format.txt:
"Both the APEv2 tags and/or ID3v1 tags must come at the end of the
WavPack file, with the ID3v1 coming last if both are present."

WavPack files that contain APEv2 tags at the beginning of the files
are unplayable on players that use FFmpeg (like VLC) and most other
software (except Banshee). Players that use libwavpack directly can
play the files because it skips the tags, but does not recognize the
tag data at that location.

https://bugzilla.gnome.org/show_bug.cgi?id=711437
2014-11-28 13:12:46 +00:00
Tim-Philipp Müller
7b64b3e109 tests: add interactive test for gapless playback using SEGMENT seeks
Not working too well yet, there are glitches even with WAV or FLAC.

https://bugzilla.gnome.org/show_bug.cgi?id=692368
2014-11-28 10:46:06 +00:00
Andrei Sarakeev
6348de195d aspectratiocrop: Handle resolution changes properly
When an caps-event is received, we must immediately change the crop
to videocrop correctly changed caps-event dimension, otherwise the
videocrop will first use the previous value of the crop that when
resizing video to a smaller resolution may cause an error.

https://bugzilla.gnome.org/show_bug.cgi?id=740671
2014-11-28 11:19:23 +01:00
Edward Hervey
f2f1663677 Automatic update of common submodule
From 7bb2bce to ef1ffdc
2014-11-27 17:10:53 +01:00
Tim-Philipp Müller
4459088c6d test: use gst_util_uint64_scale_round() for timestamp to sample calculation 2014-11-27 11:20:36 +00:00
Tim-Philipp Müller
65ff17660b tests: add interactive test for accurate seeking
For some audio formats.

https://bugzilla.gnome.org/show_bug.cgi?id=655276
2014-11-27 11:17:58 +00:00