diff options
Diffstat (limited to 'src/libreal')
-rw-r--r-- | src/libreal/Makefile.am | 11 | ||||
-rw-r--r-- | src/libreal/real_common.c | 8 | ||||
-rw-r--r-- | src/libreal/xine_real_audio_decoder.c | 26 | ||||
-rw-r--r-- | src/libreal/xine_real_video_decoder.c | 12 |
4 files changed, 29 insertions, 28 deletions
diff --git a/src/libreal/Makefile.am b/src/libreal/Makefile.am index c9cf62984..7072039dd 100644 --- a/src/libreal/Makefile.am +++ b/src/libreal/Makefile.am @@ -1,12 +1,13 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + +noinst_HEADERS = real_common.h + if ENABLE_REAL xineplug_LTLIBRARIES = xineplug_decode_real.la endif xineplug_decode_real_la_SOURCES = xine_real_video_decoder.c real_common.c xine_real_audio_decoder.c -xineplug_decode_real_la_LIBADD = $(XINE_LIB) $(DYNAMIC_LD_LIBS) -xineplug_decode_real_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_real_la_LDFLAGS = $(xineplug_ldflags) - -noinst_HEADERS = real_common.h +xineplug_decode_real_la_LIBADD = $(XINE_LIB) $(DYNAMIC_LD_LIBS) $(LTLIBINTL) diff --git a/src/libreal/real_common.c b/src/libreal/real_common.c index 925a5cc71..e2a4ee3d6 100644 --- a/src/libreal/real_common.c +++ b/src/libreal/real_common.c @@ -79,12 +79,12 @@ void _x_real_codecs_init(xine_t *const xine) { struct stat s; #define try_real_path(path) \ - if (!stat (path "/dvrc.so", &s)) \ + if (!stat (path "/drvc.so", &s)) \ default_real_codecs_path = path; #define try_real_subpath(path) \ try_real_path("/usr/" path) \ - else try_real_path("/usr/local" path) \ - else try_real_path("/opt" path) + else try_real_path("/usr/local/" path) \ + else try_real_path("/opt/" path) /* The priority is for the first found */ try_real_subpath("lib/win32") @@ -114,7 +114,7 @@ void _x_real_codecs_init(xine_t *const xine) { "how to install the codecs."), 10, NULL, NULL); - lprintf ("real codecs path : %s\n", real_codec_path); + lprintf ("real codecs path : %s\n", real_codecs_path); } void *_x_real_codec_open(xine_stream_t *const stream, const char *const path, diff --git a/src/libreal/xine_real_audio_decoder.c b/src/libreal/xine_real_audio_decoder.c index d1bb94230..46974ec8b 100644 --- a/src/libreal/xine_real_audio_decoder.c +++ b/src/libreal/xine_real_audio_decoder.c @@ -163,27 +163,27 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) { * extract header data */ - version = BE_16 (buf->content+4); + version = _X_BE_16 (buf->content+4); lprintf ("header buffer detected, header version %d\n", version); #ifdef LOG xine_hexdump (buf->content, buf->size); #endif - flavor = BE_16 (buf->content+22); - coded_frame_size = BE_32 (buf->content+24); - codec_data_length= BE_16 (buf->content+40); - coded_frame_size2= BE_16 (buf->content+42); - subpacket_size = BE_16 (buf->content+44); + flavor = _X_BE_16 (buf->content+22); + coded_frame_size = _X_BE_32 (buf->content+24); + codec_data_length= _X_BE_16 (buf->content+40); + coded_frame_size2= _X_BE_16 (buf->content+42); + subpacket_size = _X_BE_16 (buf->content+44); this->sps = subpacket_size; this->w = coded_frame_size2; this->h = codec_data_length; if (version == 4) { - samples_per_sec = BE_16 (buf->content+48); - bits_per_sample = BE_16 (buf->content+52); - num_channels = BE_16 (buf->content+54); + samples_per_sec = _X_BE_16 (buf->content+48); + bits_per_sample = _X_BE_16 (buf->content+52); + num_channels = _X_BE_16 (buf->content+54); /* FIXME: */ if (buf->type==BUF_AUDIO_COOK) { @@ -196,10 +196,10 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) { extras = buf->content+71; } else { - samples_per_sec = BE_16 (buf->content+54); - bits_per_sample = BE_16 (buf->content+58); - num_channels = BE_16 (buf->content+60); - data_len = BE_32 (buf->content+74); + samples_per_sec = _X_BE_16 (buf->content+54); + bits_per_sample = _X_BE_16 (buf->content+58); + num_channels = _X_BE_16 (buf->content+60); + data_len = _X_BE_32 (buf->content+74); extras = buf->content+78; } diff --git a/src/libreal/xine_real_video_decoder.c b/src/libreal/xine_real_video_decoder.c index ea1fc8c54..7985fdc8f 100644 --- a/src/libreal/xine_real_video_decoder.c +++ b/src/libreal/xine_real_video_decoder.c @@ -194,8 +194,8 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) { _x_abort(); } - init_data.w = BE_16(&buf->content[12]); - init_data.h = BE_16(&buf->content[14]); + init_data.w = _X_BE_16(&buf->content[12]); + init_data.h = _X_BE_16(&buf->content[14]); this->width = (init_data.w + 1) & (~1); this->height = (init_data.h + 1) & (~1); @@ -209,8 +209,8 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) { * much resemblence to the actual frequency of frames in the file. Hence * it's better to just let the engine estimate the frame duration for us */ #if 0 - this->fps = (double) BE_16(&buf->content[22]) + - ((double) BE_16(&buf->content[24]) / 65536.0); + this->fps = (double) _X_BE_16(&buf->content[22]) + + ((double) _X_BE_16(&buf->content[24]) / 65536.0); this->duration = 90000.0 / this->fps; #endif @@ -227,8 +227,8 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) { _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_RATIO, this->ratio*10000); _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->duration); - init_data.subformat = BE_32(&buf->content[26]); - init_data.format = BE_32(&buf->content[30]); + init_data.subformat = _X_BE_32(&buf->content[26]); + init_data.format = _X_BE_32(&buf->content[30]); #ifdef LOG printf ("libreal: init_data for rvyuv_init:\n"); |