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)
 

Variables

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

Macro Definition Documentation

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

Definition at line 180 of file libsmbclient.c.

Definition at line 181 of file libsmbclient.c.

Definition at line 182 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 38 of file libsmbclient.c.

Referenced by libsmbc_connect().

static av_cold int libsmbc_connect ( URLContext h)
static

Definition at line 47 of file libsmbclient.c.

Referenced by libsmbc_open().

static av_cold int libsmbc_close ( URLContext h)
static

Definition at line 77 of file libsmbclient.c.

Referenced by libsmbc_open().

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

Definition at line 91 of file libsmbclient.c.

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

Definition at line 132 of file libsmbclient.c.

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

Definition at line 154 of file libsmbclient.c.

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

Definition at line 167 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}
}

Definition at line 183 of file libsmbclient.c.

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

Definition at line 190 of file libsmbclient.c.

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,
.priv_data_size = sizeof(LIBSMBContext),
.priv_data_class = &libsmbclient_context_class,
}

Definition at line 197 of file libsmbclient.c.