From bce75509294618886bd71c4e3770578a8ba94a06 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 29 May 2010 10:13:39 +0000 Subject: misc cosmetics: K&R style nits, #include placement, indentation git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31263 b3059339-0415-0410-9bf9-f77b7e298cf2 --- av_opts.c | 3 +- libvo/video_out.h | 143 +++++++++++++++++++++++++------------------------- mplayer.c | 16 +++--- stream/stream_radio.c | 2 +- 4 files changed, 84 insertions(+), 80 deletions(-) diff --git a/av_opts.c b/av_opts.c index d4285d5bb1..04c35f1890 100644 --- a/av_opts.c +++ b/av_opts.c @@ -21,8 +21,9 @@ #include #include -#include "libavcodec/opt.h" + #include "av_opts.h" +#include "libavcodec/opt.h" int parse_avopts(void *v, char *str){ char *start; diff --git a/libvo/video_out.h b/libvo/video_out.h index 63f27ba0fb..5e64b0e2bc 100644 --- a/libvo/video_out.h +++ b/libvo/video_out.h @@ -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 ") */ - 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 ") */ + 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, ...); - - /* - * 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); - - /* - * 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); - - /* - * 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); - + 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, ...); + + /* + * 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); + + /* + * 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); + + /* + * 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); diff --git a/mplayer.c b/mplayer.c index fdb3b1c90b..98d36586ee 100644 --- a/mplayer.c +++ b/mplayer.c @@ -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_frame) 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_frame) #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 diff --git a/stream/stream_radio.c b/stream/stream_radio.c index 15d43ada57..21995a8724 100644 --- a/stream/stream_radio.c +++ b/stream/stream_radio.c @@ -1059,7 +1059,7 @@ char* radio_get_channel_name(struct stream *stream){ * \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 -- cgit v1.2.3