changeset 31201:203789464176

misc cosmetics: K&R style nits, #include placement, indentation
author diego
date Sat, 29 May 2010 10:13:39 +0000
parents 01540ca7037d
children b0618e2021e9
files av_opts.c libvo/video_out.h mplayer.c stream/stream_radio.c
diffstat 4 files changed, 77 insertions(+), 73 deletions(-) [+]
line wrap: on
line diff
--- a/av_opts.c	Sat May 29 10:11:55 2010 +0000
+++ b/av_opts.c	Sat May 29 10:13:39 2010 +0000
@@ -21,8 +21,9 @@
 
 #include <stdlib.h>
 #include <string.h>
+
+#include "av_opts.h"
 #include "libavcodec/opt.h"
-#include "av_opts.h"
 
 int parse_avopts(void *v, char *str){
     char *start;
--- a/libvo/video_out.h	Sat May 29 10:11:55 2010 +0000
+++ b/libvo/video_out.h	Sat May 29 10:13:39 2010 +0000
@@ -114,82 +114,81 @@
 
 typedef struct vo_info_s
 {
-        /* driver name ("Matrox Millennium G200/G400" */
-        const char *name;
-        /* short name (for config strings) ("mga") */
-        const char *short_name;
-        /* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */
-        const char *author;
-        /* any additional comments */
-        const char *comment;
+    /* driver name ("Matrox Millennium G200/G400" */
+    const char *name;
+    /* short name (for config strings) ("mga") */
+    const char *short_name;
+    /* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */
+    const char *author;
+    /* any additional comments */
+    const char *comment;
 } vo_info_t;
 
 typedef struct vo_functions_s
 {
-	const vo_info_t *info;
-	/*
-	 * Preinitializes driver (real INITIALIZATION)
-	 *   arg - currently it's vo_subdevice
-	 *   returns: zero on successful initialization, non-zero on error.
-	 */
-	int (*preinit)(const char *arg);
-        /*
-         * Initialize (means CONFIGURE) the display driver.
-	 * params:
-         *   width,height: image source size
-	 *   d_width,d_height: size of the requested window size, just a hint
-	 *   fullscreen: flag, 0=windowd 1=fullscreen, just a hint
-	 *   title: window title, if available
-	 *   format: fourcc of pixel format
-         * returns : zero on successful initialization, non-zero on error.
-         */
-        int (*config)(uint32_t width, uint32_t height, uint32_t d_width,
-			 uint32_t d_height, uint32_t fullscreen, char *title,
-			 uint32_t format);
+    const vo_info_t *info;
+    /*
+     * Preinitializes driver (real INITIALIZATION)
+     *   arg - currently it's vo_subdevice
+     *   returns: zero on successful initialization, non-zero on error.
+     */
+    int (*preinit)(const char *arg);
+    /*
+     * Initialize (means CONFIGURE) the display driver.
+     * params:
+     *   width,height: image source size
+     *   d_width,d_height: size of the requested window size, just a hint
+     *   fullscreen: flag, 0=windowd 1=fullscreen, just a hint
+     *   title: window title, if available
+     *   format: fourcc of pixel format
+     * returns : zero on successful initialization, non-zero on error.
+     */
+    int (*config)(uint32_t width, uint32_t height, uint32_t d_width,
+                  uint32_t d_height, uint32_t fullscreen, char *title,
+                  uint32_t format);
 
-	/*
-	 * Control interface
-	 */
-	int (*control)(uint32_t request, void *data, ...);
+    /*
+     * Control interface
+     */
+    int (*control)(uint32_t request, void *data, ...);
 
-        /*
-         * Display a new RGB/BGR frame of the video to the screen.
-         * params:
-	 *   src[0] - pointer to the image
-         */
-        int (*draw_frame)(uint8_t *src[]);
+    /*
+     * Display a new RGB/BGR frame of the video to the screen.
+     * params:
+     *   src[0] - pointer to the image
+     */
+    int (*draw_frame)(uint8_t *src[]);
 
-        /*
-         * Draw a planar YUV slice to the buffer:
-	 * params:
-	 *   src[3] = source image planes (Y,U,V)
-         *   stride[3] = source image planes line widths (in bytes)
-	 *   w,h = width*height of area to be copied (in Y pixels)
-         *   x,y = position at the destination image (in Y pixels)
-         */
-        int (*draw_slice)(uint8_t *src[], int stride[], int w,int h, int x,int y);
+    /*
+     * Draw a planar YUV slice to the buffer:
+     * params:
+     *   src[3] = source image planes (Y,U,V)
+     *   stride[3] = source image planes line widths (in bytes)
+     *   w,h = width*height of area to be copied (in Y pixels)
+     *   x,y = position at the destination image (in Y pixels)
+     */
+    int (*draw_slice)(uint8_t *src[], int stride[], int w,int h, int x,int y);
 
-   	/*
-         * Draws OSD to the screen buffer
-         */
-        void (*draw_osd)(void);
+    /*
+     * Draws OSD to the screen buffer
+     */
+    void (*draw_osd)(void);
 
-        /*
-         * Blit/Flip buffer to the screen. Must be called after each frame!
-         */
-        void (*flip_page)(void);
+    /*
+     * Blit/Flip buffer to the screen. Must be called after each frame!
+     */
+    void (*flip_page)(void);
 
-        /*
-         * This func is called after every frames to handle keyboard and
-	 * other events. It's called in PAUSE mode too!
-         */
-        void (*check_events)(void);
+    /*
+     * This func is called after every frames to handle keyboard and
+     * other events. It's called in PAUSE mode too!
+     */
+    void (*check_events)(void);
 
-        /*
-         * Closes driver. Should restore the original state of the system.
-         */
-        void (*uninit)(void);
-
+    /*
+     * Closes driver. Should restore the original state of the system.
+     */
+    void (*uninit)(void);
 } vo_functions_t;
 
 const vo_functions_t* init_best_video_out(char** vo_list);
--- a/mplayer.c	Sat May 29 10:11:55 2010 +0000
+++ b/mplayer.c	Sat May 29 10:13:39 2010 +0000
@@ -61,6 +61,8 @@
 #include "m_option.h"
 #include "m_config.h"
 #include "m_property.h"
+#include "mplayer.h"
+#include "access_mpcontext.h"
 
 #include "cfg-mplayer-def.h"
 
@@ -83,10 +85,8 @@
 #include "codec-cfg.h"
 
 #include "edl.h"
-#include "mplayer.h"
 #include "spudec.h"
 #include "vobsub.h"
-#include "access_mpcontext.h"
 
 #include "osdep/getch2.h"
 #include "osdep/timer.h"
@@ -1861,7 +1861,8 @@
     return time_frame;
 }
 
