Commit graph

45 commits

Author SHA1 Message Date
Sebastian Dröge
eadd35363a Workaround for sometimes setting the video format not actually changing the register values
Let's just try again.
2021-12-10 16:00:10 +02:00
Sebastian Dröge
0487634aa6 Don't set frame geometry and VANC mode
The former already does the latter.
2021-12-10 11:10:30 +02:00
Sebastian Dröge
a122044e2c Include field-order in the caps for interlaced formats 2021-12-10 11:10:07 +02:00
Sebastian Dröge
083aa0bc86 Don't disable quad modes on ch1 if a 12G UHD mode runs there 2021-12-03 12:27:36 +02:00
Sebastian Dröge
de8e5ed9f4 Require the default input source/output destination and channel 1 or 5 for quad modes 2021-12-03 12:27:35 +02:00
Sebastian Dröge
d1c7e0e7bb Stop autocirculate of all quad channels if a quad mode was used before
And also move the channel==1 || channel==5 check for enabling quad modes
to the very beginning.
2021-11-26 13:16:17 +02:00
Sebastian Dröge
9b8f452078 Overwrite the whole routing table if currently no channel is running 2021-11-23 18:05:51 +02:00
Sebastian Dröge
21b6a77140 Remove all routes from a previously configured quad layout when reconfiguring a channel 2021-11-23 18:05:51 +02:00
Sebastian Dröge
d4d8ca79cc Directly wait again if the source is not playing anymore after reconfiguring 2021-11-22 10:22:50 +02:00
Sebastian Dröge
87303fa05f Don't keep queue lock in the source locked while ShmMutexLocker is locked for reconfiguring
This can lead to a deadlock.
2021-11-22 10:22:49 +02:00
Sebastian Dröge
a23b634323 Fix mixup between VITC and ATC/LTC timecode indices in the source 2021-11-15 14:46:32 +02:00
Sebastian Dröge
a5c9cffea3 Print VPID information into the logs in the source element 2021-11-12 10:37:18 +02:00
Sebastian Dröge
484cb51445 Implement hopefully working dynamic framebuffer assignments
We try to allocate as many frames as were configured by looking for a
big enough range of unused contiguous frames while taking the configured
modes into account.
2021-11-10 18:05:52 +02:00
Sebastian Dröge
bfdf93ecd1 Configure fewer frames per channel by default
The number of frame stores / frame buffers can't be used like this as
the actual number of frames that can be used also depends on the
resolution.

If too many frames are used and the card's memory runs full, strange
problems (green frames, channels leaking into each other, etc.) will
appear.

As such, configure 8 frames for the source by default and half the queue
length for the sink. If anything else is needed, manual configuration
via the properties has to happen based on the expected workload on all
channels and the characteristics of the card in use.
2021-11-01 16:12:05 +02:00
Sebastian Dröge
50d90f6dca Allocate more frame buffers for quad modes 2021-10-12 19:52:06 +03:00
Sebastian Dröge
a2d4058c4b Report no signal if not all quadrants have the same format in quad-link mode 2021-09-27 10:12:19 +03:00
Sebastian Dröge
569aad78b7 Improve debug output for the currently detected video format 2021-09-27 10:10:39 +03:00
Sebastian Dröge
22c0b9ed41 Disable channel when exiting from the capture/output thread 2021-08-27 15:13:44 +03:00
Sebastian Dröge
d61b415230 Add properties for selecting capture/output frame buffers to use
And calculate them automatically be default based on the number of frame
buffers available and the number of channels.

This works around various bugs in the AJA SDK when selecting these
manually.

