summaryrefslogtreecommitdiffstats
path: root/stream/stream_cue.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_cue.c')
-rw-r--r--stream/stream_cue.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/stream/stream_cue.c b/stream/stream_cue.c
index 6bddab7c9e..ee890894fc 100644
--- a/stream/stream_cue.c
+++ b/stream/stream_cue.c
@@ -165,8 +165,8 @@ static int cue_getTrackinfo(char *Line, tTrack *track)
}
else if (strncmp(&Line[4], "PREGAP ", 7)==0) { ; /* ignore */ }
else if (strncmp(&Line[4], "FLAGS ", 6)==0) { ; /* ignore */ }
- else mp_msg (MSGT_OPEN,MSGL_INFO,
- MSGTR_MPDEMUX_CUEREAD_UnexpectedCuefileLine, Line);
+ else mp_tmsg (MSGT_OPEN,MSGL_INFO,
+ "[bincue] Unexpected cuefile line: %s\n", Line);
}
return 0;
}
@@ -217,7 +217,7 @@ static int cue_find_bin (char *firstline) {
fd_bin = open (bin_filename, O_RDONLY);
if (fd_bin == -1)
{
- mp_msg(MSGT_OPEN,MSGL_STATUS, MSGTR_MPDEMUX_CUEREAD_BinFilenameTested,
+ mp_tmsg(MSGT_OPEN,MSGL_STATUS, "[bincue] bin filename tested: %s\n",
bin_filename);
/* now try to find it with the path of the cue file */
@@ -225,8 +225,8 @@ static int cue_find_bin (char *firstline) {
fd_bin = open (s, O_RDONLY);
if (fd_bin == -1)
{
- mp_msg(MSGT_OPEN,MSGL_STATUS,
- MSGTR_MPDEMUX_CUEREAD_BinFilenameTested, s);
+ mp_tmsg(MSGT_OPEN,MSGL_STATUS,
+ "[bincue] bin filename tested: %s\n", s);
/* now I would say the whole filename is shit, build our own */
strncpy(s, cue_filename, strlen(cue_filename) - 3 );
s[strlen(cue_filename) - 3] = '\0';
@@ -234,16 +234,16 @@ static int cue_find_bin (char *firstline) {
fd_bin = open (s, O_RDONLY);
if (fd_bin == -1)
{
- mp_msg(MSGT_OPEN,MSGL_STATUS,
- MSGTR_MPDEMUX_CUEREAD_BinFilenameTested, s);
+ mp_tmsg(MSGT_OPEN,MSGL_STATUS,
+ "[bincue] bin filename tested: %s\n", s);
/* ok try it with path */
snprintf(t, sizeof( t ), "%s/%s", bincue_path, s);
fd_bin = open (t, O_RDONLY);
if (fd_bin == -1)
{
- mp_msg(MSGT_OPEN,MSGL_STATUS,
- MSGTR_MPDEMUX_CUEREAD_BinFilenameTested,t);
+ mp_tmsg(MSGT_OPEN,MSGL_STATUS,
+ "[bincue] bin filename tested: %s\n",t);
/* now I would say the whole filename is shit, build our own */
strncpy(s, cue_filename, strlen(cue_filename) - 3 );
s[strlen(cue_filename) - 3] = '\0';
@@ -251,19 +251,19 @@ static int cue_find_bin (char *firstline) {
fd_bin = open (s, O_RDONLY);
if (fd_bin == -1)
{
- mp_msg(MSGT_OPEN,MSGL_STATUS,
- MSGTR_MPDEMUX_CUEREAD_BinFilenameTested, s);
+ mp_tmsg(MSGT_OPEN,MSGL_STATUS,
+ "[bincue] bin filename tested: %s\n", s);
/* ok try it with path */
snprintf(t, sizeof( t ), "%s/%s", bincue_path, s);
fd_bin = open (t, O_RDONLY);
if (fd_bin == -1)
{
- mp_msg(MSGT_OPEN,MSGL_STATUS,
- MSGTR_MPDEMUX_CUEREAD_BinFilenameTested, s);
+ mp_tmsg(MSGT_OPEN,MSGL_STATUS,
+ "[bincue] bin filename tested: %s\n", s);
/* I'll give up */
- mp_msg(MSGT_OPEN,MSGL_ERR,
- MSGTR_MPDEMUX_CUEREAD_CannotFindBinFile);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,
+ "[bincue] Couldn't find the bin file - giving up.\n");
return -1;
}
}
@@ -275,8 +275,8 @@ static int cue_find_bin (char *firstline) {
}
- mp_msg(MSGT_OPEN,MSGL_INFO,
- MSGTR_MPDEMUX_CUEREAD_UsingBinFile, bin_filename);
+ mp_tmsg(MSGT_OPEN,MSGL_INFO,
+ "[bincue] Using bin file %s.\n", bin_filename);
return 0;
}
@@ -309,8 +309,8 @@ static inline int cue_mode_2_sector_size(int mode)
case MODE2_2336: return SIZEISO_MODE2_FORM2;
default:
- mp_msg(MSGT_OPEN,MSGL_FATAL,
- MSGTR_MPDEMUX_CUEREAD_UnknownModeForBinfile);
+ mp_tmsg(MSGT_OPEN,MSGL_FATAL,
+ "[bincue] unknown mode for binfile. Should not happen. Aborting.\n");
abort();
}
@@ -360,8 +360,8 @@ static int cue_read_cue (char *in_cue_filename)
fd_cue = fopen (in_cue_filename, "r");
if (fd_cue == NULL)
{
- mp_msg(MSGT_OPEN,MSGL_ERR,
- MSGTR_MPDEMUX_CUEREAD_CannotOpenCueFile, in_cue_filename);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,
+ "[bincue] Cannot open %s.\n", in_cue_filename);
return -1;
}
@@ -370,8 +370,8 @@ static int cue_read_cue (char *in_cue_filename)
if(! fgets( sLine, 256, fd_cue ) )
{
- mp_msg(MSGT_OPEN,MSGL_ERR,
- MSGTR_MPDEMUX_CUEREAD_ErrReadingFromCueFile, in_cue_filename);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,
+ "[bincue] Error reading from %s\n", in_cue_filename);
fclose (fd_cue);
return -1;
}
@@ -386,8 +386,8 @@ static int cue_read_cue (char *in_cue_filename)
/* red the next line and call our track finder */
if(! fgets( sLine, 256, fd_cue ) )
{
- mp_msg(MSGT_OPEN,MSGL_ERR,
- MSGTR_MPDEMUX_CUEREAD_ErrReadingFromCueFile, in_cue_filename);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,
+ "[bincue] Error reading from %s\n", in_cue_filename);
fclose (fd_cue);
return -1;
}
@@ -396,8 +396,8 @@ static int cue_read_cue (char *in_cue_filename)
{
if (cue_getTrackinfo(sLine, &tracks[nTracks++]) != 0)
{
- mp_msg(MSGT_OPEN,MSGL_ERR,
- MSGTR_MPDEMUX_CUEREAD_ErrReadingFromCueFile, in_cue_filename);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,
+ "[bincue] Error reading from %s\n", in_cue_filename);
fclose (fd_cue);
return -1;
}
@@ -405,8 +405,8 @@ static int cue_read_cue (char *in_cue_filename)
/* make a fake track with stands for the Lead out */
if (fstat (fd_bin, &filestat) == -1) {
- mp_msg(MSGT_OPEN,MSGL_ERR,
- MSGTR_MPDEMUX_CUEREAD_ErrGettingBinFileSize);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,
+ "[bincue] Error getting size of bin file.\n");
fclose (fd_cue);
return -1;
}
@@ -500,8 +500,8 @@ static void cue_vcd_read_toc(void){
int i;
for (i = 0; i < nTracks; ++i) {
- mp_msg(MSGT_OPEN,MSGL_INFO,
- MSGTR_MPDEMUX_CUEREAD_InfoTrackFormat,
+ mp_tmsg(MSGT_OPEN,MSGL_INFO,
+ "track %02d: format=%d %02d:%02d:%02d\n",
i+1,
tracks[i].mode,
tracks[i].minute,
@@ -527,12 +527,12 @@ static int cue_vcd_read(stream_t *stream, char *mem, int size) {
return 0;
if(lseek(fd_bin, position+VCD_SECTOR_OFFS, SEEK_SET) == -1) {
- mp_msg(MSGT_OPEN,MSGL_ERR, MSGTR_MPDEMUX_CUEREAD_UnexpectedBinFileEOF);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR, "[bincue] unexpected end of bin file\n");
return 0;
}
if(read(fd_bin, mem, VCD_SECTOR_DATA) != VCD_SECTOR_DATA) {
- mp_msg(MSGT_OPEN,MSGL_ERR, MSGTR_MPDEMUX_CUEREAD_CannotReadNBytesOfPayload, VCD_SECTOR_DATA);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR, "[bincue] Couldn't read %d bytes of payload.\n", VCD_SECTOR_DATA);
return 0;
}
@@ -588,10 +588,11 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
ret2=cue_vcd_get_track_end(track);
ret=cue_vcd_seek_to_track(track);
if(ret<0){
- mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_ErrTrackSelect " (seek)\n");
+ mp_msg(MSGT_OPEN, MSGL_ERR, "%s (seek)\n",
+ mp_gtext("Error selecting VCD track."));
return STREAM_UNSUPPORTED;
}
- mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_MPDEMUX_CUEREAD_CueStreamInfo_FilenameTrackTracksavail, filename, track, ret, ret2);
+ mp_tmsg(MSGT_OPEN,MSGL_INFO,"CUE stream_open, filename=%s, track=%d, available tracks: %d -> %d\n", filename, track, ret, ret2);
stream->fd = f;
stream->type = STREAMTYPE_VCDBINCUE;
@@ -617,4 +618,3 @@ const stream_info_t stream_info_cue = {
&stream_opts,
1 // Urls are an option string
};
-