MCPcopy Create free account
hub / github.com/DistroAV/DistroAV / process_empty_frame

Function process_empty_frame

src/ndi-source.cpp:361–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361void process_empty_frame(ndi_source_t *source)
362{
363 if (source->config.timeout_action == PROP_TIMEOUT_KEEP_CONTENT)
364 return;
365
366 uint64_t now = os_gettime_ns();
367
368 // 3 second timeout on no new data received for the source
369 uint64_t source_timeout = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::seconds(3)).count();
370
371 uint64_t target_timestamp = source->last_frame_timestamp + source_timeout;
372
373 if (now > target_timestamp) {
374 deactivate_source_output_video_texture(source);
375 }
376}
377
378void ndi_source_thread_process_audio3(ndi_source_config_t *config, NDIlib_audio_frame_v3_t *ndi_audio_frame,
379 obs_source_t *obs_source, obs_source_audio *obs_audio_frame);

Callers 1

ndi_source_threadFunction · 0.85

Tested by

no test coverage detected