[MPlayer-cvslog] r24584 - in trunk: cfg-common.h configure libmpdemux/Makefile libmpdemux/demux_nemesi.c libmpdemux/demux_nemesi.h libmpdemux/demuxer.c stream/Makefile stream/stream_nemesi.c

Nico Sabbi Nicola.Sabbi at poste.it
Fri Sep 21 13:27:29 CEST 2007


lu_zero wrote:

>+
>+                //List of known audio formats
>+                if (!strcmp(format_name, "MPA"))
>+                    wf->wFormatTag =
>+                        sh_audio->format = 0x55;
>+                else if (!strcmp(format_name, "vorbis"))
>+                    wf->wFormatTag =
>+                        sh_audio->format = mmioFOURCC('v','r','b','s');
>+                else
>+                    mp_msg(MSGT_DEMUX, MSGL_WARN,
>+                           "Unknown MPlayer format code for MIME"
>+                           " type \"audio/%s\"\n", format_name);
>+            } else {
>+                mp_msg(MSGT_DEMUX, MSGL_ERR,
>+                       "There is already an audio session registered,"
>+                       " ignoring...\n");
>+            }
>+
>+                //List of known video formats
>+                if (!strcmp(format_name, "MPV")) {
>+                    bih->biCompression =
>+                        sh_video->format = mmioFOURCC('M','P','E','G');
>+                } else if (!strcmp(format_name, "H264")) {
>+                    bih->biCompression =
>+                        sh_video->format = mmioFOURCC('H','2','6','4');
>+                } else {
>+                    mp_msg(MSGT_DEMUX, MSGL_WARN,
>+                        "Unknown MPlayer format code for MIME"
>+                        " type \"video/%s\"\n", format_name);
>+                }
>+            } else {
>+                mp_msg(MSGT_DEMUX, MSGL_ERR,
>+                       "There is already a video session registered,"
>+                       " ignoring...\n");
>+            }
>+        } else {
>+            mp_msg(MSGT_DEMUX, MSGL_ERR, "Unsupported media type\n");
>+        }
>+    }
>+
>  
>

what about using a mapping table here? this series of if() will grow to 
+INF otherwise



More information about the MPlayer-cvslog mailing list