[MPlayer-cvslog] r31263 - in trunk: av_opts.c libvo/video_out.h mplayer.c stream/stream_radio.c
diego
subversion at mplayerhq.hu
Sat May 29 12:13:39 CEST 2010
Author: diego
Date: Sat May 29 12:13:39 2010
New Revision: 31263
Log:
misc cosmetics: K&R style nits, #include placement, indentation
Modified:
trunk/av_opts.c
trunk/libvo/video_out.h
trunk/mplayer.c
trunk/stream/stream_radio.c
Modified: trunk/av_opts.c
==============================================================================
--- trunk/av_opts.c Sat May 29 12:11:55 2010 (r31262)
+++ trunk/av_opts.c Sat May 29 12:13:39 2010 (r31263)
@@ -21,8 +21,9 @@
#include <stdlib.h>
#include <string.h>
-#include "libavcodec/opt.h"
+
#include "av_opts.h"
+#include "libavcodec/opt.h"
int parse_avopts(void *v, char *str){
char *start;
Modified: trunk/libvo/video_out.h
==============================================================================
--- trunk/libvo/video_out.h Sat May 29 12:11:55 2010 (r31262)
+++ trunk/libvo/video_out.h Sat May 29 12:13:39 2010 (r31263)
@@ -114,82 +114,81 @@ typedef struct {
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 at 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 at 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);
-
- /*
- * Control interface
- */
- int (*control)(uint32_t request, void *data, ...);
+ 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);
- /*
- * 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[]);
+ /*
+ * Control interface
+ */
+ int (*control)(uint32_t request, void *data, ...);
- /*
- * 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);
+ /*
+ * 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[]);
- /*
- * Draws OSD to the screen buffer
- */
- void (*draw_osd)(void);
+ /*
+ * 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);
- /*
- * Blit/Flip buffer to the screen. Must be called after each frame!
- */
- void (*flip_page)(void);
+ /*
+ * Draws OSD to the screen buffer
+ */
+ void (*draw_osd)(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);
+ /*
+ * Blit/Flip buffer to the screen. Must be called after each frame!
+ */
+ void (*flip_page)(void);
- /*
- * Closes driver. Should restore the original state of the system.
- */
- void (*uninit)(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);
} vo_functions_t;
const vo_functions_t* init_best_video_out(char** vo_list);
Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c Sat May 29 12:11:55 2010 (r31262)
+++ trunk/mplayer.c Sat May 29 12:13:39 2010 (r31263)
@@ -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 @@ static float timing_sleep(float time_fra
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 @@ static double update_video(int *blit_fra
#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
Modified: trunk/stream/stream_radio.c
==============================================================================
--- trunk/stream/stream_radio.c Sat May 29 12:11:55 2010 (r31262)
+++ trunk/stream/stream_radio.c Sat May 29 12:13:39 2010 (r31263)
@@ -1059,7 +1059,7 @@ char* radio_get_channel_name(struct stre
* \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
More information about the MPlayer-cvslog
mailing list