Commit graph

7 commits

Author SHA1 Message Date
Piotr Brzeziński dc494d9edb vtenc: Move output loop to a separate thread
vtenc has an async output queue, which we only iterate over after another frame is enqueued.
At the very least it means we're always a frame behind the fastest possible output.
In edge cases it's also bug-prone - for example if we only have 1 frame, the downstream caps negotiation
will never happen.

This commit adds a separate task running on the source pad, which only iterates over the output queue
and pushes frames out as soon as they're put there. The queue length is limited to ensure we don't encode
too far ahead compared to what downstream can consume. Any failures that occur when pushing data downstream
will be signalled in self->downstream_ret so that other parts of code can act accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4967>
2023-07-21 13:05:26 +00:00
Andoni Morales Alastruey fc6e6fb547 vtenc: remove duplicated framerate and size variables
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4282>
2023-06-19 08:37:55 +00:00
Andoni Morales Alastruey 23812bbc92 vtenc: apply DTS offset to ensure DTS <= PTS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4282>
2023-06-19 08:37:54 +00:00
Nirbheek Chauhan fed69c48b6 vtenc: Add FieldDetail properties for interlaced input
Standard interlace handling:
* If we have interlace-mode=interleaved and the field order, we just
  set it when creating the session
* If we have interlace-mode=(interleaved|mixed) and no field order, we
  set the field order on the first buffer

The encoder session does not support changing the FieldDetail after it
has started encoding frames, so we cannot support mixed streams
correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan 29a32703a5 vtenc: Add a property to forcibly ignore alpha values
This PropertyKey is not documented in any headers anywhere, so we need
to define it ourselves.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan 0f0e68080c applemedia: Add ProRes support to vtenc and vtdec
For vtdec, we continue to prefer NV12; else we pick whatever
downstream wants. In the special case where we're decoding 10-bit or
12-bit ProRes formats, we will prefer AYUV64.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
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/vtenc.h (Browse further)