Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
ff1ec0c3
Commit
ff1ec0c3
authored
Apr 12, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: undeprecate av_url_read_fseek/fpause under nicer names
It seems their replacements won't be ready anytime soon.
parent
c5e03ceb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
35 deletions
+36
-35
asfdec.c
libavformat/asfdec.c
+1
-1
avio.h
libavformat/avio.h
+27
-0
avio_internal.h
libavformat/avio_internal.h
+0
-26
aviobuf.c
libavformat/aviobuf.c
+4
-4
flvdec.c
libavformat/flvdec.c
+2
-2
utils.c
libavformat/utils.c
+2
-2
No files found.
libavformat/asfdec.c
View file @
ff1ec0c3
...
...
@@ -1242,7 +1242,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
=
ffio_read_seek
(
s
->
pb
,
stream_index
,
pts
,
flags
);
int
ret
=
avio_seek_time
(
s
->
pb
,
stream_index
,
pts
,
flags
);
if
(
ret
>=
0
)
asf_reset_header
(
s
);
if
(
ret
!=
AVERROR
(
ENOSYS
))
...
...
libavformat/avio.h
View file @
ff1ec0c3
...
...
@@ -617,4 +617,31 @@ int udp_get_file_handle(URLContext *h);
*/
const
char
*
avio_enum_protocols
(
void
**
opaque
,
int
output
);
/**
* Pause and resume playing - only meaningful if using a network streaming
* protocol (e.g. MMS).
* @param pause 1 for pause, 0 for resume
*/
int
avio_pause
(
AVIOContext
*
h
,
int
pause
);
/**
* Seek to a given timestamp relative to some component stream.
* Only meaningful if using a network streaming protocol (e.g. MMS.).
* @param stream_index The stream index that the timestamp is relative to.
* If stream_index is (-1) the timestamp should be in AV_TIME_BASE
* units from the beginning of the presentation.
* If a stream_index >= 0 is used and the protocol does not support
* seeking based on component streams, the call will fail with ENOTSUP.
* @param timestamp timestamp in AVStream.time_base units
* or if there is no stream specified then in AV_TIME_BASE units.
* @param flags Optional combination of AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE
* and AVSEEK_FLAG_ANY. The protocol may silently ignore
* AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will
* fail with ENOTSUP if used and not supported.
* @return >= 0 on success
* @see AVInputFormat::read_seek
*/
int64_t
avio_seek_time
(
AVIOContext
*
h
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
#endif
/* AVFORMAT_AVIO_H */
libavformat/avio_internal.h
View file @
ff1ec0c3
...
...
@@ -67,32 +67,6 @@ 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
);
/**
* Pause and resume playing - only meaningful if using a network streaming
* protocol (e.g. MMS).
* @param pause 1 for pause, 0 for resume
*/
int
ffio_read_pause
(
AVIOContext
*
h
,
int
pause
);
/**
* Seek to a given timestamp relative to some component stream.
* Only meaningful if using a network streaming protocol (e.g. MMS.).
* @param stream_index The stream index that the timestamp is relative to.
* If stream_index is (-1) the timestamp should be in AV_TIME_BASE
* units from the beginning of the presentation.
* If a stream_index >= 0 is used and the protocol does not support
* seeking based on component streams, the call will fail with ENOTSUP.
* @param timestamp timestamp in AVStream.time_base units
* or if there is no stream specified then in AV_TIME_BASE units.
* @param flags Optional combination of AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE
* and AVSEEK_FLAG_ANY. The protocol may silently ignore
* AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will
* fail with ENOTSUP if used and not supported.
* @return >= 0 on success
* @see AVInputFormat::read_seek
*/
int64_t
ffio_read_seek
(
AVIOContext
*
h
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
void
ffio_init_checksum
(
AVIOContext
*
s
,
unsigned
long
(
*
update_checksum
)(
unsigned
long
c
,
const
uint8_t
*
p
,
unsigned
int
len
),
unsigned
long
checksum
);
...
...
libavformat/aviobuf.c
View file @
ff1ec0c3
...
...
@@ -403,12 +403,12 @@ void put_flush_packet(AVIOContext *s)
}
int
av_url_read_fpause
(
AVIOContext
*
s
,
int
pause
)
{
return
ffio_read
_pause
(
s
,
pause
);
return
avio
_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
);
return
avio_seek_time
(
s
,
stream_index
,
timestamp
,
flags
);
}
void
init_checksum
(
AVIOContext
*
s
,
unsigned
long
(
*
update_checksum
)(
unsigned
long
c
,
const
uint8_t
*
p
,
unsigned
int
len
),
...
...
@@ -1013,14 +1013,14 @@ int url_fget_max_packet_size(AVIOContext *s)
}
#endif
int
ffio_read
_pause
(
AVIOContext
*
s
,
int
pause
)
int
avio
_pause
(
AVIOContext
*
s
,
int
pause
)
{
if
(
!
s
->
read_pause
)
return
AVERROR
(
ENOSYS
);
return
s
->
read_pause
(
s
->
opaque
,
pause
);
}
int64_t
ffio_read_seek
(
AVIOContext
*
s
,
int
stream_index
,
int64_t
avio_seek_time
(
AVIOContext
*
s
,
int
stream_index
,
int64_t
timestamp
,
int
flags
)
{
URLContext
*
h
=
s
->
opaque
;
...
...
libavformat/flvdec.c
View file @
ff1ec0c3
...
...
@@ -529,7 +529,7 @@ leave:
static
int
flv_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
ts
,
int
flags
)
{
return
ffio_read_seek
(
s
->
pb
,
stream_index
,
ts
,
flags
);
return
avio_seek_time
(
s
->
pb
,
stream_index
,
ts
,
flags
);
}
#if 0 /* don't know enough to implement this */
...
...
@@ -550,7 +550,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 =
ffio_read_seek
(s->pb, stream_index, ts, flags);
ret =
avio_seek_time
(s->pb, stream_index, ts, flags);
}
if (ret == AVERROR(ENOSYS))
...
...
libavformat/utils.c
View file @
ff1ec0c3
...
...
@@ -2579,7 +2579,7 @@ int av_read_play(AVFormatContext *s)
if
(
s
->
iformat
->
read_play
)
return
s
->
iformat
->
read_play
(
s
);
if
(
s
->
pb
)
return
ffio_read
_pause
(
s
->
pb
,
0
);
return
avio
_pause
(
s
->
pb
,
0
);
return
AVERROR
(
ENOSYS
);
}
...
...
@@ -2588,7 +2588,7 @@ int av_read_pause(AVFormatContext *s)
if
(
s
->
iformat
->
read_pause
)
return
s
->
iformat
->
read_pause
(
s
);
if
(
s
->
pb
)
return
ffio_read
_pause
(
s
->
pb
,
1
);
return
avio
_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