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
9148ae5b
Commit
9148ae5b
authored
Jun 05, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opt: add test for IMAGE_SIZE and PIXEL_FMT.
parent
61c266d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
opt.c
libavutil/opt.c
+10
-0
No files found.
libavutil/opt.c
View file @
9148ae5b
...
...
@@ -890,6 +890,8 @@ typedef struct TestContext
char
*
string
;
int
flags
;
AVRational
rational
;
int
w
,
h
;
enum
PixelFormat
pix_fmt
;
}
TestContext
;
#define OFFSET(x) offsetof(TestContext, x)
...
...
@@ -907,6 +909,8 @@ static const AVOption test_options[]= {
{
"cool"
,
"set cool flag "
,
0
,
AV_OPT_TYPE_CONST
,
{
TEST_FLAG_COOL
},
INT_MIN
,
INT_MAX
,
0
,
"flags"
},
{
"lame"
,
"set lame flag "
,
0
,
AV_OPT_TYPE_CONST
,
{
TEST_FLAG_LAME
},
INT_MIN
,
INT_MAX
,
0
,
"flags"
},
{
"mu"
,
"set mu flag "
,
0
,
AV_OPT_TYPE_CONST
,
{
TEST_FLAG_MU
},
INT_MIN
,
INT_MAX
,
0
,
"flags"
},
{
"size"
,
"set size"
,
OFFSET
(
w
),
AV_OPT_TYPE_IMAGE_SIZE
,{
0
},
0
,
0
},
{
"pix_fmt"
,
"set pixfmt"
,
OFFSET
(
pix_fmt
),
AV_OPT_TYPE_PIXEL_FMT
,{
0
},
0
,
0
},
{
NULL
},
};
...
...
@@ -948,6 +952,12 @@ int main(void)
"num=42 : string=blahblah"
,
"rational=0 : rational=1/2 : rational=1/-1"
,
"rational=-1/0"
,
"size=1024x768"
,
"size=pal"
,
"size=bogus"
,
"pix_fmt=yuv420p"
,
"pix_fmt=2"
,
"pix_fmt=bogus"
,
};
test_ctx
.
class
=
&
test_class
;
...
...
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