Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
cb7c11cc
Commit
cb7c11cc
authored
13 years ago
by
Martin Storsjö
Browse files
Options
Downloads
Patches
Plain Diff
avoptions: Add an av_opt_flag_is_set function for inspecting flag fields
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
0558e266
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
doc/APIchanges
+3
-0
3 additions, 0 deletions
doc/APIchanges
libavutil/avutil.h
+1
-1
1 addition, 1 deletion
libavutil/avutil.h
libavutil/opt.c
+10
-0
10 additions, 0 deletions
libavutil/opt.c
libavutil/opt.h
+10
-0
10 additions, 0 deletions
libavutil/opt.h
with
24 additions
and
1 deletion
doc/APIchanges
+
3
−
0
View file @
cb7c11cc
...
...
@@ -13,6 +13,9 @@ libavutil: 2011-04-18
API changes, most recent first:
2011-06-xx - xxxxxxx - lavu 51.6.0 - opt.h
Add av_opt_flag_is_set().
2011-06-xx - xxxxxxx - lavu 51.5.0 - AVMetadata
Move AVMetadata from lavf to lavu and rename it to
AVDictionary -- new installed header dict.h.
...
...
This diff is collapsed.
Click to expand it.
libavutil/avutil.h
+
1
−
1
View file @
cb7c11cc
...
...
@@ -40,7 +40,7 @@
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR
5
#define LIBAVUTIL_VERSION_MINOR
6
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
...
...
This diff is collapsed.
Click to expand it.
libavutil/opt.c
+
10
−
0
View file @
cb7c11cc
...
...
@@ -320,6 +320,16 @@ int64_t av_get_int(void *obj, const char *name, const AVOption **o_out)
return
num
*
intnum
/
den
;
}
int
av_opt_flag_is_set
(
void
*
obj
,
const
char
*
field_name
,
const
char
*
flag_name
)
{
const
AVOption
*
field
=
av_find_opt
(
obj
,
field_name
,
NULL
,
0
,
0
);
const
AVOption
*
flag
=
av_find_opt
(
obj
,
flag_name
,
NULL
,
0
,
0
);
if
(
!
field
||
!
flag
||
flag
->
type
!=
FF_OPT_TYPE_CONST
)
return
0
;
return
av_get_int
(
obj
,
field_name
,
NULL
)
&
(
int
)
flag
->
default_val
.
dbl
;
}
static
void
opt_list
(
void
*
obj
,
void
*
av_log_obj
,
const
char
*
unit
,
int
req_flags
,
int
rej_flags
)
{
...
...
This diff is collapsed.
Click to expand it.
libavutil/opt.h
+
10
−
0
View file @
cb7c11cc
...
...
@@ -181,4 +181,14 @@ int av_set_options_string(void *ctx, const char *opts,
*/
void
av_opt_free
(
void
*
obj
);
/**
* Check whether a particular flag is set in a flags field.
*
* @param field_name the name of the flag field option
* @param flag_name the name of the flag to check
* @return non-zero if the flag is set, zero if the flag isn't set,
* isn't of the right type, or the flags field doesn't exist.
*/
int
av_opt_flag_is_set
(
void
*
obj
,
const
char
*
field_name
,
const
char
*
flag_name
);
#endif
/* AVUTIL_OPT_H */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment