@@ -13,7 +13,7 @@ public class NativeBindings
1313 //---------------------------------------Definition-----------------------------------------------
1414 // Encoder
1515 private delegate void EnableDebugLogsd ( int val ) ;
16- private delegate IntPtr GetEncoderd ( string dllName ) ;
16+ private delegate IntPtr GetEncoderd ( string dllName , out int error ) ;
1717 private delegate int InitializeEncoderBased ( IntPtr encoder , TagEncParamBase param ) ;
1818 private delegate int InitializeEncoderd ( IntPtr encoder , int width , int height , int bps , int fps , int configType ) ;
1919 private delegate int GetDefaultParamsd ( IntPtr encoder , ref TagEncParamExt param ) ;
@@ -28,7 +28,7 @@ public class NativeBindings
2828 private delegate int GetOptionEncoderd ( IntPtr encoder , ENCODER_OPTION option , IntPtr value ) ;
2929 private delegate int SetOptionEncoderd ( IntPtr encoder , ENCODER_OPTION option , IntPtr value ) ;
3030 // Decoder
31- private delegate IntPtr GetDecoderd ( string s ) ;
31+ private delegate IntPtr GetDecoderd ( string s , out int error ) ;
3232 private delegate int InitializeDecoderDefaultd ( IntPtr dec ) ;
3333 private delegate int InitializeDecoderd ( IntPtr dec , TagSVCDecodingParam param ) ;
3434 private delegate int DecodeAsYUVd ( IntPtr decoder , ref byte frame , int lenght , bool noDelay , ref int state , ref YUVImagePointer decoded ) ;
@@ -540,8 +540,8 @@ private void LoadAndroidx64Bindings()
540540
541541 #region Interface
542542
543- internal IntPtr GetEncoder ( string dllName )
544- => getEncoder ( dllName ) ;
543+ internal IntPtr GetEncoder ( string dllName , out int error )
544+ => getEncoder ( dllName , out error ) ;
545545 internal int InitializeEncoderBase ( IntPtr encoder , TagEncParamBase param )
546546 => initializeEncoderBase ( encoder , param ) ;
547547 internal int InitializeEncoder ( IntPtr encoder , int width , int height , int bps , int fps , int configType )
@@ -572,8 +572,8 @@ internal void EncoderEnableDebugLogs(int val)
572572 => encoderEnableDebugLogs ( val ) ;
573573 // Decoder
574574
575- internal IntPtr GetDecoder ( string s )
576- => getDecoder ( s ) ;
575+ internal IntPtr GetDecoder ( string s , out int error )
576+ => getDecoder ( s , out error ) ;
577577 internal int InitializeDecoderDefault ( IntPtr dec )
578578 => initializeDecoderDefault ( dec ) ;
579579 internal int InitializeDecoder ( IntPtr dec , TagSVCDecodingParam param )
@@ -623,7 +623,7 @@ public unsafe class Winx86
623623 [ DllImport ( DllName , EntryPoint = "EncoderEnableDebugLogs" , CallingConvention = CallingConvention . Cdecl ) ]
624624 internal static extern void EncoderEnableDebugLogs ( int val ) ;
625625 [ DllImport ( DllName , EntryPoint = "GetEncoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
626- internal static extern IntPtr GetEncoder ( string dllName ) ;
626+ internal static extern IntPtr GetEncoder ( string dllName , out int error ) ;
627627
628628 [ DllImport ( DllName , EntryPoint = "InitializeEncoderBase" , CallingConvention = CallingConvention . Cdecl ) ]
629629 internal static extern int InitializeEncoderBase ( IntPtr encoder , TagEncParamBase param ) ;
@@ -670,7 +670,7 @@ public unsafe class Winx86
670670 internal static extern void DecoderEnableDebugLogs ( int val ) ;
671671
672672 [ DllImport ( DllName , EntryPoint = "GetDecoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
673- internal static extern IntPtr GetDecoder ( string s ) ;
673+ internal static extern IntPtr GetDecoder ( string s , out int error ) ;
674674
675675 [ DllImport ( DllName , EntryPoint = "InitializeDecoderDefault" , CallingConvention = CallingConvention . Cdecl ) ]
676676 internal static extern int InitializeDecoderDefault ( IntPtr dec ) ;
@@ -737,7 +737,7 @@ public unsafe class Winx64
737737 [ DllImport ( DllName , EntryPoint = "EncoderEnableDebugLogs" , CallingConvention = CallingConvention . Cdecl ) ]
738738 internal static extern void EncoderEnableDebugLogs ( int val ) ;
739739 [ DllImport ( DllName , EntryPoint = "GetEncoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
740- internal static extern IntPtr GetEncoder ( string dllName ) ;
740+ internal static extern IntPtr GetEncoder ( string dllName , out int error ) ;
741741
742742 [ DllImport ( DllName , EntryPoint = "InitializeEncoderBase" , CallingConvention = CallingConvention . Cdecl ) ]
743743 internal static extern int InitializeEncoderBase ( IntPtr encoder , TagEncParamBase param ) ;
@@ -784,7 +784,7 @@ public unsafe class Winx64
784784 internal static extern void DecoderEnableDebugLogs ( int val ) ;
785785
786786 [ DllImport ( DllName , EntryPoint = "GetDecoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
787- internal static extern IntPtr GetDecoder ( string s ) ;
787+ internal static extern IntPtr GetDecoder ( string s , out int error ) ;
788788
789789 [ DllImport ( DllName , EntryPoint = "InitializeDecoderDefault" , CallingConvention = CallingConvention . Cdecl ) ]
790790 internal static extern int InitializeDecoderDefault ( IntPtr dec ) ;
@@ -852,7 +852,7 @@ public unsafe class Linuxx86
852852 [ DllImport ( DllName , EntryPoint = "EncoderEnableDebugLogs" , CallingConvention = CallingConvention . Cdecl ) ]
853853 internal static extern void EncoderEnableDebugLogs ( int val ) ;
854854 [ DllImport ( DllName , EntryPoint = "GetEncoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
855- internal static extern IntPtr GetEncoder ( string dllName ) ;
855+ internal static extern IntPtr GetEncoder ( string dllName , out int error ) ;
856856
857857 [ DllImport ( DllName , EntryPoint = "InitializeEncoderBase" , CallingConvention = CallingConvention . Cdecl ) ]
858858 internal static extern int InitializeEncoderBase ( IntPtr encoder , TagEncParamBase param ) ;
@@ -899,7 +899,7 @@ public unsafe class Linuxx86
899899 internal static extern void DecoderEnableDebugLogs ( int val ) ;
900900
901901 [ DllImport ( DllName , EntryPoint = "GetDecoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
902- internal static extern IntPtr GetDecoder ( string s ) ;
902+ internal static extern IntPtr GetDecoder ( string s , out int error ) ;
903903
904904 [ DllImport ( DllName , EntryPoint = "InitializeDecoderDefault" , CallingConvention = CallingConvention . Cdecl ) ]
905905 internal static extern int InitializeDecoderDefault ( IntPtr dec ) ;
@@ -966,7 +966,7 @@ public unsafe class Linuxx64
966966 [ DllImport ( DllName , EntryPoint = "EncoderEnableDebugLogs" , CallingConvention = CallingConvention . Cdecl ) ]
967967 internal static extern void EncoderEnableDebugLogs ( int val ) ;
968968 [ DllImport ( DllName , EntryPoint = "GetEncoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
969- internal static extern IntPtr GetEncoder ( string dllName ) ;
969+ internal static extern IntPtr GetEncoder ( string dllName , out int error ) ;
970970
971971 [ DllImport ( DllName , EntryPoint = "InitializeEncoderBase" , CallingConvention = CallingConvention . Cdecl ) ]
972972 internal static extern int InitializeEncoderBase ( IntPtr encoder , TagEncParamBase param ) ;
@@ -1013,7 +1013,7 @@ public unsafe class Linuxx64
10131013 internal static extern void DecoderEnableDebugLogs ( int val ) ;
10141014
10151015 [ DllImport ( DllName , EntryPoint = "GetDecoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
1016- internal static extern IntPtr GetDecoder ( string s ) ;
1016+ internal static extern IntPtr GetDecoder ( string s , out int error ) ;
10171017
10181018 [ DllImport ( DllName , EntryPoint = "InitializeDecoderDefault" , CallingConvention = CallingConvention . Cdecl ) ]
10191019 internal static extern int InitializeDecoderDefault ( IntPtr dec ) ;
@@ -1080,7 +1080,7 @@ public unsafe class LinuxArm32
10801080 [ DllImport ( DllName , EntryPoint = "EncoderEnableDebugLogs" , CallingConvention = CallingConvention . Cdecl ) ]
10811081 internal static extern void EncoderEnableDebugLogs ( int val ) ;
10821082 [ DllImport ( DllName , EntryPoint = "GetEncoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
1083- internal static extern IntPtr GetEncoder ( string dllName ) ;
1083+ internal static extern IntPtr GetEncoder ( string dllName , out int error ) ;
10841084
10851085 [ DllImport ( DllName , EntryPoint = "InitializeEncoderBase" , CallingConvention = CallingConvention . Cdecl ) ]
10861086 internal static extern int InitializeEncoderBase ( IntPtr encoder , TagEncParamBase param ) ;
@@ -1127,7 +1127,7 @@ public unsafe class LinuxArm32
11271127 internal static extern void DecoderEnableDebugLogs ( int val ) ;
11281128
11291129 [ DllImport ( DllName , EntryPoint = "GetDecoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
1130- internal static extern IntPtr GetDecoder ( string s ) ;
1130+ internal static extern IntPtr GetDecoder ( string s , out int error ) ;
11311131
11321132 [ DllImport ( DllName , EntryPoint = "InitializeDecoderDefault" , CallingConvention = CallingConvention . Cdecl ) ]
11331133 internal static extern int InitializeDecoderDefault ( IntPtr dec ) ;
@@ -1194,7 +1194,7 @@ public unsafe class LinuxArm64
11941194 [ DllImport ( DllName , EntryPoint = "EncoderEnableDebugLogs" , CallingConvention = CallingConvention . Cdecl ) ]
11951195 internal static extern void EncoderEnableDebugLogs ( int val ) ;
11961196 [ DllImport ( DllName , EntryPoint = "GetEncoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
1197- internal static extern IntPtr GetEncoder ( string dllName ) ;
1197+ internal static extern IntPtr GetEncoder ( string dllName , out int error ) ;
11981198
11991199 [ DllImport ( DllName , EntryPoint = "InitializeEncoderBase" , CallingConvention = CallingConvention . Cdecl ) ]
12001200 internal static extern int InitializeEncoderBase ( IntPtr encoder , TagEncParamBase param ) ;
@@ -1241,7 +1241,7 @@ public unsafe class LinuxArm64
12411241 internal static extern void DecoderEnableDebugLogs ( int val ) ;
12421242
12431243 [ DllImport ( DllName , EntryPoint = "GetDecoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
1244- internal static extern IntPtr GetDecoder ( string s ) ;
1244+ internal static extern IntPtr GetDecoder ( string s , out int error ) ;
12451245
12461246 [ DllImport ( DllName , EntryPoint = "InitializeDecoderDefault" , CallingConvention = CallingConvention . Cdecl ) ]
12471247 internal static extern int InitializeDecoderDefault ( IntPtr dec ) ;
@@ -1308,7 +1308,7 @@ public unsafe class AndroidArm64
13081308 [ DllImport ( DllName , EntryPoint = "EncoderEnableDebugLogs" , CallingConvention = CallingConvention . Cdecl ) ]
13091309 internal static extern void EncoderEnableDebugLogs ( int val ) ;
13101310 [ DllImport ( DllName , EntryPoint = "GetEncoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
1311- internal static extern IntPtr GetEncoder ( string dllName ) ;
1311+ internal static extern IntPtr GetEncoder ( string dllName , out int error ) ;
13121312
13131313 [ DllImport ( DllName , EntryPoint = "InitializeEncoderBase" , CallingConvention = CallingConvention . Cdecl ) ]
13141314 internal static extern int InitializeEncoderBase ( IntPtr encoder , TagEncParamBase param ) ;
@@ -1355,7 +1355,7 @@ public unsafe class AndroidArm64
13551355 internal static extern void DecoderEnableDebugLogs ( int val ) ;
13561356
13571357 [ DllImport ( DllName , EntryPoint = "GetDecoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
1358- internal static extern IntPtr GetDecoder ( string s ) ;
1358+ internal static extern IntPtr GetDecoder ( string s , out int error ) ;
13591359
13601360 [ DllImport ( DllName , EntryPoint = "InitializeDecoderDefault" , CallingConvention = CallingConvention . Cdecl ) ]
13611361 internal static extern int InitializeDecoderDefault ( IntPtr dec ) ;
@@ -1422,7 +1422,7 @@ public unsafe class AndroidArm32
14221422 [ DllImport ( DllName , EntryPoint = "EncoderEnableDebugLogs" , CallingConvention = CallingConvention . Cdecl ) ]
14231423 internal static extern void EncoderEnableDebugLogs ( int val ) ;
14241424 [ DllImport ( DllName , EntryPoint = "GetEncoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
1425- internal static extern IntPtr GetEncoder ( string dllName ) ;
1425+ internal static extern IntPtr GetEncoder ( string dllName , out int error ) ;
14261426
14271427 [ DllImport ( DllName , EntryPoint = "InitializeEncoderBase" , CallingConvention = CallingConvention . Cdecl ) ]
14281428 internal static extern int InitializeEncoderBase ( IntPtr encoder , TagEncParamBase param ) ;
@@ -1469,7 +1469,7 @@ public unsafe class AndroidArm32
14691469 internal static extern void DecoderEnableDebugLogs ( int val ) ;
14701470
14711471 [ DllImport ( DllName , EntryPoint = "GetDecoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
1472- internal static extern IntPtr GetDecoder ( string s ) ;
1472+ internal static extern IntPtr GetDecoder ( string s , out int error ) ;
14731473
14741474 [ DllImport ( DllName , EntryPoint = "InitializeDecoderDefault" , CallingConvention = CallingConvention . Cdecl ) ]
14751475 internal static extern int InitializeDecoderDefault ( IntPtr dec ) ;
@@ -1536,7 +1536,7 @@ public unsafe class Androidx64
15361536 [ DllImport ( DllName , EntryPoint = "EncoderEnableDebugLogs" , CallingConvention = CallingConvention . Cdecl ) ]
15371537 internal static extern void EncoderEnableDebugLogs ( int val ) ;
15381538 [ DllImport ( DllName , EntryPoint = "GetEncoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
1539- internal static extern IntPtr GetEncoder ( string dllName ) ;
1539+ internal static extern IntPtr GetEncoder ( string dllName , out int error ) ;
15401540
15411541 [ DllImport ( DllName , EntryPoint = "InitializeEncoderBase" , CallingConvention = CallingConvention . Cdecl ) ]
15421542 internal static extern int InitializeEncoderBase ( IntPtr encoder , TagEncParamBase param ) ;
@@ -1583,7 +1583,7 @@ public unsafe class Androidx64
15831583 internal static extern void DecoderEnableDebugLogs ( int val ) ;
15841584
15851585 [ DllImport ( DllName , EntryPoint = "GetDecoder" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
1586- internal static extern IntPtr GetDecoder ( string s ) ;
1586+ internal static extern IntPtr GetDecoder ( string s , out int error ) ;
15871587
15881588 [ DllImport ( DllName , EntryPoint = "InitializeDecoderDefault" , CallingConvention = CallingConvention . Cdecl ) ]
15891589 internal static extern int InitializeDecoderDefault ( IntPtr dec ) ;
0 commit comments