[MPlayer-cvslog] r23899 - trunk/stream/tv.c

voroshil subversion at mplayerhq.hu
Sun Jul 29 05:33:39 CEST 2007


Author: voroshil
Date: Sun Jul 29 05:33:39 2007
New Revision: 23899

Log:
Cosmetics: move two routines up
to avoid requirement of forward declarations.


Modified:
   trunk/stream/tv.c

Modified: trunk/stream/tv.c
==============================================================================
--- trunk/stream/tv.c	(original)
+++ trunk/stream/tv.c	Sun Jul 29 05:33:39 2007
@@ -505,6 +505,40 @@ done:    
 	return 1;
 }
 
+/* ================== STREAM_TV ===================== */
+
+tvi_handle_t *tv_begin(void)
+{
+    int i;
+    tvi_handle_t* h;
+    if(!strcmp(tv_param_driver,"help")){
+        mp_msg(MSGT_TV,MSGL_INFO,MSGTR_TV_AvailableDrivers);
+        for(i=0;tvi_driver_list[i];i++){
+	    mp_msg(MSGT_TV,MSGL_INFO," %s\t%s",tvi_driver_list[i]->short_name,tvi_driver_list[i]->name);
+	    if(tvi_driver_list[i]->comment)
+	        mp_msg(MSGT_TV,MSGL_INFO," (%s)",tvi_driver_list[i]->comment);
+	    mp_msg(MSGT_TV,MSGL_INFO,"\n");
+	}
+	return NULL;
+    }
+
+    for(i=0;tvi_driver_list[i];i++){
+        if (!strcmp(tvi_driver_list[i]->short_name, tv_param_driver)){
+            h=tvi_driver_list[i]->tvi_init(tv_param_device,tv_param_adevice);
+            if(!h) return NULL;
+
+            mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_DriverInfo, tvi_driver_list[i]->short_name,
+            tvi_driver_list[i]->name,
+            tvi_driver_list[i]->author,
+            tvi_driver_list[i]->comment?tvi_driver_list[i]->comment:"");
+            return h;
+        }
+    }
+    
+    mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_NoSuchDriver, tv_param_driver); 
+    return(NULL);
+}
+
 static demuxer_t* demux_open_tv(demuxer_t *demuxer)
 {
     tvi_handle_t *tvh;
@@ -663,40 +697,6 @@ static void demux_close_tv(demuxer_t *de
     demuxer->priv=NULL;
 }
 
-/* ================== STREAM_TV ===================== */
-
-tvi_handle_t *tv_begin(void)
-{
-    int i;
-    tvi_handle_t* h;
-    if(!strcmp(tv_param_driver,"help")){
-        mp_msg(MSGT_TV,MSGL_INFO,MSGTR_TV_AvailableDrivers);
-        for(i=0;tvi_driver_list[i];i++){
-	    mp_msg(MSGT_TV,MSGL_INFO," %s\t%s",tvi_driver_list[i]->short_name,tvi_driver_list[i]->name);
-	    if(tvi_driver_list[i]->comment)
-	        mp_msg(MSGT_TV,MSGL_INFO," (%s)",tvi_driver_list[i]->comment);
-	    mp_msg(MSGT_TV,MSGL_INFO,"\n");
-	}
-	return NULL;
-    }
-
-    for(i=0;tvi_driver_list[i];i++){
-        if (!strcmp(tvi_driver_list[i]->short_name, tv_param_driver)){
-            h=tvi_driver_list[i]->tvi_init(tv_param_device,tv_param_adevice);
-            if(!h) return NULL;
-
-            mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_DriverInfo, tvi_driver_list[i]->short_name,
-            tvi_driver_list[i]->name,
-            tvi_driver_list[i]->author,
-            tvi_driver_list[i]->comment?tvi_driver_list[i]->comment:"");
-            return h;
-        }
-    }
-    
-    mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_NoSuchDriver, tv_param_driver); 
-    return(NULL);
-}
-
 int tv_uninit(tvi_handle_t *tvh)
 {
     int res;



More information about the MPlayer-cvslog mailing list