See AJA support ticket #5056.
2021-08-27 15:04:30 +03:00
Sebastian Dröge
a2b30015c7 Add AJA device provider 2021-08-27 14:42:13 +03:00
Sebastian Dröge
5a79150aa3 Output per-frame debug logs only at TRACE level 2021-08-20 13:48:04 +03:00
Sebastian Dröge
e3e1d09469 Print captured timecodes to the debug log 2021-08-20 13:44:47 +03:00
Sebastian Dröge
0b3c585bea Enable LTC capture if requested 2021-08-20 13:44:35 +03:00
Sebastian Dröge
b3f5169d55 Intersect caps with configured mode if not auto in ajasrc get_caps() to provide more constrained caps 2021-08-20 12:03:24 +03:00
Sebastian Dröge
8e75c37ce4 Add signal property to ajasrc to allow checking/notify about signal availability at any time 2021-08-18 18:21:07 +03:00
Sebastian Dröge
57a2768cf6 Change default ajasrc video format to AUTO 2021-08-18 12:37:08 +03:00
Sebastian Dröge
d03f733bba Implement auto mode detection in ajasrc
This also allows switching modes while running.
2021-08-18 12:33:52 +03:00
Sebastian Dröge
02519523df Only report signal recovery after actually capturing a frame 2021-08-18 12:22:57 +03:00
Sebastian Dröge
08308c28a2 Include detected video format in warning message if it is different from the configured one 2021-08-18 11:36:24 +03:00
Sebastian Dröge
4d95164c0c In quad mode, stop autocirculate on the other channels before starting
It might theoretically be running from single link mode from a previous
run that was not cleaned up properly.
2021-08-18 10:50:15 +03:00
Sebastian Dröge
e116719597 Report signal loss if the expected mode is reported but no frame was captured for more than 32 iterations 2021-08-18 10:18:53 +03:00
Sebastian Dröge
83eb812f06 Wait for vsync after reporting signal loss 2021-08-18 10:16:19 +03:00
Sebastian Dröge
fe13e5f211 Add support for AFD/Bar VANC in the source element and widescreen NTSC/PAL 2021-07-07 12:28:38 +03:00
Sebastian Dröge
99c86891a4 Read colorimetry information from VPID and create caps from detected input format
This does not implement automatic mode selection yet, for which it is
necessary to change the routing at runtime based on the detected
format. It is a first step into that direction though.
2021-07-07 10:36:55 +03:00
Sebastian Dröge
735768b905 Add support for UHD/UHD2 modes and SDI quad-link modes 2021-07-06 15:23:17 +03:00
Sebastian Dröge
fa5385bc8e ajasrc: Set output buffer duration based on the framerate as an estimate 2021-07-06 11:47:42 +03:00
Sebastian Dröge
8075fe577c Streamline VANC/geometry/standard configuration between source and sink
This shouldn't have any effect but makes the configuration the same on
both sides.
2021-03-05 21:50:22 +02:00
Sebastian Dröge
6deeb2389e Work around AJA SDK not recogizing CEA708 packets when capturing TALL frames in SD modes
Stop using CountAncillaryDataWithType(AJAAncillaryDataType_Cea708) etc
because for SD it doesn't recognize the packets. It assumes they would
only be received on AJAAncillaryDataChannel_Y but for SD it is actually
AJAAncillaryDataChannel_Both.
2021-03-05 17:47:14 +02:00
Sebastian Dröge
2b4e0f7ece Only allocate VANC buffer pool if the device supports extraction 2021-02-19 16:01:30 +02:00
Sebastian Dröge
e2e54c3631 Capture VANC from "TALL" video frames if firmware VANC extraction can't be used
This is the case if the device does not support it, or if the input
channel and SDI input are not the same.
2021-02-19 15:57:52 +02:00
Sebastian Dröge
18baa2a761 Allocate twice the queue length for the ANC buffers in interlace modes 2021-02-19 14:45:25 +02:00
Sebastian Dröge
7ce3f2f400 Implement signal loss and frame drop detection in the source 2021-02-09 15:46:48 +02:00
Sebastian Dröge
12380026e6 Simplify configuration of timecode index and embedded audio source 2021-02-09 15:08:26 +02:00
Sebastian Dröge
7be26718b8 Add configuration for audio source, embedded audio input and timecode index 2021-02-09 13:24:20 +02:00
Sebastian Dröge
453f482c0b Add AJA source 2021-02-08 22:35:45 +02:00