diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/cfg-mplayer.h | 2 | ||||
-rw-r--r-- | core/codec-cfg.c | 85 | ||||
-rw-r--r-- | core/codec-cfg.h | 14 | ||||
-rw-r--r-- | core/defaultopts.c | 1 |
4 files changed, 3 insertions, 99 deletions
diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h index a13eae243f..8ddf4616a0 100644 --- a/core/cfg-mplayer.h +++ b/core/cfg-mplayer.h @@ -480,7 +480,7 @@ const m_option_t common_opts[] = { OPT_FLAG_CONSTANTS("no-aspect", movie_aspect, 0, 0, 0), OPT_FLOATRANGE("xy", screen_size_xy, 0, 0.001, 4096), - OPT_FLAG_CONSTANTS("flip", flip, 0, -1, 1), + OPT_FLAG_CONSTANTS("flip", flip, 0, 0, 1), // use (probably completely broken) decoder direct rendering OPT_MAKE_FLAGS("dr1", vd_use_dr1, 0), diff --git a/core/codec-cfg.c b/core/codec-cfg.c index 91e56d6e25..ac875a8a82 100644 --- a/core/codec-cfg.c +++ b/core/codec-cfg.c @@ -138,71 +138,6 @@ static int add_to_format(char *s, char *alias,unsigned int *fourcc, unsigned int return 1; } -static int add_to_inout(char *sfmt, char *sflags, unsigned int *outfmt, - unsigned char *outflags) -{ - - static char *flagstr[] = { - "flip", - "noflip", - "yuvhack", - "query", - "static", - NULL - }; - - int i, j, freeslots; - unsigned char flags; - - for (i = 0; i < CODECS_MAX_OUTFMT && outfmt[i] != 0xffffffff; i++) - /* NOTHING */; - freeslots = CODECS_MAX_OUTFMT - i; - if (!freeslots) - goto err_out_too_many; - - flags = 0; - if(sflags) { - do { - for (j = 0; flagstr[j] != NULL; j++) - if (!strncmp(sflags, flagstr[j], - strlen(flagstr[j]))) - break; - if (flagstr[j] == NULL) - goto err_out_parse_error; - flags|=(1<<j); - sflags+=strlen(flagstr[j]); - } while (*(sflags++) == ','); - - if (*(--sflags) != '\0') - goto err_out_parse_error; - } - - do { - for (j = 0; isalnum(sfmt[j]) || sfmt[j] == '_'; j++); - unsigned int fmt = mp_imgfmt_from_name((bstr) {sfmt, j}, true); - if (!fmt) - goto err_out_parse_error; - outfmt[i] = fmt; - outflags[i] = flags; - ++i; - sfmt += j; - } while ((*(sfmt++) == ',') && --freeslots); - - if (!freeslots) - goto err_out_too_many; - - if (*(--sfmt) != '\0') - goto err_out_parse_error; - - return 1; -err_out_too_many: - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"too many out..."); - return 0; -err_out_parse_error: - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"parse error"); - return 0; -} - static int validate_codec(codecs_t *c, int type) { unsigned int i; @@ -422,8 +357,6 @@ int parse_codec_cfg(const char *cfgfile) ++*nr_codecsp; memset(codec,0,sizeof(codecs_t)); memset(codec->fourcc, 0xff, sizeof(codec->fourcc)); - memset(codec->outfmt, 0xff, sizeof(codec->outfmt)); - memset(codec->infmt, 0xff, sizeof(codec->infmt)); if (get_token(1, 1) < 0) goto err_out_parse_error; @@ -497,25 +430,11 @@ int parse_codec_cfg(const char *cfgfile) *endptr != '\0') goto err_out_parse_error; } - } else if (!strcmp(token[0], "out")) { - if (get_token(1, 2) < 0) - goto err_out_parse_error; - if (!add_to_inout(token[0], token[1], codec->outfmt, - codec->outflags)) - goto err_out_print_linenum; - } else if (!strcmp(token[0], "in")) { - if (get_token(1, 2) < 0) - goto err_out_parse_error; - if (!add_to_inout(token[0], token[1], codec->infmt, - codec->inflags)) - goto err_out_print_linenum; } else if (!strcmp(token[0], "flags")) { if (get_token(1, 1) < 0) goto err_out_parse_error; - if (!strcmp(token[0], "seekable")) - codec->flags |= CODECS_FLAG_SEEKABLE; - else if (!strcmp(token[0], "align16")) - codec->flags |= CODECS_FLAG_ALIGN16; + if (!strcmp(token[0], "flip")) + codec->flags |= CODECS_FLAG_FLIP; else goto err_out_parse_error; } else if (!strcmp(token[0], "status")) { diff --git a/core/codec-cfg.h b/core/codec-cfg.h index 480f570bba..01af497c3d 100644 --- a/core/codec-cfg.h +++ b/core/codec-cfg.h @@ -22,19 +22,9 @@ #include <stdbool.h> #define CODECS_MAX_FOURCC 92 -#define CODECS_MAX_OUTFMT 16 -#define CODECS_MAX_INFMT 16 // Global flags: -#define CODECS_FLAG_SEEKABLE (1<<0) -#define CODECS_FLAG_ALIGN16 (1<<1) - -// Outfmt flags: #define CODECS_FLAG_FLIP (1<<0) -#define CODECS_FLAG_NOFLIP (1<<1) -#define CODECS_FLAG_YUVHACK (1<<2) -#define CODECS_FLAG_QUERY (1<<3) -#define CODECS_FLAG_STATIC (1<<4) #define CODECS_STATUS__MIN 0 #define CODECS_STATUS_NOT_WORKING -1 @@ -59,10 +49,6 @@ typedef struct { typedef struct codecs { unsigned int fourcc[CODECS_MAX_FOURCC]; unsigned int fourccmap[CODECS_MAX_FOURCC]; - unsigned int outfmt[CODECS_MAX_OUTFMT]; - unsigned char outflags[CODECS_MAX_OUTFMT]; - unsigned int infmt[CODECS_MAX_INFMT]; - unsigned char inflags[CODECS_MAX_INFMT]; char *name; char *info; char *comment; diff --git a/core/defaultopts.c b/core/defaultopts.c index 4338e10b0a..a7da8bb4e3 100644 --- a/core/defaultopts.c +++ b/core/defaultopts.c @@ -52,7 +52,6 @@ void set_default_mplayer_options(struct MPOpts *opts) .playback_speed = 1., .drc_level = 1., .movie_aspect = -1., - .flip = -1, .sub_auto = 1, #ifdef CONFIG_ASS .ass_enabled = 1, |