0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/sub/osd_dummy.c
wm4 7f4a09bb85 sub: uglify OSD code path with locking
Do two things:
1. add locking to struct osd_state
2. make struct osd_state opaque

While 1. is somewhat simple, 2. is quite horrible. Lots of code accesses
lots of osd_state (and osd_object) members. To make sure everything is
accessed synchronously, I prefer making osd_state opaque, even if it
means adding pretty dumb accessors.

All of this is meant to allow running VO in their own threads.
Eventually, VOs will request OSD on their own, which means osd_state
will be accessed from foreign threads.
2014-01-18 01:27:43 +01:00

33 lines
638 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "talloc.h"
#include "osd.h"
void osd_init_backend(struct osd_state *osd)
{
}
void osd_destroy_backend(struct osd_state *osd)
{
}
void osd_get_function_sym(char *buffer, size_t buffer_size, int osd_function)
{
}
void osd_object_get_bitmaps(struct osd_state *osd, struct osd_object *obj,
struct sub_bitmaps *out_imgs)
{
*out_imgs = (struct sub_bitmaps) {0};
}
void osd_object_get_resolution(struct osd_state *osd, int obj,
int *out_w, int *out_h)
{
*out_w = 0;
*out_h = 0;
}