FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
libsmbclient.c File Reference
#include <libsmbclient.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  LIBSMBContext
 

Macros

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

Functions

static void libsmbc_get_auth_data (SMBCCTX *c, const char *server, const char *share, char *workgroup, int workgroup_len, char *username, int username_len, char *password, int password_len)
 
static av_cold int libsmbc_connect (URLContext *h)
 
static av_cold int libsmbc_close (URLContext *h)
 
static av_cold int libsmbc_open (URLContext *h, const char *url, int flags)
 
static int64_t libsmbc_seek (URLContext *h, int64_t pos, int whence)
 
static int libsmbc_read (URLContext *h, unsigned char *buf, int size)
 
static int libsmbc_write (URLContext *h, const unsigned char *buf, int size)
 
static int libsmbc_open_dir (URLContext *h)
 
static int libsmbc_read_dir (URLContext *h, AVIODirEntry **next)
 
static int libsmbc_close_dir (URLContext *h)
 
static int libsmbc_delete (URLContext *h)
 
static int libsmbc_move (URLContext *h_src, URLContext *h_dst)
 

Variables

static const AVOption options []
 
static const AVClass libsmbclient_context_class
 
const URLProtocol ff_libsmbclient_protocol
 

Macro Definition Documentation

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

Definition at line 351 of file libsmbclient.c.

Definition at line 352 of file libsmbclient.c.

Definition at line 353 of file libsmbclient.c.

Function Documentation

static void libsmbc_get_auth_data ( SMBCCTX *  c,
const char *  server,
const char *  share,
char *  workgroup,
int  workgroup_len,
char *  username,
int  username_len,
char *  password,
int  password_len 
)
static

Definition at line 39 of file libsmbclient.c.

Referenced by libsmbc_connect().

static av_cold int libsmbc_connect ( URLContext h)
static

Definition at line 48 of file libsmbclient.c.

Referenced by libsmbc_delete(), libsmbc_move(), libsmbc_open(), and libsmbc_open_dir().

static av_cold int libsmbc_close ( URLContext h)
static
static av_cold int libsmbc_open ( URLContext h,
const char *  url,
int  flags 
)
static

Definition at line 95 of file libsmbclient.c.

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

Definition at line 136 of file libsmbclient.c.

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

Definition at line 158 of file libsmbclient.c.

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

Definition at line 172 of file libsmbclient.c.

static int libsmbc_open_dir ( URLContext h)
static

Definition at line 186 of file libsmbclient.c.

static int libsmbc_read_dir ( URLContext h,
AVIODirEntry **  next 
)
static

Definition at line 207 of file libsmbclient.c.

static int libsmbc_close_dir ( URLContext h)
static

Definition at line 279 of file libsmbclient.c.

static int libsmbc_delete ( URLContext h)
static

Definition at line 290 of file libsmbclient.c.

static int libsmbc_move ( URLContext h_src,
URLContext h_dst 
)
static

Definition at line 331 of file libsmbclient.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{"timeout", "set timeout in ms of socket I/O operations", OFFSET(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 },
{"workgroup", "set the workgroup used for making connections", OFFSET(workgroup), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E },
{NULL}
}
#define D
Definition: libsmbclient.c:352
#define NULL
Definition: coverity.c:32
static av_always_inline av_const double trunc(double x)
Definition: libm.h:458
#define OFFSET(x)
Definition: libsmbclient.c:351
#define E
Definition: libsmbclient.c:353

Definition at line 354 of file libsmbclient.c.

const AVClass libsmbclient_context_class
static
Initial value:
= {
.class_name = "libsmbc",
.item_name = av_default_item_name,
.option = options,
}
static const AVOption options[]
Definition: libsmbclient.c:354
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
av_default_item_name

Definition at line 361 of file libsmbclient.c.

const URLProtocol ff_libsmbclient_protocol
Initial value:
= {
.name = "smb",
.url_open = libsmbc_open,
.url_read = libsmbc_read,
.url_write = libsmbc_write,
.url_seek = libsmbc_seek,
.url_close = libsmbc_close,
.url_delete = libsmbc_delete,
.url_move = libsmbc_move,
.url_open_dir = libsmbc_open_dir,
.url_read_dir = libsmbc_read_dir,
.url_close_dir = libsmbc_close_dir,
.priv_data_size = sizeof(LIBSMBContext),
.priv_data_class = &libsmbclient_context_class,
}
#define URL_PROTOCOL_FLAG_NETWORK
Definition: url.h:34
static int libsmbc_move(URLContext *h_src, URLContext *h_dst)
Definition: libsmbclient.c:331
static av_cold int libsmbc_close(URLContext *h)
Definition: libsmbclient.c:81
static int64_t libsmbc_seek(URLContext *h, int64_t pos, int whence)
Definition: libsmbclient.c:136
static int libsmbc_close_dir(URLContext *h)
Definition: libsmbclient.c:279
static int flags
Definition: log.c:57
static int libsmbc_write(URLContext *h, const unsigned char *buf, int size)
Definition: libsmbclient.c:172
static int libsmbc_read_dir(URLContext *h, AVIODirEntry **next)
Definition: libsmbclient.c:207
static int libsmbc_read(URLContext *h, unsigned char *buf, int size)
Definition: libsmbclient.c:158
static int libsmbc_open_dir(URLContext *h)
Definition: libsmbclient.c:186
static int libsmbc_delete(URLContext *h)
Definition: libsmbclient.c:290
static const AVClass libsmbclient_context_class
Definition: libsmbclient.c:361
static av_cold int libsmbc_open(URLContext *h, const char *url, int flags)
Definition: libsmbclient.c:95

Definition at line 368 of file libsmbclient.c.