X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=decklink_capture.cpp;h=6dba068fca51108fcbfc3a55050efcc1223880ee;hb=4a0187ffb4075b4d217b8d9e9c96cac548b199d8;hp=4db60120f3040a0325325959c7edd5a0463cc5a8;hpb=7c8d29249d9024bcd79224ec0d85789ee9c1c74c;p=nageru diff --git a/decklink_capture.cpp b/decklink_capture.cpp index 4db6012..6dba068 100644 --- a/decklink_capture.cpp +++ b/decklink_capture.cpp @@ -319,6 +319,14 @@ HRESULT STDMETHODCALLTYPE DeckLinkCapture::VideoInputFrameArrived( char thread_name[16]; snprintf(thread_name, sizeof(thread_name), "DeckLink_C_%d", card_index); pthread_setname_np(pthread_self(), thread_name); + + sched_param param; + memset(¶m, 0, sizeof(param)); + param.sched_priority = 1; + if (sched_setscheduler(0, SCHED_RR, ¶m) == -1) { + printf("couldn't set realtime priority for DeckLink thread: %s\n", strerror(errno)); + } + if (has_dequeue_callbacks) { dequeue_init_callback(); }