[MPlayer-dev-eng] [PATCH] Support for QNX: QSA audio and Photon GUI.

Diego Biurrun diego at biurrun.de
Thu Feb 7 23:14:17 CET 2013


On Thu, Feb 07, 2013 at 04:21:39PM +0200, Mike Gorchak wrote:
> 
> typedef struct _qsa_fallback_format {
>     int qsa_format;
>     int mp_format;
>     int qsa_fallback_format;
> } qsa_fallback_format_t;
> 
> typedef struct _qsa_fallback_rate {
>     int qsa_rate;
>     int qsa_fallback_rate;
> } qsa_fallback_rate_t;

You continue invading POSIX namespace.

> static int qsa_to_mp_format(int qsa_format)
> {
>     int it = 0;
> 
>     do {
>         if ((fallback_formats[it].qsa_format == 0) && (fallback_formats[it].mp_format == 0)) {
>             break;
>         }

We generally avoid pointless {} like these ..

> static void flip_page(void)
> {
>     switch (phrender_type) {
>     case PHRENDER_USE_OFFSCREEN:
>     case PHRENDER_USE_SWOFFSCREEN:
>     {
>         PtDamageWidget(phrawcontainer);
>         PtFlush();
>     }
>     break;
>     case PHRENDER_USE_LAYER:
>     {
>         if (ph_image_current == 0) {
>             ph_image_current = 1;
>         } else {
>             ph_image_current = 0;
>         }
>         photon_configure_layer();
>         PtDamageWidget(phrawcontainer);
>         PtFlush();
>         if (vo_vsync) {
>             PgWaitVSync();
>         }
>     }

.. or like these inside the case block.

> typedef struct _layer_mp_map {
>     unsigned int layer_id;
>     unsigned int mp_id;
>     unsigned int format_idx;
>     unsigned int found;
>     unsigned int layer_idx;
>     unsigned int layer_caps;
>     unsigned int layer_chroma_caps;
> } layer_mp_map_t;

more namespace pollution

Diego


More information about the MPlayer-dev-eng mailing list