Add explanatory comments to the #endif part of multiple inclusion guards.
[mplayer/greg.git] / stream / open.c
blob0ec0222c32abd24dfc6168fd55c3e9228bd7a707
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>
10 #include "config.h"
11 #include "mp_msg.h"
12 #include "help_mp.h"
14 #ifdef __FreeBSD__
15 #include <sys/cdrio.h>
16 #endif
18 #include "m_option.h"
19 #include "stream.h"
20 #include "libmpdemux/demuxer.h"
23 /// We keep these 2 for the gui atm, but they will be removed.
24 int vcd_track=0;
25 char* cdrom_device=NULL;
26 int dvd_chapter=1;
27 int dvd_last_chapter=0;
28 char* dvd_device=NULL;
29 int dvd_title=0;
31 // Open a new stream (stdin/file/vcd/url)
33 stream_t* open_stream(char* filename,char** options, int* file_format){
34 // Check if playlist or unknown
35 if (*file_format != DEMUXER_TYPE_PLAYLIST){
36 *file_format=DEMUXER_TYPE_UNKNOWN;
39 if(!filename) {
40 mp_msg(MSGT_OPEN,MSGL_ERR,"NULL filename, report this bug\n");
41 return NULL;
44 //============ Open STDIN or plain FILE ============
46 return open_stream_full(filename,STREAM_READ,options,file_format);