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
f8270bbf
Commit
f8270bbf
authored
Apr 04, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: add a function for iterating though protocol names.
parent
c234d40b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
avio.c
libavformat/avio.c
+10
-0
avio.h
libavformat/avio.h
+13
-0
No files found.
libavformat/avio.c
View file @
f8270bbf
...
...
@@ -57,6 +57,16 @@ URLProtocol *av_protocol_next(URLProtocol *p)
else
return
first_protocol
;
}
const
char
*
avio_enum_protocols
(
void
**
opaque
,
int
output
)
{
URLProtocol
**
p
=
opaque
;
*
p
=
*
p
?
(
*
p
)
->
next
:
first_protocol
;
if
(
!*
p
)
return
NULL
;
if
((
output
&&
(
*
p
)
->
url_write
)
||
(
!
output
&&
(
*
p
)
->
url_read
))
return
(
*
p
)
->
name
;
return
avio_enum_protocols
(
opaque
,
output
);
}
int
ffurl_register_protocol
(
URLProtocol
*
protocol
,
int
size
)
{
URLProtocol
**
p
;
...
...
libavformat/avio.h
View file @
f8270bbf
...
...
@@ -600,4 +600,17 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
int
udp_get_file_handle
(
URLContext
*
h
);
#endif
/**
* Iterate through names of available protocols.
*
* @param opaque A private pointer representing current protocol.
* It must be a pointer to NULL on first iteration and will
* be updated by successive calls to avio_enum_protocols.
* @param output If set to 1, iterate over output protocols,
* otherwise over input protocols.
*
* @return A static string containing the name of current protocol or NULL
*/
const
char
*
avio_enum_protocols
(
void
**
opaque
,
int
output
);
#endif
/* AVFORMAT_AVIO_H */
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