[Mplayer-cvslog] CVS: main/libmpdemux open.c,1.56,1.57 stream.c,1.43,1.44 stream.h,1.49,1.50 tv.c,1.32,1.33
Arpi of Ize
arpi at mplayerhq.hu
Sun Sep 15 22:52:13 CEST 2002
- Previous message: [Mplayer-cvslog] CVS: main/libmpdemux demux_mf.c,1.8,1.9 mf.c,1.4,1.5 mf.h,1.2,1.3 open.c,1.55,1.56 stream.c,1.42,1.43 stream.h,1.48,1.49
- Next message: [Mplayer-cvslog] CVS: main/libmpcodecs/native cinepak.c,1.11,1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv26568
Modified Files:
open.c stream.c stream.h tv.c
Log Message:
stream layer cleanup part 2
STREAMTYPE_TV removed, use STREAMTYPE_DUMMY instead. tv init moved to demux_open
Index: open.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/open.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- open.c 15 Sep 2002 19:47:49 -0000 1.56
+++ open.c 15 Sep 2002 20:51:55 -0000 1.57
@@ -390,47 +390,16 @@
}
#endif
+//============ Check for TV-input or multi-file input ====
+ if( (mf_support == 1)
#ifdef USE_TV
-//============ Check for TV-input ====
- if (tv_param_on == 1)
- {
- tvi_handle_t *tv_handler;
-
- /* create stream */
- stream = new_stream(-1, STREAMTYPE_TV);
- if (!stream)
- return(NULL);
-
- /* create tvi handler */
- tv_handler = tv_begin();
- if (!tv_handler)
- return(NULL);
-
- /* preinit */
- if (!tv_init(tv_handler))
- goto tv_err;
-
- if (!stream_open_tv(stream, tv_handler))
- goto tv_err;
-
- stream->priv=tv_handler;
-
- return(stream);
-
- /* something went wrong - uninit */
-tv_err:
- tv_uninit(tv_handler);
- return(NULL);
- }
+ || (tv_param_on == 1)
#endif
-
-//============ Check for multi file-input ====
- if (mf_support == 1)
- {
+ ){
/* create stream */
stream = new_stream(-1, STREAMTYPE_DUMMY);
if (!stream) return(NULL);
- stream->url=strdup(filename);
+ stream->url=filename?strdup(filename):NULL;
return(stream);
}
Index: stream.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stream.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- stream.c 15 Sep 2002 19:47:49 -0000 1.43
+++ stream.c 15 Sep 2002 20:51:55 -0000 1.44
@@ -194,11 +194,8 @@
}
#endif
break;
-#ifdef USE_TV
- case STREAMTYPE_TV:
- s->pos=newpos; /* no sense */
- break;
-#endif
+ default:
+ return 0;
}
// putchar('.');fflush(stdout);
//} else {
Index: stream.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stream.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- stream.h 15 Sep 2002 19:47:49 -0000 1.49
+++ stream.h 15 Sep 2002 20:51:55 -0000 1.50
@@ -13,7 +13,6 @@
#define STREAMTYPE_STREAM 2 // same as FILE but no seeking (for net/stdin)
#define STREAMTYPE_DVD 3 // libdvdread
#define STREAMTYPE_MEMORY 4 // read data from memory area
-#define STREAMTYPE_TV 5 // FIXME!!! dummy
#define STREAMTYPE_PLAYLIST 6 // FIXME!!! same as STREAMTYPE_FILE now
#define STREAMTYPE_DS 8 // read from a demuxer stream
#define STREAMTYPE_DVDNAV 9 // we cannot safely "seek" in this...
Index: tv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tv.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- tv.c 8 Sep 2002 23:00:01 -0000 1.32
+++ tv.c 15 Sep 2002 20:51:55 -0000 1.33
@@ -75,7 +75,7 @@
int demux_tv_fill_buffer(demuxer_t *demux, demux_stream_t *ds)
{
- tvi_handle_t *tvh=(tvi_handle_t*)(demux->stream->priv);
+ tvi_handle_t *tvh=(tvi_handle_t*)(demux->priv);
demux_packet_t* dp;
sh_video_t *sh_video = demux->video->sh;
@@ -111,7 +111,7 @@
return 1;
}
-int stream_open_tv(stream_t *stream, tvi_handle_t *tvh)
+static int open_tv(tvi_handle_t *tvh)
{
int i;
tvi_functions_t *funcs = tvh->functions;
@@ -257,10 +257,19 @@
int demux_open_tv(demuxer_t *demuxer)
{
- tvi_handle_t *tvh=(tvi_handle_t*)(demuxer->stream->priv);
- sh_video_t *sh_video = NULL;
+ tvi_handle_t *tvh;
+ sh_video_t *sh_video;
sh_audio_t *sh_audio = NULL;
- tvi_functions_t *funcs = tvh->functions;
+ tvi_functions_t *funcs;
+
+ if(!(tvh=tv_begin())) return 0;
+ if (!tv_init(tvh)) return 0;
+ if (!open_tv(tvh)){
+ tv_uninit(tvh);
+ return 0;
+ }
+ funcs = tvh->functions;
+ demuxer->priv=tvh;
sh_video = new_sh_video(demuxer, 0);
@@ -387,7 +396,7 @@
#if defined(USE_TV) && defined(HAVE_TV_V4L)
int demux_close_tv(demuxer_t *demuxer)
{
- tvi_handle_t *tvh=(tvi_handle_t*)(demuxer->stream->priv);
+ tvi_handle_t *tvh=(tvi_handle_t*)(demuxer->priv);
return(tvh->functions->uninit(tvh->priv));
}
#endif
- Previous message: [Mplayer-cvslog] CVS: main/libmpdemux demux_mf.c,1.8,1.9 mf.c,1.4,1.5 mf.h,1.2,1.3 open.c,1.55,1.56 stream.c,1.42,1.43 stream.h,1.48,1.49
- Next message: [Mplayer-cvslog] CVS: main/libmpcodecs/native cinepak.c,1.11,1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list