mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
libeplayer3: remove absolute file names
this makes debug output nicer to read for out-of-tree builds
This commit is contained in:
@@ -32,11 +32,13 @@
|
|||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
|
static const char *FILENAME = "eplayer/input.cpp";
|
||||||
|
|
||||||
#define averror(_err,_fun) ({ \
|
#define averror(_err,_fun) ({ \
|
||||||
if (_err < 0) { \
|
if (_err < 0) { \
|
||||||
char _error[512]; \
|
char _error[512]; \
|
||||||
av_strerror(_err, _error, sizeof(_error)); \
|
av_strerror(_err, _error, sizeof(_error)); \
|
||||||
fprintf(stderr, "%s %d: %s: %d (%s)\n", __FILE__, __LINE__, #_fun, _err, _error); \
|
fprintf(stderr, "%s %d: %s: %d (%s)\n", FILENAME, __LINE__, #_fun, _err, _error); \
|
||||||
} \
|
} \
|
||||||
_err; \
|
_err; \
|
||||||
})
|
})
|
||||||
@@ -279,7 +281,7 @@ bool Input::Play()
|
|||||||
Player *player = (Player *) arg;
|
Player *player = (Player *) arg;
|
||||||
bool res = player->input.abortPlayback || player->abortRequested;
|
bool res = player->input.abortPlayback || player->abortRequested;
|
||||||
if (res)
|
if (res)
|
||||||
fprintf(stderr, "%s %s %d: abort requested (%d/%d)\n", __FILE__, __func__, __LINE__, player->input.abortPlayback, player->abortRequested);
|
fprintf(stderr, "%s %s %d: abort requested (%d/%d)\n", FILENAME, __func__, __LINE__, player->input.abortPlayback, player->abortRequested);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -391,7 +393,7 @@ bool Input::Init(const char *filename)
|
|||||||
fprintf(stderr, "filename NULL\n");
|
fprintf(stderr, "filename NULL\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
fprintf(stderr, "%s %s %d: %s\n", __FILE__, __func__, __LINE__, filename);
|
fprintf(stderr, "%s %s %d: %s\n", FILENAME, __func__, __LINE__, filename);
|
||||||
|
|
||||||
avcodec_register_all();
|
avcodec_register_all();
|
||||||
av_register_all();
|
av_register_all();
|
||||||
|
@@ -42,10 +42,12 @@
|
|||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "pes.h"
|
#include "pes.h"
|
||||||
|
|
||||||
|
static const char *FILENAME = "eplayer/output.cpp";
|
||||||
|
|
||||||
#define dioctl(fd,req,arg) ({ \
|
#define dioctl(fd,req,arg) ({ \
|
||||||
int _r = ioctl(fd,req,arg); \
|
int _r = ioctl(fd,req,arg); \
|
||||||
if (_r) \
|
if (_r) \
|
||||||
fprintf(stderr, "%s %d: ioctl '%s' failed: %d (%s)\n", __FILE__, __LINE__, #req, errno, strerror(errno)); \
|
fprintf(stderr, "%s %d: ioctl '%s' failed: %d (%s)\n", FILENAME, __LINE__, #req, errno, strerror(errno)); \
|
||||||
_r; \
|
_r; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@@ -30,6 +30,8 @@
|
|||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
|
static const char *FILENAME = "eplayer/player.cpp";
|
||||||
|
|
||||||
#define cMaxSpeed_ff 128 /* fixme: revise */
|
#define cMaxSpeed_ff 128 /* fixme: revise */
|
||||||
#define cMaxSpeed_fr -320 /* fixme: revise */
|
#define cMaxSpeed_fr -320 /* fixme: revise */
|
||||||
|
|
||||||
@@ -83,7 +85,7 @@ bool Player::Open(const char *Url, bool _noprobe)
|
|||||||
} else if (!strncmp(Url, "bluray:/", 8)) {
|
} else if (!strncmp(Url, "bluray:/", 8)) {
|
||||||
url = Url;
|
url = Url;
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "%s %s %d: Unknown stream (%s)\n", __FILE__, __func__, __LINE__, Url);
|
fprintf(stderr, "%s %s %d: Unknown stream (%s)\n", FILENAME, __func__, __LINE__, Url);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +129,7 @@ bool Player::Play()
|
|||||||
int err = pthread_create(&playThread, NULL, playthread, this);
|
int err = pthread_create(&playThread, NULL, playthread, this);
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
fprintf(stderr, "%s %s %d: pthread_create: %d (%s)\n", __FILE__, __func__, __LINE__, err, strerror(err));
|
fprintf(stderr, "%s %s %d: pthread_create: %d (%s)\n", FILENAME, __func__, __LINE__, err, strerror(err));
|
||||||
ret = false;
|
ret = false;
|
||||||
isPlaying = false;
|
isPlaying = false;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user