fixes to mask, keyfrmpopup, listbox; update ver for build
[goodguy/history.git] / cinelerra-5.1 / cinelerra / filempeg.C
index c51cf4463fe5973a8545b286607a0cca1191fab8..c34cc731307ade5dbb526a1000bcdc875d4b24e3 100644 (file)
@@ -492,6 +492,7 @@ int FileMPEG::open_file(int rd, int wr)
                        {
                                const char *exec_path = File::get_cinlib_path();
                                sprintf(mjpeg_command, "%s/%s", exec_path, HVPEG_EXE);
+                               append_vcommand_line(mjpeg_command);
 
                                if(asset->aspect_ratio > 0)
                                {
@@ -515,7 +516,7 @@ int FileMPEG::open_file(int rd, int wr)
                                append_vcommand_line(asset->vmpeg_cmodel == BC_YUV422P ? "-422" : "");
                                if(asset->vmpeg_fix_bitrate)
                                {
-                                       append_vcommand_line("--cbr -b");
+                                       append_vcommand_line("-b");
                                        append_vcommand_line(bitrate_string);
                                }
                                else
@@ -2088,17 +2089,6 @@ void MPEGConfigVideo::update_cmodel_objs()
 }
 
 
-
-
-
-
-
-
-
-
-
-
-
 MPEGDerivative::MPEGDerivative(int x, int y, MPEGConfigVideo *gui)
  : BC_PopupMenu(x, y, 150, derivative_to_string(gui->asset->vmpeg_derivative))
 {
@@ -2119,42 +2109,21 @@ int MPEGDerivative::handle_event()
 
 int MPEGDerivative::string_to_derivative(char *string)
 {
-       if(!strcasecmp(derivative_to_string(1), string))
-               return 1;
-       if(!strcasecmp(derivative_to_string(2), string))
-               return 2;
-
+       if( !strcasecmp(derivative_to_string(1), string) ) return 1;
+       if( !strcasecmp(derivative_to_string(2), string) ) return 2;
        return 1;
 }
 
 char* MPEGDerivative::derivative_to_string(int derivative)
 {
-       switch(derivative)
-       {
-               case 1:
-                       return _("MPEG-1");
-                       break;
-
-               case 2:
-                       return _("MPEG-2");
-                       break;
-
-               default:
-                       return _("MPEG-1");
-                       break;
+       switch(derivative) {
+       case 1: return _("MPEG-1");
+       case 2: return _("MPEG-2");
        }
+       return _("MPEG-1");
 }
 
 
-
-
-
-
-
-
-
-
-
 MPEGPreset::MPEGPreset(int x, int y, MPEGConfigVideo *gui)
  : BC_PopupMenu(x, y, 200, value_to_string(gui->asset->vmpeg_preset))
 {
@@ -2163,8 +2132,7 @@ MPEGPreset::MPEGPreset(int x, int y, MPEGConfigVideo *gui)
 
 void MPEGPreset::create_objects()
 {
-       for(int i = 0; i < 10; i++)
-       {
+       for(int i = 0; i < 14; i++) {
                add_item(new BC_MenuItem(value_to_string(i)));
        }
 }
@@ -2177,8 +2145,7 @@ int MPEGPreset::handle_event()
 
 int MPEGPreset::string_to_value(char *string)
 {
-       for(int i = 0; i < 10; i++)
-       {
+       for(int i = 0; i < 14; i++) {
                if(!strcasecmp(value_to_string(i), string))
                        return i;
        }
@@ -2187,20 +2154,23 @@ int MPEGPreset::string_to_value(char *string)
 
 char* MPEGPreset::value_to_string(int derivative)
 {
-       switch(derivative)
-       {
-               case 0: return _("Generic MPEG-1"); break;
-               case 1: return _("standard VCD"); break;
-               case 2: return _("user VCD"); break;
-               case 3: return _("Generic MPEG-2"); break;
-               case 4: return _("standard SVCD"); break;
-               case 5: return _("user SVCD"); break;
-               case 6: return _("VCD Still sequence"); break;
-               case 7: return _("SVCD Still sequence"); break;
-               case 8: return _("DVD NAV"); break;
-               case 9: return _("DVD"); break;
-               default: return _("Generic MPEG-1"); break;
+       switch( derivative ) {
+       case 0: return _("Generic MPEG-1"); break;
+       case 1: return _("standard VCD"); break;
+       case 2: return _("user VCD"); break;
+       case 3: return _("Generic MPEG-2"); break;
+       case 4: return _("standard SVCD"); break;
+       case 5: return _("user SVCD"); break;
+       case 6: return _("VCD Still sequence"); break;
+       case 7: return _("SVCD Still sequence"); break;
+       case 8: return _("DVD NAV"); break;
+       case 9: return _("DVD"); break;
+       case 10: return _("ATSC 480i"); break;
+       case 11: return _("ATSC 480p"); break;
+       case 12: return _("ATSC 720p"); break;
+       case 13: return _("ATSC 1080i"); break;
        }
+       return _("Generic MPEG-1");
 }