*HUGE* set of compiler warning fixes, unused variables removal

based on patch by Dominik Mierzejewski <dominik@rangers.eu.org>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8124 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-11-06 23:54:29 +00:00
parent d1d7c65367
commit f859d013a8
55 changed files with 136 additions and 95 deletions

View File

@ -763,7 +763,7 @@ static int config_read_option(m_config_t *config,config_t** conf_list, char *opt
goto err_missing_param;
if (sscanf(param, sizeof(off_t) == sizeof(int) ?
"%d%c" : "%lld%c", &tmp_off, &dummy) != 1) {
"%d%c" : "%lld%c", &tmp_off, (char *)&dummy) != 1) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "parameter must be an integer: %s\n", param);
ret = ERR_OUT_OF_RANGE;
goto out;

View File

@ -12,6 +12,7 @@ CpuCaps gCpuCaps;
#ifdef ARCH_X86
#include <stdio.h>
#include <string.h>
#ifdef __FreeBSD__
#include <sys/types.h>

View File

@ -13,7 +13,6 @@ static uint64_t __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL;
static uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL;
static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){
int i;
int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-512, %%esi \n\t"
@ -51,7 +50,6 @@ static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){
}
static int a52_resample_STEREO_to_2_MMX(float * _f, int16_t * s16){
int i;
int32_t * f = (int32_t *) _f;
/* benchmark scores are 0.3% better with SSE but we would need to set bias=0 and premultiply it
#ifdef HAVE_SSE
@ -100,7 +98,6 @@ static int a52_resample_STEREO_to_2_MMX(float * _f, int16_t * s16){
}
static int a52_resample_3F_to_5_MMX(float * _f, int16_t * s16){
int i;
int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
@ -156,7 +153,6 @@ static int a52_resample_3F_to_5_MMX(float * _f, int16_t * s16){
}
static int a52_resample_2F_2R_to_4_MMX(float * _f, int16_t * s16){
int i;
int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
@ -208,7 +204,6 @@ static int a52_resample_2F_2R_to_4_MMX(float * _f, int16_t * s16){
}
static int a52_resample_3F_2R_to_5_MMX(float * _f, int16_t * s16){
int i;
int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
@ -268,7 +263,6 @@ static int a52_resample_3F_2R_to_5_MMX(float * _f, int16_t * s16){
}
static int a52_resample_MONO_LFE_to_6_MMX(float * _f, int16_t * s16){
int i;
int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
@ -309,7 +303,6 @@ static int a52_resample_MONO_LFE_to_6_MMX(float * _f, int16_t * s16){
}
static int a52_resample_STEREO_LFE_to_6_MMX(float * _f, int16_t * s16){
int i;
int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
@ -348,7 +341,6 @@ static int a52_resample_STEREO_LFE_to_6_MMX(float * _f, int16_t * s16){
}
static int a52_resample_3F_LFE_to_6_MMX(float * _f, int16_t * s16){
int i;
int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
@ -389,7 +381,6 @@ static int a52_resample_3F_LFE_to_6_MMX(float * _f, int16_t * s16){
}
static int a52_resample_2F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){
int i;
int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"
@ -436,7 +427,6 @@ static int a52_resample_2F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){
}
static int a52_resample_3F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){
int i;
int32_t * f = (int32_t *) _f;
asm volatile(
"movl $-1024, %%esi \n\t"

View File

@ -44,7 +44,7 @@ static int init(int rate_hz, int channels, int format, int flags)
int err;
int frag_spec;
if(err=arts_init()) {
if( (err=arts_init()) ) {
mp_msg(MSGT_AO, MSGL_ERR, "AO: [arts] %s\n", arts_error_text(err));
return 0;
}

View File

@ -118,7 +118,7 @@ static void reset(){
// open & setup audio device
// return: 1=success 0=fail
static int init(){
int c,k = 0;
int k = 0;
float F[KM] = CF;
// Check input format

View File

@ -160,6 +160,10 @@ static void uninit(){
static void reset(){
}
/* forward declarations */
int upsample();
int downsample();
// processes 'ao_plugin_data.len' bytes of 'data'
// called for every block of data
// FIXME: this routine needs to be optimized (it is probably possible to do a lot here)

View File

@ -173,7 +173,7 @@ static double steering_matrix[][12] = {
};
// Experimental moving average dominances
static int amp_L = 0, amp_R = 0, amp_C = 0, amp_S = 0;
//static int amp_L = 0, amp_R = 0, amp_C = 0, amp_S = 0;
// processes 'ao_plugin_data.len' bytes of 'data'
// called for every block of data

View File

@ -39,11 +39,13 @@ static int init(sh_audio_t *sh_audio)
return 1;
}
extern void print_wave_header(WAVEFORMATEX *h);
static int preinit(sh_audio_t *sh_audio)
{
HRESULT ret;
WAVEFORMATEX *in_fmt = sh_audio->wf;
unsigned int srcsize = 0;
DWORD srcsize = 0;
acm_context_t *priv;
priv = malloc(sizeof(acm_context_t));

View File

@ -192,11 +192,11 @@ static int preinit(sh_audio_t *sh){
WantedBufferSize=OutputFormatInfo.numChannels*OutputFormatInfo.sampleRate*2;
error = SoundConverterGetBufferSizes(myConverter,
WantedBufferSize,&FramesToGet,&InputBufferSize,&OutputBufferSize);
printf("SoundConverterGetBufferSizes:%i\n");
printf("WantedBufferSize = %i\n",WantedBufferSize);
printf("InputBufferSize = %i\n",InputBufferSize);
printf("OutputBufferSize = %i\n",OutputBufferSize);
printf("FramesToGet = %i\n",FramesToGet);
printf("SoundConverterGetBufferSizes:%i\n",error);
printf("WantedBufferSize = %li\n",WantedBufferSize);
printf("InputBufferSize = %li\n",InputBufferSize);
printf("OutputBufferSize = %li\n",OutputBufferSize);
printf("FramesToGet = %li\n",FramesToGet);
InFrameSize=InputBufferSize/FramesToGet;
OutFrameSize=OutputBufferSize/FramesToGet;
@ -256,7 +256,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
InputBufferSize=FramesToGet*InFrameSize;
printf("FramesToGet = %i (%i -> %i bytes)\n",FramesToGet,
printf("FramesToGet = %li (%li -> %li bytes)\n",FramesToGet,
InputBufferSize, FramesToGet*OutFrameSize);
if(InputBufferSize>sh->a_in_buffer_len){
@ -270,8 +270,8 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
error = SoundConverterConvertBuffer(myConverter,sh->a_in_buffer,
FramesToGet,buf,&ConvertedFrames,&ConvertedBytes);
printf("SoundConverterConvertBuffer:%i\n",error);
printf("ConvertedFrames = %i\n",ConvertedFrames);
printf("ConvertedBytes = %i\n",ConvertedBytes);
printf("ConvertedFrames = %li\n",ConvertedFrames);
printf("ConvertedBytes = %li\n",ConvertedBytes);
InputBufferSize=(ConvertedBytes/OutFrameSize)*InFrameSize; // FIXME!!
sh->a_in_buffer_len-=InputBufferSize;

View File

@ -45,7 +45,6 @@ void afm_help(){
int init_audio_codec(sh_audio_t *sh_audio)
{
unsigned i;
// reset in/out buffer size/pointer:
sh_audio->a_buffer_size=0;
@ -166,6 +165,8 @@ int init_audio(sh_audio_t *sh_audio,char* codecname,char* afm,int status){
return 0;
}
extern char *get_path(char *filename);
int init_best_audio_codec(sh_audio_t *sh_audio,char** audio_codec_list,char** audio_fm_list){
char* ac_l_default[2]={"",(char*)NULL};
// hack:

View File

@ -202,6 +202,8 @@ int init_video(sh_video_t *sh_video,char* codecname,char* vfm,int status){
return 0;
}
extern char *get_path(char *filename);
int init_best_video_codec(sh_video_t *sh_video,char** video_codec_list,char** video_fm_list){
char* vc_l_default[2]={"",(char*)NULL};
// hack:

View File

@ -130,7 +130,6 @@ void qt_decode_rpza(char *encoded, int encoded_size, char *decoded, int width,
int height, int bytes_per_pixel)
{
int i;
int stream_ptr = 0;
int chunk_size;
unsigned char opcode;
@ -145,7 +144,6 @@ void qt_decode_rpza(char *encoded, int encoded_size, char *decoded, int width,
int pixel_ptr = 0;
int pixel_x, pixel_y;
int row_inc = bytes_per_pixel * (width - 4);
int max_height = row_inc * height;
int block_x_inc = bytes_per_pixel * 4;
int block_y_inc = bytes_per_pixel * width;
int block_ptr;

View File

@ -98,10 +98,8 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags)
{
static int init_done = 0;
int r;
int cb = 1;
int cr = 2;
mp_image_t* mpi;
int w, h;
int w;
lzo_context_t *priv = sh->context;
if (len <= 0) {

View File

@ -138,6 +138,8 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
return CONTROL_UNKNOWN;
}
extern void print_video_header(BITMAPINFOHEADER *h);
// init driver
static int init(sh_video_t *sh){
HRESULT ret;

View File

@ -74,9 +74,9 @@ static BITMAPINFOHEADER* vfw_open_encoder(char *dll_name, BITMAPINFOHEADER *inpu
ICINFO icinfo;
ret = ICGetInfo(encoder_hic, &icinfo, sizeof(ICINFO));
printf("%d - %d - %d\n", ret, icinfo.dwSize, sizeof(ICINFO));
printf("Compressor type: %.4x\n", icinfo.fccType);
printf("Compressor subtype: %.4x\n", icinfo.fccHandler);
printf("%ld - %ld - %d\n", ret, icinfo.dwSize, sizeof(ICINFO));
printf("Compressor type: %.4lx\n", icinfo.fccType);
printf("Compressor subtype: %.4lx\n", icinfo.fccHandler);
printf("Compressor flags: %lu, version %lu, ICM version: %lu\n",
icinfo.dwFlags, icinfo.dwVersion, icinfo.dwVersionICM);
//printf("Compressor name: %s\n", icinfo.szName);
@ -130,21 +130,21 @@ static int vfw_start_encoder(BITMAPINFOHEADER *input_bih, BITMAPINFOHEADER *outp
// if(verbose) {
printf("Starting compression:\n");
printf(" Input format:\n");
printf(" biSize %ld\n", input_bih->biSize);
printf(" biWidth %ld\n", input_bih->biWidth);
printf(" biHeight %ld\n", input_bih->biHeight);
printf(" biSize %d\n", input_bih->biSize);
printf(" biWidth %d\n", input_bih->biWidth);
printf(" biHeight %d\n", input_bih->biHeight);
printf(" biPlanes %d\n", input_bih->biPlanes);
printf(" biBitCount %d\n", input_bih->biBitCount);
printf(" biCompression 0x%lx ('%.4s')\n", input_bih->biCompression, (char *)&input_bih->biCompression);
printf(" biSizeImage %ld\n", input_bih->biSizeImage);
printf(" biCompression 0x%x ('%.4s')\n", input_bih->biCompression, (char *)&input_bih->biCompression);
printf(" biSizeImage %d\n", input_bih->biSizeImage);
printf(" Output format:\n");
printf(" biSize %ld\n", output_bih->biSize);
printf(" biWidth %ld\n", output_bih->biWidth);
printf(" biHeight %ld\n", output_bih->biHeight);
printf(" biSize %d\n", output_bih->biSize);
printf(" biWidth %d\n", output_bih->biWidth);
printf(" biHeight %d\n", output_bih->biHeight);
printf(" biPlanes %d\n", output_bih->biPlanes);
printf(" biBitCount %d\n", output_bih->biBitCount);
printf(" biCompression 0x%lx ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression);
printf(" biSizeImage %ld\n", output_bih->biSizeImage);
printf(" biCompression 0x%x ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression);
printf(" biSizeImage %d\n", output_bih->biSizeImage);
// }
output_bih->biWidth=input_bih->biWidth;
@ -165,13 +165,13 @@ static int vfw_start_encoder(BITMAPINFOHEADER *input_bih, BITMAPINFOHEADER *outp
mp_msg(MSGT_WIN32,MSGL_V,"ICCompressBegin OK\n");
printf(" Output format after query/begin:\n");
printf(" biSize %ld\n", output_bih->biSize);
printf(" biWidth %ld\n", output_bih->biWidth);
printf(" biHeight %ld\n", output_bih->biHeight);
printf(" biSize %d\n", output_bih->biSize);
printf(" biWidth %d\n", output_bih->biWidth);
printf(" biHeight %d\n", output_bih->biHeight);
printf(" biPlanes %d\n", output_bih->biPlanes);
printf(" biBitCount %d\n", output_bih->biBitCount);
printf(" biCompression 0x%lx ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression);
printf(" biSizeImage %ld\n", output_bih->biSizeImage);
printf(" biCompression 0x%x ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression);
printf(" biSizeImage %d\n", output_bih->biSizeImage);
encoder_buf_size=input_bih->biSizeImage;
encoder_buf=malloc(encoder_buf_size);

View File

@ -50,6 +50,7 @@ static int const divx4_general_presets[7] = {
};
extern char* passtmpfile;
extern void mencoder_write_chunk(aviwrite_stream_t *s,int len,unsigned int flags);
static int xvidenc_pass = 0;
static int xvidenc_quality = sizeof(divx4_motion_presets) / sizeof(divx4_motion_presets[0]) - 1; /* best quality */
@ -136,7 +137,10 @@ config(struct vf_instance_s* vf,
enc_param.rc_buffer = xvidenc_rc_buffer;
enc_param.min_quantizer = xvidenc_min_quantizer;
enc_param.max_quantizer = xvidenc_max_quantizer;
enc_param.max_key_interval = xvidenc_max_key_interval;
if( xvidenc_max_key_interval > 0 )
enc_param.max_key_interval = xvidenc_max_key_interval;
else
enc_param.max_key_interval = 10 * enc_param.fbase / enc_param.fincr;
switch (xvid_encore(NULL, XVID_ENC_CREATE, &enc_param, NULL)) {
case XVID_ERR_FAIL:
mp_msg(MSGT_MENCODER,MSGL_ERR, "xvid: encoder creation failed\n");

View File

@ -165,7 +165,6 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){
}
static int open(vf_instance_t *vf, char* args){
unsigned int i;
vf->config=config;
vf->put_image=put_image;
vf->query_format=query_format;

View File

@ -130,7 +130,6 @@ void Super2xSaI_ex(uint8 *src, uint32 src_pitch,
uint8 *dst, uint32 dst_pitch,
uint32 width, uint32 height, int sbpp) {
int j;
unsigned int x, y;
unsigned long color[16];

View File

@ -177,7 +177,6 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){
}
static int open(vf_instance_t *vf, char* args){
char *pos, *max;
int e;
vf->config=config;

View File

@ -49,7 +49,7 @@ struct vf_priv_s {
/***************************************************************************/
static int interleave(uint8_t *dst, uint8_t *src, int w, int h, int dstStride, int srcStride, int interleave, int swap){
static void interleave(uint8_t *dst, uint8_t *src, int w, int h, int dstStride, int srcStride, int interleave, int swap){
const int a= swap;
const int b= 1-a;
const int m= h>>1;
@ -124,7 +124,6 @@ static void parse(FilterParam *fp, char* args){
}
static int open(vf_instance_t *vf, char* args){
char *pos, *max;
vf->put_image=put_image;
// vf->get_image=get_image;

View File

@ -8,6 +8,10 @@
#include "../mp_msg.h"
#include "../cpudetect.h"
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"

View File

@ -64,7 +64,7 @@ void print_wave_header(WAVEFORMATEX *h){
if(h->wFormatTag==0x55 && h->cbSize>=12){
MPEGLAYER3WAVEFORMAT* h2=(MPEGLAYER3WAVEFORMAT *)h;
printf("mp3.wID=%d\n",h2->wID);
printf("mp3.fdwFlags=0x%X\n",h2->fdwFlags);
printf("mp3.fdwFlags=0x%lX\n",h2->fdwFlags);
printf("mp3.nBlockSize=%d\n",h2->nBlockSize);
printf("mp3.nFramesPerBlock=%d\n",h2->nFramesPerBlock);
printf("mp3.nCodecDelay=%d\n",h2->nCodecDelay);
@ -83,13 +83,13 @@ void print_wave_header(WAVEFORMATEX *h){
void print_video_header(BITMAPINFOHEADER *h){
printf("======= VIDEO Format ======\n");
printf(" biSize %ld\n", h->biSize);
printf(" biWidth %ld\n", h->biWidth);
printf(" biHeight %ld\n", h->biHeight);
printf(" biSize %d\n", h->biSize);
printf(" biWidth %d\n", h->biWidth);
printf(" biHeight %d\n", h->biHeight);
printf(" biPlanes %d\n", h->biPlanes);
printf(" biBitCount %d\n", h->biBitCount);
printf(" biCompression %ld='%.4s'\n", h->biCompression, (char *)&h->biCompression);
printf(" biSizeImage %ld\n", h->biSizeImage);
printf(" biCompression %d='%.4s'\n", h->biCompression, (char *)&h->biCompression);
printf(" biSizeImage %d\n", h->biSizeImage);
printf("===========================\n");
}

View File

@ -232,7 +232,7 @@ int demux_asf_fill_buffer(demuxer_t *demux){
unsigned int rlen;
//
int len;
unsigned int time2;
unsigned int time2=0;
int keyframe=0;
if(p>=p_end) mp_msg(MSGT_DEMUX,MSGL_V,"Warning! invalid packet 1, sig11 coming soon...\n");
@ -344,6 +344,9 @@ int demux_asf_fill_buffer(demuxer_t *demux){
#include "stheader.h"
extern void resync_audio_stream(sh_audio_t *sh_audio);
extern void skip_audio_frame(sh_audio_t *sh_audio);
void demux_seek_asf(demuxer_t *demuxer,float rel_seek_secs,int flags){
demux_stream_t *d_audio=demuxer->audio;
demux_stream_t *d_video=demuxer->video;

View File

@ -28,6 +28,7 @@ typedef struct da_priv {
extern void free_sh_audio(sh_audio_t* sh);
extern void resync_audio_stream(sh_audio_t *sh_audio);
extern void print_wave_header(WAVEFORMATEX *h);
int hr_mp3_seek = 0;

View File

@ -566,6 +566,7 @@ demuxer_t* demux_open_avi(demuxer_t* demuxer){
}
//extern float initial_pts_delay;
extern void resync_audio_stream(sh_audio_t *sh_audio);
void demux_seek_avi(demuxer_t *demuxer,float rel_seek_secs,int flags){
avi_priv_t *priv=demuxer->priv;

View File

@ -345,6 +345,9 @@ do{
return 1;
}
extern void resync_audio_stream(sh_audio_t *sh_audio);
extern void skip_audio_frame(sh_audio_t *sh_audio);
void demux_seek_mpg(demuxer_t *demuxer,float rel_seek_secs,int flags){
demux_stream_t *d_audio=demuxer->audio;
demux_stream_t *d_video=demuxer->video;

View File

@ -440,6 +440,9 @@ void demux_ogg_build_syncpoints_table(demuxer_t* demuxer) {
}
extern void print_wave_header(WAVEFORMATEX *h);
extern void print_video_header(BITMAPINFOHEADER *h);
/// Open an ogg physical stream
int demux_ogg_open(demuxer_t* demuxer) {
ogg_demuxer_t* ogg_d;
@ -869,6 +872,8 @@ demuxer_t* init_avi_with_ogg(demuxer_t* demuxer) {
}
extern void resync_audio_stream(sh_audio_t *sh_audio);
void demux_ogg_seek(demuxer_t *demuxer,float rel_seek_secs,int flags) {
ogg_demuxer_t* ogg_d = demuxer->priv;
ogg_sync_state* sync = &ogg_d->sync;

View File

@ -660,6 +660,8 @@ got_video:
}// goto loop;
}
extern void print_wave_header(WAVEFORMATEX *h);
void demux_open_real(demuxer_t* demuxer)
{
real_priv_t* priv = demuxer->priv;

View File

@ -522,6 +522,7 @@ extern int y4m_check_file(demuxer_t *demuxer);
extern void demux_open_y4m(demuxer_t *demuxer);
extern int roq_check_file(demuxer_t *demuxer);
extern int pva_check_file(demuxer_t * demuxer);
extern demuxer_t * demux_open_pva(demuxer_t * demuxer);
extern int real_check_file(demuxer_t *demuxer);
extern void demux_open_real(demuxer_t *demuxer);
extern int nuv_check_file(demuxer_t *demuxer);
@ -531,6 +532,7 @@ extern int demux_ogg_open(demuxer_t* demuxer);
extern int demux_rawaudio_open(demuxer_t* demuxer);
extern int smjpeg_check_file(demuxer_t *demuxer);
extern int demux_open_smjpeg(demuxer_t* demuxer);
extern int bmp_check_file(demuxer_t *demuxer);
extern demuxer_t* init_avi_with_ogg(demuxer_t* demuxer);

View File

@ -22,6 +22,7 @@
#ifdef STREAMING
#include "url.h"
#include "network.h"
extern int streaming_start( stream_t *stream, int *demuxer_type, URL_t *url);
#ifdef STREAMING_LIVE_DOT_COM
#include "demux_rtp.h"
int isSDPFile = 0;
@ -531,7 +532,7 @@ if(dvd_title){
int dvd_parse_chapter_range(struct config *conf, const char *range){
const char *s;
char *t;
conf; /* prevent warning from GCC */
/* conf; prevent warning from GCC */
s = range;
dvd_chapter = 1;
dvd_last_chapter = 0;

View File

@ -108,6 +108,10 @@ int demux_tv_fill_buffer(demuxer_t *demux, demux_stream_t *ds)
return 1;
}
/* forward declarations */
int tv_set_freq(tvi_handle_t *tvh, unsigned long freq);
int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq);
static int open_tv(tvi_handle_t *tvh)
{
int i;

View File

@ -1,4 +1,5 @@
#include <stdlib.h> /* malloc */
#include <string.h> /* memset */
static int init(priv_t *priv);
static int uninit(priv_t *priv);

View File

@ -301,7 +301,7 @@ int _dvdcss_title ( dvdcss_t dvdcss, int i_block )
if(dvdcss->psz_cache){
int fd;
key_file=malloc(strlen(dvdcss->psz_cache)+12+4);
sprintf(key_file,"%s/%0.10x",dvdcss->psz_cache,i_block);
sprintf(key_file,"%s/%.10x",dvdcss->psz_cache,i_block);
if ( (fd=open( key_file,O_RDONLY ) ) > 0 ){
if(read(fd, p_title_key, 5)==5){
// success!

View File

@ -269,7 +269,7 @@ extern dvdcss_t dvdcss_open ( char *psz_target )
/* if the CACHE is enabled, extract some unique disc ID */
if(dvdcss_cache_dir){
char* disc_id=NULL;
char title_name[64];
/*char title_name[64];*/
char sector[DVDCSS_BLOCK_SIZE];
// 32768+40 -> disc title (32 uppercase chars)
// 32768+813 -> disc manufacturing date + serial no (16 digit number)
@ -289,14 +289,14 @@ extern dvdcss_t dvdcss_open ( char *psz_target )
for ( i=0;i<16;i++ )
if ( ( title_name[i] < '0' )||( title_name[i] > '9' ) ){
disc_id=malloc(16+4);
sprintf( disc_id,"%0.2X%0.2X%0.2X%0.2X%0.2X%0.2X%0.2X%0.2X",title_name[0],title_name[1],title_name[2],title_name[3],title_name[4],title_name[5],title_name[6],title_name[7] );
sprintf( disc_id,"%.2X%.2X%.2X%.2X%.2X%.2X%.2X%.2X",title_name[0],title_name[1],title_name[2],title_name[3],title_name[4],title_name[5],title_name[6],title_name[7] );
break;
}
if(!disc_id) disc_id=strdup(title_name);
}
if(disc_id){
// yeah, we have a disc name/id, let's set up cache path:
char* dir;
/*char* dir;*/
dvdcss->psz_cache = malloc(strlen(dvdcss_cache_dir)+strlen(disc_id)+4);
sprintf(dvdcss->psz_cache,"%s/%s",dvdcss_cache_dir,disc_id);
mkdir( dvdcss->psz_cache,493 );

View File

@ -9,6 +9,7 @@
*/
#include <stddef.h>
#include "../cpudetect.h"
#include "fastmemcpy.h"
#define BLOCK_SIZE 4096
#define CONFUSION_FACTOR 0
@ -177,6 +178,7 @@ void * mem2agpcpy(void * to, const void * from, size_t len)
#endif
#endif //!RUNTIME_CPUDETECT
return to;
}
#endif /* use fastmemcpy */

View File

@ -732,7 +732,7 @@ static FT_ULong decode_char(iconv_t *cd, char c) {
int inbytesleft = 1;
int outbytesleft = sizeof(FT_ULong);
size_t count = iconv(*cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
iconv(*cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
/* convert unicode BigEndian -> MachineEndian */
o = be2me_32(o);
@ -785,7 +785,9 @@ static int prepare_charset(char *charmap, char *encoding, FT_ULong *charset, FT_
}
static int prepare_charset_unicode(FT_Face face, FT_ULong *charset, FT_ULong *charcodes) {
#ifdef HAVE_FREETYPE21
FT_ULong charcode;
#endif
FT_UInt gindex;
int i,j;

View File

@ -2,7 +2,9 @@
#include "geometry.h"
#include "../mp_msg.h"
// #include "../mplayer.h" /* exit_player() */
#include <string.h>
#include <stdlib.h> /* strtol */
/* A string of the form xpos[%]:ypos[%] */
char *vo_geometry = NULL;
@ -53,7 +55,7 @@ int geometry(int *xpos, int *ypos, int scrw, int scrh, int vidw, int vidh, int f
return geometry_error();
}
if(*colpos != '\0')
if(*colpos != '\0') {
if(vo_geometry[glen - 1] == '%') {
if(!get_num(colpos + 1, &yper, vo_geometry + glen - 1))
return geometry_error();
@ -61,6 +63,7 @@ int geometry(int *xpos, int *ypos, int scrw, int scrh, int vidw, int vidh, int f
if(!get_num(colpos + 1, ypos, vo_geometry + glen))
return geometry_error();
}
}
if(xper)
*xpos = (scrw - vidw) * ((float)xper / 100.0);

View File

@ -16,7 +16,10 @@ static mga_vid_config_t mga_vid_config;
static uint8_t *vid_data, *frames[4];
static int f = -1;
static uint32_t drwX,drwY,drwWidth,drwHeight,drwBorderWidth,drwDepth;
static uint32_t drwX,drwY,drwWidth,drwHeight;
#ifdef VO_XMGA
static uint32_t drwBorderWidth,drwDepth;
#endif
static uint32_t drwcX,drwcY,dwidth,dheight;
static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
@ -324,7 +327,7 @@ static uint32_t control(uint32_t request, void *data, ...)
case VOCTRL_SET_PANSCAN:
if ( vo_fs && ( vo_panscan != vo_panscan_amount ) ) // || ( !vo_fs && vo_panscan_amount ) )
{
int old_y = vo_panscan_y;
// int old_y = vo_panscan_y;
panscan_calc();
// if ( old_y != vo_panscan_y )
set_window();

View File

@ -4,6 +4,10 @@
#include <string.h>
#include "config.h"
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
#include "mp_msg.h"
#include "video_out.h"
#include "font_load.h"
@ -434,7 +438,6 @@ inline static void vo_update_text_sub(mp_osd_obj_t* obj,int dxs,int dys){
inline static void vo_update_spudec_sub(mp_osd_obj_t* obj, int dxs, int dys)
{
unsigned int bbox[4];
int i;
spudec_calc_bbox(vo_spudec, dxs, dys, bbox);
obj->bbox.x1 = bbox[0];
obj->bbox.x2 = bbox[1];

View File

@ -246,9 +246,6 @@ static int vo_dga_src_height; // height of video in pixels
static int vo_dga_src_offset=0; // offset in src
static int vo_dga_vp_offset=0; // offset in dest
static int vo_dga_bytes_per_line; // bytes per line to copy
static int vo_dga_src_skip; // bytes to skip after copying one
// line
// (not supported yet) in src
static int vo_dga_vp_skip; // dto. for dest
static int vo_dga_lines; // num of lines to copy
static int vo_dga_hw_mode = 0; // index in mode list that is actually
@ -333,7 +330,6 @@ static void fillblock(char *strt, int yoff, int lines, int val){
static uint32_t draw_frame( uint8_t *src[] ){
int vp_skip = vo_dga_vp_skip;
int lpl = vo_dga_bytes_per_line >> 2;
int numlines = vo_dga_lines;
char *s, *d;
@ -366,7 +362,6 @@ static uint32_t draw_frame( uint8_t *src[] ){
case VDM_CONV_15TO16:
{
int i;
char *e;
for(i=0; i< vo_dga_lines; i++){
rgb15to16( s, d, vo_dga_bytes_per_line);
d+=vo_dga_bytes_per_line;
@ -400,7 +395,7 @@ static uint32_t draw_frame( uint8_t *src[] ){
static void check_events(void)
{
int e=vo_x11_check_events(mDisplay);
vo_x11_check_events(mDisplay);
}
//---------------------------------------------------------

View File

@ -108,9 +108,11 @@
#include <stdio.h>
#include <time.h>
#include <math.h>
#include <malloc.h>
#include "config.h"
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
#include "fastmemcpy.h"
#include "video_out.h"

View File

@ -120,6 +120,9 @@ static const vo_info_t* get_info(void)
return &vo_info;
}
/* forward declaration */
int gif_reduce(int width, int height, unsigned char *source, unsigned char *destination, unsigned char *palette);
static uint32_t draw_frame(uint8_t * src[])
{
uint8_t *use_data;

View File

@ -15,6 +15,7 @@
#include "config.h"
#include "video_out.h"
#include "video_out_internal.h"
#include "sub.h"
LIBVO_EXTERN(gl2)
@ -61,14 +62,6 @@ static unsigned char *ImageData=NULL;
//static int texture_id=1;
static GLXContext wsGLXContext;
static int wsGLXAttrib[] = { GLX_RGBA,
GLX_RED_SIZE,1,
GLX_GREEN_SIZE,1,
GLX_BLUE_SIZE,1,
GLX_ALPHA_SIZE,0,
GLX_DOUBLEBUFFER,
None };
static uint32_t image_width;
static uint32_t image_height;
@ -606,7 +599,7 @@ static int choose_glx_visual(Display *dpy, int scr, XVisualInfo *res_vi)
template.screen = scr;
vi_list = XGetVisualInfo(dpy, VisualScreenMask, &template, &vi_num);
if (!vi_list) return -1;
best_weight = 1000000;
best_weight = 1000000; best_i=0;
for (i = 0; i < vi_num; i++) {
int val, res, w = 0;
/* of course, the visual must support OpenGL rendering... */

View File

@ -23,6 +23,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "config.h"
#include "video_out.h"

View File

@ -1139,8 +1139,6 @@ static uint32_t draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int
{
struct sdl_priv_s *priv = &sdl_priv;
uint8_t *dst;
uint8_t *src;
int i;
SDL_OVR_LOCK(-1)
@ -1195,7 +1193,6 @@ static void check_events (void)
struct sdl_priv_s *priv = &sdl_priv;
SDL_Event event;
SDLKey keypressed = 0;
static int modifiers = 0;
/* Poll the waiting SDL Events */
while ( SDL_PollEvent(&event) ) {

View File

@ -43,6 +43,7 @@
#include "video_out_internal.h"
#include "drivers/3dfx.h"
#include "aspect.h"
#include "sub.h"
LIBVO_EXTERN(tdfxfb)

View File

@ -195,7 +195,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
uint32_t d_height, uint32_t flags, char *title, uint32_t format)
{
XVisualInfo vinfo;
XSizeHints hint;
// XSizeHints hint;
XSetWindowAttributes xswa;
unsigned long xswamask;
XWindowAttributes attribs;

View File

@ -21,6 +21,7 @@ int vidix_init(unsigned src_width,unsigned src_height,
int vidix_start(void);
int vidix_stop(void);
void vidix_term( void );
uint32_t vidix_control(uint32_t request, void *data, ...);
uint32_t vidix_query_fourcc(unsigned fourcc);
uint32_t vidix_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y);

View File

@ -1103,6 +1103,7 @@ uint32_t vo_x11_get_equalizer(char *name, int *value)
else if (!strcasecmp(name, "contrast")) *value = vo_contrast;
else if (!strcasecmp(name, "gamma")) *value = vo_gamma;
else return VO_NOTIMPL;
return VO_TRUE;
}

View File

@ -289,6 +289,7 @@ void mencoder_write_chunk(aviwrite_stream_t *s,int len,unsigned int flags){
aviwrite_write_chunk(muxer,s,muxer_f,len,flags);
}
extern void print_wave_header(WAVEFORMATEX *h);
int main(int argc,char* argv[]){
@ -684,7 +685,7 @@ case ACODEC_COPY:
mux_a->h.dwScale=mux_a->h.dwSampleSize;
mux_a->h.dwRate=mux_a->wf->nAvgBytesPerSec;
}
printf("audiocodec: framecopy (format=%x chans=%d rate=%d bits=%d bps=%d sample=%d)\n",
printf("audiocodec: framecopy (format=%x chans=%d rate=%ld bits=%d bps=%ld sample=%ld)\n",
mux_a->wf->wFormatTag, mux_a->wf->nChannels, mux_a->wf->nSamplesPerSec,
mux_a->wf->wBitsPerSample, mux_a->wf->nAvgBytesPerSec, mux_a->h.dwSampleSize);
break;
@ -1194,7 +1195,7 @@ if(sh_audio && mux_a->codec==ACODEC_VBRMP3 && !lame_param_vbr){
mux_a->h.dwRate=mux_a->wf->nAvgBytesPerSec;
mux_a->h.dwScale=1;
mux_a->wf->nBlockAlign=1;
printf("\n\nCBR audio: %d bytes/sec, %d bytes/block\n",
printf("\n\nCBR audio: %ld bytes/sec, %d bytes/block\n",
mux_a->h.dwRate,((MPEGLAYER3WAVEFORMAT*)(mux_a->wf))->nBlockSize);
}
#endif

View File

@ -129,6 +129,8 @@ static int max_framesize=0;
#include "libmpcodecs/dec_video.h"
//#include "libmpcodecs/vf.h"
extern void vf_list_plugins();
//**************************************************************************//
//**************************************************************************//
@ -381,6 +383,10 @@ static void uninit_player(unsigned int mask){
current_module=NULL;
}
#ifdef X11_FULLSCREEN
extern void vo_uninit( void );
#endif
void exit_player(char* how){
uninit_player(INITED_ALL);

View File

@ -13,6 +13,7 @@
#include "../cpudetect.h"
#include "../mangle.h"
#include "../bswap.h"
#include "../libvo/fastmemcpy.h"
#ifdef ARCH_X86
#define CAN_COMPILE_X86_ASM

View File

@ -15,6 +15,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sub_cc.h"

View File

@ -243,7 +243,7 @@ subtitle *sub_read_line_subviewer(FILE *fd,subtitle *current) {
char *curptr=current->text[i]=(char *)malloc (len+1);
if (!current->text[i]) return ERR;
//strncpy (current->text[i], line, len); current->text[i][len]='\0';
for(j; j<len; j++) {
for(; j<len; j++) {
/* let's filter html tags ::atmos */
if(line[j]=='>') {
skip=0;

View File

@ -777,7 +777,7 @@ int vixConfigPlayback(vidix_playback_t *config)
return(EFAULT);
}
mga_src_base &= (~0xFFFF); /* 64k boundary */
if (mga_verbose > 1) printf("[mga] YUV buffer base: %p\n", mga_src_base);
if (mga_verbose > 1) printf("[mga] YUV buffer base: %#x\n", mga_src_base);
config->dga_addr = mga_mem_base + mga_src_base;
@ -1325,7 +1325,7 @@ int vixInit(void)
}
}
if (mga_verbose > 1) printf("[mga] hardware addresses: mmio: %p, framebuffer: %p\n",
if (mga_verbose > 1) printf("[mga] hardware addresses: mmio: %#x, framebuffer: %#x\n",
pci_info.base1, pci_info.base0);
mga_mmio_base = map_phys_mem(pci_info.base1,0x4000);