Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
8bc3a480
Commit
8bc3a480
authored
Jul 14, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmdutils: remove #if 0-ed conflict marger trash that i forgot
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
321b2a9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
140 deletions
+0
-140
cmdutils.c
cmdutils.c
+0
-140
No files found.
cmdutils.c
View file @
8bc3a480
...
...
@@ -308,147 +308,7 @@ int opt_default(const char *opt, const char *arg)
fprintf
(
stderr
,
"Unrecognized option '%s'
\n
"
,
opt
);
return
AVERROR_OPTION_NOT_FOUND
;
}
#if 0
<<<<<<< HEAD
int opt_default(const char *opt, const char *arg){
int type;
int ret= 0;
const AVOption *o= NULL;
int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};
AVCodec *p = NULL;
AVOutputFormat *oformat = NULL;
AVInputFormat *iformat = NULL;
while ((p = av_codec_next(p))) {
const AVClass *c = p->priv_class;
if (c && av_find_opt(&c, opt, NULL, 0, 0))
break;
}
if (p)
goto out;
while ((oformat = av_oformat_next(oformat))) {
const AVClass *c = oformat->priv_class;
if (c && av_find_opt(&c, opt, NULL, 0, 0))
break;
}
if (oformat)
goto out;
while ((iformat = av_iformat_next(iformat))) {
const AVClass *c = iformat->priv_class;
if (c && av_find_opt(&c, opt, NULL, 0, 0))
break;
}
if (iformat)
goto out;
for(type=0; *avcodec_opts && type<AVMEDIA_TYPE_NB && ret>= 0; type++){
const AVOption *o2 = av_opt_find(avcodec_opts[0], opt, NULL, opt_types[type], 0);
if(o2)
ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o);
}
if(!o && avformat_opts)
ret = av_set_string3(avformat_opts, opt, arg, 1, &o);
if(!o && sws_opts)
ret = av_set_string3(sws_opts, opt, arg, 1, &o);
if(!o){
if (opt[0] == 'a' && avcodec_opts[AVMEDIA_TYPE_AUDIO])
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_AUDIO], opt+1, arg, 1, &o);
else if(opt[0] == 'v' && avcodec_opts[AVMEDIA_TYPE_VIDEO])
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, arg, 1, &o);
else if(opt[0] == 's' && avcodec_opts[AVMEDIA_TYPE_SUBTITLE])
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], opt+1, arg, 1, &o);
if (ret >= 0)
opt += 1;
}
if (o && ret < 0) {
fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt);
exit(1);
}
if (!o) {
fprintf(stderr, "Unrecognized option '%s'\n", opt);
exit(1);
}
out:
if ((ret = opt_default2(opt, arg)) < 0)
return ret;
// av_log(NULL, AV_LOG_ERROR, "%s:%s: %f 0x%0X\n", opt, arg, av_get_double(avcodec_opts, opt, NULL), (int)av_get_int(avcodec_opts, opt, NULL));
opt_values= av_realloc(opt_values, sizeof(void*)*(opt_name_count+1));
opt_values[opt_name_count] = av_strdup(arg);
opt_names= av_realloc(opt_names, sizeof(void*)*(opt_name_count+1));
opt_names[opt_name_count++] = av_strdup(opt);
if ((*avcodec_opts && avcodec_opts[0]->debug) || (avformat_opts && avformat_opts->debug))
av_log_set_level(AV_LOG_DEBUG);
return 0;
}
||||||| merged common ancestors
int opt_default(const char *opt, const char *arg){
int type;
int ret= 0;
const AVOption *o= NULL;
int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};
for(type=0; *avcodec_opts && type<AVMEDIA_TYPE_NB && ret>= 0; type++){
const AVOption *o2 = av_opt_find(avcodec_opts[0], opt, NULL, opt_types[type], 0);
if(o2)
ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o);
}
if(!o && avformat_opts)
ret = av_set_string3(avformat_opts, opt, arg, 1, &o);
if(!o && sws_opts)
ret = av_set_string3(sws_opts, opt, arg, 1, &o);
if(!o){
if (opt[0] == 'a' && avcodec_opts[AVMEDIA_TYPE_AUDIO])
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_AUDIO], opt+1, arg, 1, &o);
else if(opt[0] == 'v' && avcodec_opts[AVMEDIA_TYPE_VIDEO])
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, arg, 1, &o);
else if(opt[0] == 's' && avcodec_opts[AVMEDIA_TYPE_SUBTITLE])
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], opt+1, arg, 1, &o);
}
if (o && ret < 0) {
fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt);
exit(1);
}
if (!o) {
AVCodec *p = NULL;
AVOutputFormat *oformat = NULL;
while ((p=av_codec_next(p))){
const AVClass *c = p->priv_class;
if(c && av_opt_find(&c, opt, NULL, 0, 0))
break;
}
if (!p) {
while ((oformat = av_oformat_next(oformat))) {
const AVClass *c = oformat->priv_class;
if (c && av_opt_find(&c, opt, NULL, 0, 0))
break;
}
}
}
if ((ret = opt_default2(opt, arg)) < 0)
return ret;
// av_log(NULL, AV_LOG_ERROR, "%s:%s: %f 0x%0X\n", opt, arg, av_get_double(avcodec_opts, opt, NULL), (int)av_get_int(avcodec_opts, opt, NULL));
//FIXME we should always use avcodec_opts, ... for storing options so there will not be any need to keep track of what i set over this
opt_values= av_realloc(opt_values, sizeof(void*)*(opt_name_count+1));
opt_values[opt_name_count]= o ? NULL : av_strdup(arg);
opt_names= av_realloc(opt_names, sizeof(void*)*(opt_name_count+1));
opt_names[opt_name_count++]= o ? o->name : av_strdup(opt);
if ((*avcodec_opts && avcodec_opts[0]->debug) || (avformat_opts && avformat_opts->debug))
av_log_set_level(AV_LOG_DEBUG);
return 0;
}
=======
>>>>>>> qatar/master
#endif
int
opt_loglevel
(
const
char
*
opt
,
const
char
*
arg
)
{
const
struct
{
const
char
*
name
;
int
level
;
}
log_levels
[]
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment