Commit graph

11 commits

Author SHA1 Message Date
Matthew Waters
f954d93f27 applemedia: silence some deprecation warnings from ios 12.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5111>
2023-07-27 13:05:37 +00:00
Nirbheek Chauhan
3b9ce6cb54 avfvideosrc: GL texture cache also supports YUY2 on macOS
BGRA gives black frames, and everything else fails to negotiate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4134>
2023-03-14 00:00:24 +00:00
Nirbheek Chauhan
a8ed817d30 avfvideosrc: Use frame duration instead of frame rate
These days you're can use minFrameDuration and maxFrameDuration which
are CMTime with fractional values. That way we don't need to convert
between double and fractions in a really weird way.

This fixes really odd fractional values exposed in caps, like:

2000000/76923, 1000000/37037, 5000000/178571, 10000000/344827, 10000000/333333

Which are actually just 26/1, 27/1, 28/1, 29/1, 30/1

We can also delete a lot of outdated code for iOS versions older than
7.0 by using newer APIs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4134>
2023-03-14 00:00:24 +00:00
Jan Schmidt
47e97251af avfvideosrc: Fix description and trailing whitespace
Minor fix to mention that the element is also useful on MacOS,
and remove some trailing whitespace

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4083>
2023-03-01 20:05:32 +00:00
Jan Schmidt
855e86f6a2 avfvideosrc: Don't wait on main thread for permissions request
Recursively invoking the NSMainLoop can cause crashes in
applications that don't expect it. Instead of waiting for
permission to be granted, move the wait later - until we
actually need device permissions when starting the capture
session. That moves the wait into the streaming thread
instead of the application thread that's setting the pipeline
state to READY.

Instead of a manual state change implementation to open
and close the device, use the basesrc start/stop methods that
are intended for the purpose.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4083>
2023-03-01 20:05:32 +00:00
Nirbheek Chauhan
b3806da265 avfvideosrc: Report latency when doing screen capture
There is no `device` when doing screen capture, but there is always an
`input`, so use that to decide when we can reply to a latency query.
Without this, the latency query just fails.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3589>
2022-12-16 23:58:07 +00:00
Piotr Brzeziński
1e70525bc9 avfvideosrc: Allow specifying crop coordinates during screen capture
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3153>
2022-10-12 21:19:31 +00:00
Piotr Brzeziński
0d72a6209c avfvideosrc: Fix wrong default framerate value
Current default G_MAXINT is not a correct value under any circumstances.
This creates an issue with screen capture, during which we currently do
not get any framerate info causing G_MAXINT to show up, where elements
downstream can possibly misbehave - for example, `vtenc` causes
a kernel panic.
Replace with 30/1 to avoid such scenarios.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2944>
2022-08-25 14:24:57 +00:00
Diogo Goncalves
acfc9ae216 avfvideosrc: fix wrong framerate selected for caps
This fix solves an issue where a format that doesn't support the
requested framerate would be selected. It ensures that we use the first
format and framerate pair that supports the requested caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2331>
2022-05-13 19:38:45 +00:00
Nirbheek Chauhan
d05fcadf4e applemedia: Document vtenc / vtdec elements
Also preserve-alpha property should only be exposed on the
vtenc_prores element since h264 does not support transparency.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-docs/-/issues/94

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1601>
2022-01-30 02:17:24 +05:30
Thibault Saunier
019971a3c7 Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
Renamed from sys/applemedia/avfvideosrc.m (Browse further)