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
933e90a6
Commit
933e90a6
authored
Mar 14, 2011
by
Anton Khirnov
Committed by
Ronald S. Bultje
Mar 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: make av_url_read_fseek/fpause internal.
Signed-off-by:
Ronald S. Bultje
<
rsbultje@gmail.com
>
parent
f44d6445
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
12 deletions
+27
-12
asfdec.c
libavformat/asfdec.c
+2
-1
avio.h
libavformat/avio.h
+3
-4
avio_internal.h
libavformat/avio_internal.h
+5
-0
aviobuf.c
libavformat/aviobuf.c
+12
-3
flvdec.c
libavformat/flvdec.c
+3
-2
utils.c
libavformat/utils.c
+2
-2
No files found.
libavformat/asfdec.c
View file @
933e90a6
...
...
@@ -25,6 +25,7 @@
#include "libavutil/avstring.h"
#include "libavcodec/mpegaudio.h"
#include "avformat.h"
#include "avio_internal.h"
#include "riff.h"
#include "asf.h"
#include "asfcrypt.h"
...
...
@@ -1243,7 +1244,7 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int
/* Try using the protocol's read_seek if available */
if
(
s
->
pb
)
{
int
ret
=
av_url_read_f
seek
(
s
->
pb
,
stream_index
,
pts
,
flags
);
int
ret
=
ffio_read_
seek
(
s
->
pb
,
stream_index
,
pts
,
flags
);
if
(
ret
>=
0
)
asf_reset_header
(
s
);
if
(
ret
!=
AVERROR
(
ENOSYS
))
...
...
libavformat/avio.h
View file @
933e90a6
...
...
@@ -415,6 +415,9 @@ attribute_deprecated void put_tag(AVIOContext *s, const char *tag);
* @}
*/
attribute_deprecated
int
av_url_read_fpause
(
AVIOContext
*
h
,
int
pause
);
attribute_deprecated
int64_t
av_url_read_fseek
(
AVIOContext
*
h
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
/**
* @defgroup old_url_f_funcs Old url_f* functions
...
...
@@ -513,10 +516,6 @@ static av_always_inline int64_t avio_tell(AVIOContext *s)
*/
int64_t
avio_size
(
AVIOContext
*
s
);
int
av_url_read_fpause
(
AVIOContext
*
h
,
int
pause
);
int64_t
av_url_read_fseek
(
AVIOContext
*
h
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
/** @warning currently size is limited */
#ifdef __GNUC__
int
avio_printf
(
AVIOContext
*
s
,
const
char
*
fmt
,
...)
__attribute__
((
__format__
(
__printf__
,
2
,
3
)));
...
...
libavformat/avio_internal.h
View file @
933e90a6
...
...
@@ -66,4 +66,9 @@ uint64_t ffio_read_varlen(AVIOContext *bc);
/** @warning must be called before any I/O */
int
ffio_set_buf_size
(
AVIOContext
*
s
,
int
buf_size
);
int
ffio_read_pause
(
AVIOContext
*
h
,
int
pause
);
int64_t
ffio_read_seek
(
AVIOContext
*
h
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
#endif // AVFORMAT_AVIO_INTERNAL_H
libavformat/aviobuf.c
View file @
933e90a6
...
...
@@ -397,6 +397,15 @@ void put_flush_packet(AVIOContext *s)
{
avio_flush
(
s
);
}
int
av_url_read_fpause
(
AVIOContext
*
s
,
int
pause
)
{
return
ffio_read_pause
(
s
,
pause
);
}
int64_t
av_url_read_fseek
(
AVIOContext
*
s
,
int
stream_index
,
int64_t
timestamp
,
int
flags
)
{
return
ffio_read_seek
(
s
,
stream_index
,
timestamp
,
flags
);
}
#endif
int
avio_put_str
(
AVIOContext
*
s
,
const
char
*
str
)
...
...
@@ -971,15 +980,15 @@ int url_fget_max_packet_size(AVIOContext *s)
}
#endif
int
av_url_read_f
pause
(
AVIOContext
*
s
,
int
pause
)
int
ffio_read_
pause
(
AVIOContext
*
s
,
int
pause
)
{
if
(
!
s
->
read_pause
)
return
AVERROR
(
ENOSYS
);
return
s
->
read_pause
(
s
->
opaque
,
pause
);
}
int64_t
av_url_read_f
seek
(
AVIOContext
*
s
,
int
stream_index
,
int64_t
timestamp
,
int
flags
)
int64_t
ffio_read_
seek
(
AVIOContext
*
s
,
int
stream_index
,
int64_t
timestamp
,
int
flags
)
{
URLContext
*
h
=
s
->
opaque
;
int64_t
ret
;
...
...
libavformat/flvdec.c
View file @
933e90a6
...
...
@@ -28,6 +28,7 @@
#include "libavcodec/bytestream.h"
#include "libavcodec/mpeg4audio.h"
#include "avformat.h"
#include "avio_internal.h"
#include "flv.h"
typedef
struct
{
...
...
@@ -461,7 +462,7 @@ leave:
static
int
flv_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
ts
,
int
flags
)
{
return
av_url_read_f
seek
(
s
->
pb
,
stream_index
,
ts
,
flags
);
return
ffio_read_
seek
(
s
->
pb
,
stream_index
,
ts
,
flags
);
}
#if 0 /* don't know enough to implement this */
...
...
@@ -482,7 +483,7 @@ static int flv_read_seek2(AVFormatContext *s, int stream_index,
ts = av_rescale_rnd(ts, 1000, AV_TIME_BASE,
flags & AVSEEK_FLAG_BACKWARD ? AV_ROUND_DOWN : AV_ROUND_UP);
}
ret =
av_url_read_f
seek(s->pb, stream_index, ts, flags);
ret =
ffio_read_
seek(s->pb, stream_index, ts, flags);
}
if (ret == AVERROR(ENOSYS))
...
...
libavformat/utils.c
View file @
933e90a6
...
...
@@ -2553,7 +2553,7 @@ int av_read_play(AVFormatContext *s)
if
(
s
->
iformat
->
read_play
)
return
s
->
iformat
->
read_play
(
s
);
if
(
s
->
pb
)
return
av_url_read_f
pause
(
s
->
pb
,
0
);
return
ffio_read_
pause
(
s
->
pb
,
0
);
return
AVERROR
(
ENOSYS
);
}
...
...
@@ -2562,7 +2562,7 @@ int av_read_pause(AVFormatContext *s)
if
(
s
->
iformat
->
read_pause
)
return
s
->
iformat
->
read_pause
(
s
);
if
(
s
->
pb
)
return
av_url_read_f
pause
(
s
->
pb
,
1
);
return
ffio_read_
pause
(
s
->
pb
,
1
);
return
AVERROR
(
ENOSYS
);
}
...
...
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