[Mplayer-cvslog] CVS: main/libmpdemux stream_null.c,NONE,1.1 Makefile,1.57,1.58 stream.c,1.62,1.63 open.c,1.78,1.79
Alban Bedel CVS
albeu at mplayerhq.hu
Thu Apr 10 12:59:23 CEST 2003
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv23057/libmpdemux
Modified Files:
Makefile stream.c open.c
Added Files:
stream_null.c
Log Message:
Add a null streamv Currently used for tv and mf. Could be used to
implement /dev/zero on system how don't have it.
--- NEW FILE ---
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include "stream.h"
#include "demuxer.h"
#ifdef USE_TV
extern char* tv_param_channel;
#endif
static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
stream->type = STREAMTYPE_DUMMY;
if(strncmp("mf://",stream->url,5) == 0) {
*file_format = DEMUXER_TYPE_MF;
}
#ifdef USE_TV
else if (strncmp("tv://",stream->url,5) == 0) {
*file_format = DEMUXER_TYPE_TV;
if(stream->url[5] != '\0')
tv_param_channel = strdup(stream->url + 5);
}
#endif
return 1;
}
stream_info_t stream_info_null = {
"Null stream",
"null",
"Albeu",
"",
open_s,
{
#ifdef USE_TV
"tv",
#endif
"mf", "null", NULL },
NULL,
0 // Urls are an option string
};
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/Makefile,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- Makefile 9 Apr 2003 07:31:11 -0000 1.57
+++ Makefile 10 Apr 2003 10:59:12 -0000 1.58
@@ -3,7 +3,7 @@
include ../config.mak
-SRCS = mp3_hdr.c video.c mpeg_hdr.c cache2.c asfheader.c aviheader.c aviprint.c muxer.c muxer_avi.c muxer_mpeg.c demux_asf.c demux_avi.c demux_mov.c parse_mp4.c demux_mpg.c demux_pva.c demux_viv.c demuxer.c dvdauth.c dvdnav_stream.c open.c parse_es.c stream.c stream_file.c stream_netstream.c stream_vcd.c tv.c tvi_dummy.c tvi_v4l.c tvi_bsdbt848.c frequencies.c demux_fli.c demux_real.c demux_y4m.c yuv4mpeg.c yuv4mpeg_ratio.c demux_nuv.c demux_film.c demux_roq.c mf.c demux_mf.c demux_audio.c demux_demuxers.c demux_ogg.c demux_bmp.c cdda.c demux_rawaudio.c demux_rawvideo.c cddb.c cdinfo.c demux_rawdv.c ai_alsa.c ai_oss.c audio_in.c demux_smjpeg.c cue_read.c extension.c demux_gif.c demux_ts.c
+SRCS = mp3_hdr.c video.c mpeg_hdr.c cache2.c asfheader.c aviheader.c aviprint.c muxer.c muxer_avi.c muxer_mpeg.c demux_asf.c demux_avi.c demux_mov.c parse_mp4.c demux_mpg.c demux_pva.c demux_viv.c demuxer.c dvdauth.c dvdnav_stream.c open.c parse_es.c stream.c stream_file.c stream_netstream.c stream_vcd.c stream_null.c tv.c tvi_dummy.c tvi_v4l.c tvi_bsdbt848.c frequencies.c demux_fli.c demux_real.c demux_y4m.c yuv4mpeg.c yuv4mpeg_ratio.c demux_nuv.c demux_film.c demux_roq.c mf.c demux_mf.c demux_audio.c demux_demuxers.c demux_ogg.c demux_bmp.c cdda.c demux_rawaudio.c demux_rawvideo.c cddb.c cdinfo.c demux_rawdv.c ai_alsa.c ai_oss.c audio_in.c demux_smjpeg.c cue_read.c extension.c demux_gif.c demux_ts.c
ifeq ($(XMMS_PLUGINS),yes)
SRCS += demux_xmms.c
endif
Index: stream.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stream.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- stream.c 9 Apr 2003 07:31:11 -0000 1.62
+++ stream.c 10 Apr 2003 10:59:12 -0000 1.63
@@ -50,6 +50,7 @@
#ifdef STREAMING
extern stream_info_t stream_info_netstream;
#endif
+extern stream_info_t stream_info_null;
extern stream_info_t stream_info_file;
stream_info_t* auto_open_streams[] = {
@@ -62,6 +63,7 @@
#ifdef STREAMING
&stream_info_netstream,
#endif
+ &stream_info_null,
&stream_info_file,
NULL
};
Index: open.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/open.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- open.c 9 Apr 2003 07:31:11 -0000 1.78
+++ open.c 10 Apr 2003 10:59:12 -0000 1.79
@@ -69,28 +69,14 @@
{ "unknown", "stereo", "unknown", "unknown", "unknown", "5.1" };
#endif
-extern int vcd_get_track_end(int fd,int track);
-
#include "cue_read.h"
-#ifdef USE_TV
-#include "tv.h"
-extern char* tv_param_channel;
-#endif
-
#ifdef HAS_DVBIN_SUPPORT
#include "dvbin.h"
#endif
-#ifdef HAVE_CDDA
-stream_t* open_cdda(char* dev,char* track);
-#ifdef STREAMING
-stream_t* cddb_open(char* dev,char* track);
-#endif
-#endif
-
// Define function about auth the libsmbclient library
// FIXME: I really do not not is this function is properly working
@@ -135,9 +121,6 @@
stream_t* stream=NULL;
int f=-1;
off_t len;
-#ifdef __FreeBSD__
-int bsize = VCD_SECTOR_SIZE;
-#endif
*file_format = DEMUXER_TYPE_UNKNOWN;
if(!filename) {
mp_msg(MSGT_OPEN,MSGL_ERR,"NULL filename, report this bug\n");
@@ -483,31 +466,6 @@
}
#endif
-
-
-
-//============ Check for TV-input or multi-file input ====
- if( (strncmp("mf://",filename,5) == 0)
-#ifdef USE_TV
- || (strncmp("tv://",filename,5) == 0)
-#endif
- ){
- /* create stream */
- stream = new_stream(-1, STREAMTYPE_DUMMY);
- if (!stream) return(NULL);
- if(strncmp("mf://",filename,5) == 0) {
- *file_format = DEMUXER_TYPE_MF;
-#ifdef USE_TV
- } else {
- *file_format = DEMUXER_TYPE_TV;
- if(filename[5] != '\0')
- tv_param_channel = strdup(filename + 5);
-#endif
- }
- stream->url= filename[5] != '\0' ? strdup(filename + 5) : NULL;
- return(stream);
- }
-
#ifdef STREAMING
#ifdef STREAMING_LIVE_DOT_COM
// Check for a SDP file:
More information about the MPlayer-cvslog
mailing list