]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avio.c
lavf/http: Implement server side network code.
[ffmpeg] / libavformat / avio.c
index c188adcce1280be0df8a2537436688d7a76e28c7..21713d9d5e67255d21258b54359c4a9e005e5bb9 100644 (file)
@@ -211,6 +211,26 @@ int ffurl_connect(URLContext *uc, AVDictionary **options)
     return 0;
 }
 
+int ffurl_accept(URLContext *s, URLContext **c)
+{
+    av_assert0(!*c);
+    if (s->prot->url_accept)
+        return s->prot->url_accept(s, c);
+    return AVERROR(EBADF);
+}
+
+int ffurl_handshake(URLContext *c)
+{
+    int ret;
+    if (c->prot->url_handshake) {
+        ret = c->prot->url_handshake(c);
+        if (ret)
+            return ret;
+    }
+    c->is_connected = 1;
+    return 0;
+}
+
 #define URL_SCHEME_CHARS                        \
     "abcdefghijklmnopqrstuvwxyz"                \
     "ABCDEFGHIJKLMNOPQRSTUVWXYZ"                \