shithub: aacdec

Download patch

ref: 130c46862751338fdb7085f738496aed60fef5a8
parent: 31b537ecac196e6836d83ed9fe1a93b2ef1669ce
author: menno <menno>
date: Tue Feb 25 12:45:04 EST 2003

Added "Use for AAC" option (hardly tested, but should work)

--- a/plugins/in_mp4/config.c
+++ b/plugins/in_mp4/config.c
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software 
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
-** $Id: config.c,v 1.1 2002/08/09 21:48:12 menno Exp $
+** $Id: config.c,v 1.2 2003/02/25 17:45:02 menno Exp $
 **/
 
 #define WIN32_LEAN_AND_MEAN
@@ -28,6 +28,7 @@
 int m_priority = 3;
 int m_resolution = 0;
 int m_show_errors = 1;
+int m_use_for_aac = 1;
 
 void _r_s(char *name,char *data, int mlen)
 {
--- a/plugins/in_mp4/config.h
+++ b/plugins/in_mp4/config.h
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software 
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
-** $Id: config.h,v 1.1 2002/08/09 21:48:12 menno Exp $
+** $Id: config.h,v 1.2 2003/02/25 17:45:03 menno Exp $
 **/
 
 char app_name[];
@@ -24,6 +24,7 @@
 int m_priority;
 int m_resolution;
 int m_show_errors;
+int m_use_for_aac;
 
 #define RS(x) (_r_s(#x,x,sizeof(x)))
 #define WS(x) (WritePrivateProfileString(app_name,#x,x,INI_FILE))
--- a/plugins/in_mp4/in_mp4.c
+++ b/plugins/in_mp4/in_mp4.c
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software 
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
-** $Id: in_mp4.c,v 1.25 2002/12/22 21:36:28 menno Exp $
+** $Id: in_mp4.c,v 1.26 2003/02/25 17:45:03 menno Exp $
 **/
 
 //#define DEBUG_OUTPUT
@@ -136,6 +136,7 @@
     char priority[10];
     char resolution[10];
     char show_errors[10];
+    char use_for_aac[10];
 
 	config_init();
 
@@ -142,14 +143,17 @@
     strcpy(show_errors, "1");
     strcpy(priority, "3");
     strcpy(resolution, "0");
+    strcpy(use_for_aac, "1");
 
     RS(priority);
 	RS(resolution);
 	RS(show_errors);
+    RS(use_for_aac);
 
     m_priority = atoi(priority);
     m_resolution = atoi(resolution);
     m_show_errors = atoi(show_errors);
+    m_use_for_aac = atoi(use_for_aac);
 }
 
 void config_write()
@@ -157,14 +161,17 @@
     char priority[10];
     char resolution[10];
     char show_errors[10];
+    char use_for_aac[10];
 
     itoa(m_priority, priority, 10);
     itoa(m_resolution, resolution, 10);
     itoa(m_show_errors, show_errors, 10);
+    itoa(m_use_for_aac, use_for_aac, 10);
 
     WS(priority);
 	WS(resolution);
 	WS(show_errors);
+	WS(use_for_aac);
 }
 
 void init()
@@ -369,6 +376,8 @@
         SendMessage(GetDlgItem(hwndDlg, res_id_table[m_resolution]), BM_SETCHECK, BST_CHECKED, 0);
         if (m_show_errors)
             SendMessage(GetDlgItem(hwndDlg, IDC_ERROR), BM_SETCHECK, BST_CHECKED, 0);
+        if (m_use_for_aac)
+            SendMessage(GetDlgItem(hwndDlg, IDC_USEFORAAC), BM_SETCHECK, BST_CHECKED, 0);
         return TRUE;
 
     case WM_COMMAND:
@@ -378,6 +387,7 @@
             return TRUE;
         case IDOK:
             m_show_errors = SendMessage(GetDlgItem(hwndDlg, IDC_ERROR), BM_GETCHECK, 0, 0);
