#include "libavutil/avstring.h"
#include "libavcodec/mpegaudio.h"
#include "avformat.h"
+#include "avio_internal.h"
#include "riff.h"
#include "asf.h"
#include "asfcrypt.h"
/* Try using the protocol's read_seek if available */
if(s->pb) {
- int ret = av_url_read_fseek(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))
* @}
*/
+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
*/
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)));
/** @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
{
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)
}
#endif
-int av_url_read_fpause(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_fseek(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;
#include "libavcodec/bytestream.h"
#include "libavcodec/mpeg4audio.h"
#include "avformat.h"
+#include "avio_internal.h"
#include "flv.h"
typedef struct {
static int flv_read_seek(AVFormatContext *s, int stream_index,
int64_t ts, int flags)
{
- return av_url_read_fseek(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 */
ts = av_rescale_rnd(ts, 1000, AV_TIME_BASE,
flags & AVSEEK_FLAG_BACKWARD ? AV_ROUND_DOWN : AV_ROUND_UP);
}
- ret = av_url_read_fseek(s->pb, stream_index, ts, flags);
+ ret = ffio_read_seek(s->pb, stream_index, ts, flags);
}
if (ret == AVERROR(ENOSYS))
if (s->iformat->read_play)
return s->iformat->read_play(s);
if (s->pb)
- return av_url_read_fpause(s->pb, 0);
+ return ffio_read_pause(s->pb, 0);
return AVERROR(ENOSYS);
}
if (s->iformat->read_pause)
return s->iformat->read_pause(s);
if (s->pb)
- return av_url_read_fpause(s->pb, 1);
+ return ffio_read_pause(s->pb, 1);
return AVERROR(ENOSYS);
}