Move vd_use_slices to options struct

This commit is contained in:
Uoti Urpala 2008-04-24 08:20:59 +03:00
parent bb679dd40a
commit 7dc4226348
7 changed files with 7 additions and 10 deletions

View File

@ -242,8 +242,8 @@
{"tskeepbroken", &ts_keep_broken, CONF_TYPE_FLAG, 0, 0, 1, NULL},
// draw by slices or whole frame (useful with libmpeg2/libavcodec)
{"slices", &vd_use_slices, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"noslices", &vd_use_slices, CONF_TYPE_FLAG, 0, 1, 0, NULL},
OPT_FLAG_ON("slices", vd_use_slices, 0),
OPT_FLAG_OFF("noslices", vd_use_slices, 0),
{"field-dominance", &field_dominance, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL},
#ifdef USE_LIBAVCODEC

View File

@ -16,6 +16,7 @@ void set_default_mplayer_options(struct MPOpts *opts)
.playback_speed = 1.,
.movie_aspect = -1.,
.flip = -1,
.vd_use_slices = 1,
.lavc_param = (struct lavc_param){
.workaround_bugs = 1, // autodetect
.error_resilience = 2,

View File

@ -103,9 +103,6 @@ vd_functions_t *mpcodecs_vd_drivers[] = {
#include "libvo/video_out.h"
// libvo opts:
int vd_use_slices = 1;
/** global variables for gamma, brightness, contrast, saturation and hue
modified by mplayer.c and gui/mplayer/gtk/eq.c:
ranges -100 - 100

View File

@ -20,8 +20,6 @@ typedef struct vd_functions
// NULL terminated array of all drivers
extern vd_functions_t* mpcodecs_vd_drivers[];
extern int vd_use_slices;
#define VDCTRL_QUERY_FORMAT 3 /* test for availabilty of a format */
#define VDCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */
#define VDCTRL_SET_PP_LEVEL 5 /* set postprocessing level */

View File

@ -226,7 +226,7 @@ static int init(sh_video_t *sh){
return 0;
}
if(vd_use_slices && (lavc_codec->capabilities&CODEC_CAP_DRAW_HORIZ_BAND) && !do_vis_debug)
if(sh->opts->vd_use_slices && (lavc_codec->capabilities&CODEC_CAP_DRAW_HORIZ_BAND) && !do_vis_debug)
ctx->do_slices=1;
if(lavc_codec->capabilities&CODEC_CAP_DR1 && !do_vis_debug && lavc_codec->id != CODEC_ID_H264 && lavc_codec->id != CODEC_ID_INTERPLAY_VIDEO && lavc_codec->id != CODEC_ID_ROQ)

View File

@ -2,7 +2,7 @@
#include <stdlib.h>
#include "config.h"
#include "options.h"
#include "mp_msg.h"
#include "vd_internal.h"
@ -214,7 +214,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
}
mpeg2_skip(mpeg2dec, 0); //mpeg2skip skips frames until set again to 0
use_callback = (!framedrop && vd_use_slices &&
use_callback = (!framedrop && sh->opts->vd_use_slices &&
(info->current_picture->flags&PIC_FLAG_PROGRESSIVE_FRAME)) ?
MP_IMGFLAG_DRAW_CALLBACK:0;

View File

@ -24,6 +24,7 @@ typedef struct MPOpts {
float movie_aspect;
float screen_size_xy;
int flip;
int vd_use_slices;
struct lavc_param {
int workaround_bugs;
int error_resilience;