a pastebin project

Something

  1. Index: macosx/Controller.mm
  2. ===================================================================
  3. --- macosx/Controller.mm        (revision 1269)
  4. +++ macosx/Controller.mm        (working copy)
  5. @@ -21,6 +21,7 @@
  6.  static int FormatSettings[4][10] =
  7.    { { HB_MUX_MP4 | HB_VCODEC_FFMPEG | HB_ACODEC_FAAC,
  8.           HB_MUX_MP4 | HB_VCODEC_X264   | HB_ACODEC_FAAC,
  9. +      HB_MUX_MP4 | HB_VCODEC_X264   | HB_ACODEC_FAAC,
  10.           0,
  11.           0 },
  12.      { HB_MUX_MKV | HB_VCODEC_FFMPEG | HB_ACODEC_FAAC,
  13. @@ -2248,6 +2249,8 @@
  14.              
  15.              [fDstCodecsPopUp addItemWithTitle:_( @"MPEG-4 Video / AAC Audio" )];
  16.              [fDstCodecsPopUp addItemWithTitle:_( @"AVC/H.264 Video / AAC Audio" )];
  17. +            /* We add a new codecs entry which will allow the new aac/ ac3 hybrid */
  18. +            [fDstCodecsPopUp addItemWithTitle:_( @"AVC/H.264 Video / AAC + AC3 Audio" )];
  19.                       /* We enable the create chapters checkbox here since we are .mp4*/
  20.                       [fCreateChapterMarkers setEnabled: YES];
  21.                       /* We show the Large File (64 bit formatting) checkbox since we are .mp4
  22. @@ -2827,7 +2830,17 @@
  23.      int format = [fDstFormatPopUp indexOfSelectedItem];
  24.      int codecs = [fDstCodecsPopUp indexOfSelectedItem];
  25.      int acodec = FormatSettings[format][codecs] & HB_ACODEC_MASK;
  26. -
  27. +   
  28. +    /*HACK: Lets setup a convenience variable to decide whether or not to allow aac hybrid (aac + ac3 passthru )*/
  29. +    bool mp4AacAc3;
  30. +    if (format == 0 && codecs == 2) // if mp4 and aac + aac
  31. +    {
  32. +    mp4AacAc3 = 1;
  33. +    }
  34. +    else
  35. +    {
  36. +    mp4AacAc3 = 0;
  37. +    }
  38.      /* pointer to this track's mixdown NSPopUpButton */
  39.      NSTextField   * mixdownTextField;
  40.      NSPopUpButton * mixdownPopUp;
  41. @@ -2891,7 +2904,7 @@
  42.                  int layout = audio->input_channel_layout & HB_INPUT_CH_LAYOUT_DISCRETE_NO_LFE_MASK;
  43.  
  44.                  /* do we want to add a mono option? */
  45. -                if (audioCodecsSupportMono == 1) {
  46. +                if (!mp4AacAc3 && audioCodecsSupportMono == 1) {
  47.                      NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle:
  48.                          [NSString stringWithCString: hb_audio_mixdowns[0].human_readable_name]
  49.                          action: NULL keyEquivalent: @""];
  50. @@ -2903,7 +2916,7 @@
  51.                  /* do we want to add a stereo option? */
  52.                  /* offer stereo if we have a mono source and non-mono-supporting codecs, as otherwise we won't have a mixdown at all */
  53.                  /* also offer stereo if we have a stereo-or-better source */
  54. -                if ((layout == HB_INPUT_CH_LAYOUT_MONO && audioCodecsSupportMono == 0) || layout >= HB_INPUT_CH_LAYOUT_STEREO) {
  55. +                if ((!mp4AacAc3 && ((layout == HB_INPUT_CH_LAYOUT_MONO && audioCodecsSupportMono == 0) || layout >= HB_INPUT_CH_LAYOUT_STEREO))) {
  56.                      NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle:
  57.                          [NSString stringWithCString: hb_audio_mixdowns[1].human_readable_name]
  58.                          action: NULL keyEquivalent: @""];
  59. @@ -2913,7 +2926,7 @@
  60.                  }
  61.  
  62.                  /* do we want to add a dolby surround (DPL1) option? */
  63. -                if (layout == HB_INPUT_CH_LAYOUT_3F1R || layout == HB_INPUT_CH_LAYOUT_3F2R || layout == HB_INPUT_CH_LAYOUT_DOLBY) {
  64. +                if (!mp4AacAc3 && (layout == HB_INPUT_CH_LAYOUT_3F1R || layout == HB_INPUT_CH_LAYOUT_3F2R || layout == HB_INPUT_CH_LAYOUT_DOLBY)) {
  65.                      NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle:
  66.                          [NSString stringWithCString: hb_audio_mixdowns[2].human_readable_name]
  67.                          action: NULL keyEquivalent: @""];
  68. @@ -2923,7 +2936,7 @@
  69.                  }
  70.  
  71.                  /* do we want to add a dolby pro logic 2 (DPL2) option? */
  72. -                if (layout == HB_INPUT_CH_LAYOUT_3F2R) {
  73. +                if (!mp4AacAc3 && layout == HB_INPUT_CH_LAYOUT_3F2R) {
  74.                      NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle:
  75.                          [NSString stringWithCString: hb_audio_mixdowns[3].human_readable_name]
  76.                          action: NULL keyEquivalent: @""];
  77. @@ -2933,7 +2946,7 @@
  78.                  }
  79.  
  80.                  /* do we want to add a 6-channel discrete option? */
  81. -                if (audioCodecsSupport6Ch == 1 && layout == HB_INPUT_CH_LAYOUT_3F2R && (audio->input_channel_layout & HB_INPUT_CH_LAYOUT_HAS_LFE)) {
  82. +                if (!mp4AacAc3 && (audioCodecsSupport6Ch == 1 && layout == HB_INPUT_CH_LAYOUT_3F2R && (audio->input_channel_layout & HB_INPUT_CH_LAYOUT_HAS_LFE))) {
  83.                      NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle:
  84.                          [NSString stringWithCString: hb_audio_mixdowns[4].human_readable_name]
  85.                          action: NULL keyEquivalent: @""];
  86. @@ -2943,7 +2956,7 @@
  87.                  }
  88.  
  89.                  /* do we want to add an AC-3 passthrough option? */
  90. -                if (audio->codec == HB_ACODEC_AC3) {
  91. +                if (mp4AacAc3 && audio->codec == HB_ACODEC_AC3) {
  92.                      NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle:
  93.                          [NSString stringWithCString: hb_audio_mixdowns[5].human_readable_name]
  94.                          action: NULL keyEquivalent: @""];
  95. @@ -2953,7 +2966,7 @@
  96.                  }
  97.  
  98.                  /* do we want to add the DPLII+AC3 passthrough option? */
  99. -                if (audio->codec == HB_ACODEC_AC3) {
  100. +                if (mp4AacAc3 && audio->codec == HB_ACODEC_AC3) {
  101.                      NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle:
  102.                          [NSString stringWithCString: hb_audio_mixdowns[6].human_readable_name]
  103.                          action: NULL keyEquivalent: @""];

advertising

Create a Paste

Please enter your new post below (or upload a file instead):





Please note that information posted here will not expire by default. If you want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords.

worth-right