New upstream version 24.0.1+dfsg1

This commit is contained in:
Sebastian Ramacher 2019-09-22 23:19:10 +02:00
parent b14f9eae6d
commit 5a730d6ec3
842 changed files with 42245 additions and 33385 deletions

View file

@ -5,9 +5,9 @@
struct random_tex {
obs_source_t *source;
os_event_t *stop_signal;
pthread_t thread;
bool initialized;
os_event_t *stop_signal;
pthread_t thread;
bool initialized;
};
static const char *random_getname(void *unused)
@ -38,28 +38,28 @@ static inline void fill_texture(uint32_t *pixels)
for (y = 0; y < 20; y++) {
for (x = 0; x < 20; x++) {
uint32_t pixel = 0;
pixel |= (rand()%256);
pixel |= (rand()%256) << 8;
pixel |= (rand()%256) << 16;
pixel |= (rand() % 256);
pixel |= (rand() % 256) << 8;
pixel |= (rand() % 256) << 16;
//pixel |= (rand()%256) << 24;
//pixel |= 0xFFFFFFFF;
pixels[y*20 + x] = pixel;
pixels[y * 20 + x] = pixel;
}
}
}
static void *video_thread(void *data)
{
struct random_tex *rt = data;
uint32_t pixels[20*20];
uint64_t cur_time = os_gettime_ns();
struct random_tex *rt = data;
uint32_t pixels[20 * 20];
uint64_t cur_time = os_gettime_ns();
struct obs_source_frame frame = {
.data = {[0] = (uint8_t*)pixels},
.linesize = {[0] = 20*4},
.width = 20,
.height = 20,
.format = VIDEO_FORMAT_BGRX
.data = {[0] = (uint8_t *)pixels},
.linesize = {[0] = 20 * 4},
.width = 20,
.height = 20,
.format = VIDEO_FORMAT_BGRX,
};
while (os_event_try(rt->stop_signal) == EAGAIN) {
@ -98,10 +98,10 @@ static void *random_create(obs_data_t *settings, obs_source_t *source)
}
struct obs_source_info test_random = {
.id = "random",
.type = OBS_SOURCE_TYPE_INPUT,
.id = "random",
.type = OBS_SOURCE_TYPE_INPUT,
.output_flags = OBS_SOURCE_ASYNC_VIDEO,
.get_name = random_getname,
.create = random_create,
.destroy = random_destroy,
.get_name = random_getname,
.create = random_create,
.destroy = random_destroy,
};