FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
mmsh.c File Reference
#include <string.h>
#include "libavutil/intreadwrite.h"
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "internal.h"
#include "mms.h"
#include "http.h"
#include "url.h"

Go to the source code of this file.

Data Structures

struct  MMSHContext
 

Macros

#define CHUNK_HEADER_LENGTH   4
 
#define EXT_HEADER_LENGTH   8
 
#define USERAGENT   "User-Agent: NSPlayer/4.1.0.3856\r\n"
 
#define CLIENTGUID   "Pragma: xClientGUID={c77e7400-738a-11d2-9add-0020af0a3278}\r\n"
 

Enumerations

enum  ChunkType {
  DISPLAY_INFO = 0xC8, TILE_DATA, CURSOR_POS, CURSOR_SHAPE,
  CHUNK_CC, CHUNK_CD, CHUNK_TYPE_DATA = 0x4424, CHUNK_TYPE_ASF_HEADER = 0x4824,
  CHUNK_TYPE_END = 0x4524, CHUNK_TYPE_STREAM_CHANGE = 0x4324
}
 

Functions

static int mmsh_close (URLContext *h)
 
static ChunkType get_chunk_header (MMSHContext *mmsh, int *len)
 
static int read_data_packet (MMSHContext *mmsh, const int len)
 
static int get_http_header_data (MMSHContext *mmsh)
 
static int mmsh_open_internal (URLContext *h, const char *uri, int flags, int timestamp, int64_t pos)
 
static int mmsh_open (URLContext *h, const char *uri, int flags)
 
static int handle_chunk_type (MMSHContext *mmsh)
 
static int mmsh_read (URLContext *h, uint8_t *buf, int size)
 
static int64_t mmsh_read_seek (URLContext *h, int stream_index, int64_t timestamp, int flags)
 
static int64_t mmsh_seek (URLContext *h, int64_t pos, int whence)
 

Variables

const URLProtocol ff_mmsh_protocol
 

Macro Definition Documentation

◆ CHUNK_HEADER_LENGTH

#define CHUNK_HEADER_LENGTH   4

Definition at line 37 of file mmsh.c.

◆ EXT_HEADER_LENGTH

#define EXT_HEADER_LENGTH   8

Definition at line 38 of file mmsh.c.

◆ USERAGENT

#define USERAGENT   "User-Agent: NSPlayer/4.1.0.3856\r\n"

Definition at line 41 of file mmsh.c.

◆ CLIENTGUID

#define CLIENTGUID   "Pragma: xClientGUID={c77e7400-738a-11d2-9add-0020af0a3278}\r\n"

Definition at line 44 of file mmsh.c.

Enumeration Type Documentation

◆ ChunkType

enum ChunkType
Enumerator
DISPLAY_INFO 
TILE_DATA 
CURSOR_POS 
CURSOR_SHAPE 
CHUNK_CC 
CHUNK_CD 
CHUNK_TYPE_DATA 
CHUNK_TYPE_ASF_HEADER 
CHUNK_TYPE_END 
CHUNK_TYPE_STREAM_CHANGE 

Definition at line 49 of file mmsh.c.

Function Documentation

◆ mmsh_close()

static int mmsh_close ( URLContext h)
static

Definition at line 63 of file mmsh.c.

Referenced by mmsh_open_internal(), and mmsh_read_seek().

◆ get_chunk_header()

static ChunkType get_chunk_header ( MMSHContext mmsh,
int len 
)
static

Definition at line 73 of file mmsh.c.

Referenced by get_http_header_data(), and handle_chunk_type().

◆ read_data_packet()

static int read_data_packet ( MMSHContext mmsh,
const int  len 
)
static

Definition at line 114 of file mmsh.c.

Referenced by get_http_header_data(), and handle_chunk_type().

◆ get_http_header_data()

static int get_http_header_data ( MMSHContext mmsh)
static

Definition at line 142 of file mmsh.c.

Referenced by handle_chunk_type(), and mmsh_open_internal().

◆ mmsh_open_internal()

static int mmsh_open_internal ( URLContext h,
const char *  uri,
int  flags,
int  timestamp,
int64_t  pos 
)
static

Definition at line 212 of file mmsh.c.

Referenced by mmsh_open(), and mmsh_read_seek().

◆ mmsh_open()

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

Definition at line 323 of file mmsh.c.

◆ handle_chunk_type()

static int handle_chunk_type ( MMSHContext mmsh)
static

Definition at line 328 of file mmsh.c.

Referenced by mmsh_read().

◆ mmsh_read()

static int mmsh_read ( URLContext h,
uint8_t *  buf,
int  size 
)
static

Definition at line 356 of file mmsh.c.

◆ mmsh_read_seek()

static int64_t mmsh_read_seek ( URLContext h,
int  stream_index,
int64_t  timestamp,
int  flags 
)
static

Definition at line 374 of file mmsh.c.

◆ mmsh_seek()

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

Definition at line 400 of file mmsh.c.

Variable Documentation

◆ ff_mmsh_protocol

const URLProtocol ff_mmsh_protocol
Initial value:
= {
.name = "mmsh",
.url_open = mmsh_open,
.url_read = mmsh_read,
.url_seek = mmsh_seek,
.url_close = mmsh_close,
.url_read_seek = mmsh_read_seek,
.priv_data_size = sizeof(MMSHContext),
.default_whitelist = "http,tcp",
}

Definition at line 410 of file mmsh.c.

URL_PROTOCOL_FLAG_NETWORK
#define URL_PROTOCOL_FLAG_NETWORK
Definition: url.h:33
mmsh_open
static int mmsh_open(URLContext *h, const char *uri, int flags)
Definition: mmsh.c:323
mmsh_seek
static int64_t mmsh_seek(URLContext *h, int64_t pos, int whence)
Definition: mmsh.c:400
mmsh_read_seek
static int64_t mmsh_read_seek(URLContext *h, int stream_index, int64_t timestamp, int flags)
Definition: mmsh.c:374
mmsh_close
static int mmsh_close(URLContext *h)
Definition: mmsh.c:63
MMSHContext
Definition: mmsh.c:56
mmsh_read
static int mmsh_read(URLContext *h, uint8_t *buf, int size)
Definition: mmsh.c:356
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561