mirror of
https://github.com/mpv-player/mpv
synced 2025-02-05 22:52:18 +00:00
Remove global vo_flags
Move the information to struct sh_video field.
This commit is contained in:
parent
60f104d4aa
commit
bb679dd40a
@ -104,7 +104,6 @@ vd_functions_t *mpcodecs_vd_drivers[] = {
|
||||
#include "libvo/video_out.h"
|
||||
|
||||
// libvo opts:
|
||||
int vo_flags = 0;
|
||||
int vd_use_slices = 1;
|
||||
|
||||
/** global variables for gamma, brightness, contrast, saturation and hue
|
||||
@ -178,7 +177,7 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h,
|
||||
continue;
|
||||
}
|
||||
j = i;
|
||||
vo_flags = flags;
|
||||
sh->output_flags = flags;
|
||||
if (flags & VFCAP_CSP_SUPPORTED_BY_HW)
|
||||
break;
|
||||
} else if (!palette
|
||||
@ -242,9 +241,9 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h,
|
||||
if (!(sh->codec->outflags[j] & CODECS_FLAG_NOFLIP))
|
||||
opts->flip = 1;
|
||||
}
|
||||
if (vo_flags & VFCAP_FLIPPED)
|
||||
if (sh->output_flags & VFCAP_FLIPPED)
|
||||
opts->flip ^= 1;
|
||||
if (opts->flip && !(vo_flags & VFCAP_FLIP)) {
|
||||
if (opts->flip && !(sh->output_flags & VFCAP_FLIP)) {
|
||||
// we need to flip, but no flipping filter avail.
|
||||
vf_add_before_vo(&vf, "flip", NULL);
|
||||
sh->vfilter = vf;
|
||||
|
@ -84,6 +84,7 @@ typedef struct sh_video {
|
||||
// output driver/filters: (set by libmpcodecs core)
|
||||
unsigned int outfmtidx;
|
||||
struct vf_instance *vfilter; // the video filter chain, used for this video stream
|
||||
int output_flags; // query_format() results for output filters+vo
|
||||
struct vd_functions *vd_driver;
|
||||
int vf_initialized;
|
||||
#ifdef DYNAMIC_PLUGINS
|
||||
|
@ -24,8 +24,6 @@
|
||||
#include "x11_common.h"
|
||||
#endif
|
||||
|
||||
//int vo_flags=0;
|
||||
|
||||
int xinerama_screen = -1;
|
||||
int xinerama_x;
|
||||
int xinerama_y;
|
||||
|
@ -239,8 +239,6 @@ void vo_destroy(struct vo *vo);
|
||||
// NULL terminated array of all drivers
|
||||
extern const struct vo_driver *video_out_drivers[];
|
||||
|
||||
extern int vo_flags;
|
||||
|
||||
extern int xinerama_screen;
|
||||
extern int xinerama_x;
|
||||
extern int xinerama_y;
|
||||
|
@ -2123,7 +2123,7 @@ static int sleep_until_update(struct MPContext *mpctx, float *time_frame,
|
||||
//============================== SLEEP: ===================================
|
||||
|
||||
// flag 256 means: libvo driver does its timing (dvb card)
|
||||
if (*time_frame > 0.001 && !(vo_flags&256))
|
||||
if (*time_frame > 0.001 && !(mpctx->sh_video->output_flags&256))
|
||||
*time_frame = timing_sleep(*time_frame);
|
||||
return frame_time_remaining;
|
||||
}
|
||||
@ -3551,7 +3551,7 @@ if(!reinit_video_chain(mpctx)) {
|
||||
}
|
||||
}
|
||||
|
||||
if(vo_flags & 0x08 && vo_spudec)
|
||||
if(mpctx->sh_video->output_flags & 0x08 && vo_spudec)
|
||||
spudec_set_hw_spu(vo_spudec,mpctx->video_out);
|
||||
|
||||
#ifdef HAVE_FREETYPE
|
||||
|
Loading…
Reference in New Issue
Block a user