History

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.

Devin Heitmueller committed 3 years ago

Commit ac424721 parent e7d800f7 files · +121 −2Browse files

Showing the changes to libavdevice/decklink_common.cpp (1 of 7 files). Show all

Unified · Split

libavdevice/decklink_common.cpp+16−0
@@ -484,6 +484,22 @@ int ff_decklink_packet_queue_get(DecklinkPacketQueue *q, AVPacket *pkt, int bloc · 483 unmodified lines
484484 return ret;
485485 }
486486
487+int64_t ff_decklink_packet_queue_peekpts(DecklinkPacketQueue *q)
488+{
489+ PacketListEntry *pkt1;
490+ int64_t pts = -1;
491+
492+ pthread_mutex_lock(&q->mutex);
493+ pkt1 = q->pkt_list.head;
494+ if (pkt1) {
495+ pts = pkt1->pkt.pts;
496+ }
497+ pthread_mutex_unlock(&q->mutex);
498+
499+ return pts;
500+}
501+
502+
487503 int ff_decklink_list_devices(AVFormatContext *avctx,
488504 struct AVDeviceInfoList *device_list,
489505 int show_inputs, int show_outputs)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t