-static void select_subtitle(MPContext *mpctx) {
+static void select_subtitle(MPContext *mpctx)
+{
   // find the best sub to use
   int vobsub_index_id = vobsub_get_index_by_id(vo_vobsub, vobsub_id);
   mpctx->global_sub_pos = -1; // no subs by default
@@ -2349,9 +2350,12 @@
 #ifdef CONFIG_DVDNAV
 	/// wait, still frame or EOF
 	if (mpctx->stream->type == STREAMTYPE_DVDNAV && in_size < 0) {
-	    if (mp_dvdnav_is_eof(mpctx->stream)) return -1;
-	    if (mpctx->d_video) mpctx->d_video->eof = 0;
-	    if (mpctx->d_audio) mpctx->d_audio->eof = 0;
+	    if (mp_dvdnav_is_eof(mpctx->stream))
+                return -1;
+	    if (mpctx->d_video)
+                mpctx->d_video->eof = 0;
+	    if (mpctx->d_audio)
+                mpctx->d_audio->eof = 0;
 	    mpctx->stream->eof = 0;
 	} else
 #endif
--- a/stream/stream_radio.c	Sat May 29 10:11:55 2010 +0000
+++ b/stream/stream_radio.c	Sat May 29 10:13:39 2010 +0000
@@ -1059,7 +1059,7 @@
  * \brief fills given buffer with audio data
  * \return number of bytes, written into buffer
  */
-static int fill_buffer_s(struct stream *s, char* buffer, int max_len){
+static int fill_buffer_s(struct stream *s, char *buffer, int max_len){
     int len=max_len;
 
 #ifdef CONFIG_RADIO_CAPTURE