comparison libmpdemux/network.c @ 4783:17f29765ea77

Support for retriving mp3 playlist from the network
author albeu
date Thu, 21 Feb 2002 13:14:52 +0000
parents 330462dd5569
children 9c06b312ced6
comparison
equal deleted inserted replaced
4782:4b728967bd77 4783:17f29765ea77
47 { "video/x-ms-asf", DEMUXER_TYPE_ASF }, 47 { "video/x-ms-asf", DEMUXER_TYPE_ASF },
48 { "video/x-ms-afs", DEMUXER_TYPE_ASF }, 48 { "video/x-ms-afs", DEMUXER_TYPE_ASF },
49 { "video/x-ms-wvx", DEMUXER_TYPE_ASF }, 49 { "video/x-ms-wvx", DEMUXER_TYPE_ASF },
50 { "video/x-ms-wmv", DEMUXER_TYPE_ASF }, 50 { "video/x-ms-wmv", DEMUXER_TYPE_ASF },
51 { "video/x-ms-wma", DEMUXER_TYPE_ASF }, 51 { "video/x-ms-wma", DEMUXER_TYPE_ASF },
52 // Playlists
53 { "audio/x-scpls", DEMUXER_TYPE_PLAYLIST },
54 { "audio/x-mpegurl", DEMUXER_TYPE_PLAYLIST },
55 { "audio/x-pls", DEMUXER_TYPE_PLAYLIST }
52 }; 56 };
53 57
54 static struct { 58 static struct {
55 char *extension; 59 char *extension;
56 int demuxer_type; 60 int demuxer_type;
68 { "viv", DEMUXER_TYPE_VIVO }, 72 { "viv", DEMUXER_TYPE_VIVO },
69 { "rm", DEMUXER_TYPE_REAL }, 73 { "rm", DEMUXER_TYPE_REAL },
70 { "y4m", DEMUXER_TYPE_Y4M }, 74 { "y4m", DEMUXER_TYPE_Y4M },
71 { "mp3", DEMUXER_TYPE_AUDIO }, 75 { "mp3", DEMUXER_TYPE_AUDIO },
72 { "wav", DEMUXER_TYPE_AUDIO }, 76 { "wav", DEMUXER_TYPE_AUDIO },
77 { "pls", DEMUXER_TYPE_PLAYLIST },
78 { "m3u", DEMUXER_TYPE_PLAYLIST }
73 }; 79 };
74 80
75 streaming_ctrl_t * 81 streaming_ctrl_t *
76 streaming_ctrl_new( ) { 82 streaming_ctrl_new( ) {
77 streaming_ctrl_t *streaming_ctrl; 83 streaming_ctrl_t *streaming_ctrl;
704 case DEMUXER_TYPE_REAL: 710 case DEMUXER_TYPE_REAL:
705 case DEMUXER_TYPE_Y4M: 711 case DEMUXER_TYPE_Y4M:
706 case DEMUXER_TYPE_FILM: 712 case DEMUXER_TYPE_FILM:
707 case DEMUXER_TYPE_ROQ: 713 case DEMUXER_TYPE_ROQ:
708 case DEMUXER_TYPE_AUDIO: 714 case DEMUXER_TYPE_AUDIO:
715 case DEMUXER_TYPE_PLAYLIST:
709 case DEMUXER_TYPE_UNKNOWN: 716 case DEMUXER_TYPE_UNKNOWN:
710 // Generic start, doesn't need to filter 717 // Generic start, doesn't need to filter
711 // the network stream, it's a raw stream 718 // the network stream, it's a raw stream
712 ret = nop_streaming_start( stream ); 719 ret = nop_streaming_start( stream );
713 if( ret<0 ) { 720 if( ret<0 ) {
714 printf("nop_streaming_start failed\n"); 721 printf("nop_streaming_start failed\n");
715 } 722 }
723 if((*demuxer_type) == DEMUXER_TYPE_PLAYLIST)
724 stream->type = STREAMTYPE_PLAYLIST;
716 break; 725 break;
717 default: 726 default:
718 printf("Unable to detect the streaming type\n"); 727 printf("Unable to detect the streaming type\n");
719 ret = -1; 728 ret = -1;
720 } 729 }