[MPlayer-cvslog] r19368 - trunk/libao2/ao_mpegpes.c
ivo
subversion at mplayerhq.hu
Fri Aug 11 19:10:57 CEST 2006
Author: ivo
Date: Fri Aug 11 19:10:57 2006
New Revision: 19368
Modified:
trunk/libao2/ao_mpegpes.c
Log:
replace calls to perror() with calls to mp_msg()
this will shut up mplayer -realy-quiet. ao_mpegpes is the first ao that is
tried and will almost always fail (unless you have the right hardware)
Modified: trunk/libao2/ao_mpegpes.c
==============================================================================
--- trunk/libao2/ao_mpegpes.c (original)
+++ trunk/libao2/ao_mpegpes.c Fri Aug 11 19:10:57 2006
@@ -6,6 +6,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <inttypes.h>
+#include <errno.h>
#include "config.h"
@@ -108,28 +109,28 @@
#endif
if((vo_mpegpes_fd2 = open(ao_file,O_RDWR|O_NONBLOCK)) < 0)
{
- perror("DVB AUDIO DEVICE: ");
+ mp_msg(MSGT_VO, MSGL_ERR, "DVB AUDIO DEVICE: %s\n", strerror(errno));
return -1;
}
if( (ioctl(vo_mpegpes_fd2,AUDIO_SELECT_SOURCE, AUDIO_SOURCE_MEMORY) < 0))
{
- perror("DVB AUDIO SELECT SOURCE: ");
+ mp_msg(MSGT_VO, MSGL_ERR, "DVB AUDIO SELECT SOURCE: %s\n", strerror(errno));
return -1;
}
if((ioctl(vo_mpegpes_fd2,AUDIO_PLAY) < 0))
{
- perror("DVB AUDIO PLAY: ");
+ mp_msg(MSGT_VO, MSGL_ERR, "DVB AUDIO PLAY: %s\n", strerror(errno));
return -1;
}
if((ioctl(vo_mpegpes_fd2,AUDIO_SET_AV_SYNC, true) < 0))
{
- perror("DVB AUDIO SET AV SYNC: ");
+ mp_msg(MSGT_VO, MSGL_ERR, "DVB AUDIO SET AV SYNC: %s\n", strerror(errno));
return -1;
}
//FIXME: in vo_mpegpes audio was inited as MUTEd
if((ioctl(vo_mpegpes_fd2,AUDIO_SET_MUTE, false) < 0))
{
- perror("DVB AUDIO SET MUTE: ");
+ mp_msg(MSGT_VO, MSGL_ERR, "DVB AUDIO SET MUTE: %s\n", strerror(errno));
return -1;
}
return vo_mpegpes_fd2;
@@ -170,7 +171,7 @@
vo_mpegpes_fd2=open(ao_file,O_WRONLY|O_CREAT,0666);
if(vo_mpegpes_fd2<0)
{
- perror("ao_mpegpes");
+ mp_msg(MSGT_VO, MSGL_ERR, "ao_mpegpes: %s\n", strerror(errno));
return -1;
}
return vo_mpegpes_fd2;
@@ -190,7 +191,7 @@
if(pfd[0].revents & POLLOUT){
int ret=write(vo_mpegpes_fd2,data,len);
if(ret<=0){
- perror("write");
+ mp_msg(MSGT_VO, MSGL_ERR, "ao_mpegpes write: %s\n", strerror(errno));
usleep(0);
} else {
len-=ret;
More information about the MPlayer-cvslog
mailing list