#include "libavutil/avstring.h"
#include "avformat.h"
#include <unistd.h>
#include "internal.h"
#include "network.h"
#include "http.h"
#include "os_support.h"
#include "httpauth.h"
#include "url.h"
#include "libavutil/opt.h"
Go to the source code of this file.
Functions |
| HTTP_CLASS (http) |
| HTTP_CLASS (https) |
static int | http_connect (URLContext *h, const char *path, const char *local_path, const char *hoststr, const char *auth, const char *proxyauth, int *new_location) |
void | ff_http_init_auth_state (URLContext *dest, const URLContext *src) |
| Initialize the authentication state based on another HTTP URLContext.
|
static int | http_open_cnx (URLContext *h) |
static int | http_open (URLContext *h, const char *uri, int flags) |
static int | http_getc (HTTPContext *s) |
static int | http_get_line (HTTPContext *s, char *line, int line_size) |
static int | process_line (URLContext *h, char *line, int line_count, int *new_location) |
static int | has_header (const char *str, const char *header) |
static int | http_buf_read (URLContext *h, uint8_t *buf, int size) |
static int | http_read (URLContext *h, uint8_t *buf, int size) |
static int | http_write (URLContext *h, const uint8_t *buf, int size) |
static int | http_close (URLContext *h) |
static int64_t | http_seek (URLContext *h, int64_t off, int whence) |
static int | http_get_file_handle (URLContext *h) |
Macro Definition Documentation
#define HTTP_CLASS |
( |
|
flavor | ) |
|
Value:static const AVClass flavor ## _context_class = {\
}
Definition at line 64 of file http.c.
Function Documentation
Initialize the authentication state based on another HTTP URLContext.
This can be used to pre-initialize the authentication parameters if they are known beforehand, to avoid having to do an initial failing request just to get the parameters.
- Parameters
-
dest | URL context whose authentication state gets updated |
src | URL context whose authentication state gets copied |
Definition at line 79 of file http.c.
static int has_header |
( |
const char * |
str, |
|
|
const char * |
header |
|
) |
| |
|
inlinestatic |
static int http_buf_read |
( |
URLContext * |
h, |
|
|
uint8_t * |
buf, |
|
|
int |
size |
|
) |
| |
|
static |
static int http_connect |
( |
URLContext * |
h, |
|
|
const char * |
path, |
|
|
const char * |
local_path, |
|
|
const char * |
hoststr, |
|
|
const char * |
auth, |
|
|
const char * |
proxyauth, |
|
|
int * |
new_location |
|
) |
| |
|
static |
static int http_get_line |
( |
HTTPContext * |
s, |
|
|
char * |
line, |
|
|
int |
line_size |
|
) |
| |
|
static |
static int http_open |
( |
URLContext * |
h, |
|
|
const char * |
uri, |
|
|
int |
flags |
|
) |
| |
|
static |
static int http_read |
( |
URLContext * |
h, |
|
|
uint8_t * |
buf, |
|
|
int |
size |
|
) |
| |
|
static |
static int64_t http_seek |
( |
URLContext * |
h, |
|
|
int64_t |
off, |
|
|
int |
whence |
|
) |
| |
|
static |
static int http_write |
( |
URLContext * |
h, |
|
|
const uint8_t * |
buf, |
|
|
int |
size |
|
) |
| |
|
static |
static int process_line |
( |
URLContext * |
h, |
|
|
char * |
line, |
|
|
int |
line_count, |
|
|
int * |
new_location |
|
) |
| |
|
static |
Variable Documentation
Initial value: {
{
"chunked_post",
"use chunked transfer-encoding for posts",
OFFSET(chunked_post),
AV_OPT_TYPE_INT, {.dbl = 1}, 0, 1,
E },
{
"headers",
"custom HTTP headers, can override built in default headers",
OFFSET(headers),
AV_OPT_TYPE_STRING, { 0 }, 0, 0,
D|
E },
}
Definition at line 59 of file http.c.