Commit graph

14790 commits

Author SHA1 Message Date
Tim-Philipp Müller
b76595d67e gdkpixbufoverlay: add "positioning-mode" property to allow absolute positions
Set positioning-mode=pixels-absolute to allow positioning with
absolute coordinates, meaning negative x/y offsets will be
interpreted as being to the left/above the video frame instead
of being interpreted as relative to the right/bottom edge of
the video frame (which is a silly default, but that's how it is).

This means we can nicely slide images into and out of the frame,
see gdkpixbufoverlay-test.

https://bugzilla.gnome.org/show_bug.cgi?id=739566
2014-12-25 15:38:37 +00:00
Sebastian Dröge
11d6be2dcb osxaudio: Directly return the ringbuffer's caps if it is acquired 2014-12-22 15:33:51 +01:00
Sebastian Dröge
fc1670b75d osxaudio: Put all audio formats into the template caps
We report the proper caps later from the get_caps() vfunc implementation after
probing the selected device.
2014-12-22 12:56:19 +01:00
Sebastian Dröge
b83cd14a12 osxaudio: Also set the big endian flag for floating point samples 2014-12-22 12:56:05 +01:00
Sebastian Dröge
d2da56cfea MAINTAINERS: Update my mail address 2014-12-22 11:45:59 +01:00
Sebastian Dröge
e7b10a107d osxaudio: Fix deadlock and property change notification in device selection code
After creating the ringbuffer we have to set the device on the ringbuffer as
it defaults to kAudioDeviceUnknown. At this point it can't have changed to
anything else yet and we don't have to notify about changes to the sink/src
"device" property. It's also not a good idea because GstAudioBaseSrc has the
object lock taken while the ringbuffer is created, which might cause a
deadlock if something calls back into the element from "notify::device".

Once the base class is done with the NULL_TO_READY state change, it has opened
the device via the ringbuffer and this might have chosen a different device.
Especially if we initially used kAudioDeviceUnknown. Also notify about this
property change as initially intended by this code.
2014-12-22 10:29:01 +01:00
Nicolas Dufresne
2a1459c88f v4l2pool: Update configuration size
We already update our copy of VideoInfo.size to proper size, now also
the configuration so the size matches on release.

https://bugzilla.gnome.org/show_bug.cgi?id=741420
2014-12-19 12:32:06 -05:00
Edward Hervey
cbe56d2331 matroska-demux: Cache upstream length
Instead of constantly querying upstream, just cache the last duration,
and in the unlikelyness we might have gone over query again before
deciding we are EOS.

Cut 15% cpu off matroskademux streaming thread (srsly...)
2014-12-19 10:59:18 +01:00
Vincent Penquerc'h
b7413279d9 matroska: mux/demux the OpusHead header
This is meant to be so (https://wiki.xiph.org/MatroskaOpus - while
it is marked as a draft, this part was confirmed to be correct on
IRC), and allows one to determine whether a demuxed stream is
multistream or not, and thus set the multistream caps field
accordingly. In turn, this means downstream does not have to guess.

https://bugzilla.gnome.org/show_bug.cgi?id=740744
2014-12-18 11:38:49 +00:00
Sebastian Dröge
d18b893d28 rtspsrc: Don't dereference NULL if a suitable stream for the AUX element can't be found
CID 1258717
2014-12-18 11:51:12 +01:00
Sebastian Dröge
13479aa390 Automatic update of common submodule
From ef1ffdc to f2c6b95
2014-12-18 10:53:39 +01:00
Tim-Philipp Müller
4dd7d79b52 udpsink: allocate scratch space for render functions on the heap
and not the stack. Our allocations could get a bit too large
to be sure it's not going to cause trouble using the stack.
2014-12-16 20:26:36 +00:00
Tim-Philipp Müller
97a2eb7afb multiudpsink: re-use send_buffers() code path for render() function
It's like rendering a buffer list, just with one buffer.
Has the added advantage that if there are multiple clients
we can send the buffer to all the clients in one go.
2014-12-16 20:26:36 +00:00
Tim-Philipp Müller
54a9a436ba multiudpsink: keep client list consistent during removals
We unlock and re-lock the client lock while emitting the
removed signal, which causes inconsistencies in the client
list vs. the client counts. Instead, remove the client from
the list already before emitting the signal and put it into
a temporary list of clients to be removed. That way things
look consistent to the streaming thread, but signal callbacks
can still do things like get stats from removed clients.
2014-12-16 20:26:36 +00:00
Tim-Philipp Müller
fa3ef2e54c multiudpsink: fix client count after removal 2014-12-16 20:26:36 +00:00
Tim-Philipp Müller
7bdf7500a1 multiudpsink: keep client list sorted by socket family
We make use of in the send_buffers() function if we
need to use different sockets to send to IPv4 and
IPv6 destinations.
2014-12-16 20:26:36 +00:00
Tim-Philipp Müller
e1a7deb27f multiudpsink: add sendmmsg-ready render_list function prototype
Add prototype for a render_list() function that can use a
sendmmsg-style g_socket_send_messages() function once it lands
in GLib. We can use this infrastructure to send multiple buffers
made up by multiple memories to multiple clients in one go, which
drastically reduces the number of syscalls made when sending
high-bitrate video streams.

https://bugzilla.gnome.org/show_bug.cgi?id=732152
2014-12-16 20:26:36 +00:00
Tim-Philipp Müller
dead5c2476 multiudpsink: make udp client structure refcounted
Use the refcount for memory management and keep track
of the number of duplicate clients in a separate
variable. This will be useful later, and means we
don't have to hold the OBJECT_LOCK all the time.

https://bugzilla.gnome.org/show_bug.cgi?id=732866
2014-12-16 20:26:36 +00:00
Tim-Philipp Müller
675384a8cb multiudpsink: keep count of number of unique and non-unique IPv4 and IPv6 clients
This will come in handy later.
2014-12-16 20:26:36 +00:00
Nicolas Dufresne
f6259e96c7 v4l2bufferpool: Disable create_buf with libv4l2
Libv4l2 does not work with CREATE_BUFS. Instead of failing on random
error caused by libv4l2, disable CREATE_BUFS when an emulated format is
detected.
2014-12-16 15:00:22 -05:00
Nicolas Dufresne
1fe4a19dc2 v4l2allocator: Add protection against broken libv4l2
It looks like libv4l2 support for CREATE_BUF is incomplete. That
combine with existing bugs may lead to crash in GStreamer. These
check will make it robust by:

- Checking create buf index isn't an already in used index
- Checking that the index out of QUERYBUF matches the requested
  index
2014-12-16 13:42:22 -05:00
Sebastian Dröge
6b2fc2de8d rtspsrc: Add something to the debug logs if an RTX AUX element can't be added
... because the application already has a signal handler set up here.
2014-12-16 16:40:08 +01:00
Matthew Waters
bf0a19bf02 rtspsrc: add retransmission support according to RFC4588
Based on the client-rtpaux example
2014-12-16 16:40:08 +01:00
Wim Taymans
0b881ab2ce osxvideosink: clear rectangle structures before use 2014-12-16 13:25:01 +01:00
Nicolas Dufresne
3dae65ede8 v4l2object: Always set format
Right now we try to be clever by detecting if device format have
changed or not, and skip setting format in this case. This is valid
behaviour with V4L2, but it's also very error prone. The rational
for not setting these all the time is for speed, though I can't
measure any noticeable gain on any HW I own. Also, until recently,
we where doing get/set on the format for each format we where
probing, making it near to impossible that the format would match.
This also fixes bug where we where skipping frame-rate setting if
format didn't change.

https://bugzilla.gnome.org/show_bug.cgi?id=740636
2014-12-15 18:38:00 -05:00
Nicolas Dufresne
9c468ef2da videocrop: Remove todo about caps filter
The filter is already interected.
2014-12-15 18:30:01 -05:00
Nicolas Dufresne
36f1a9bce1 videocrop: Make sure new crop is applied
Since "basetransform: Fix caps equality check" commit a7f357,
set_info() will not be called anymore if crop didn't change
the caps. This is fixed by setting "need_update" boolean when
cropping properties has been changed, and then applying these
if they where not applied before rendering the next frame. This
patch also fixed the locking, dropping un-needed custom lock,
and no holding needless lock while doing the operation as we
already hold the streaming lock.

https://bugzilla.gnome.org/show_bug.cgi?id=740787
2014-12-15 18:27:09 -05:00
Arun Raghavan
db91486aa8 osxaudiosink: Prefer filter caps order while getting caps
https://bugzilla.gnome.org/show_bug.cgi?id=740987
2014-12-15 11:22:44 +05:30
Arun Raghavan
f573f028d2 osxaudiosink: Add some error handling around channel layout parsing
For now we just spit a warning and ignore the channel layout if we can't
support it.

https://bugzilla.gnome.org/show_bug.cgi?id=740987
2014-12-15 11:19:52 +05:30
Arun Raghavan
d18a6b0a2c osxaudio: Take lock around sink/source before accessing the ringbuffer
https://bugzilla.gnome.org/show_bug.cgi?id=740987
2014-12-15 11:19:52 +05:30
Arun Raghavan
4a58ebf487 osxaudiosrc: Probe channel layout too
https://bugzilla.gnome.org/show_bug.cgi?id=740987
2014-12-15 11:19:52 +05:30
Arun Raghavan
df610a7c18 osxaudiosink: Only fix up channels/layout for PCM caps while probing
It's unlikely that setting a channel layout will do much for AC3/DTS
streams. If we find at some point that it does make sense, we can
perform the structure copying unconditionally (i.e., the current code is
wrong, since AC3/DTS will get two structures now - one with the channel
layout, one without).

https://bugzilla.gnome.org/show_bug.cgi?id=740987
2014-12-15 11:19:52 +05:30
Arun Raghavan
bd1502862c osxaudiosrc: Implement caps probing
https://bugzilla.gnome.org/show_bug.cgi?id=740987
2014-12-15 11:19:52 +05:30
Arun Raghavan
48872dbc56 osxaudio: Bind audio device to audio unit early
We want to bind the device during open so that subsequent format queries
on the audio unit are as specific as possible from that point onwards.

https://bugzilla.gnome.org/show_bug.cgi?id=740987
2014-12-15 11:19:52 +05:30
Arun Raghavan
2d0391c6e1 osxaudiosink: Fix up caps querying a bit
This should make caps queries correct in PAUSED and higher as well.

https://bugzilla.gnome.org/show_bug.cgi?id=740987
2014-12-15 11:19:51 +05:30
Arun Raghavan
f967f0742f osxaudio: Move osxaudiosrc-specific code out of the generic path
Avoids one layering violation (GstCoreAudio referring to
GstOsxAudioSrc).

https://bugzilla.gnome.org/show_bug.cgi?id=740987
2014-12-15 11:19:51 +05:30
Arun Raghavan
ffcb1577fa osxaudio: Clean up a GstCoreAudio -> GstOsxAudioSrc/Sink reference
Now that device selection has no sink/source-specific bits, we can have
generic device selection for this path. We do need to now track state
changes so we can look up the final device_id once the device is open,
though.

https://bugzilla.gnome.org/show_bug.cgi?id=740987
2014-12-15 11:19:51 +05:30
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