45 if (!*path)
return AVERROR(EINVAL);
49 path = strchr(path,
'/');
50 if (!path)
return AVERROR(EINVAL);
54 "Gopher protocol type '%c' not supported yet!\n",
60 snprintf(buffer,
sizeof(buffer),
"%s\r\n", path);
81 char hostname[1024], auth[1024], path[1024],
buf[1024];
88 path,
sizeof(path), uri);
static int gopher_open(URLContext *h, const char *uri, int flags)
void av_url_split(char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url)
Split a URL string into components.
#define URL_PROTOCOL_FLAG_NETWORK
#define AV_LOG_WARNING
Something somehow does not look correct.
int ffurl_write(URLContext *h, const unsigned char *buf, int size)
Write size bytes from buf to the resource accessed by h.
int is_streamed
true if streamed (no seek possible), default = false
AVIOInterruptCB interrupt_callback
static int gopher_read(URLContext *h, uint8_t *buf, int size)
static int gopher_connect(URLContext *h, const char *path)
int ff_url_join(char *str, int size, const char *proto, const char *authorization, const char *hostname, int port, const char *fmt,...)
#define AVIO_FLAG_READ_WRITE
read-write pseudo flag
static int gopher_close(URLContext *h)
URLProtocol ff_gopher_protocol
int ffurl_close(URLContext *h)
int ffurl_open(URLContext **puc, const char *filename, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options)
Create an URLContext for accessing to the resource indicated by url, and open it. ...
static int gopher_write(URLContext *h, const uint8_t *buf, int size)
unbuffered private I/O API
int ffurl_read(URLContext *h, unsigned char *buf, int size)
Read up to size bytes from the resource accessed by h, and store the read bytes in buf...