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
8a4c0866
Commit
8a4c0866
authored
Jul 23, 2014
by
Andrey Utkin
Committed by
Michael Niedermayer
Jul 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: Introduce avio_read_to_bprint(avioctx, bp, max_size)
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
01b236b7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
2 deletions
+32
-2
APIchanges
doc/APIchanges
+3
-0
avio.h
libavformat/avio.h
+9
-0
aviobuf.c
libavformat/aviobuf.c
+18
-0
version.h
libavformat/version.h
+2
-2
No files found.
doc/APIchanges
View file @
8a4c0866
...
@@ -15,6 +15,9 @@ libavutil: 2012-10-22
...
@@ -15,6 +15,9 @@ libavutil: 2012-10-22
API changes, most recent first:
API changes, most recent first:
2014-07-23 - XXXXXXX - lavf 55.49.100 - avio.h
Add avio_read_to_bprint()
2014-07-14 - 62227a7 - lavf 55.47.100 - avformat.h
2014-07-14 - 62227a7 - lavf 55.47.100 - avformat.h
Add av_stream_get_parser()
Add av_stream_get_parser()
...
...
libavformat/avio.h
View file @
8a4c0866
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "libavutil/common.h"
#include "libavutil/common.h"
#include "libavutil/dict.h"
#include "libavutil/dict.h"
#include "libavutil/log.h"
#include "libavutil/log.h"
#include "libavutil/bprint.h"
#include "libavformat/version.h"
#include "libavformat/version.h"
...
@@ -500,4 +501,12 @@ int avio_pause(AVIOContext *h, int pause);
...
@@ -500,4 +501,12 @@ int avio_pause(AVIOContext *h, int pause);
int64_t
avio_seek_time
(
AVIOContext
*
h
,
int
stream_index
,
int64_t
avio_seek_time
(
AVIOContext
*
h
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
int64_t
timestamp
,
int
flags
);
/**
* Read contents of h into print buffer, up to max_size bytes, or up to EOF.
*
* @return 0 for success (max_size bytes read or EOF reached), negative error
* code otherwise
*/
int
avio_read_to_bprint
(
AVIOContext
*
h
,
AVBPrint
*
pb
,
size_t
max_size
);
#endif
/* AVFORMAT_AVIO_H */
#endif
/* AVFORMAT_AVIO_H */
libavformat/aviobuf.c
View file @
8a4c0866
...
@@ -953,6 +953,24 @@ int64_t avio_seek_time(AVIOContext *s, int stream_index,
...
@@ -953,6 +953,24 @@ int64_t avio_seek_time(AVIOContext *s, int stream_index,
return
ret
;
return
ret
;
}
}
int
avio_read_to_bprint
(
AVIOContext
*
h
,
AVBPrint
*
pb
,
size_t
max_size
)
{
int
ret
;
char
buf
[
1024
];
while
(
max_size
)
{
ret
=
avio_read
(
h
,
buf
,
FFMIN
(
max_size
,
sizeof
(
buf
)));
if
(
ret
==
AVERROR_EOF
)
return
0
;
if
(
ret
<=
0
)
return
ret
;
av_bprint_append_data
(
pb
,
buf
,
ret
);
if
(
!
av_bprint_is_complete
(
pb
))
return
AVERROR
(
ENOMEM
);
max_size
-=
ret
;
}
return
0
;
}
/* output in a dynamic buffer */
/* output in a dynamic buffer */
typedef
struct
DynBuffer
{
typedef
struct
DynBuffer
{
...
...
libavformat/version.h
View file @
8a4c0866
...
@@ -30,8 +30,8 @@
...
@@ -30,8 +30,8 @@
#include "libavutil/version.h"
#include "libavutil/version.h"
#define LIBAVFORMAT_VERSION_MAJOR 55
#define LIBAVFORMAT_VERSION_MAJOR 55
#define LIBAVFORMAT_VERSION_MINOR 4
8
#define LIBAVFORMAT_VERSION_MINOR 4
9
#define LIBAVFORMAT_VERSION_MICRO 10
1
#define LIBAVFORMAT_VERSION_MICRO 10
0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
LIBAVFORMAT_VERSION_MINOR, \
...
...
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