all error/warn/info messages moved to help_mp-en.h for translation

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1974 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-09-26 21:35:14 +00:00
parent bb02b53665
commit 2f6b07dba8
17 changed files with 194 additions and 121 deletions

View File

@ -5,6 +5,7 @@
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
#include "libao2/afmt.h"
@ -98,7 +99,7 @@ sh_audio->audio_out_minsize=8192;// default size, maybe not enough for Win32/ACM
switch(driver){
case AFM_ACM:
#ifndef USE_WIN32DLL
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"Win32/ACM audio codec disabled, or unavailable on non-x86 CPU -> force nosound :(\n");
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_NoACMSupport);
driver=0;
#else
// Win32 ACM audio codec:
@ -111,20 +112,20 @@ case AFM_ACM:
// if(sh_audio->a_buffer_size<sh_audio->audio_out_minsize+MAX_OUTBURST)
// sh_audio->a_buffer_size=sh_audio->audio_out_minsize+MAX_OUTBURST;
} else {
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"Could not load/initialize Win32/ACM AUDIO codec (missing DLL file?)\n");
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_ACMiniterror);
driver=0;
}
#endif
break;
case AFM_DSHOW:
#ifndef USE_DIRECTSHOW
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"Compiled without DirectShow support -> force nosound :(\n");
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_NoDShowAudio);
driver=0;
#else
// Win32 DShow audio codec:
// printf("DShow_audio: channs=%d rate=%d\n",sh_audio->channels,sh_audio->samplerate);
if(DS_AudioDecoder_Open(sh_audio->codec->dll,&sh_audio->codec->guid,sh_audio->wf)){
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"ERROR: Could not load/initialize Win32/DirectShow AUDIO codec: %s\n",sh_audio->codec->dll);
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_MissingDLLcodec,sh_audio->codec->dll);
driver=0;
} else {
sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec;
@ -141,7 +142,7 @@ case AFM_DSHOW:
break;
case AFM_VORBIS:
#ifndef HAVE_OGGVORBIS
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"OggVorbis audio codec disabled -> force nosound :(\n");
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_NoOggVorbis);
driver=0;
#else
/* OggVorbis audio via libvorbis, compatible with files created by nandub and zorannt codec */
@ -173,7 +174,7 @@ case AFM_MPEG:
break;
case AFM_FFMPEG:
#ifndef USE_LIBAVCODEC
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"MPlayer was compiled WITHOUT libavcodec support!\n");
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_NoLAVCsupport);
return 0;
#else
// FFmpeg Audio:
@ -192,7 +193,7 @@ mp_msg(MSGT_DECAUDIO,MSGL_V,"dec_audio: Allocating %d + %d = %d bytes for output
sh_audio->a_buffer=malloc(sh_audio->a_buffer_size);
if(!sh_audio->a_buffer){
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"Cannot allocate audio out buffer\n");
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_CantAllocAudioBuf);
return 0;
}
memset(sh_audio->a_buffer,0,sh_audio->a_buffer_size);
@ -203,7 +204,7 @@ switch(driver){
case AFM_ACM: {
int ret=acm_decode_audio(sh_audio,sh_audio->a_buffer,4096,sh_audio->a_buffer_size);
if(ret<0){
mp_msg(MSGT_DECAUDIO,MSGL_WARN,"ACM decoding error: %d\n",ret);
mp_msg(MSGT_DECAUDIO,MSGL_INFO,"ACM decoding error: %d\n",ret);
driver=0;
}
sh_audio->a_buffer_len=ret;
@ -268,12 +269,12 @@ case AFM_HWAC3: {
len = ds_get_packet(sh_audio->ds, &buffer); // maybe 1 packet is not enough,
// at least for mpeg, PS packets contain about max. 2000 bytes of data.
if(ac3_iec958_parse_syncinfo(buffer, len, &ai, &skipped) < 0) {
mp_msg(MSGT_DECAUDIO,MSGL_ERR, "AC3 stream not valid.\n");
mp_msg(MSGT_DECAUDIO,MSGL_ERR, MSGTR_AC3notvalid);
driver = 0;
break;
}
if(ai.samplerate != 48000) {
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"Only 48000 Hz streams supported.\n");
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_AC3only48k);
driver = 0;
break;
}
@ -303,13 +304,13 @@ case AFM_FFMPEG: {
}
lavc_codec = (AVCodec *)avcodec_find_decoder_by_name(sh_audio->codec->dll);
if(!lavc_codec){
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"Can't find codec '%s' in libavcodec...\n",sh_audio->codec->dll);
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_MissingLAVCcodec,sh_audio->codec->dll);
return 0;
}
memset(&lavc_context, 0, sizeof(lavc_context));
/* open it */
if (avcodec_open(&lavc_context, lavc_codec) < 0) {
mp_msg(MSGT_DECAUDIO,MSGL_ERR, "could not open codec\n");
mp_msg(MSGT_DECAUDIO,MSGL_ERR, MSGTR_CantOpenCodec);
return 0;
}
mp_msg(MSGT_DECAUDIO,MSGL_V,"INFO: libavcodec init OK!\n");
@ -480,7 +481,7 @@ case AFM_VORBIS: {
}
if(!sh_audio->channels || !sh_audio->samplerate){
mp_msg(MSGT_DECAUDIO,MSGL_WARN,"Unknown/missing audio format, using nosound\n");
mp_msg(MSGT_DECAUDIO,MSGL_WARN,MSGTR_UnknownAudio);
driver=0;
}
@ -512,7 +513,7 @@ int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen){
int x=ds_get_packet(sh_audio->ds,&start);
if(x<=0) break; // error
y=avcodec_decode_audio(&lavc_context,buf,&len2,start,x);
if(y<0){ printf("lavc_audio: error\n");break; }
if(y<0){ mp_msg(MSGT_DECAUDIO,MSGL_V,"lavc_audio: error\n");break; }
if(y<x) sh_audio->ds->buffer_pos+=y-x; // put back data (HACK!)
if(len2>0){
//len=len2;break;

View File

@ -5,6 +5,7 @@
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
extern int verbose; // defined in mplayer.c
extern int divx_quality;
@ -146,12 +147,12 @@ int set_video_colors(sh_video_t *sh_video,char *item,int value){
int uninit_video(sh_video_t *sh_video){
if(!sh_video->inited) return;
printf("uninit video: %d \n",sh_video->codec->driver);
mp_msg(MSGT_DECVIDEO,MSGL_V,"uninit video: %d \n",sh_video->codec->driver);
switch(sh_video->codec->driver){
#ifdef USE_LIBAVCODEC
case VFM_FFMPEG:
if (avcodec_close(&lavc_context) < 0)
mp_msg(MSGT_DECVIDEO,MSGL_ERR, "could not close codec\n");
mp_msg(MSGT_DECVIDEO,MSGL_ERR, MSGTR_CantCloseCodec);
break;
#endif
#ifdef USE_DIRECTSHOW
@ -179,7 +180,6 @@ switch(sh_video->codec->driver){
#ifdef USE_WIN32DLL
case VFM_VFW: {
if(!init_video_codec(sh_video,0)) {
// GUI_MSG( mplUnknowError )
return 0;
}
mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32 video codec init OK!\n");
@ -187,7 +187,6 @@ switch(sh_video->codec->driver){
}
case VFM_VFWEX: {
if(!init_video_codec(sh_video,1)) {
// GUI_MSG( mplUnknowError )
return 0;
}
mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32Ex video codec init OK!\n");
@ -195,26 +194,17 @@ switch(sh_video->codec->driver){
}
case VFM_DSHOW: { // Win32/DirectShow
#ifndef USE_DIRECTSHOW
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"MPlayer was compiled WITHOUT directshow support!\n");
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_NoDShowSupport);
return 0;
// GUI_MSG( mplCompileWithoutDSSupport )
#else
int bpp;
if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, sh_video->bih, 0, &sh_video->our_out_buffer)){
// if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, sh_video->bih, 0, NULL)){
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"ERROR: Couldn't open required DirectShow codec: %s\n",sh_video->codec->dll);
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MissingDLLcodec,sh_video->codec->dll);
mp_msg(MSGT_DECVIDEO,MSGL_HINT,"Maybe you forget to upgrade your win32 codecs?? It's time to download the new\n");
mp_msg(MSGT_DECVIDEO,MSGL_HINT,"package from: ftp://mplayerhq.hu/MPlayer/releases/w32codec.zip !\n");
// mp_msg(MSGT_DECVIDEO,MSGL_HINT,"Or you should disable DShow support: make distclean;make -f Makefile.No-DS\n");
return 0;
// #ifdef HAVE_GUI
// if ( !nogui )
// {
// strcpy( mplShMem->items.videodata.codecdll,sh_video->codec->dll );
// mplSendMessage( mplDSCodecNotFound );
// usec_sleep( 10000 );
// }
// #endif
}
switch(out_fmt){
@ -248,7 +238,7 @@ switch(sh_video->codec->driver){
case VFM_VFW:
case VFM_DSHOW:
case VFM_VFWEX:
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Support for win32 codecs disabled, or unavailable on non-x86 platforms!\n");
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_NoWin32Support);
return 0;
#endif /* !USE_WIN32DLL */
case VFM_ODIVX: { // OpenDivX
@ -272,7 +262,7 @@ switch(sh_video->codec->driver){
}
case VFM_DIVX4: { // DivX4Linux
#ifndef NEW_DECORE
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"MPlayer was compiled WITHOUT DivX4Linux (libdivxdecore.so) support!\n");
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_NoDivx4Support);
return 0;
#else
mp_msg(MSGT_DECVIDEO,MSGL_V,"DivX4Linux video codec\n");
@ -307,7 +297,7 @@ switch(sh_video->codec->driver){
}
case VFM_FFMPEG: { // FFmpeg's libavcodec
#ifndef USE_LIBAVCODEC
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"MPlayer was compiled WITHOUT libavcodec support!\n");
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_NoLAVCsupport);
return 0;
#else
mp_msg(MSGT_DECVIDEO,MSGL_V,"FFmpeg's libavcodec video codec\n");
@ -318,7 +308,7 @@ switch(sh_video->codec->driver){
}
lavc_codec = (AVCodec *)avcodec_find_decoder_by_name(sh_video->codec->dll);
if(!lavc_codec){
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Can't find codec '%s' in libavcodec...\n",sh_video->codec->dll);
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MissingLAVCcodec,sh_video->codec->dll);
return 0;
}
memset(&lavc_context, 0, sizeof(lavc_context));
@ -328,7 +318,7 @@ switch(sh_video->codec->driver){
mp_dbg(MSGT_DECVIDEO,MSGL_DBG2,"libavcodec.size: %d x %d\n",lavc_context.width,lavc_context.height);
/* open it */
if (avcodec_open(&lavc_context, lavc_codec) < 0) {
mp_msg(MSGT_DECVIDEO,MSGL_ERR, "could not open codec\n");
mp_msg(MSGT_DECVIDEO,MSGL_ERR, MSGTR_CantOpenCodec);
return 0;
}
@ -342,11 +332,7 @@ switch(sh_video->codec->driver){
#ifdef MPEG12_POSTPROC
picture->pp_options=divx_quality;
#else
if(divx_quality){
mp_msg(MSGT_DECVIDEO,MSGL_HINT,"WARNING! You requested image postprocessing for an MPEG 1/2 video,\n");
mp_msg(MSGT_DECVIDEO,MSGL_HINT," but compiled MPlayer without MPEG 1/2 postprocessing support!\n");
mp_msg(MSGT_DECVIDEO,MSGL_HINT," #define MPEG12_POSTPROC in config.h, and recompile libmpeg2!\n");
}
if(divx_quality) mp_msg(MSGT_DECVIDEO,MSGL_HINT,MSGTR_MpegPPhint);
#endif
mpeg2_allocate_image_buffers (picture);
break;
@ -363,7 +349,7 @@ switch(sh_video->codec->driver){
int cols=1<<(sh_video->bih->biBitCount);
int i;
if(cols>256) cols=256;
printf("RLE: converting palette for %d colors.\n",cols);
mp_msg(MSGT_DECVIDEO,MSGL_V,"RLE: converting palette for %d colors.\n",cols);
for(i=0;i<cols;i++){
unsigned int c=pal[i];
unsigned int b=c&255;
@ -651,9 +637,8 @@ switch(d_video->demuxer->file_format){
if(i==0x1B3) break; // found it!
if(!i || !skip_video_packet(d_video)){
if(verbose) mp_msg(MSGT_DECVIDEO,MSGL_V,"NONE :(\n");
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"MPEG: FATAL: EOF while searching for sequence header\n");
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MpegNoSequHdr);
return 0;
// GUI_MSG( mplMPEGErrorSeqHeaderSearch )
}
}
mp_msg(MSGT_DECVIDEO,MSGL_V,"OK!\n");
@ -662,33 +647,28 @@ switch(d_video->demuxer->file_format){
// ========= Read & process sequence header & extension ============
if(!videobuffer) videobuffer=memalign(8,VIDEOBUFFER_SIZE);
if(!videobuffer){
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Cannot allocate shared memory\n");
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_ShMemAllocFail);
return 0;
// GUI_MSG( mplErrorShMemAlloc )
}
if(!read_video_packet(d_video)){
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"FATAL: Cannot read sequence header!\n");
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_CannotReadMpegSequHdr);
return 0;
// GUI_MSG( mplMPEGErrorCannotReadSeqHeader )
}
if(header_process_sequence_header (picture, &videobuffer[4])) {
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"bad sequence header!\n");
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_BadMpegSequHdr);
return 0;
// GUI_MSG( mplMPEGErrorBadSeqHeader )
}
if(sync_video_packet(d_video)==0x1B5){ // next packet is seq. ext.
// videobuf_len=0;
int pos=videobuf_len;
if(!read_video_packet(d_video)){
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"FATAL: Cannot read sequence header extension!\n");
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_CannotReadMpegSequHdrEx);
return 0;
// GUI_MSG( mplMPEGErrorCannotReadSeqHeaderExt )
}
if(header_process_extension (picture, &videobuffer[pos+4])) {
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"bad sequence header extension!\n");
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_BadMpegSequHdrEx);
return 0;
// GUI_MSG( mplMPEGErrorBadSeqHeaderExt )
}
}
// display info:

