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
bf7e9cc8
Commit
bf7e9cc8
authored
May 29, 2014
by
Christophe Gisquet
Committed by
Michael Niedermayer
May 29, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: allow passing dimensions to videogen
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
7b4c4605
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
videogen.c
tests/videogen.c
+18
-4
No files found.
tests/videogen.c
View file @
bf7e9cc8
...
@@ -141,23 +141,37 @@ static void gen_image(int num, int w, int h)
...
@@ -141,23 +141,37 @@ static void gen_image(int num, int w, int h)
}
}
}
}
void
print_help
(
const
char
*
name
)
{
printf
(
"usage: %s file|dir [w=%i] [h=%i]
\n
"
"generate a test video stream
\n
"
,
name
,
DEFAULT_WIDTH
,
DEFAULT_HEIGHT
);
exit
(
1
);
}
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
int
w
,
h
,
i
;
int
w
,
h
,
i
;
char
buf
[
1024
];
char
buf
[
1024
];
int
isdir
=
0
;
int
isdir
=
0
;
if
(
argc
!=
2
)
{
if
(
argc
<
2
||
argc
>
4
)
{
printf
(
"usage: %s file|dir
\n
"
print_help
(
argv
[
0
]);
"generate a test video stream
\n
"
,
argv
[
0
]);
exit
(
1
);
}
}
if
(
!
freopen
(
argv
[
1
],
"wb"
,
stdout
))
if
(
!
freopen
(
argv
[
1
],
"wb"
,
stdout
))
isdir
=
1
;
isdir
=
1
;
w
=
DEFAULT_WIDTH
;
w
=
DEFAULT_WIDTH
;
if
(
argc
>
2
)
{
w
=
atoi
(
argv
[
2
]);
if
(
w
<
1
)
print_help
(
argv
[
0
]);
}
h
=
DEFAULT_HEIGHT
;
h
=
DEFAULT_HEIGHT
;
if
(
argc
>
3
)
{
h
=
atoi
(
argv
[
3
]);
if
(
h
<
1
)
print_help
(
argv
[
0
]);
}
rgb_tab
=
malloc
(
w
*
h
*
3
);
rgb_tab
=
malloc
(
w
*
h
*
3
);
wrap
=
w
*
3
;
wrap
=
w
*
3
;
...
...
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