FFmpeg
Data Structures | Macros | Functions | Variables
libamqp.c File Reference
#include <amqp.h>
#include <amqp_tcp_socket.h>
#include <sys/time.h>
#include "avformat.h"
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "network.h"
#include "url.h"
#include "urldecode.h"

Go to the source code of this file.

Data Structures

struct  AMQPContext
 

Macros

#define STR_LEN   1024
 
#define DEFAULT_CHANNEL   1
 
#define OFFSET(x)   offsetof(AMQPContext, x)
 
#define D   AV_OPT_FLAG_DECODING_PARAM
 
#define E   AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static int amqp_proto_open (URLContext *h, const char *uri, int flags)
 
static int amqp_proto_write (URLContext *h, const unsigned char *buf, int size)
 
static int amqp_proto_read (URLContext *h, unsigned char *buf, int size)
 
static int amqp_proto_close (URLContext *h)
 

Variables

static const AVOption options []
 
static const AVClass amqp_context_class
 
const URLProtocol ff_libamqp_protocol
 

Macro Definition Documentation

#define STR_LEN   1024

Definition at line 45 of file libamqp.c.

Referenced by amqp_proto_open().

#define DEFAULT_CHANNEL   1

Definition at line 46 of file libamqp.c.

Referenced by amqp_proto_close(), amqp_proto_open(), and amqp_proto_write().

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

Definition at line 48 of file libamqp.c.

Definition at line 49 of file libamqp.c.

Definition at line 50 of file libamqp.c.

Function Documentation

static int amqp_proto_open ( URLContext h,
const char *  uri,
int  flags 
)
static

Definition at line 62 of file libamqp.c.

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

Definition at line 235 of file libamqp.c.

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

Definition at line 264 of file libamqp.c.

static int amqp_proto_close ( URLContext h)
static

Definition at line 297 of file libamqp.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "pkt_size", "Maximum send/read packet size", OFFSET(pkt_size), AV_OPT_TYPE_INT, { .i64 = 131072 }, 4096, INT_MAX, .flags = D | E },
{ "exchange", "Exchange to send/read packets", OFFSET(exchange), AV_OPT_TYPE_STRING, { .str = "amq.direct" }, 0, 0, .flags = D | E },
{ "routing_key", "Key to filter streams", OFFSET(routing_key), AV_OPT_TYPE_STRING, { .str = "amqp" }, 0, 0, .flags = D | E },
{ "connection_timeout", "Initial connection timeout", OFFSET(connection_timeout), AV_OPT_TYPE_DURATION, { .i64 = -1 }, -1, INT64_MAX, .flags = D | E},
{ "delivery_mode", "Delivery mode", OFFSET(delivery_mode), AV_OPT_TYPE_INT, { .i64 = AMQP_DELIVERY_PERSISTENT }, 1, 2, .flags = E, "delivery_mode"},
{ "persistent", "Persistent delivery mode", 0, AV_OPT_TYPE_CONST, { .i64 = AMQP_DELIVERY_PERSISTENT }, 0, 0, E, "delivery_mode" },
{ "non-persistent", "Non-persistent delivery mode", 0, AV_OPT_TYPE_CONST, { .i64 = AMQP_DELIVERY_NONPERSISTENT }, 0, 0, E, "delivery_mode" },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define E
Definition: libamqp.c:50
#define OFFSET(x)
Definition: libamqp.c:48
#define D
Definition: libamqp.c:49
static int exchange(MqcState *mqc, uint8_t *cxstate, int lps)
Definition: mqcdec.c:45

Definition at line 51 of file libamqp.c.

const AVClass amqp_context_class
static
Initial value:
= {
.class_name = "amqp",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
static const AVOption options[]
Definition: libamqp.c:51

Definition at line 307 of file libamqp.c.

const URLProtocol ff_libamqp_protocol
Initial value:
= {
.name = "amqp",
.url_close = amqp_proto_close,
.url_open = amqp_proto_open,
.url_read = amqp_proto_read,
.url_write = amqp_proto_write,
.priv_data_size = sizeof(AMQPContext),
.priv_data_class = &amqp_context_class,
}
static int amqp_proto_write(URLContext *h, const unsigned char *buf, int size)
Definition: libamqp.c:235
#define URL_PROTOCOL_FLAG_NETWORK
Definition: url.h:34
static int amqp_proto_read(URLContext *h, unsigned char *buf, int size)
Definition: libamqp.c:264
static const AVClass amqp_context_class
Definition: libamqp.c:307
static int amqp_proto_open(URLContext *h, const char *uri, int flags)
Definition: libamqp.c:62
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static int amqp_proto_close(URLContext *h)
Definition: libamqp.c:297

Definition at line 314 of file libamqp.c.