comparison a52dec.c @ 4334:bc434522dfc2 libavcodec

Rename variables: a52 --> liba52, a52bin --> liba52bin
author diego
date Sat, 06 Jan 2007 23:33:43 +0000
parents c8c591fe26f8
children d9a61f401c11
comparison
equal deleted inserted replaced
4333:018b316baca7 4334:bc434522dfc2
25 */ 25 */
26 26
27 #include "avcodec.h" 27 #include "avcodec.h"
28 #include "liba52/a52.h" 28 #include "liba52/a52.h"
29 29
30 #ifdef CONFIG_A52BIN 30 #ifdef CONFIG_LIBA52BIN
31 #include <dlfcn.h> 31 #include <dlfcn.h>
32 static const char* liba52name = "liba52.so.0"; 32 static const char* liba52name = "liba52.so.0";
33 #endif 33 #endif
34 34
35 /** 35 /**
68 int (*a52_block)(a52_state_t * state); 68 int (*a52_block)(a52_state_t * state);
69 void (*a52_free)(a52_state_t * state); 69 void (*a52_free)(a52_state_t * state);
70 70
71 } AC3DecodeState; 71 } AC3DecodeState;
72 72
73 #ifdef CONFIG_A52BIN 73 #ifdef CONFIG_LIBA52BIN
74 static void* dlsymm(void* handle, const char* symbol) 74 static void* dlsymm(void* handle, const char* symbol)
75 { 75 {
76 void* f = dlsym(handle, symbol); 76 void* f = dlsym(handle, symbol);
77 if (!f) 77 if (!f)
78 av_log( NULL, AV_LOG_ERROR, "A52 Decoder - function '%s' can't be resolved\n", symbol); 78 av_log( NULL, AV_LOG_ERROR, "A52 Decoder - function '%s' can't be resolved\n", symbol);
82 82
83 static int a52_decode_init(AVCodecContext *avctx) 83 static int a52_decode_init(AVCodecContext *avctx)
84 { 84 {
85 AC3DecodeState *s = avctx->priv_data; 85 AC3DecodeState *s = avctx->priv_data;
86 86
87 #ifdef CONFIG_A52BIN 87 #ifdef CONFIG_LIBA52BIN
88 s->handle = dlopen(liba52name, RTLD_LAZY); 88 s->handle = dlopen(liba52name, RTLD_LAZY);
89 if (!s->handle) 89 if (!s->handle)
90 { 90 {
91 av_log( avctx, AV_LOG_ERROR, "A52 library %s could not be opened! \n%s\n", liba52name, dlerror()); 91 av_log( avctx, AV_LOG_ERROR, "A52 library %s could not be opened! \n%s\n", liba52name, dlerror());
92 return -1; 92 return -1;
237 237
238 static int a52_decode_end(AVCodecContext *avctx) 238 static int a52_decode_end(AVCodecContext *avctx)
239 { 239 {
240 AC3DecodeState *s = avctx->priv_data; 240 AC3DecodeState *s = avctx->priv_data;
241 s->a52_free(s->state); 241 s->a52_free(s->state);
242 #ifdef CONFIG_A52BIN 242 #ifdef CONFIG_LIBA52BIN
243 dlclose(s->handle); 243 dlclose(s->handle);
244 #endif 244 #endif
245 return 0; 245 return 0;
246 } 246 }
247 247