It seems their replacements won't be ready anytime soon.tags/n0.8
| @@ -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 */ | /* Try using the protocol's read_seek if available */ | ||||
| if(s->pb) { | 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) | if(ret >= 0) | ||||
| asf_reset_header(s); | asf_reset_header(s); | ||||
| if (ret != AVERROR(ENOSYS)) | if (ret != AVERROR(ENOSYS)) | ||||
| @@ -617,4 +617,31 @@ int udp_get_file_handle(URLContext *h); | |||||
| */ | */ | ||||
| const char *avio_enum_protocols(void **opaque, int output); | 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 */ | #endif /* AVFORMAT_AVIO_H */ | ||||
| @@ -67,32 +67,6 @@ uint64_t ffio_read_varlen(AVIOContext *bc); | |||||
| /** @warning must be called before any I/O */ | /** @warning must be called before any I/O */ | ||||
| int ffio_set_buf_size(AVIOContext *s, int buf_size); | 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, | void ffio_init_checksum(AVIOContext *s, | ||||
| unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), | unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), | ||||
| unsigned long checksum); | unsigned long checksum); | ||||
| @@ -403,12 +403,12 @@ void put_flush_packet(AVIOContext *s) | |||||
| } | } | ||||
| int av_url_read_fpause(AVIOContext *s, int pause) | 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 av_url_read_fseek(AVIOContext *s, int stream_index, | ||||
| int64_t timestamp, int flags) | 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, | void init_checksum(AVIOContext *s, | ||||
| unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), | 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 | #endif | ||||
| int ffio_read_pause(AVIOContext *s, int pause) | |||||
| int avio_pause(AVIOContext *s, int pause) | |||||
| { | { | ||||
| if (!s->read_pause) | if (!s->read_pause) | ||||
| return AVERROR(ENOSYS); | return AVERROR(ENOSYS); | ||||
| return s->read_pause(s->opaque, pause); | 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) | int64_t timestamp, int flags) | ||||
| { | { | ||||
| URLContext *h = s->opaque; | URLContext *h = s->opaque; | ||||
| @@ -529,7 +529,7 @@ leave: | |||||
| static int flv_read_seek(AVFormatContext *s, int stream_index, | static int flv_read_seek(AVFormatContext *s, int stream_index, | ||||
| int64_t ts, int flags) | 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 */ | #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, | ts = av_rescale_rnd(ts, 1000, AV_TIME_BASE, | ||||
| flags & AVSEEK_FLAG_BACKWARD ? AV_ROUND_DOWN : AV_ROUND_UP); | 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)) | if (ret == AVERROR(ENOSYS)) | ||||
| @@ -2579,7 +2579,7 @@ int av_read_play(AVFormatContext *s) | |||||
| if (s->iformat->read_play) | if (s->iformat->read_play) | ||||
| return s->iformat->read_play(s); | return s->iformat->read_play(s); | ||||
| if (s->pb) | if (s->pb) | ||||
| return ffio_read_pause(s->pb, 0); | |||||
| return avio_pause(s->pb, 0); | |||||
| return AVERROR(ENOSYS); | return AVERROR(ENOSYS); | ||||
| } | } | ||||
| @@ -2588,7 +2588,7 @@ int av_read_pause(AVFormatContext *s) | |||||
| if (s->iformat->read_pause) | if (s->iformat->read_pause) | ||||
| return s->iformat->read_pause(s); | return s->iformat->read_pause(s); | ||||
| if (s->pb) | if (s->pb) | ||||
| return ffio_read_pause(s->pb, 1); | |||||
| return avio_pause(s->pb, 1); | |||||
| return AVERROR(ENOSYS); | return AVERROR(ENOSYS); | ||||
| } | } | ||||