#include "bmusb/fake_capture.h"
#include <assert.h>
+#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
} // namespace
FakeCapture::FakeCapture(unsigned width, unsigned height, unsigned fps, unsigned audio_sample_frequency, int card_index, bool has_audio)
- : width(width), height(height), fps(fps), audio_sample_frequency(audio_sample_frequency)
+ : width(width), height(height), fps(fps), audio_sample_frequency(audio_sample_frequency), card_index(card_index)
{
char buf[256];
snprintf(buf, sizeof(buf), "Fake card %d", card_index + 1);
void FakeCapture::producer_thread_func()
{
+ char thread_name[16];
+ snprintf(thread_name, sizeof(thread_name), "FakeCapture_%d", card_index);
+ pthread_setname_np(pthread_self(), thread_name);
+
uint16_t timecode = 0;
if (has_dequeue_callbacks) {