summary refs log tree commit diff
path: root/pkgs/tools/networking/fuppes/fuppes-faad-exanpse-backward-symbols-macro.patch
blob: c88a6fb4427ed7765c3300f62b625c1968f6026c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
diff -x _inst -x _build -x .svn -ur fuppes-0.660/src/lib/Transcoding/FaadWrapper.cpp fuppes-0.660.new/src/lib/Transcoding/FaadWrapper.cpp
--- fuppes-0.660/src/lib/Transcoding/FaadWrapper.cpp	2009-11-19 10:16:25.000000000 +0100
+++ fuppes-0.660.new/src/lib/Transcoding/FaadWrapper.cpp	2011-01-30 22:25:34.171263052 +0100
@@ -329,13 +329,19 @@
   
   CloseFile();
 }
-  
+
+// These macros are used to convert old function names to new ones based on
+// the #define declared in faad headers.  The two-level macro are used to
+// expanse the macro which are gave to to_str.
+#define to_str_(fun) #fun
+#define to_str(fun) to_str_(fun)
+
 bool CFaadWrapper::LoadLib()
 {
   #ifdef WIN32 
-  std::string sLibName = "libfaad-0.dll"; 
+  std::string sLibName = "libfaad-2.dll"; 
   #else   
-  std::string sLibName = "libfaad.so.0"; 
+  std::string sLibName = "libfaad.so.2"; 
   #endif 
    
   if(!CSharedConfig::Shared()->FaadLibName().empty()) { 
@@ -350,54 +356,54 @@
     return false; 
   }
  
-  m_faacDecOpen = (faacDecOpen_t)FuppesGetProcAddress(m_LibHandle, "faacDecOpen"); 
+  m_faacDecOpen = (faacDecOpen_t)FuppesGetProcAddress(m_LibHandle, to_str(faacDecOpen)); 
   if(!m_faacDecOpen) { 
     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 'faacDecOpen'", __FILE__, __LINE__);    
     return false; 
   }
 
-  m_faacDecGetErrorMessage = (faacDecGetErrorMessage_t)FuppesGetProcAddress(m_LibHandle, "faacDecGetErrorMessage"); 
+  m_faacDecGetErrorMessage = (faacDecGetErrorMessage_t)FuppesGetProcAddress(m_LibHandle, to_str(faacDecGetErrorMessage)); 
   if(!m_faacDecGetErrorMessage) { 
     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 'faacDecGetErrorMessage'", __FILE__, __LINE__);    
     return false; 
   }
   
-  m_faacDecGetCurrentConfiguration = (faacDecGetCurrentConfiguration_t)FuppesGetProcAddress(m_LibHandle, "faacDecGetCurrentConfiguration"); 
+  m_faacDecGetCurrentConfiguration = (faacDecGetCurrentConfiguration_t)FuppesGetProcAddress(m_LibHandle, to_str(faacDecGetCurrentConfiguration)); 
   if(!m_faacDecGetCurrentConfiguration) { 
     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 'faacDecGetCurrentConfiguration'", __FILE__, __LINE__);    
   } 
 
-  m_faacDecSetConfiguration = (faacDecSetConfiguration_t)FuppesGetProcAddress(m_LibHandle, "faacDecSetConfiguration"); 
+  m_faacDecSetConfiguration = (faacDecSetConfiguration_t)FuppesGetProcAddress(m_LibHandle, to_str(faacDecSetConfiguration)); 
   if(!m_faacDecSetConfiguration) { 
     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 'faacDecSetConfiguration'", __FILE__, __LINE__);    
   } 
 
-  m_faacDecInit = (faacDecInit_t)FuppesGetProcAddress(m_LibHandle, "faacDecInit"); 
+  m_faacDecInit = (faacDecInit_t)FuppesGetProcAddress(m_LibHandle, to_str(faacDecInit)); 
   if(!m_faacDecInit) { 
     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 'faacDecInit'", __FILE__, __LINE__);    
   } 
 
-  m_faacDecInit2 = (faacDecInit2_t)FuppesGetProcAddress(m_LibHandle, "faacDecInit2"); 
+  m_faacDecInit2 = (faacDecInit2_t)FuppesGetProcAddress(m_LibHandle, to_str(faacDecInit2)); 
   if(!m_faacDecInit2) { 
     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 'faacDecInit2'", __FILE__, __LINE__);    
     return false; 
   }
   
-  m_faacDecDecode = (faacDecDecode_t)FuppesGetProcAddress(m_LibHandle, "faacDecDecode"); 
+  m_faacDecDecode = (faacDecDecode_t)FuppesGetProcAddress(m_LibHandle, to_str(faacDecDecode)); 
   if(!m_faacDecDecode) { 
     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 'faacDecDecode'", __FILE__, __LINE__);    
     return false; 
   } 
 
-  m_faacDecClose = (faacDecClose_t)FuppesGetProcAddress(m_LibHandle, "faacDecClose"); 
+  m_faacDecClose = (faacDecClose_t)FuppesGetProcAddress(m_LibHandle, to_str(faacDecClose)); 
   if(!m_faacDecClose) { 
     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 'faacDecClose'", __FILE__, __LINE__);    
     return false; 
   } 
 
-  m_AudioSpecificConfig = (AudioSpecificConfig_t)FuppesGetProcAddress(m_LibHandle, "AudioSpecificConfig"); 
+  m_AudioSpecificConfig = (AudioSpecificConfig_t)FuppesGetProcAddress(m_LibHandle, to_str(AudioSpecificConfig)); 
   if(!m_AudioSpecificConfig) {
-		m_AudioSpecificConfig = (AudioSpecificConfig_t)FuppesGetProcAddress(m_LibHandle, "faacDecAudioSpecificConfig"); 
+		m_AudioSpecificConfig = (AudioSpecificConfig_t)FuppesGetProcAddress(m_LibHandle, to_str(faacDecAudioSpecificConfig)); 
 		if(!m_AudioSpecificConfig) {  
   	  CSharedLog::Shared()->Log(L_EXT, "cannot load symbol '(faacDec)AudioSpecificConfig'", __FILE__, __LINE__);    
       return false;