mirror of
https://github.com/mpv-player/mpv
synced 2025-01-21 23:23:19 +00:00
Use new config headers
Remove STREAMTYPE_PLAYLIST. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9750 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2f0fdb59c0
commit
c5c742302c
@ -11,6 +11,7 @@
|
||||
#include "asf.h"
|
||||
|
||||
#include "stream.h"
|
||||
#include "demuxer.h"
|
||||
|
||||
#include "network.h"
|
||||
|
||||
@ -24,7 +25,7 @@
|
||||
extern int verbose;
|
||||
|
||||
|
||||
int asf_http_streaming_start( stream_t *stream );
|
||||
int asf_http_streaming_start( stream_t *stream, int *demuxer_type );
|
||||
int asf_mmst_streaming_start( stream_t *stream );
|
||||
|
||||
|
||||
@ -47,7 +48,7 @@ int asf_mmst_streaming_start( stream_t *stream );
|
||||
// In MPlayer case since HTTP support is more reliable,
|
||||
// we are doing HTTP first then we try MMST if HTTP fail.
|
||||
int
|
||||
asf_streaming_start( stream_t *stream ) {
|
||||
asf_streaming_start( stream_t *stream, int *demuxer_type) {
|
||||
char proto_s[10];
|
||||
int fd = -1;
|
||||
|
||||
@ -58,7 +59,7 @@ asf_streaming_start( stream_t *stream ) {
|
||||
!strncasecmp( proto_s, "http_proxy", 10)
|
||||
) {
|
||||
mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/HTTP...\n");
|
||||
fd = asf_http_streaming_start( stream );
|
||||
fd = asf_http_streaming_start( stream, demuxer_type );
|
||||
if( fd>-1 ) return fd;
|
||||
mp_msg(MSGT_NETWORK,MSGL_V," ===> ASF/HTTP failed\n");
|
||||
if( fd==-2 ) return -1;
|
||||
@ -619,7 +620,7 @@ asf_http_parse_response(asf_http_streaming_ctrl_t *asf_http_ctrl, HTTP_header_t
|
||||
}
|
||||
|
||||
int
|
||||
asf_http_streaming_start( stream_t *stream ) {
|
||||
asf_http_streaming_start( stream_t *stream, int *demuxer_type ) {
|
||||
HTTP_header_t *http_hdr=NULL;
|
||||
URL_t *url = stream->streaming_ctrl->url;
|
||||
asf_http_streaming_ctrl_t *asf_http_ctrl;
|
||||
@ -717,7 +718,7 @@ asf_http_streaming_start( stream_t *stream ) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
stream->type = STREAMTYPE_PLAYLIST;
|
||||
*demuxer_type = DEMUXER_TYPE_PLAYLIST;
|
||||
done = 1;
|
||||
break;
|
||||
case ASF_Authenticate_e:
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "stream.h"
|
||||
#include "demuxer.h"
|
||||
#include "../cfgparser.h"
|
||||
#include "../m_config.h"
|
||||
|
||||
#include "network.h"
|
||||
#include "http.h"
|
||||
@ -36,7 +36,7 @@ extern int stream_cache_size;
|
||||
|
||||
extern int mp_input_check_interrupt(int time);
|
||||
|
||||
int asf_streaming_start( stream_t *stream );
|
||||
int asf_streaming_start( stream_t *stream, int *demuxer_type );
|
||||
int rtsp_streaming_start( stream_t *stream );
|
||||
|
||||
/* Variables for the command line option -user, -passwd & -bandwidth */
|
||||
@ -1006,7 +1006,9 @@ streaming_start(stream_t *stream, int *demuxer_type, URL_t *url) {
|
||||
// Send the appropriate HTTP request
|
||||
// Need to filter the network stream.
|
||||
// ASF raw stream is encapsulated.
|
||||
ret = asf_streaming_start( stream );
|
||||
// It can also be a playlist (redirector)
|
||||
// so we need to pass demuxer_type too
|
||||
ret = asf_streaming_start( stream, demuxer_type );
|
||||
if( ret<0 ) {
|
||||
mp_msg(MSGT_NETWORK,MSGL_ERR,"asf_streaming_start failed\n");
|
||||
}
|
||||
@ -1040,8 +1042,6 @@ streaming_start(stream_t *stream, int *demuxer_type, URL_t *url) {
|
||||
if( ret<0 ) {
|
||||
mp_msg(MSGT_NETWORK,MSGL_ERR,"nop_streaming_start failed\n");
|
||||
}
|
||||
if((*demuxer_type) == DEMUXER_TYPE_PLAYLIST)
|
||||
stream->type = STREAMTYPE_PLAYLIST;
|
||||
break;
|
||||
default:
|
||||
mp_msg(MSGT_NETWORK,MSGL_ERR,"Unable to detect the streaming type\n");
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include "cfgparser.h"
|
||||
#include "m_config.h"
|
||||
#include "playtree.h"
|
||||
#include "playtreeparser.h"
|
||||
#include "libmpdemux/stream.h"
|
||||
@ -456,7 +456,6 @@ parse_playtree(stream_t *stream, int forced) {
|
||||
|
||||
#ifdef MP_DEBUG
|
||||
assert(stream != NULL);
|
||||
// assert(stream->type == STREAMTYPE_PLAYLIST);
|
||||
#endif
|
||||
|
||||
p = play_tree_parser_new(stream,0);
|
||||
@ -517,24 +516,18 @@ play_tree_t*
|
||||
parse_playlist_file(char* file) {
|
||||
stream_t *stream;
|
||||
play_tree_t* ret;
|
||||
int fd;
|
||||
int f;
|
||||
|
||||
if(!strcmp(file,"-"))
|
||||
fd = 0;
|
||||
else
|
||||
fd = open(file,O_RDONLY);
|
||||
stream = open_stream(file,0,&f);
|
||||
|
||||
if(fd < 0) {
|
||||
if(!stream) {
|
||||
mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Error while opening playlist file %s : %s\n",file,strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
mp_msg(MSGT_PLAYTREE,MSGL_V,"Parsing playlist file %s...\n",file);
|
||||
|
||||
stream = new_stream(fd,STREAMTYPE_PLAYLIST);
|
||||
ret = parse_playtree(stream,1);
|
||||
if(close(fd) < 0)
|
||||
mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Warning error while closing playlist file %s : %s\n",file,strerror(errno));
|
||||
free_stream(stream);
|
||||
|
||||
play_tree_add_bpf(ret, file);
|
||||
|
Loading…
Reference in New Issue
Block a user