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
84be6e72
Commit
84be6e72
authored
Dec 12, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
av_*_next() API for libavformat
Originally committed as revision 11206 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
562b2163
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
8 deletions
+33
-8
ffmpeg.c
ffmpeg.c
+6
-6
avformat.h
libavformat/avformat.h
+7
-2
avio.c
libavformat/avio.c
+6
-0
avio.h
libavformat/avio.h
+2
-0
utils.c
libavformat/utils.c
+12
-0
No files found.
ffmpeg.c
View file @
84be6e72
...
...
@@ -3318,9 +3318,9 @@ static int64_t getutime(void)
static
void
opt_show_formats
(
void
)
{
AVInputFormat
*
ifmt
;
AVOutputFormat
*
ofmt
;
URLProtocol
*
up
;
AVInputFormat
*
ifmt
=
NULL
;
AVOutputFormat
*
ofmt
=
NULL
;
URLProtocol
*
up
=
NULL
;
AVCodec
*
p
=
NULL
,
*
p2
;
AVBitStreamFilter
*
bsf
=
NULL
;
const
char
*
last_name
;
...
...
@@ -3333,7 +3333,7 @@ static void opt_show_formats(void)
const
char
*
name
=
NULL
;
const
char
*
long_name
=
NULL
;
for
(
ofmt
=
first_oformat
;
ofmt
!=
NULL
;
ofmt
=
ofmt
->
next
)
{
while
(
ofmt
=
av_oformat_next
(
ofmt
)
)
{
if
((
name
==
NULL
||
strcmp
(
ofmt
->
name
,
name
)
<
0
)
&&
strcmp
(
ofmt
->
name
,
last_name
)
>
0
){
name
=
ofmt
->
name
;
...
...
@@ -3341,7 +3341,7 @@ static void opt_show_formats(void)
encode
=
1
;
}
}
for
(
ifmt
=
first_iformat
;
ifmt
!=
NULL
;
ifmt
=
ifmt
->
next
)
{
while
(
ifmt
=
av_iformat_next
(
ifmt
)
)
{
if
((
name
==
NULL
||
strcmp
(
ifmt
->
name
,
name
)
<
0
)
&&
strcmp
(
ifmt
->
name
,
last_name
)
>
0
){
name
=
ifmt
->
name
;
...
...
@@ -3424,7 +3424,7 @@ static void opt_show_formats(void)
printf
(
"
\n
"
);
printf
(
"Supported file protocols:
\n
"
);
for
(
up
=
first_protocol
;
up
!=
NULL
;
up
=
up
->
next
)
while
(
up
=
av_protocol_next
(
up
)
)
printf
(
" %s:"
,
up
->
name
);
printf
(
"
\n
"
);
...
...
libavformat/avformat.h
View file @
84be6e72
...
...
@@ -21,8 +21,8 @@
#ifndef FFMPEG_AVFORMAT_H
#define FFMPEG_AVFORMAT_H
#define LIBAVFORMAT_VERSION_INT ((52<<16)+(
1
<<8)+0)
#define LIBAVFORMAT_VERSION 52.
1
.0
#define LIBAVFORMAT_VERSION_INT ((52<<16)+(
2
<<8)+0)
#define LIBAVFORMAT_VERSION 52.
2
.0
#define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
#define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
...
...
@@ -452,8 +452,13 @@ typedef struct AVPacketList {
struct
AVPacketList
*
next
;
}
AVPacketList
;
#if LIBAVFORMAT_VERSION_INT < (53<<16)
extern
AVInputFormat
*
first_iformat
;
extern
AVOutputFormat
*
first_oformat
;
#endif
AVInputFormat
*
av_iformat_next
(
AVInputFormat
*
f
);
AVOutputFormat
*
av_oformat_next
(
AVOutputFormat
*
f
);
enum
CodecID
av_guess_image2_codec
(
const
char
*
filename
);
...
...
libavformat/avio.c
View file @
84be6e72
...
...
@@ -26,6 +26,12 @@ static int default_interrupt_cb(void);
URLProtocol
*
first_protocol
=
NULL
;
URLInterruptCB
*
url_interrupt_cb
=
default_interrupt_cb
;
URLProtocol
*
av_protocol_next
(
URLProtocol
*
p
)
{
if
(
p
)
return
p
->
next
;
else
return
first_protocol
;
}
int
register_protocol
(
URLProtocol
*
protocol
)
{
URLProtocol
**
p
;
...
...
libavformat/avio.h
View file @
84be6e72
...
...
@@ -136,6 +136,8 @@ typedef struct URLProtocol {
extern
URLProtocol
*
first_protocol
;
extern
URLInterruptCB
*
url_interrupt_cb
;
URLProtocol
*
av_protocol_next
(
URLProtocol
*
p
);
int
register_protocol
(
URLProtocol
*
protocol
);
typedef
struct
{
...
...
libavformat/utils.c
View file @
84be6e72
...
...
@@ -41,6 +41,18 @@ AVInputFormat *first_iformat = NULL;
/** head of registered output format linked list. */
AVOutputFormat
*
first_oformat
=
NULL
;
AVInputFormat
*
av_iformat_next
(
AVInputFormat
*
f
)
{
if
(
f
)
return
f
->
next
;
else
return
first_iformat
;
}
AVOutputFormat
*
av_oformat_next
(
AVOutputFormat
*
f
)
{
if
(
f
)
return
f
->
next
;
else
return
first_oformat
;
}
void
av_register_input_format
(
AVInputFormat
*
format
)
{
AVInputFormat
**
p
;
...
...
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