View File

@ -6,6 +6,7 @@
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
#include "stream.h"
#include "asf.h"

View File

@ -6,6 +6,7 @@
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
#include "stream.h"
#include "demuxer.h"
@ -221,7 +222,7 @@ do{
if(!ret && priv->skip_video_frames<=0)
if(--max_packs==0){
demux->stream->eof=1;
mp_msg(MSGT_DEMUX,MSGL_ERR,"demux: file doesn't contain the selected audio or video stream\n");
mp_msg(MSGT_DEMUX,MSGL_ERR,MSGTR_DoesntContainSelectedStream);
return 0;
}
} while(ret!=1);
@ -298,7 +299,7 @@ do{
if(!ret && priv->skip_video_frames<=0)
if(--max_packs==0){
demux->stream->eof=1;
mp_msg(MSGT_DEMUX,MSGL_ERR,"demux: file doesn't contain the selected audio or video stream\n");
mp_msg(MSGT_DEMUX,MSGL_ERR,MSGTR_DoesntContainSelectedStream);
return 0;
}
} while(ret!=1);
@ -409,16 +410,16 @@ demuxer_t* demux_open_avi(demuxer_t* demuxer){
}
}
if(v_pos==-1){
mp_msg(MSGT_DEMUX,MSGL_ERR,"AVI_NI: missing video stream!? contact the author, it may be a bug :(\n");
mp_msg(MSGT_DEMUX,MSGL_ERR,"AVI_NI: " MSGTR_MissingVideoStream);
return NULL;
// GUI_MSG( mplErrorAVINI )
}
if(a_pos==-1){
mp_msg(MSGT_DEMUX,MSGL_INFO,"AVI_NI: No audio stream found -> nosound\n");
mp_msg(MSGT_DEMUX,MSGL_INFO,"AVI_NI: " MSGTR_MissingAudioStream);
sh_audio=NULL;
} else {
if(force_ni || abs(a_pos-v_pos)>0x100000){ // distance > 1MB
mp_msg(MSGT_DEMUX,MSGL_INFO,"%s NON-INTERLEAVED AVI file-format!\n",force_ni?"Forced":"Detected");
mp_msg(MSGT_DEMUX,MSGL_INFO,MSGTR_NI_Message,force_ni?MSGTR_NI_Forced:MSGTR_NI_Detected);
demuxer->type=DEMUXER_TYPE_AVI_NI; // HACK!!!!
pts_from_bps=1; // force BPS sync!
}
@ -426,7 +427,7 @@ demuxer_t* demux_open_avi(demuxer_t* demuxer){
} else {
// no index
if(force_ni){
mp_msg(MSGT_DEMUX,MSGL_INFO,"Using NON-INTERLEAVED Broken AVI file-format!\n");
mp_msg(MSGT_DEMUX,MSGL_INFO,MSGTR_UsingNINI);
demuxer->type=DEMUXER_TYPE_AVI_NINI; // HACK!!!!
priv->idx_pos_a=
priv->idx_pos_v=demuxer->movi_start;
@ -435,7 +436,7 @@ demuxer_t* demux_open_avi(demuxer_t* demuxer){
demuxer->seekable=0;
}
if(!ds_fill_buffer(d_video)){
mp_msg(MSGT_DEMUX,MSGL_ERR,"AVI: missing video stream!? contact the author, it may be a bug :(\n");
mp_msg(MSGT_DEMUX,MSGL_ERR,"AVI: " MSGTR_MissingVideoStreamBug);
return NULL;
// GUI_MSG( mplAVIErrorMissingVideoStream )
}
@ -443,7 +444,7 @@ demuxer_t* demux_open_avi(demuxer_t* demuxer){
if(d_audio->id!=-2){
mp_msg(MSGT_DEMUX,MSGL_V,"AVI: Searching for audio stream (id:%d)\n",d_audio->id);
if(!ds_fill_buffer(d_audio)){
mp_msg(MSGT_DEMUX,MSGL_INFO,"AVI: No Audio stream found... ->nosound\n");
mp_msg(MSGT_DEMUX,MSGL_INFO,"AVI: " MSGTR_MissingAudioStream);
sh_audio=NULL;
} else {
sh_audio=d_audio->sh;sh_audio->ds=d_audio;
@ -499,7 +500,7 @@ void demux_seek_avi(demuxer_t *demuxer,float rel_seek_secs,int flags){
// bad video header, try to get it from audio
if(sh_audio) total=sh_video->fps*sh_audio->audio.dwLength/sh_audio->wf->nAvgBytesPerSec;
if(total<=1){
mp_msg(MSGT_SEEK,MSGL_WARN,"Couldn't determine number of frames (for absoulte seek) \n");
mp_msg(MSGT_SEEK,MSGL_WARN,MSGTR_CouldntDetFNo);
total=0;
}
}

View File

@ -7,6 +7,7 @@
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
#include "stream.h"
#include "demuxer.h"
@ -143,7 +144,7 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
}
mp_msg(MSGT_DEMUX,MSGL_V,"\n");
if(fourcc!=trak->fourcc && i)
mp_msg(MSGT_DEMUX,MSGL_WARN,"MOV: Warning! variable FOURCC detected!?\n");
mp_msg(MSGT_DEMUX,MSGL_WARN,MSGTR_MOVvariableFourCC);
if(!stream_seek(demuxer->stream,pos+len)) break;
}
break;
@ -168,7 +169,7 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
if(id==MOV_FOURCC('t','r','a','k')){
// if(trak) printf("MOV: Warning! trak in trak?\n");
if(priv->track_db>=MOV_MAX_TRACKS){
mp_msg(MSGT_DEMUX,MSGL_WARN,"MOV: Warning! too many tracks!");
mp_msg(MSGT_DEMUX,MSGL_WARN,MSGTR_MOVtooManyTrk);
return;
}
trak=malloc(sizeof(mov_track_t));
@ -180,7 +181,7 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
trak=NULL;
} else
if(id==MOV_FOURCC('c','m','o','v')){
mp_msg(MSGT_DEMUX,MSGL_ERR,"MOV: Compressed headers not (yet) supported!\n");
mp_msg(MSGT_DEMUX,MSGL_ERR,MSGTR_MOVcomprhdr);
return;
}
@ -202,7 +203,7 @@ int mov_read_header(demuxer_t* demuxer){
// Build tables:
// ...
mp_msg(MSGT_DEMUX,MSGL_ERR,"\n****** Quicktime MOV format not yet supported!!!!!!! *******\n");
mp_msg(MSGT_DEMUX,MSGL_ERR,MSGTR_MOVnotyetsupp);
return 1;
}

View File

@ -6,6 +6,7 @@
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
#include "config.h"
#include "dvdauth.h"
@ -107,7 +108,7 @@ static int demux_mpg_read_packet(demuxer_t *demux,int id){
#ifdef HAVE_LIBCSS
css=1;
#else
mp_msg(MSGT_DEMUX,MSGL_WARN,"Encrypted VOB file (not compiled with libcss support)! Read file DOCS/DVD\n");
mp_msg(MSGT_DEMUX,MSGL_WARN,MSGTR_EncryptedVOB);
#endif
}
c=stream_read_char(demux->stream); pts_flags=c>>6;
@ -231,7 +232,7 @@ static int demux_mpg_read_packet(demuxer_t *demux,int id){
#ifdef HAVE_LIBCSS
if (css) {
if (descrambling) CSSDescramble(demux->stream->buffer,key_title); else
mp_msg(MSGT_DEMUX,MSGL_WARN,"Encrypted stream but authentication was not requested by you!!\n");
mp_msg(MSGT_DEMUX,MSGL_WARN,MSGTR_EncryptedVOBauth);
}
#endif
ds_read_packet(ds,demux->stream,len,pts/90000.0f,demux->filepos,0);
@ -310,7 +311,7 @@ do{
if(!ret)
if(--max_packs==0){
demux->stream->eof=1;
mp_msg(MSGT_DEMUX,MSGL_ERR,"demux: file doesn't contain the selected audio or video stream\n");
mp_msg(MSGT_DEMUX,MSGL_ERR,MSGTR_DoesntContainSelectedStream);
return 0;
}
} else {

View File

@ -407,7 +407,7 @@ if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_MPEG_PS){
file_format=DEMUXER_TYPE_MPEG_ES; // <-- hack is here :)
} else {
if(demuxer->synced==2)
mp_msg(MSGT_DEMUXER,MSGL_ERR,MSGTR_MissingMpegVideo);
mp_msg(MSGT_DEMUXER,MSGL_ERR,"MPEG: " MSGTR_MissingVideoStreamBug);
else
mp_msg(MSGT_DEMUXER,MSGL_V,"Not MPEG System Stream format... (maybe Transport Stream?)\n");
}
@ -465,7 +465,7 @@ switch(file_format){
// demuxer->idx_pos=0;
// demuxer->endpos=avi_header.movi_end;
if(!ds_fill_buffer(d_video)){
mp_msg(MSGT_DEMUXER,MSGL_WARN,MSGTR_MissingASFvideo);
mp_msg(MSGT_DEMUXER,MSGL_WARN,"ASF: " MSGTR_MissingVideoStream);
sh_video=NULL;
//printf("ASF: missing video stream!? contact the author, it may be a bug :(\n");
//GUI_MSG( mplASFErrorMissingVideoStream )
@ -482,7 +482,7 @@ switch(file_format){
if(audio_id!=-2){
mp_msg(MSGT_DEMUXER,MSGL_V,"ASF: Searching for audio stream (id:%d)\n",d_audio->id);
if(!ds_fill_buffer(d_audio)){
mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_MissingASFaudio);
mp_msg(MSGT_DEMUXER,MSGL_INFO,"ASF: " MSGTR_MissingAudioStream);
sh_audio=NULL;
} else {
sh_audio=d_audio->sh;sh_audio->ds=d_audio;
@ -503,7 +503,7 @@ switch(file_format){
if(audio_id!=-2) {
if(!ds_fill_buffer(d_audio)){
mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_MissingMPEGaudio);
mp_msg(MSGT_DEMUXER,MSGL_INFO,"MPEG: " MSGTR_MissingAudioStream);
sh_audio=NULL;
} else {
sh_audio=d_audio->sh;sh_audio->ds=d_audio;
@ -534,9 +534,9 @@ int demux_seek(demuxer_t *demuxer,float rel_seek_secs,int flags){
if(!demuxer->seekable){
if(demuxer->file_format==DEMUXER_TYPE_AVI)
mp_msg(MSGT_SEEK,MSGL_WARN,"Can't seek in raw .AVI streams! (index required, try with the -idx switch!) \n");
mp_msg(MSGT_SEEK,MSGL_WARN,MSGTR_CantSeekRawAVI);
else
mp_msg(MSGT_SEEK,MSGL_WARN,"Can't seek in this file! \n");
mp_msg(MSGT_SEEK,MSGL_WARN,MSGTR_CantSeekFile);
return 0;
}

View File

@ -5,6 +5,7 @@
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
#include "stream.h"
#include "demuxer.h"
@ -50,7 +51,7 @@ int init_acm_audio_codec(sh_audio_t *sh_audio){
if(ret==ACMERR_NOTPOSSIBLE)
mp_msg(MSGT_WIN32,MSGL_ERR,"ACM_Decoder: Unappropriate audio format\n");
else
mp_msg(MSGT_WIN32,MSGL_ERR,"ACM_Decoder: acmStreamOpen error %d", (int)ret);
mp_msg(MSGT_WIN32,MSGL_ERR,"ACM_Decoder: acmStreamOpen error: %d", (int)ret);
sh_audio->srcstream=NULL;
return 0;
}
@ -283,7 +284,7 @@ int init_video_codec(sh_video_t *sh_video,int ex){
sh_video->our_out_buffer = memalign(64,sh_video->o_bih.biSizeImage);
if(!sh_video->our_out_buffer){
mp_msg(MSGT_WIN32,MSGL_ERR,"not enough memory for decoded picture buffer (%ld bytes)\n", sh_video->o_bih.biSizeImage);
mp_msg(MSGT_WIN32,MSGL_ERR,MSGTR_NoMemForDecodedImage, sh_video->o_bih.biSizeImage);
return 0;
}

View File

@ -16,20 +16,20 @@ int main ( int argc , char ** argv )
{
int fd,lba=0;
if (argc!=2) {
printf("Bad usage.\n");
fprintf(stderr,"Bad usage.\n");
return 1;
}
if ((fd = open(argv[1], O_RDONLY)) == -1) {
printf("Cannot open file %s: %s\n",
fprintf(stderr,"Cannot open file %s: %s\n",
argv[1] ? argv[1] : "(NULL)", strerror(errno));
return 1;
}
if (ioctl(fd, FIBMAP, &lba) != 0) {
printf("fibmap ioctl: %s (Hint: %s is not suid root?)\n",strerror(errno),argv[0]);
fprintf(stderr,"fibmap ioctl: %s (Hint: %s is not suid root?)\n",strerror(errno),argv[0]);
close(fd);
return 1;
}
close(fd);
printf("%d\n",lba);
fprintf(stderr,"%d\n",lba);
return 0;
}

View File

@ -1,3 +1,5 @@
// ========================= MPlayer help ===========================
#ifdef HELP_MP_DEFINE_STATIC
static char* banner_text=
"\n\n"
@ -49,6 +51,8 @@ static char help_text[]=
"\n";
#endif
// ========================= MPlayer messages ===========================
// mplayer.c:
#define MSGTR_Exiting "\nExiting... (%s)\n"
@ -91,9 +95,14 @@ static char help_text[]=
#define MSGTR_SystemTooSlow "\n************************************************************************"\
"\n** Your system is too SLOW to play this! try with -framedrop or RTFM! **"\
"\n************************************************************************\n"
//#define MSGTR_
// open.c:
#define MSGTR_NoGui "MPlayer was compiled WITHOUT GUI support!\n"
#define MSGTR_GuiNeedsX "MPlayer GUI requires X11!\n"
#define MSGTR_Playing "Playing %s\n"
#define MSGTR_NoSound "Audio: no sound!!!\n"
#define MSGTR_FPSforced "FPS forced to be %5.3f (ftime: %5.3f)\n"
// open.c, stream.c:
#define MSGTR_CdDevNotfound "CD-ROM Device '%s' not found!\n"
#define MSGTR_ErrTrackSelect "Error selecting VCD track!"
#define MSGTR_ReadSTDIN "Reading from stdin...\n"
@ -101,7 +110,19 @@ static char help_text[]=
#define MSGTR_ConnToServer "Connected to server: %s\n"
#define MSGTR_FileNotFound "File not found: '%s'\n"
// demuxer.c:
#define MSGTR_CantOpenDVD "Couldn't open DVD device: %s\n"
#define MSGTR_DVDwait "Reading disc structure, please wait...\n"
#define MSGTR_DVDnumTitles "There are %d titles on this DVD.\n"
#define MSGTR_DVDinvalidTitle "Invalid DVD title number: %d\n"
#define MSGTR_DVDnumChapters "There are %d chapters in this DVD title.\n"
#define MSGTR_DVDinvalidChapter "Invalid DVD chapter number: %d\n"
#define MSGTR_DVDnumAngles "There are %d angles in this DVD title.\n"
#define MSGTR_DVDinvaludAngle "Invalid DVD angle number: %d\n"
#define MSGTR_DVDnoIFO "Can't open the IFO file for DVD title %d.\n"
#define MSGTR_DVDnoVOBs "Can't open title VOBS (VTS_%02d_1.VOB).\n"
#define MSGTR_DVDopenOk "DVD successfully opened!\n"
// demuxer.c, demux_*.c:
#define MSGTR_AudioStreamRedefined "Warning! Audio stream header %d redefined!\n"
#define MSGTR_VideoStreamRedefined "Warning! video stream header %d redefined!\n"
#define MSGTR_TooManyAudioInBuffer "\nDEMUXER: Too many (%d in %d bytes) audio packets in the buffer!\n"
@ -117,11 +138,71 @@ static char help_text[]=
#define MSGTR_InvalidMPEGES "Invalid MPEG-ES stream??? contact the author, it may be a bug :(\n"
#define MSGTR_FormatNotRecognized "============= Sorry, this file format not recognized/supported ===============\n"\
"=== If this file is an AVI, ASF or MPEG stream, please contact the author! ===\n"
#define MSGTR_MissingASFvideo "ASF: no video stream found!\n"
#define MSGTR_MissingASFaudio "ASF: No Audio stream found... ->nosound\n"
#define MSGTR_MissingMPEGaudio "MPEG: No Audio stream found... ->nosound\n"
#define MSGTR_MissingVideoStream "No video stream found!\n"
#define MSGTR_MissingAudioStream "No Audio stream found... ->nosound\n"
#define MSGTR_MissingVideoStreamBug "Missing video stream!? Contact the author, it may be a bug :(\n"
//#define MSGTR_
#define MSGTR_DoesntContainSelectedStream "demux: file doesn't contain the selected audio or video stream\n"
#define MSGTR_NI_Forced "Forced"
#define MSGTR_NI_Detected "Detected"
#define MSGTR_NI_Message "%s NON-INTERLEAVED AVI file-format!\n"
#define MSGTR_UsingNINI "Using NON-INTERLEAVED Broken AVI file-format!\n"
#define MSGTR_CouldntDetFNo "Couldn't determine number of frames (for absoulte seek) \n"
#define MSGTR_CantSeekRawAVI "Can't seek in raw .AVI streams! (index required, try with the -idx switch!) \n"
#define MSGTR_CantSeekFile "Can't seek in this file! \n"
#define MSGTR_EncryptedVOB "Encrypted VOB file (not compiled with libcss support)! Read file DOCS/DVD\n"
#define MSGTR_EncryptedVOBauth "Encrypted stream but authentication was not requested by you!!\n"
#define MSGTR_MOVcomprhdr "MOV: Compressed headers not (yet) supported!\n"
#define MSGTR_MOVvariableFourCC "MOV: Warning! variable FOURCC detected!?\n"
#define MSGTR_MOVtooManyTrk "MOV: Warning! too many tracks!"
#define MSGTR_MOVnotyetsupp "\n****** Quicktime MOV format not yet supported!!!!!!! *******\n"
// dec_video.c & dec_audio.c:
#define MSGTR_CantOpenCodec "could not open codec\n"
#define MSGTR_CantCloseCodec "could not close codec\n"
#define MSGTR_MissingDLLcodec "ERROR: Couldn't open required DirectShow codec: %s\n"
#define MSGTR_ACMiniterror "Could not load/initialize Win32/ACM AUDIO codec (missing DLL file?)\n"
#define MSGTR_MissingLAVCcodec "Can't find codec '%s' in libavcodec...\n"
#define MSGTR_NoDShowSupport "MPlayer was compiled WITHOUT directshow support!\n"
#define MSGTR_NoWfvSupport "Support for win32 codecs disabled, or unavailable on non-x86 platforms!\n"
#define MSGTR_NoDivx4Support "MPlayer was compiled WITHOUT DivX4Linux (libdivxdecore.so) support!\n"
#define MSGTR_NoLAVCsupport "MPlayer was compiled WITHOUT ffmpeg/libavcodec support!\n"
#define MSGTR_NoACMSupport "Win32/ACM audio codec disabled, or unavailable on non-x86 CPU -> force nosound :(\n"
#define MSGTR_NoDShowAudio "Compiled without DirectShow support -> force nosound :(\n"
#define MSGTR_NoOggVorbis "OggVorbis audio codec disabled -> force nosound :(\n"
#define MSGTR_MpegPPhint "WARNING! You requested image postprocessing for an MPEG 1/2 video,\n" \
" but compiled MPlayer without MPEG 1/2 postprocessing support!\n" \
" #define MPEG12_POSTPROC in config.h, and recompile libmpeg2!\n"
#define MSGTR_MpegNoSequHdr "MPEG: FATAL: EOF while searching for sequence header\n"
#define MSGTR_CannotReadMpegSequHdr "FATAL: Cannot read sequence header!\n"
#define MSGTR_CannotReadMpegSequHdrEx "FATAL: Cannot read sequence header extension!\n"
#define MSGTR_BadMpegSequHdr "MPEG: Bad sequence header!\n"
#define MSGTR_BadMpegSequHdrEx "MPEG: Bad sequence header extension!\n"
#define MSGTR_ShMemAllocFail "Cannot allocate shared memory\n"
#define MSGTR_CantAllocAudioBuf "Cannot allocate audio out buffer\n"
#define MSGTR_NoMemForDecodedImage "not enough memory for decoded picture buffer (%ld bytes)\n"
#define MSGTR_AC3notvalid "AC3 stream not valid.\n"
#define MSGTR_AC3only48k "Only 48000 Hz streams supported.\n"
#define MSGTR_UnknownAudio "Unknown/missing audio format, using nosound\n"
// LIRC:
#define MSGTR_SettingUpLIRC "Setting up lirc support...\n"
#define MSGTR_LIRCdisabled "You won't be able to use your remote control\n"
#define MSGTR_LIRCopenfailed "Failed opening lirc support!\n"
#define MSGTR_LIRCsocketerr "Something's wrong with the lirc socket: %s\n"
#define MSGTR_LIRCcfgerr "Failed to read LIRC config file %s !\n"
// ====================== GUI messages/buttons ========================
#ifdef HAVE_NEW_GUI

View File

@ -37,10 +37,9 @@ void lirc_mp_setup(void){
int lirc_flags;
int lirc_sock;
printf("Setting up lirc support...\n");
mp_msg(MSGT_LIRC,MSGL_INFO,MSGTR_SettingUpLIRC);
if((lirc_sock=lirc_init("mplayer_lirc",1))==-1){
printf("Failed opening lirc support!\n");
printf("You won't be able to use your remote control\n");
mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCopenfailed MSGTR_LIRCdisabled);
return;
}
@ -51,21 +50,18 @@ void lirc_mp_setup(void){
fcntl(lirc_sock,F_SETFL,lirc_flags|O_NONBLOCK);
}else{
lirc_deinit();
printf("Something's wrong with the lirc socket: %s\n",
strerror(errno));
printf("You won't be able to use your remote control\n");
mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCsocketerr MSGTR_LIRCdisabled,strerror(errno));
return;
}
if(lirc_readconfig( lirc_configfile,&lirc_config,NULL )!=0 ){
printf("Failed to read config file %s !\n",
mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCcfgerr MSGTR_LIRCdisabled,
lirc_configfile == NULL ? "~/.lircrc" : lirc_configfile);
printf("You won't be able to use your remote control\n");
lirc_deinit();
return;
}
printf("LIRC init was successful.\n");
mp_msg(MSGT_LIRC,MSGL_V,"LIRC init was successful.\n");
lirc_is_setup = 1;
}
@ -73,7 +69,7 @@ void lirc_mp_setup(void){
void lirc_mp_cleanup(void){
if(lirc_is_setup != 0){
printf("Cleaning up lirc stuff.\n");
mp_msg(MSGT_LIRC,MSGL_V,"Cleaning up lirc stuff.\n");
lirc_mp_getinput(NULL);
lirc_freeconfig(lirc_config);
lirc_deinit();
@ -137,7 +133,7 @@ int lirc_mp_getinput(){
}
free(code);
if(ret==-1){
printf("LIRC: lirc_code2char() returned an error!\n");
mp_msg(MSGT_LIRC,MSGL_V,"LIRC: lirc_code2char() returned an error!\n");
}
}
}

View File

@ -43,6 +43,11 @@ extern int verbose; // defined in mplayer.c
#define MSGT_OPEN 16 // open.c (stream opening)
#define MSGT_DVD 17 // open.c (DVD init/read/seek)
#define MSGT_PARSEES 18 // parse_es.c (mpeg stream parser)
#define MSGT_LIRC 19 // lirc_mp.c
#define MSGT_STREAM 20 // stream.c
#define MSGT_MAX 64
void mp_msg_init(int verbose);

View File

@ -497,12 +497,12 @@ int gui_no_filename=0;
#ifndef HAVE_NEW_GUI
if(use_gui){
mp_msg(MSGT_CPLAYER,MSGL_WARN,"MPlayer was compiled WITHOUT GUI support!\n");
mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoGui);
use_gui=0;
}
#else
if(use_gui && !vo_init()){
mp_msg(MSGT_CPLAYER,MSGL_WARN,"MPlayer GUI requires X11!\n");
mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_GuiNeedsX);
use_gui=0;
}
#endif
@ -639,7 +639,7 @@ play_next_file:
}
#endif
if(filename) mp_msg(MSGT_CPLAYER,MSGL_INFO,"Playing %s\n", filename);
if(filename) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_Playing, filename);
#ifdef USE_SUB
// check .sub
@ -1117,7 +1117,7 @@ if(sh_audio){
if(sh_audio) sh_audio->timer=0;
if(!sh_audio){
mp_msg(MSGT_CPLAYER,MSGL_INFO,"Audio: no sound!!!\n");
mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_NoSound);
if(verbose) mp_msg(MSGT_CPLAYER,MSGL_V,"Freeing %d unused audio chunks\n",d_audio->packs);
ds_free_packs(d_audio); // free buffered chunks
d_audio->id=-2; // do not read audio chunks
@ -1130,7 +1130,7 @@ if(demuxer->file_format!=DEMUXER_TYPE_AVI) pts_from_bps=0; // it must be 0 for m
if(force_fps){
sh_video->fps=force_fps;
sh_video->frametime=1.0f/sh_video->fps;
mp_msg(MSGT_CPLAYER,MSGL_INFO,"FPS forced to be %5.3f (ftime: %5.3f)\n",sh_video->fps,sh_video->frametime);
mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_FPSforced,sh_video->fps,sh_video->frametime);
}
//==================== START PLAYING =======================
@ -1318,7 +1318,7 @@ if(1)
if(d>0){
if(verbose)
if((int)sh_video->fps==1000)
printf("\rASF framerate: %d fps \n",(int)(1.0f/d));
mp_msg(MSGT_CPLAYER,MSGL_STATUS,"\rASF framerate: %d fps \n",(int)(1.0f/d));
sh_video->frametime=d; // 1ms
sh_video->fps=1.0f/d;
}

22
open.c
View File

@ -127,11 +127,11 @@ if(dvd_title){
if(!filename) filename=DEFAULT_DVD_DEVICE;
dvd = DVDOpen(filename);
if( !dvd ) {
mp_msg(MSGT_OPEN,MSGL_ERR, "Couldn't open DVD: %s\n",filename);
mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,filename);
return NULL;
}
mp_msg(MSGT_OPEN,MSGL_INFO, "Reading disc structure, please wait...\n");
mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_DVDwait);
/**
* Load the video manager to find out the information about the titles on
@ -147,10 +147,10 @@ if(dvd_title){
/**
* Make sure our title number is valid.
*/
mp_msg(MSGT_OPEN,MSGL_INFO, "There are %d titles on this DVD.\n",
mp_msg(MSGT_OPEN,MSGL_INFO, MSGTR_DVDnumTitles,
tt_srpt->nr_of_srpts );
if( dvd_title < 1 || dvd_title > tt_srpt->nr_of_srpts ) {
mp_msg(MSGT_OPEN,MSGL_ERR, "Invalid DVD title number: %d\n", dvd_title);
mp_msg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDinvalidTitle, dvd_title);
ifoClose( vmg_file );
DVDClose( dvd );
return NULL;
@ -159,10 +159,10 @@ if(dvd_title){
/**
* Make sure the chapter number is valid for this title.
*/
mp_msg(MSGT_OPEN,MSGL_INFO, "There are %d chapters in this DVD title.\n",
mp_msg(MSGT_OPEN,MSGL_INFO, MSGTR_DVDnumChapters,
tt_srpt->title[dvd_title].nr_of_ptts );
if( dvd_chapter<1 || dvd_chapter>tt_srpt->title[dvd_title].nr_of_ptts ) {
mp_msg(MSGT_OPEN,MSGL_ERR, "Invalid DVD chapter number: %d\n", dvd_chapter);
mp_msg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDinvalidChapter, dvd_chapter);
ifoClose( vmg_file );
DVDClose( dvd );
return NULL;
@ -171,10 +171,10 @@ if(dvd_title){
/**
* Make sure the angle number is valid for this title.
*/
mp_msg(MSGT_OPEN,MSGL_INFO, "There are %d angles in this DVD title.\n",
mp_msg(MSGT_OPEN,MSGL_INFO, MSGTR_DVDnumAngles,
tt_srpt->title[dvd_title].nr_of_angles );
if( dvd_angle<1 || dvd_angle>tt_srpt->title[dvd_title].nr_of_angles ) {
mp_msg(MSGT_OPEN,MSGL_ERR, "Invalid DVD angle number: %d\n", dvd_angle);
mp_msg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDinvaludAngle, dvd_angle);
ifoClose( vmg_file );
DVDClose( dvd );
return NULL;
@ -185,7 +185,7 @@ if(dvd_title){
*/
vts_file = ifoOpen( dvd, tt_srpt->title[dvd_title].title_set_nr );
if( !vts_file ) {
mp_msg(MSGT_OPEN,MSGL_ERR, "Can't open the IFO file for DVD title %d.\n",
mp_msg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDnoIFO,
tt_srpt->title[dvd_title].title_set_nr );
ifoClose( vmg_file );
DVDClose( dvd );
@ -197,7 +197,7 @@ if(dvd_title){
title = DVDOpenFile( dvd, tt_srpt->title[dvd_title].title_set_nr,
DVD_READ_TITLE_VOBS );
if( !title ) {
mp_msg(MSGT_OPEN,MSGL_ERR, "Can't open title VOBS (VTS_%02d_1.VOB).\n",
mp_msg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDnoVOBs,
tt_srpt->title[dvd_title].title_set_nr );
ifoClose( vts_file );
ifoClose( vmg_file );
@ -205,7 +205,7 @@ if(dvd_title){
return NULL;
}
mp_msg(MSGT_OPEN,MSGL_INFO, "DVD successfully opened!\n");
mp_msg(MSGT_OPEN,MSGL_INFO, MSGTR_DVDopenOk);
// store data
d=malloc(sizeof(dvd_priv_t)); memset(d,0,sizeof(dvd_priv_t));
d->dvd=dvd;

View File

@ -7,6 +7,8 @@
extern int verbose; // defined in mplayer.c
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
#include "stream.h"
#include "demuxer.h"
@ -46,7 +48,7 @@ int sync_video_packet(demux_stream_t *ds){
c=demux_getc(ds);if(c<0){ return 0;} // EOF
videobuf_code[3]=c;
}
if(verbose>=2) if(skipped) printf("videobuf: %d bytes skipped (next: 0x1%02X)\n",skipped,videobuf_code[3]);
if(skipped) mp_dbg(MSGT_PARSEES,MSGL_DBG2,"videobuf: %d bytes skipped (next: 0x1%02X)\n",skipped,videobuf_code[3]);
return 0x100|videobuf_code[3];
}
@ -90,7 +92,7 @@ int packet_start;
videobuf_len-=4;
if(verbose>=2) printf("videobuf: packet 0x1%02X len=%d (total=%d)\n",videobuffer[packet_start+3],videobuf_len-packet_start,videobuf_len);
mp_dbg(MSGT_PARSEES,MSGL_DBG2,"videobuf: packet 0x1%02X len=%d (total=%d)\n",videobuffer[packet_start+3],videobuf_len-packet_start,videobuf_len);
// Save next packet code:
videobuf_code[0]=videobuffer[videobuf_len];

View File

@ -9,6 +9,8 @@
#include <fcntl.h>
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
#include "stream.h"
@ -116,7 +118,7 @@ if(newpos==0 || newpos!=s->pos){
case STREAMTYPE_STREAM:
//s->pos=newpos; // real seek
if(newpos<s->pos){
printf("Cannot seek backward in linear streams!\n");
mp_msg(MSGT_STREAM,MSGL_INFO,"Cannot seek backward in linear streams!\n");
return 1;
}
while(s->pos<newpos){
@ -134,10 +136,11 @@ if(newpos==0 || newpos!=s->pos){
s->buf_pos=pos; // byte position in sector
return 1;
}
#ifdef _LARGEFILE_SOURCE
if(verbose) printf("stream_seek: WARNING! Can't seek to 0x%llX !\n",(long long)(pos+newpos));
mp_msg(MSGT_STREAM,MSGL_V,"stream_seek: WARNING! Can't seek to 0x%llX !\n",(long long)(pos+newpos));
#else
if(verbose) printf("stream_seek: WARNING! Can't seek to 0x%X !\n",(pos+newpos));
mp_msg(MSGT_STREAM,MSGL_V,"stream_seek: WARNING! Can't seek to 0x%X !\n",(pos+newpos));
#endif
return 0;
}

View File

@ -62,7 +62,7 @@ void vcd_read_toc(int fd){
if (ioctl(fd,CDROMREADTOCENTRY,&tocentry)==-1)
{ perror("read CDROM toc entry: "); return; }
printf("track %02d: adr=%d ctrl=%d format=%d %02d:%02d:%02d mode: %d\n",
mp_msg(MSGT_OPEN,MSGL_INFO,"track %02d: adr=%d ctrl=%d format=%d %02d:%02d:%02d mode: %d\n",
(int)tocentry.cdte_track,
(int)tocentry.cdte_adr,
(int)tocentry.cdte_ctrl,