diff options
author | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-05-18 16:14:06 +0000 |
---|---|---|
committer | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-05-18 16:14:06 +0000 |
commit | 4a83e5f2bd80b95f6acf9737462f0c3bce30423a (patch) | |
tree | b7f8797c8b6a142ab2d2f88114dc7afe944689c4 /asf_streaming.c | |
parent | 8a0a08e97f23930c62c4e13ef5c371508f5051fc (diff) | |
download | mpv-4a83e5f2bd80b95f6acf9737462f0c3bce30423a.tar.bz2 mpv-4a83e5f2bd80b95f6acf9737462f0c3bce30423a.tar.xz |
Starting implementation of ASF network streaming.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@834 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'asf_streaming.c')
-rw-r--r-- | asf_streaming.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/asf_streaming.c b/asf_streaming.c new file mode 100644 index 0000000000..e808a9d40f --- /dev/null +++ b/asf_streaming.c @@ -0,0 +1,54 @@ +#include "asf.h" + +#include <string.h> + +static ASF_StreamType_e stream_type; + +void asf_streaming(char *data, int length) { + ASF_stream_chunck_t *stream_chunck=(ASF_stream_chunck_t*)data; + printf("ASF stream chunck size=%d\n", stream_chunck->length); + + switch(stream_chunck->type) { + case 0x4324: // Clear ASF configuration + printf(" --> Clearing ASF stream configuration!\n"); + break; + case 0x4424: // Data follows + printf(" --> Data follows\n"); + break; + case 0x4524: // Transfer complete + printf(" --> Transfer complete\n"); + break; + case 0x4824: // ASF header chunk follows + printf(" --> ASF header chunk follows\n"); + break; + default: + printf("======> Unknown stream type %d\n", stream_chunck->type ); + } +} + +void asf_steam_type(char *content_type, char *features) { + stream_type = ASF_Unknown_e; + if( !strcasecmp(content_type, "application/octet-stream") ) { + if( strstr(features, "broadcast")) { + printf("-----> Live stream <-------\n"); + stream_type = ASF_Live_e; + } else { + printf("-----> Prerecorded <-------\n"); + stream_type = ASF_Prerecorded_e; + } + } else { + if( (!strcasecmp(content_type, "audio/x-ms-wax")) || + (!strcasecmp(content_type, "audio/x-ms-wma")) || + (!strcasecmp(content_type, "video/x-ms-asf")) || + (!strcasecmp(content_type, "video/x-ms-afs")) || + (!strcasecmp(content_type, "video/x-ms-wvx")) || + (!strcasecmp(content_type, "video/x-ms-wmv")) || + (!strcasecmp(content_type, "video/x-ms-wma")) ) { + printf("-----> Redirector <-------\n"); + stream_type = ASF_Redirector_e; + } else { + printf("-----> unknown content-type: %s\n", content_type ); + stream_type = ASF_Unknown_e; + } + } +} |