diff options
author | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-21 13:14:52 +0000 |
---|---|---|
committer | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-21 13:14:52 +0000 |
commit | c9fdd6b63092f06294c887b80861866cdcc3f276 (patch) | |
tree | d4e029575918365550f068bf9db04d1d0431a4f5 /libmpdemux | |
parent | a43fe42a2ae0ead724b71803187ae7928201a22f (diff) | |
download | mpv-c9fdd6b63092f06294c887b80861866cdcc3f276.tar.bz2 mpv-c9fdd6b63092f06294c887b80861866cdcc3f276.tar.xz |
Support for retriving mp3 playlist from the network
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4784 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demuxer.h | 3 | ||||
-rw-r--r-- | libmpdemux/network.c | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h index 7542756053..f2bbb9b5bb 100644 --- a/libmpdemux/demuxer.h +++ b/libmpdemux/demuxer.h @@ -25,6 +25,9 @@ #define DEMUXER_TYPE_MAX 17 #define DEMUXER_TYPE_DEMUXERS (1<<16) +// A virtual demuxer type for the network code +#define DEMUXER_TYPE_PLAYLIST (2<<16) + #define DEMUXER_TIME_NONE 0 #define DEMUXER_TIME_PTS 1 diff --git a/libmpdemux/network.c b/libmpdemux/network.c index 727b06e419..407ff2f6c2 100644 --- a/libmpdemux/network.c +++ b/libmpdemux/network.c @@ -49,6 +49,10 @@ static struct { { "video/x-ms-wvx", DEMUXER_TYPE_ASF }, { "video/x-ms-wmv", DEMUXER_TYPE_ASF }, { "video/x-ms-wma", DEMUXER_TYPE_ASF }, + // Playlists + { "audio/x-scpls", DEMUXER_TYPE_PLAYLIST }, + { "audio/x-mpegurl", DEMUXER_TYPE_PLAYLIST }, + { "audio/x-pls", DEMUXER_TYPE_PLAYLIST } }; static struct { @@ -70,6 +74,8 @@ static struct { { "y4m", DEMUXER_TYPE_Y4M }, { "mp3", DEMUXER_TYPE_AUDIO }, { "wav", DEMUXER_TYPE_AUDIO }, + { "pls", DEMUXER_TYPE_PLAYLIST }, + { "m3u", DEMUXER_TYPE_PLAYLIST } }; streaming_ctrl_t * @@ -706,6 +712,7 @@ streaming_start(stream_t *stream, int *demuxer_type, URL_t *url) { case DEMUXER_TYPE_FILM: case DEMUXER_TYPE_ROQ: case DEMUXER_TYPE_AUDIO: + case DEMUXER_TYPE_PLAYLIST: case DEMUXER_TYPE_UNKNOWN: // Generic start, doesn't need to filter // the network stream, it's a raw stream @@ -713,6 +720,8 @@ streaming_start(stream_t *stream, int *demuxer_type, URL_t *url) { if( ret<0 ) { printf("nop_streaming_start failed\n"); } + if((*demuxer_type) == DEMUXER_TYPE_PLAYLIST) + stream->type = STREAMTYPE_PLAYLIST; break; default: printf("Unable to detect the streaming type\n"); |