Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
16a44b41
Commit
16a44b41
authored
May 20, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vsrc_testsrc: use AV_OPT_TYPE_IMAGE_SIZE.
parent
2ec3e576
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
vsrc_testsrc.c
libavfilter/vsrc_testsrc.c
+3
-10
No files found.
libavfilter/vsrc_testsrc.c
View file @
16a44b41
...
...
@@ -39,11 +39,10 @@
typedef
struct
{
const
AVClass
*
class
;
int
h
,
w
;
int
w
,
h
;
unsigned
int
nb_frame
;
AVRational
time_base
;
int64_t
pts
,
max_pts
;
char
*
size
;
///< video frame size
char
*
rate
;
///< video frame rate
char
*
duration
;
///< total duration of the generated video
AVRational
sar
;
///< sample aspect ratio
...
...
@@ -58,8 +57,8 @@ typedef struct {
#define OFFSET(x) offsetof(TestSourceContext, x)
static
const
AVOption
testsrc_options
[]
=
{
{
"size"
,
"set video size"
,
OFFSET
(
size
),
AV_OPT_TYPE_STRING
,
{.
str
=
"320x240"
},
0
,
0
},
{
"s"
,
"set video size"
,
OFFSET
(
size
),
AV_OPT_TYPE_STRING
,
{.
str
=
"320x240"
},
0
,
0
},
{
"size"
,
"set video size"
,
OFFSET
(
w
),
AV_OPT_TYPE_IMAGE_SIZE
,
{.
str
=
"320x240"
},
0
,
0
},
{
"s"
,
"set video size"
,
OFFSET
(
w
),
AV_OPT_TYPE_IMAGE_SIZE
,
{.
str
=
"320x240"
},
0
,
0
},
{
"rate"
,
"set video rate"
,
OFFSET
(
rate
),
AV_OPT_TYPE_STRING
,
{.
str
=
"25"
},
0
,
0
},
{
"r"
,
"set video rate"
,
OFFSET
(
rate
),
AV_OPT_TYPE_STRING
,
{.
str
=
"25"
},
0
,
0
},
{
"duration"
,
"set video duration"
,
OFFSET
(
duration
),
AV_OPT_TYPE_STRING
,
{.
str
=
NULL
},
0
,
0
},
...
...
@@ -84,12 +83,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
return
ret
;
}
if
((
ret
=
av_parse_video_size
(
&
test
->
w
,
&
test
->
h
,
test
->
size
))
<
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Invalid frame size: '%s'
\n
"
,
test
->
size
);
return
ret
;
}
av_freep
(
&
test
->
size
);
if
((
ret
=
av_parse_video_rate
(
&
frame_rate_q
,
test
->
rate
))
<
0
||
frame_rate_q
.
den
<=
0
||
frame_rate_q
.
num
<=
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Invalid frame rate: '%s'
\n
"
,
test
->
rate
);
...
...
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