---
configure | 1 -
doc/general.texi | 1 -
doc/protocols.texi | 4 --
libavformat/Makefile | 1 -
libavformat/allformats.c | 1 -
libavformat/gopher.c | 125 ----------------------------------------------
6 files changed, 0 insertions(+), 133 deletions(-)
delete mode 100644 libavformat/gopher.c
diff --git a/configure b/configure
index aa5797a..9f87e6b 100755
--- a/configure
+++ b/configure
@@ -1550,7 +1550,6 @@ ffrtmpcrypt_protocol_deps_any="gcrypt nettle openssl"
ffrtmpcrypt_protocol_select="tcp_protocol"
ffrtmphttp_protocol_deps="!librtmp_protocol"
ffrtmphttp_protocol_select="http_protocol"
-gopher_protocol_deps="network"
httpproxy_protocol_deps="network"
httpproxy_protocol_select="tcp_protocol"
http_protocol_deps="network"
diff --git a/doc/general.texi b/doc/general.texi
index 0585554..759e14a 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -836,7 +836,6 @@ performance on systems without hardware floating point
support).
@multitable @columnfractions .4 .1
@item Name @tab Support
@item file @tab X
-@item Gopher @tab X
@item HLS @tab X
@item HTTP @tab X
@item HTTPS @tab X
diff --git a/doc/protocols.texi b/doc/protocols.texi
index 7b84f25..adba76d 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -61,10 +61,6 @@ The ff* tools default to the file protocol, that is a
resource
specified with the name "FILE.mpeg" is interpreted as the URL
"file:FILE.mpeg".
-@section gopher
-
-Gopher protocol.
-
@section hls
Read Apple HTTP Live Streaming compliant segmented stream as
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 01d0f73..d8fe448 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -345,7 +345,6 @@ OBJS-$(CONFIG_CRYPTO_PROTOCOL) += crypto.o
OBJS-$(CONFIG_FFRTMPCRYPT_PROTOCOL) += rtmpcrypt.o rtmpdh.o
OBJS-$(CONFIG_FFRTMPHTTP_PROTOCOL) += rtmphttp.o
OBJS-$(CONFIG_FILE_PROTOCOL) += file.o
-OBJS-$(CONFIG_GOPHER_PROTOCOL) += gopher.o
OBJS-$(CONFIG_HLS_PROTOCOL) += hlsproto.o
OBJS-$(CONFIG_HTTP_PROTOCOL) += http.o httpauth.o
OBJS-$(CONFIG_HTTPPROXY_PROTOCOL) += http.o httpauth.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 40770e5..5b69a9f 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -250,7 +250,6 @@ void av_register_all(void)
REGISTER_PROTOCOL (FFRTMPCRYPT, ffrtmpcrypt);
REGISTER_PROTOCOL (FFRTMPHTTP, ffrtmphttp);
REGISTER_PROTOCOL (FILE, file);
- REGISTER_PROTOCOL (GOPHER, gopher);
REGISTER_PROTOCOL (HLS, hls);
REGISTER_PROTOCOL (HTTP, http);
REGISTER_PROTOCOL (HTTPPROXY, httpproxy);
diff --git a/libavformat/gopher.c b/libavformat/gopher.c
deleted file mode 100644
index a149f7f..0000000
--- a/libavformat/gopher.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Gopher protocol
- *
- * Copyright (c) 2009 Toshimitsu Kimura
- *
- * based on libavformat/http.c, Copyright (c) 2000, 2001 Fabrice Bellard
- *
- * This file is part of Libav.
- *
- * Libav is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * Libav is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "libavutil/avstring.h"
-#include "avformat.h"
-#include "internal.h"
-#include "network.h"
-#include "url.h"
-
-typedef struct {
- URLContext *hd;
-} GopherContext;
-
-static int gopher_write(URLContext *h, const uint8_t *buf, int size)
-{
- GopherContext *s = h->priv_data;
- return ffurl_write(s->hd, buf, size);
-}
-
-static int gopher_connect(URLContext *h, const char *path)
-{
- char buffer[1024];
-
- if (!*path) return AVERROR(EINVAL);
- switch (*++path) {
- case '5':
- case '9':
- path = strchr(path, '/');
- if (!path) return AVERROR(EINVAL);
- break;
- default:
- av_log(h, AV_LOG_WARNING,
- "Gopher protocol type '%c' not supported yet!\n",
- *path);
- return AVERROR(EINVAL);
- }
-
- /* send gopher sector */
- snprintf(buffer, sizeof(buffer), "%s\r\n", path);
-
- if (gopher_write(h, buffer, strlen(buffer)) < 0)
- return AVERROR(EIO);
-
- return 0;
-}
-
-static int gopher_close(URLContext *h)
-{
- GopherContext *s = h->priv_data;
- if (s->hd) {
- ffurl_close(s->hd);
- s->hd = NULL;
- }
- return 0;
-}
-
-static int gopher_open(URLContext *h, const char *uri, int flags)
-{
- GopherContext *s = h->priv_data;
- char hostname[1024], auth[1024], path[1024], buf[1024];
- int port, err;
-
- h->is_streamed = 1;
-
- /* needed in any case to build the host string */
- av_url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname),
&port,
- path, sizeof(path), uri);
-
- if (port < 0)
- port = 70;
-
- ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port, NULL);
-
- s->hd = NULL;
- err = ffurl_open(&s->hd, buf, AVIO_FLAG_READ_WRITE,
- &h->interrupt_callback, NULL);
- if (err < 0)
- goto fail;
-
- if ((err = gopher_connect(h, path)) < 0)
- goto fail;
- return 0;
- fail:
- gopher_close(h);
- return err;
-}
-
-static int gopher_read(URLContext *h, uint8_t *buf, int size)
-{
- GopherContext *s = h->priv_data;
- int len = ffurl_read(s->hd, buf, size);
- return len;
-}
-
-
-URLProtocol ff_gopher_protocol = {
- .name = "gopher",
- .url_open = gopher_open,
- .url_read = gopher_read,
- .url_write = gopher_write,
- .url_close = gopher_close,
- .priv_data_size = sizeof(GopherContext),
- .flags = URL_PROTOCOL_FLAG_NETWORK,
-};
--
1.7.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel