FFmpeg
Classes | Macros | Typedefs | Enumerations
rtmpproto.c File Reference

RTMP protocol. More...

#include "libavcodec/bytestream.h"
#include "libavutil/avstring.h"
#include "libavutil/base64.h"
#include "libavutil/intfloat.h"
#include "libavutil/lfg.h"
#include "libavutil/md5.h"
#include "libavutil/opt.h"
#include "libavutil/random_seed.h"
#include "avformat.h"
#include "internal.h"
#include "network.h"
#include "flv.h"
#include "rtmp.h"
#include "rtmpcrypt.h"
#include "rtmppkt.h"
#include "url.h"

Classes

struct  TrackedMethod
 
struct  RTMPContext
 protocol handler context More...
 

Macros

#define APP_MAX_LENGTH   1024
 
#define PLAYPATH_MAX_LENGTH   512
 
#define TCURL_MAX_LENGTH   1024
 
#define FLASHVER_MAX_LENGTH   64
 
#define RTMP_PKTDATA_DEFAULT_SIZE   4096
 
#define RTMP_HEADER   11
 
#define PLAYER_KEY_OPEN_PART_LEN   30
 length of partial key used for first client digest signing
 
#define SERVER_KEY_OPEN_PART_LEN   36
 length of partial key used for first server digest signing
 
#define RTMP_CTRL_ABORT_MESSAGE   (2)
 
#define OFFSET(x)   offsetof(RTMPContext, x)
 
#define DEC   AV_OPT_FLAG_DECODING_PARAM
 
#define ENC   AV_OPT_FLAG_ENCODING_PARAM
 
#define RTMP_PROTOCOL(flavor)
 

Typedefs

typedef struct TrackedMethod TrackedMethod
 
typedef struct RTMPContext RTMPContext
 protocol handler context
 

Enumerations

enum  ClientState {
  STATE_START, STATE_HANDSHAKED, STATE_FCPUBLISH, STATE_PLAYING,
  STATE_SEEKING, STATE_PUBLISHING, STATE_RECEIVING, STATE_SENDING,
  STATE_STOPPED
}
 RTMP protocol handler state. More...
 

Detailed Description

RTMP protocol.

Macro Definition Documentation

§ RTMP_PROTOCOL

#define RTMP_PROTOCOL (   flavor)
Value:
static const AVClass flavor##_class = { \
.class_name = #flavor, \
.item_name = av_default_item_name, \
.option = rtmp_options, \
.version = LIBAVUTIL_VERSION_INT, \
}; \
\
const URLProtocol ff_##flavor##_protocol = { \
.name = #flavor, \
.url_open2 = rtmp_open, \
.url_read = rtmp_read, \
.url_read_seek = rtmp_seek, \
.url_read_pause = rtmp_pause, \
.url_write = rtmp_write, \
.url_close = rtmp_close, \
.priv_data_size = sizeof(RTMPContext), \
.flags = URL_PROTOCOL_FLAG_NETWORK, \
.priv_data_class= &flavor##_class, \
};
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
struct RTMPContext RTMPContext
protocol handler context
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
Definition: log.h:72
Definition: url.h:54
Describe the class of an AVClass context structure.
Definition: log.h:67

Enumeration Type Documentation

§ ClientState

RTMP protocol handler state.

Enumerator
STATE_START 

client has not done anything yet

STATE_HANDSHAKED 

client has performed handshake

STATE_FCPUBLISH 

client FCPublishing stream (for output)

STATE_PLAYING 

client has started receiving multimedia data from server

STATE_SEEKING 

client has started the seek operation. Back on STATE_PLAYING when the time comes

STATE_PUBLISHING 

client has started sending multimedia data to server (for output)

STATE_RECEIVING 

received a publish command (for input)

STATE_SENDING 

received a play command (for output)

STATE_STOPPED 

the broadcast has been stopped