+            m_use_for_aac = SendMessage(GetDlgItem(hwndDlg, IDC_USEFORAAC), BM_GETCHECK, 0, 0);
             m_priority = SendMessage(GetDlgItem(hwndDlg, IDC_PRIORITY), TBM_GETPOS, 0, 0);
             for (i = 0; i < 5; i++)
             {
@@ -421,9 +431,12 @@
     {
         return 1;
     }
-    if(StringComp(fn + strlen(fn) - 3, "AAC", 3) == 0)
+    if (m_use_for_aac)
     {
-        return 1;
+        if(StringComp(fn + strlen(fn) - 3, "AAC", 3) == 0)
+        {
+            return 1;
+        }
     }
 
     return 0;
--- a/plugins/in_mp4/in_mp4.rc
+++ b/plugins/in_mp4/in_mp4.rc
@@ -1,4 +1,4 @@
-// Microsoft Visual C++ generated resource script.
+//Microsoft Developer Studio generated resource script.
 //
 #include "resource.h"
 
@@ -27,18 +27,18 @@
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE 
+1 TEXTINCLUDE MOVEABLE PURE 
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE 
+2 TEXTINCLUDE MOVEABLE PURE 
 BEGIN
     "#include ""afxres.h""\r\n"
     "\0"
 END
 
-3 TEXTINCLUDE 
+3 TEXTINCLUDE MOVEABLE PURE 
 BEGIN
     "\r\n"
     "\0"
@@ -53,10 +53,9 @@
 //
 
 IDD_INFO DIALOGEX 0, 0, 303, 207
-STYLE DS_SETFONT | DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | 
-    WS_SYSMENU
+STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "MPEG-4 File Info"
-FONT 8, "MS Sans Serif", 0, 0, 0x0
+FONT 8, "MS Sans Serif"
 BEGIN
     DEFPUSHBUTTON   "OK",IDOK,246,186,50,14
     LTEXT           "Static",IDC_INFOTEXT,14,17,275,47,0,WS_EX_CLIENTEDGE
@@ -68,16 +67,17 @@
                     IDC_CONVERT1,24,98,255,27
 END
 
-IDD_CONFIG DIALOGEX 0, 0, 151, 108
-STYLE DS_SETFONT | DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | 
-    WS_SYSMENU
+IDD_CONFIG DIALOG DISCARDABLE  0, 0, 151, 108
+STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Configuration"
-FONT 8, "MS Sans Serif", 0, 0, 0x0
+FONT 8, "MS Sans Serif"
 BEGIN
     CONTROL         "Slider1",IDC_PRIORITY,"msctls_trackbar32",TBS_VERT | 
                     TBS_NOTICKS | WS_TABSTOP,13,15,18,46
     CONTROL         "16 bits",IDC_16BITS,"Button",BS_AUTORADIOBUTTON,77,18,
                     37,10
+    CONTROL         "16 bits dithered",IDC_16BITS_DITHERED,"Button",
+                    BS_AUTORADIOBUTTON,77,29,64,10
     CONTROL         "24 bits",IDC_24BITS,"Button",BS_AUTORADIOBUTTON,77,40,
                     37,10
     CONTROL         "32 bits",IDC_32BITS,"Button",BS_AUTORADIOBUTTON,77,51,
@@ -84,15 +84,15 @@
                     37,10
     CONTROL         "Show errors",IDC_ERROR,"Button",BS_AUTOCHECKBOX | 
                     WS_TABSTOP,7,70,53,10
-    DEFPUSHBUTTON   "OK",IDOK,94,87,50,14
+    CONTROL         "Use for AAC",IDC_USEFORAAC,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,78,70,55,10
     PUSHBUTTON      "Cancel",IDCANCEL,7,87,50,14
+    DEFPUSHBUTTON   "OK",IDOK,94,87,50,14
     GROUPBOX        "Priority",IDC_STATIC,7,7,57,58
     LTEXT           "Highest",IDC_STATIC,34,18,25,8
     LTEXT           "Normal",IDC_STATIC,34,35,23,8
     LTEXT           "Lowest",IDC_STATIC,34,52,24,8
     GROUPBOX        "Resolution",IDC_STATIC,71,7,73,58
-    CONTROL         "16 bits dithered",IDC_16BITS_DITHERED,"Button",
-                    BS_AUTORADIOBUTTON,77,29,64,10
 END
 
 
@@ -102,7 +102,7 @@
 //
 
 #ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO 
+GUIDELINES DESIGNINFO MOVEABLE PURE 
 BEGIN
     IDD_INFO, DIALOG
     BEGIN
--- a/plugins/in_mp4/resource.h
+++ b/plugins/in_mp4/resource.h
@@ -1,5 +1,5 @@
 //{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
+// Microsoft Developer Studio generated include file.
 // Used by in_mp4.rc
 //
 #define IDD_INFO                        101
@@ -26,6 +26,7 @@
 #define IDC_16BITS_DITHERED             1009
 #define IDC_CONVERT1                    1009
 #define IDC_USERDATA                    1010
+#define IDC_USEFORAAC                   1011
 
 // Next default values for new objects
 // 
@@ -33,7 +34,7 @@
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NEXT_RESOURCE_VALUE        103
 #define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1011
+#define _APS_NEXT_CONTROL_VALUE         1012
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif