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
2b4c1a0f
Commit
2b4c1a0f
authored
Jul 19, 2019
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools/aviocat: add verbose mode.
For now: print the input size as detected by AVSEEK_SIZE.
parent
8cd96e13
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
aviocat.c
tools/aviocat.c
+12
-2
No files found.
tools/aviocat.c
View file @
2b4c1a0f
...
@@ -26,14 +26,14 @@
...
@@ -26,14 +26,14 @@
static
int
usage
(
const
char
*
argv0
,
int
ret
)
static
int
usage
(
const
char
*
argv0
,
int
ret
)
{
{
fprintf
(
stderr
,
"%s [-b bytespersec] [-d duration] [-oi <options>] [-oo <options>] input_url output_url
\n
"
,
argv0
);
fprintf
(
stderr
,
"%s [-b bytespersec] [-d duration] [-oi <options>] [-oo <options>]
[-v]
input_url output_url
\n
"
,
argv0
);
fprintf
(
stderr
,
"<options>: AVOptions expressed as key=value, :-separated
\n
"
);
fprintf
(
stderr
,
"<options>: AVOptions expressed as key=value, :-separated
\n
"
);
return
ret
;
return
ret
;
}
}
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
int
bps
=
0
,
duration
=
0
,
ret
,
i
;
int
bps
=
0
,
duration
=
0
,
verbose
=
0
,
ret
,
i
;
const
char
*
input_url
=
NULL
,
*
output_url
=
NULL
;
const
char
*
input_url
=
NULL
,
*
output_url
=
NULL
;
int64_t
stream_pos
=
0
;
int64_t
stream_pos
=
0
;
int64_t
start_time
;
int64_t
start_time
;
...
@@ -65,6 +65,8 @@ int main(int argc, char **argv)
...
@@ -65,6 +65,8 @@ int main(int argc, char **argv)
return
usage
(
argv
[
0
],
1
);
return
usage
(
argv
[
0
],
1
);
}
}
i
++
;
i
++
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-v"
))
{
verbose
=
1
;
}
else
if
(
!
input_url
)
{
}
else
if
(
!
input_url
)
{
input_url
=
argv
[
i
];
input_url
=
argv
[
i
];
}
else
if
(
!
output_url
)
{
}
else
if
(
!
output_url
)
{
...
@@ -82,6 +84,14 @@ int main(int argc, char **argv)
...
@@ -82,6 +84,14 @@ int main(int argc, char **argv)
fprintf
(
stderr
,
"Unable to open %s: %s
\n
"
,
input_url
,
errbuf
);
fprintf
(
stderr
,
"Unable to open %s: %s
\n
"
,
input_url
,
errbuf
);
return
1
;
return
1
;
}
}
if
(
verbose
)
{
int64_t
size
=
avio_seek
(
input
,
0
,
AVSEEK_SIZE
);
if
(
size
>=
0
)
{
fprintf
(
stderr
,
"aviocat: input size: %"
PRId64
"
\n
"
,
size
);
}
else
{
fprintf
(
stderr
,
"aviocat: input size: unknown
\n
"
);
}
}
if
(
duration
&&
!
bps
)
{
if
(
duration
&&
!
bps
)
{
int64_t
size
=
avio_size
(
input
);
int64_t
size
=
avio_size
(
input
);
if
(
size
<
0
)
{
if
(
size
<
0
)
{
...
...
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