FFmpeg
|
#include "avformat.h"
#include "mms.h"
#include "avio_internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "libavcodec/bytestream.h"
#include "network.h"
#include "url.h"
Go to the source code of this file.
Data Structures | |
struct | MMSTContext |
Macros | |
#define | LOCAL_ADDRESS 0xc0a80081 |
#define | LOCAL_PORT 1037 |
Enumerations | |
enum | MMSCSPacketType { CS_PKT_INITIAL = 0x01, CS_PKT_PROTOCOL_SELECT = 0x02, CS_PKT_MEDIA_FILE_REQUEST = 0x05, CS_PKT_START_FROM_PKT_ID = 0x07, CS_PKT_STREAM_PAUSE = 0x09, CS_PKT_STREAM_CLOSE = 0x0d, CS_PKT_MEDIA_HEADER_REQUEST = 0x15, CS_PKT_TIMING_DATA_REQUEST = 0x18, CS_PKT_USER_PASSWORD = 0x1a, CS_PKT_KEEPALIVE = 0x1b, CS_PKT_STREAM_ID_REQUEST = 0x33 } |
Client to server packet types. More... | |
enum | MMSSCPacketType { SC_PKT_CLIENT_ACCEPTED = 0x01, SC_PKT_PROTOCOL_ACCEPTED = 0x02, SC_PKT_PROTOCOL_FAILED = 0x03, SC_PKT_MEDIA_PKT_FOLLOWS = 0x05, SC_PKT_MEDIA_FILE_DETAILS = 0x06, SC_PKT_HEADER_REQUEST_ACCEPTED = 0x11, SC_PKT_TIMING_TEST_REPLY = 0x15, SC_PKT_PASSWORD_REQUIRED = 0x1a, SC_PKT_KEEPALIVE = 0x1b, SC_PKT_STREAM_STOPPED = 0x1e, SC_PKT_STREAM_CHANGING = 0x20, SC_PKT_STREAM_ID_ACCEPTED = 0x21, SC_PKT_CANCEL = -1, SC_PKT_NO_DATA = -2, SC_PKT_ASF_HEADER = 0x010000, SC_PKT_ASF_MEDIA = 0x010001 } |
Server to client packet types. More... | |
Functions | |
static void | start_command_packet (MMSTContext *mmst, MMSCSPacketType packet_type) |
Create MMST command packet header. More... | |
static void | insert_command_prefixes (MMSContext *mms, uint32_t prefix1, uint32_t prefix2) |
Add prefixes to MMST command packet. More... | |
static int | send_command_packet (MMSTContext *mmst) |
Send a prepared MMST command packet. More... | |
static int | mms_put_utf16 (MMSContext *mms, const uint8_t *src) |
static int | send_time_test_data (MMSTContext *mmst) |
static int | send_protocol_select (MMSTContext *mmst) |
static int | send_media_file_request (MMSTContext *mmst) |
static void | handle_packet_stream_changing_type (MMSTContext *mmst) |
static int | send_keepalive_packet (MMSTContext *mmst) |
static void | pad_media_packet (MMSContext *mms) |
Pad media packets smaller than max_packet_size and/or adjust read position after a seek. More... | |
static MMSSCPacketType | get_tcp_server_response (MMSTContext *mmst) |
Read incoming MMST media, header or command packet. More... | |
static int | mms_safe_send_recv (MMSTContext *mmst, int(*send_fun)(MMSTContext *mmst), const MMSSCPacketType expect_type) |
static int | send_media_header_request (MMSTContext *mmst) |
static int | send_startup_packet (MMSTContext *mmst) |
Send the initial handshake. More... | |
static int | send_stream_selection_request (MMSTContext *mmst) |
Send MMST stream selection command based on the AVStream->discard values. More... | |
static int | send_close_packet (MMSTContext *mmst) |
static int | mms_close (URLContext *h) |
Close the MMSH/MMST connection. More... | |
static int | send_media_packet_request (MMSTContext *mmst) |
static void | clear_stream_buffers (MMSContext *mms) |
static int | mms_open (URLContext *h, const char *uri, int flags) |
static int | mms_read (URLContext *h, uint8_t *buf, int size) |
Read ASF data through the protocol. More... | |
Variables | |
const URLProtocol | ff_mmst_protocol |
enum MMSCSPacketType |
enum MMSSCPacketType |
Server to client packet types.
|
static |
Create MMST command packet header.
Definition at line 100 of file mmst.c.
Referenced by send_close_packet(), send_keepalive_packet(), send_media_file_request(), send_media_header_request(), send_media_packet_request(), send_protocol_select(), send_startup_packet(), send_stream_selection_request(), and send_time_test_data().
|
static |
Add prefixes to MMST command packet.
Definition at line 118 of file mmst.c.
Referenced by send_close_packet(), send_keepalive_packet(), send_media_file_request(), send_media_header_request(), send_media_packet_request(), send_protocol_select(), send_startup_packet(), and send_time_test_data().
|
static |
Send a prepared MMST command packet.
Definition at line 126 of file mmst.c.
Referenced by send_close_packet(), send_keepalive_packet(), send_media_file_request(), send_media_header_request(), send_media_packet_request(), send_protocol_select(), send_startup_packet(), send_stream_selection_request(), and send_time_test_data().
|
static |
Definition at line 155 of file mmst.c.
Referenced by send_media_file_request(), send_protocol_select(), and send_startup_packet().
|
static |
Definition at line 170 of file mmst.c.
Referenced by mms_open().
|
static |
Definition at line 177 of file mmst.c.
Referenced by mms_open().
|
static |
Definition at line 201 of file mmst.c.
Referenced by mms_open().
|
static |
Definition at line 215 of file mmst.c.
Referenced by get_tcp_server_response().
|
static |
Definition at line 225 of file mmst.c.
Referenced by get_tcp_server_response().
|
static |
Pad media packets smaller than max_packet_size and/or adjust read position after a seek.
Definition at line 235 of file mmst.c.
Referenced by get_tcp_server_response().
|
static |
Read incoming MMST media, header or command packet.
Definition at line 245 of file mmst.c.
Referenced by mms_safe_send_recv().
|
static |
Definition at line 379 of file mmst.c.
Referenced by mms_open(), and mms_read().
|
static |
Definition at line 402 of file mmst.c.
Referenced by mms_open().
|
static |
|
static |
Send MMST stream selection command based on the AVStream->discard values.
Definition at line 446 of file mmst.c.
Referenced by mms_open().
|
static |
Definition at line 461 of file mmst.c.
Referenced by mms_close().
|
static |
|
static |
Definition at line 486 of file mmst.c.
Referenced by mms_open().
|
static |
Definition at line 505 of file mmst.c.
Referenced by mms_open().
|
static |
|
static |
const URLProtocol ff_mmst_protocol |