FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
libssh.c File Reference
#include <fcntl.h>
#include <libssh/sftp.h>
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "internal.h"
#include "url.h"

Go to the source code of this file.

Data Structures

struct  LIBSSHContext
 

Macros

#define OFFSET(x)   offsetof(LIBSSHContext, x)
 
#define D   AV_OPT_FLAG_DECODING_PARAM
 
#define E   AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static int libssh_close (URLContext *h)
 
static int libssh_open (URLContext *h, const char *url, int flags)
 
static int64_t libssh_seek (URLContext *h, int64_t pos, int whence)
 
static int libssh_read (URLContext *h, unsigned char *buf, int size)
 
static int libssh_write (URLContext *h, const unsigned char *buf, int size)
 

Variables

static const AVOption options []
 
static const AVClass libssh_context_class
 
URLProtocol ff_libssh_protocol
 

Macro Definition Documentation

#define OFFSET (   x)    offsetof(LIBSSHContext, x)

Definition at line 203 of file libssh.c.

Definition at line 204 of file libssh.c.

Definition at line 205 of file libssh.c.

Function Documentation

static int libssh_close ( URLContext h)
static

Definition at line 39 of file libssh.c.

Referenced by libssh_open().

static int libssh_open ( URLContext h,
const char *  url,
int  flags 
)
static

Definition at line 53 of file libssh.c.

static int64_t libssh_seek ( URLContext h,
int64_t  pos,
int  whence 
)
static

Definition at line 145 of file libssh.c.

static int libssh_read ( URLContext h,
unsigned char *  buf,
int  size 
)
static

Definition at line 179 of file libssh.c.

static int libssh_write ( URLContext h,
const unsigned char *  buf,
int  size 
)
static

Definition at line 191 of file libssh.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{"timeout", "set timeout of socket I/O operations", OFFSET(rw_timeout), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, D|E },
{"truncate", "Truncate existing files on write", OFFSET(trunc), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, E },
{NULL}
}

Definition at line 206 of file libssh.c.

const AVClass libssh_context_class
static
Initial value:
= {
.class_name = "libssh",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 212 of file libssh.c.

URLProtocol ff_libssh_protocol
Initial value:
= {
.name = "sftp",
.url_open = libssh_open,
.url_read = libssh_read,
.url_write = libssh_write,
.url_seek = libssh_seek,
.url_close = libssh_close,
.priv_data_size = sizeof(LIBSSHContext),
.priv_data_class = &libssh_context_class,
}

Definition at line 219 of file libssh.c.