Mercurial > mplayer.hg
comparison stream/open.c @ 19271:64d82a45a05d
introduce new 'stream' directory for all stream layer related components and split them from libmpdemux
author | ben |
---|---|
date | Mon, 31 Jul 2006 17:39:17 +0000 |
parents | libmpdemux/open.c@6ac0b5f0d1ed |
children | ab8d6b6deb63 |
comparison
equal
deleted
inserted
replaced
19270:7d39b911f0bd | 19271:64d82a45a05d |
---|---|
1 | |
2 #include <ctype.h> | |
3 #include <stdio.h> | |
4 #include <stdlib.h> | |
5 #include <string.h> | |
6 #include <unistd.h> | |
7 #include <fcntl.h> | |
8 #include <string.h> | |
9 | |
10 #include "config.h" | |
11 #include "mp_msg.h" | |
12 #include "help_mp.h" | |
13 | |
14 #ifdef __FreeBSD__ | |
15 #include <sys/cdrio.h> | |
16 #endif | |
17 | |
18 #include "m_option.h" | |
19 #include "stream.h" | |
20 #include "demuxer.h" | |
21 #include "mf.h" | |
22 | |
23 | |
24 /// We keep these 2 for the gui atm, but they will be removed. | |
25 int vcd_track=0; | |
26 char* cdrom_device=NULL; | |
27 int dvd_chapter=1; | |
28 int dvd_last_chapter=0; | |
29 char* dvd_device=NULL; | |
30 int dvd_title=0; | |
31 | |
32 // Open a new stream (stdin/file/vcd/url) | |
33 | |
34 stream_t* open_stream(char* filename,char** options, int* file_format){ | |
35 // Check if playlist or unknown | |
36 if (*file_format != DEMUXER_TYPE_PLAYLIST){ | |
37 *file_format=DEMUXER_TYPE_UNKNOWN; | |
38 } | |
39 | |
40 if(!filename) { | |
41 mp_msg(MSGT_OPEN,MSGL_ERR,"NULL filename, report this bug\n"); | |
42 return NULL; | |
43 } | |
44 | |
45 //============ Open STDIN or plain FILE ============ | |
46 | |
47 return open_stream_full(filename,STREAM_READ,options,file_format); | |
48 } | |
49 |