diff options
author | Devin Heitmueller <devin.heitmueller@ltnglobal.com> | 2023-06-30 17:14:39 -0400 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2023-07-02 19:57:45 +0200 |
commit | ac4247270c055ecc56e6aca94fbb13a3f8aab3ce (patch) | |
tree | 2f7c5e76c0b9ae9773db0f5dee90c8668794e729 /libavdevice/decklink_common.cpp | |
parent | e7d800fe89d337a0414d4d3b2de4162d94fe7046 (diff) | |
download | ffmpeg-ac4247270c055ecc56e6aca94fbb13a3f8aab3ce.tar.gz |
avdevice/decklink_enc: add support for SMPTE 2038 VANC packet output
Support decoding and embedding VANC packets delivered via SMPTE 2038
into the SDI output. We leverage an intermediate queue because
data packets are announced separately from video but we need to embed
the data into the video frame when it is output.
Note that this patch has some additional abstraction for data
streams in general as opposed to just SMPTE 2038 packets. This is
because subsequent patches will introduce support for other
data codecs.
Thanks to Marton Balint for review/feedback.
Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavdevice/decklink_common.cpp')
-rw-r--r-- | libavdevice/decklink_common.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index b3b83f53b8..47de7ef6b0 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -484,6 +484,22 @@ int ff_decklink_packet_queue_get(DecklinkPacketQueue *q, AVPacket *pkt, int bloc return ret; } +int64_t ff_decklink_packet_queue_peekpts(DecklinkPacketQueue *q) +{ + PacketListEntry *pkt1; + int64_t pts = -1; + + pthread_mutex_lock(&q->mutex); + pkt1 = q->pkt_list.head; + if (pkt1) { + pts = pkt1->pkt.pts; + } + pthread_mutex_unlock(&q->mutex); + + return pts; +} + + int ff_decklink_list_devices(AVFormatContext *avctx, struct AVDeviceInfoList *device_list, int show_inputs, int show_outputs) |