diff avio.c @ 2778:50e2307414ee libavformat

Extend URLProtocol with new function pointers and api functions for av_url_read_play(), av_url_read_pause() and av_url_read_seek(). patch by: Bj«Órn Axelsson, bjorn d axelsson a intinor d se
author andoma
date Sat, 24 Nov 2007 07:09:32 +0000
parents 39cac1b7296e
children 173b5cb7efde
line wrap: on
line diff
--- a/avio.c	Fri Nov 23 11:41:01 2007 +0000
+++ b/avio.c	Sat Nov 24 07:09:32 2007 +0000
@@ -187,3 +187,25 @@
         interrupt_cb = default_interrupt_cb;
     url_interrupt_cb = interrupt_cb;
 }
+
+int av_url_read_play(URLContext *h)
+{
+    if (!h->prot->url_read_play)
+        return AVERROR(ENOSYS);
+    return h->prot->url_read_play(h);
+}
+
+int av_url_read_pause(URLContext *h)
+{
+    if (!h->prot->url_read_pause)
+        return AVERROR(ENOSYS);
+    return h->prot->url_read_pause(h);
+}
+
+int av_url_read_seek(URLContext *h,
+        int stream_index, int64_t timestamp, int flags)
+{
+    if (!h->prot->url_read_seek)
+        return AVERROR(ENOSYS);
+    return h->prot->url_read_seek(h, stream_index, timestamp, flags);
+}