mirror of https://github.com/mpv-player/mpv
Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsg
The tmsg stuff was for the internal gettext() based translation system, which nobody ever attempted to use and thus was removed. mp_gtext() and set_osd_tmsg() were also for this. mp_dbg was once enabled in debug mode only, but since we have log level for enabling debug messages, it seems utterly useless.
This commit is contained in:
parent
3e6cd3ef19
commit
7dc7b900c6
|
@ -144,7 +144,7 @@ static int setup_format(struct dec_audio *da)
|
|||
// If not set, try container samplerate.
|
||||
// (Maybe this can't happen, and it's an artifact from the past.)
|
||||
da->decoded.rate = sh_audio->wf->nSamplesPerSec;
|
||||
mp_tmsg(MSGT_DECAUDIO, MSGL_WARN, "ad_lavc: using container rate.\n");
|
||||
mp_msg(MSGT_DECAUDIO, MSGL_WARN, "ad_lavc: using container rate.\n");
|
||||
}
|
||||
|
||||
struct mp_chmap lavc_chmap;
|
||||
|
@ -198,7 +198,7 @@ static int init(struct dec_audio *da, const char *decoder)
|
|||
|
||||
lavc_codec = avcodec_find_decoder_by_name(decoder);
|
||||
if (!lavc_codec) {
|
||||
mp_tmsg(MSGT_DECAUDIO, MSGL_ERR,
|
||||
mp_msg(MSGT_DECAUDIO, MSGL_ERR,
|
||||
"Cannot find codec '%s' in libavcodec...\n", decoder);
|
||||
uninit(da);
|
||||
return 0;
|
||||
|
@ -254,7 +254,7 @@ static int init(struct dec_audio *da, const char *decoder)
|
|||
|
||||
/* open it */
|
||||
if (avcodec_open2(lavc_context, lavc_codec, NULL) < 0) {
|
||||
mp_tmsg(MSGT_DECAUDIO, MSGL_ERR, "Could not open codec.\n");
|
||||
mp_msg(MSGT_DECAUDIO, MSGL_ERR, "Could not open codec.\n");
|
||||
uninit(da);
|
||||
return 0;
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ static void uninit(struct dec_audio *da)
|
|||
|
||||
if (lavc_context) {
|
||||
if (avcodec_close(lavc_context) < 0)
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "Could not close codec.\n");
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Could not close codec.\n");
|
||||
av_freep(&lavc_context->extradata);
|
||||
av_freep(&lavc_context);
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ static int decode_new_packet(struct dec_audio *da)
|
|||
da->pts_offset = 0;
|
||||
}
|
||||
|
||||
mp_dbg(MSGT_DECAUDIO, MSGL_DBG2, "Decoded %d -> %d samples\n", in_len,
|
||||
mp_msg(MSGT_DECAUDIO, MSGL_DBG2, "Decoded %d -> %d samples\n", in_len,
|
||||
priv->frame.samples);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ static bool reinit_audio_buffer(struct dec_audio *da)
|
|||
static void uninit_decoder(struct dec_audio *d_audio)
|
||||
{
|
||||
if (d_audio->ad_driver) {
|
||||
mp_tmsg(MSGT_DECAUDIO, MSGL_V, "Uninit audio decoder.\n");
|
||||
mp_msg(MSGT_DECAUDIO, MSGL_V, "Uninit audio decoder.\n");
|
||||
d_audio->ad_driver->uninit(d_audio);
|
||||
}
|
||||
d_audio->ad_driver = NULL;
|
||||
|
@ -91,7 +91,7 @@ static void uninit_decoder(struct dec_audio *d_audio)
|
|||
static int init_audio_codec(struct dec_audio *d_audio, const char *decoder)
|
||||
{
|
||||
if (!d_audio->ad_driver->init(d_audio, decoder)) {
|
||||
mp_tmsg(MSGT_DECAUDIO, MSGL_V, "Audio decoder init failed.\n");
|
||||
mp_msg(MSGT_DECAUDIO, MSGL_V, "Audio decoder init failed.\n");
|
||||
d_audio->ad_driver = NULL;
|
||||
uninit_decoder(d_audio);
|
||||
return 0;
|
||||
|
@ -148,14 +148,14 @@ int audio_init_best_codec(struct dec_audio *d_audio, char *audio_decoders)
|
|||
const struct ad_functions *driver = find_driver(sel->family);
|
||||
if (!driver)
|
||||
continue;
|
||||
mp_tmsg(MSGT_DECAUDIO, MSGL_V, "Opening audio decoder %s:%s\n",
|
||||
mp_msg(MSGT_DECAUDIO, MSGL_V, "Opening audio decoder %s:%s\n",
|
||||
sel->family, sel->decoder);
|
||||
d_audio->ad_driver = driver;
|
||||
if (init_audio_codec(d_audio, sel->decoder)) {
|
||||
decoder = sel;
|
||||
break;
|
||||
}
|
||||
mp_tmsg(MSGT_DECAUDIO, MSGL_WARN, "Audio decoder init failed for "
|
||||
mp_msg(MSGT_DECAUDIO, MSGL_WARN, "Audio decoder init failed for "
|
||||
"%s:%s\n", sel->family, sel->decoder);
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ int audio_init_filters(struct dec_audio *d_audio, int in_samplerate,
|
|||
|
||||
char *s_from = mp_audio_config_to_str(&afs->input);
|
||||
char *s_to = mp_audio_config_to_str(&afs->output);
|
||||
mp_tmsg(MSGT_DECAUDIO, MSGL_V,
|
||||
mp_msg(MSGT_DECAUDIO, MSGL_V,
|
||||
"Building audio filter chain for %s -> %s...\n", s_from, s_to);
|
||||
talloc_free(s_from);
|
||||
talloc_free(s_to);
|
||||
|
|
|
@ -177,7 +177,7 @@ static struct af_instance *af_create(struct af_stream *s, char *name,
|
|||
{
|
||||
struct m_obj_desc desc;
|
||||
if (!m_obj_list_find(&desc, &af_obj_list, bstr0(name))) {
|
||||
mp_tmsg(MSGT_VFILTER, MSGL_ERR,
|
||||
mp_msg(MSGT_VFILTER, MSGL_ERR,
|
||||
"Couldn't find audio filter '%s'.\n", name);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -818,13 +818,13 @@ static int af_open(struct af_instance *af) {
|
|||
|
||||
if (LADSPA_IS_HINT_BOUNDED_BELOW(hint.HintDescriptor) &&
|
||||
val < hint.LowerBound) {
|
||||
mp_tmsg(MSGT_AFILTER, MSGL_ERR, "%s: Input control #%d is below lower boundary of %0.4f.\n",
|
||||
mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: Input control #%d is below lower boundary of %0.4f.\n",
|
||||
setup->myname, i, hint.LowerBound);
|
||||
return AF_ERROR;
|
||||
}
|
||||
if (LADSPA_IS_HINT_BOUNDED_ABOVE(hint.HintDescriptor) &&
|
||||
val > hint.UpperBound) {
|
||||
mp_tmsg(MSGT_AFILTER, MSGL_ERR, "%s: Input control #%d is above upper boundary of %0.4f.\n",
|
||||
mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: Input control #%d is above upper boundary of %0.4f.\n",
|
||||
setup->myname, i, hint.UpperBound);
|
||||
return AF_ERROR;
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ static int control(struct af_instance *af, int cmd, void *arg)
|
|||
s->lavc_actx->bit_rate = bit_rate;
|
||||
|
||||
if (avcodec_open2(s->lavc_actx, s->lavc_acodec, NULL) < 0) {
|
||||
mp_tmsg(MSGT_AFILTER, MSGL_ERR, "Couldn't open codec %s, br=%d.\n", "ac3", bit_rate);
|
||||
mp_msg(MSGT_AFILTER, MSGL_ERR, "Couldn't open codec %s, br=%d.\n", "ac3", bit_rate);
|
||||
return AF_ERROR;
|
||||
}
|
||||
}
|
||||
|
@ -257,13 +257,13 @@ static int af_open(struct af_instance* af){
|
|||
|
||||
s->lavc_acodec = avcodec_find_encoder_by_name("ac3");
|
||||
if (!s->lavc_acodec) {
|
||||
mp_tmsg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, couldn't find encoder for codec %s.\n", "ac3");
|
||||
mp_msg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, couldn't find encoder for codec %s.\n", "ac3");
|
||||
return AF_ERROR;
|
||||
}
|
||||
|
||||
s->lavc_actx = avcodec_alloc_context3(s->lavc_acodec);
|
||||
if (!s->lavc_actx) {
|
||||
mp_tmsg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, couldn't allocate context!\n");
|
||||
mp_msg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, couldn't allocate context!\n");
|
||||
return AF_ERROR;
|
||||
}
|
||||
const enum AVSampleFormat *fmts = s->lavc_acodec->sample_fmts;
|
||||
|
|
|
@ -113,16 +113,16 @@ static void setvolume_internal(struct mixer *mixer, float l, float r)
|
|||
struct ao_control_vol vol = {.left = l, .right = r};
|
||||
if (!mixer->softvol) {
|
||||
if (ao_control(mixer->ao, AOCONTROL_SET_VOLUME, &vol) != CONTROL_OK)
|
||||
mp_tmsg(MSGT_GLOBAL, MSGL_ERR,
|
||||
mp_msg(MSGT_GLOBAL, MSGL_ERR,
|
||||
"[Mixer] Failed to change audio output volume.\n");
|
||||
return;
|
||||
}
|
||||
float gain = (l + r) / 2.0 / 100.0 * mixer->opts->softvol_max / 100.0;
|
||||
if (!af_control_any_rev(mixer->af, AF_CONTROL_SET_VOLUME, &gain)) {
|
||||
mp_tmsg(MSGT_GLOBAL, MSGL_V, "[Mixer] Inserting volume filter.\n");
|
||||
mp_msg(MSGT_GLOBAL, MSGL_V, "[Mixer] Inserting volume filter.\n");
|
||||
if (!(af_add(mixer->af, "volume", NULL)
|
||||
&& af_control_any_rev(mixer->af, AF_CONTROL_SET_VOLUME, &gain)))
|
||||
mp_tmsg(MSGT_GLOBAL, MSGL_ERR,
|
||||
mp_msg(MSGT_GLOBAL, MSGL_ERR,
|
||||
"[Mixer] No volume control available.\n");
|
||||
}
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ void mixer_setbalance(struct mixer *mixer, float val)
|
|||
return;
|
||||
|
||||
if (!(af_pan_balance = af_add(mixer->af, "pan", NULL))) {
|
||||
mp_tmsg(MSGT_GLOBAL, MSGL_ERR,
|
||||
mp_msg(MSGT_GLOBAL, MSGL_ERR,
|
||||
"[Mixer] No balance control available.\n");
|
||||
return;
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ static void probe_softvol(struct mixer *mixer)
|
|||
ao_control_vol_t vol;
|
||||
if (ao_control(mixer->ao, AOCONTROL_GET_VOLUME, &vol) != CONTROL_OK) {
|
||||
mixer->softvol = true;
|
||||
mp_tmsg(MSGT_GLOBAL, MSGL_WARN,
|
||||
mp_msg(MSGT_GLOBAL, MSGL_WARN,
|
||||
"[mixer] Hardware volume control unavailable.\n");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,14 +181,14 @@ struct ao *ao_init_best(struct mpv_global *global,
|
|||
for (int n = 0; ao_list[n].name; n++) {
|
||||
if (strlen(ao_list[n].name) == 0)
|
||||
goto autoprobe;
|
||||
mp_tmsg(MSGT_AO, MSGL_V, "Trying preferred audio driver '%s'\n",
|
||||
mp_msg(MSGT_AO, MSGL_V, "Trying preferred audio driver '%s'\n",
|
||||
ao_list[n].name);
|
||||
struct ao *ao = ao_create(false, global, input_ctx, encode_lavc_ctx,
|
||||
samplerate, format, channels,
|
||||
ao_list[n].name, ao_list[n].attribs);
|
||||
if (ao)
|
||||
return ao;
|
||||
mp_tmsg(MSGT_AO, MSGL_WARN, "Failed to initialize audio driver '%s'\n",
|
||||
mp_msg(MSGT_AO, MSGL_WARN, "Failed to initialize audio driver '%s'\n",
|
||||
ao_list[n].name);
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
@ -355,7 +355,7 @@ int demuxer_add_packet(demuxer_t *demuxer, struct sh_stream *stream,
|
|||
if (stream->type != STREAM_VIDEO && dp->pts == MP_NOPTS_VALUE)
|
||||
dp->pts = dp->dts;
|
||||
|
||||
mp_dbg(MSGT_DEMUXER, MSGL_DBG2,
|
||||
mp_msg(MSGT_DEMUXER, MSGL_DBG2,
|
||||
"DEMUX: Append packet to %s, len=%d pts=%5.3f pos=%"PRIu64" "
|
||||
"[packs: A=%d V=%d S=%d]\n", stream_type_name(stream->type),
|
||||
dp->len, dp->pts, dp->pos, count_packs(demuxer, STREAM_AUDIO),
|
||||
|
@ -375,13 +375,13 @@ static bool demux_check_queue_full(demuxer_t *demux)
|
|||
overflow:
|
||||
|
||||
if (!demux->warned_queue_overflow) {
|
||||
mp_tmsg(MSGT_DEMUXER, MSGL_ERR, "\nToo many packets in the demuxer "
|
||||
mp_msg(MSGT_DEMUXER, MSGL_ERR, "\nToo many packets in the demuxer "
|
||||
"packet queue (video: %d packets in %d bytes, audio: %d "
|
||||
"packets in %d bytes, sub: %d packets in %d bytes).\n",
|
||||
count_packs(demux, STREAM_VIDEO), count_bytes(demux, STREAM_VIDEO),
|
||||
count_packs(demux, STREAM_AUDIO), count_bytes(demux, STREAM_AUDIO),
|
||||
count_packs(demux, STREAM_SUB), count_bytes(demux, STREAM_SUB));
|
||||
mp_tmsg(MSGT_DEMUXER, MSGL_HINT, "Maybe you are playing a non-"
|
||||
mp_msg(MSGT_DEMUXER, MSGL_HINT, "Maybe you are playing a non-"
|
||||
"interleaved stream/file or the codec failed?\n");
|
||||
}
|
||||
demux->warned_queue_overflow = true;
|
||||
|
@ -401,7 +401,7 @@ static void ds_get_packets(struct sh_stream *sh)
|
|||
{
|
||||
struct demux_stream *ds = sh->ds;
|
||||
demuxer_t *demux = sh->demuxer;
|
||||
mp_dbg(MSGT_DEMUXER, MSGL_DBG3, "ds_get_packets (%s) called\n",
|
||||
mp_msg(MSGT_DEMUXER, MSGL_DBG3, "ds_get_packets (%s) called\n",
|
||||
stream_type_name(sh->type));
|
||||
while (1) {
|
||||
if (ds->head)
|
||||
|
@ -532,10 +532,10 @@ static struct demuxer *open_given_type(struct MPOpts *opts,
|
|||
if (ret >= 0) {
|
||||
demuxer->params = NULL;
|
||||
if (demuxer->filetype)
|
||||
mp_tmsg(MSGT_DEMUXER, MSGL_INFO, "Detected file format: %s (%s)\n",
|
||||
mp_msg(MSGT_DEMUXER, MSGL_INFO, "Detected file format: %s (%s)\n",
|
||||
demuxer->filetype, desc->desc);
|
||||
else
|
||||
mp_tmsg(MSGT_DEMUXER, MSGL_INFO, "Detected file format: %s\n",
|
||||
mp_msg(MSGT_DEMUXER, MSGL_INFO, "Detected file format: %s\n",
|
||||
desc->desc);
|
||||
if (stream_manages_timeline(demuxer->stream)) {
|
||||
// Incorrect, but fixes some behavior with DVD/BD
|
||||
|
@ -622,7 +622,7 @@ void demux_flush(demuxer_t *demuxer)
|
|||
int demux_seek(demuxer_t *demuxer, float rel_seek_secs, int flags)
|
||||
{
|
||||
if (!demuxer->seekable) {
|
||||
mp_tmsg(MSGT_DEMUXER, MSGL_WARN, "Cannot seek in this file.\n");
|
||||
mp_msg(MSGT_DEMUXER, MSGL_WARN, "Cannot seek in this file.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -718,7 +718,7 @@ int demux_info_add_bstr(demuxer_t *demuxer, struct bstr opt, struct bstr param)
|
|||
if (oldval) {
|
||||
if (bstrcmp0(param, oldval) == 0)
|
||||
return 0;
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_INFO, "Demuxer info %.*s changed to %.*s\n",
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, "Demuxer info %.*s changed to %.*s\n",
|
||||
BSTR_P(opt), BSTR_P(param));
|
||||
}
|
||||
|
||||
|
@ -734,7 +734,7 @@ int demux_info_print(demuxer_t *demuxer)
|
|||
if (!info || !info->num_keys)
|
||||
return 0;
|
||||
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_INFO, "Clip info:\n");
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, "Clip info:\n");
|
||||
for (n = 0; n < info->num_keys; n++) {
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, " %s: %s\n", info->keys[n],
|
||||
info->values[n]);
|
||||
|
|
|
@ -73,7 +73,7 @@ static int d_check_file(struct demuxer *demuxer, enum demux_check check)
|
|||
|
||||
bstr buf = stream_read_complete(s, NULL, 100000000);
|
||||
if (!buf.start) {
|
||||
mp_tmsg(MSGT_ASS, MSGL_ERR, "Refusing to load subtitle file "
|
||||
mp_msg(MSGT_ASS, MSGL_ERR, "Refusing to load subtitle file "
|
||||
"larger than 100 MB: %s\n", demuxer->filename);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -278,7 +278,7 @@ static bstr demux_mkv_decode(mkv_track_t *track, bstr data, uint32_t type)
|
|||
zstream.zfree = (free_func) 0;
|
||||
zstream.opaque = (voidpf) 0;
|
||||
if (inflateInit(&zstream) != Z_OK) {
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_WARN,
|
||||
mp_msg(MSGT_DEMUX, MSGL_WARN,
|
||||
"[mkv] zlib initialization failed.\n");
|
||||
goto error;
|
||||
}
|
||||
|
@ -294,7 +294,7 @@ static bstr demux_mkv_decode(mkv_track_t *track, bstr data, uint32_t type)
|
|||
zstream.next_out = (Bytef *) (dest + zstream.total_out);
|
||||
result = inflate(&zstream, Z_NO_FLUSH);
|
||||
if (result != Z_OK && result != Z_STREAM_END) {
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_WARN,
|
||||
mp_msg(MSGT_DEMUX, MSGL_WARN,
|
||||
"[mkv] zlib decompression failed.\n");
|
||||
talloc_free(dest);
|
||||
dest = NULL;
|
||||
|
@ -323,7 +323,7 @@ static bstr demux_mkv_decode(mkv_track_t *track, bstr data, uint32_t type)
|
|||
if (result == 0)
|
||||
break;
|
||||
if (!(result & AV_LZO_OUTPUT_FULL)) {
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_WARN,
|
||||
mp_msg(MSGT_DEMUX, MSGL_WARN,
|
||||
"[mkv] lzo decompression failed.\n");
|
||||
talloc_free(dest);
|
||||
dest = NULL;
|
||||
|
@ -400,7 +400,7 @@ static int demux_mkv_read_info(demuxer_t *demuxer)
|
|||
}
|
||||
}
|
||||
}
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_INFO,
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO,
|
||||
"[mkv] This is not one of the wanted files. "
|
||||
"Stopping attempt to open.\n");
|
||||
res = -2;
|
||||
|
@ -439,18 +439,18 @@ static void parse_trackencodings(struct demuxer *demuxer,
|
|||
}
|
||||
|
||||
if (e.type == 1) {
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_WARN, "[mkv] Track "
|
||||
mp_msg(MSGT_DEMUX, MSGL_WARN, "[mkv] Track "
|
||||
"number %u has been encrypted and "
|
||||
"decryption has not yet been\n"
|
||||
"[mkv] implemented. Skipping track.\n",
|
||||
track->tnum);
|
||||
} else if (e.type != 0) {
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_WARN,
|
||||
mp_msg(MSGT_DEMUX, MSGL_WARN,
|
||||
"[mkv] Unknown content encoding type for "
|
||||
"track %u. Skipping track.\n",
|
||||
track->tnum);
|
||||
} else if (e.comp_algo != 0 && e.comp_algo != 2 && e.comp_algo != 3) {
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_WARN,
|
||||
mp_msg(MSGT_DEMUX, MSGL_WARN,
|
||||
"[mkv] Track %u has been compressed with "
|
||||
"an unknown/unsupported compression\n"
|
||||
"[mkv] algorithm (%" PRIu64 "). Skipping track.\n",
|
||||
|
@ -458,7 +458,7 @@ static void parse_trackencodings(struct demuxer *demuxer,
|
|||
}
|
||||
#if !HAVE_ZLIB
|
||||
else if (e.comp_algo == 0) {
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_WARN,
|
||||
mp_msg(MSGT_DEMUX, MSGL_WARN,
|
||||
"[mkv] Track %u was compressed with zlib "
|
||||
"but mpv has not been compiled\n"
|
||||
"[mkv] with support for zlib compression. "
|
||||
|
@ -1171,12 +1171,12 @@ static void display_create_tracks(demuxer_t *demuxer)
|
|||
break;
|
||||
}
|
||||
if (mkv_d->tracks[i]->name)
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_V,
|
||||
mp_msg(MSGT_DEMUX, MSGL_V,
|
||||
"[mkv] Track ID %u: %s (%s) \"%s\"\n",
|
||||
mkv_d->tracks[i]->tnum, type, mkv_d->tracks[i]->codec_id,
|
||||
mkv_d->tracks[i]->name);
|
||||
else
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_V, "[mkv] Track ID %u: %s (%s)\n",
|
||||
mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] Track ID %u: %s (%s)\n",
|
||||
mkv_d->tracks[i]->tnum, type, mkv_d->tracks[i]->codec_id);
|
||||
}
|
||||
}
|
||||
|
@ -1286,7 +1286,7 @@ static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track)
|
|||
extradata_size = track->private_size;
|
||||
}
|
||||
if (!vi->id) {
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_WARN, "[mkv] Unknown/unsupported "
|
||||
mp_msg(MSGT_DEMUX, MSGL_WARN, "[mkv] Unknown/unsupported "
|
||||
"CodecID (%s) or missing/bad CodecPrivate\n"
|
||||
"[mkv] data (track %u).\n",
|
||||
track->codec_id, track->tnum);
|
||||
|
@ -1652,7 +1652,7 @@ static int demux_mkv_open_audio(demuxer_t *demuxer, mkv_track_t *track)
|
|||
return 0;
|
||||
|
||||
error:
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_WARN, "[mkv] Unknown/unsupported audio "
|
||||
mp_msg(MSGT_DEMUX, MSGL_WARN, "[mkv] Unknown/unsupported audio "
|
||||
"codec ID '%s' for track %u or missing/faulty\n[mkv] "
|
||||
"private codec data.\n", track->codec_id, track->tnum);
|
||||
return 1;
|
||||
|
@ -1707,7 +1707,7 @@ static int demux_mkv_open_sub(demuxer_t *demuxer, mkv_track_t *track)
|
|||
sh->default_track = track->default_track;
|
||||
|
||||
if (!subtitle_type) {
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_ERR,
|
||||
mp_msg(MSGT_DEMUX, MSGL_ERR,
|
||||
"[mkv] Subtitle type '%s' is not supported.\n",
|
||||
track->codec_id);
|
||||
}
|
||||
|
@ -1829,7 +1829,7 @@ static int demux_mkv_open(demuxer_t *demuxer, enum demux_check check)
|
|||
while (1) {
|
||||
uint32_t id = ebml_read_id(s, NULL);
|
||||
if (s->eof) {
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_WARN,
|
||||
mp_msg(MSGT_DEMUX, MSGL_WARN,
|
||||
"[mkv] Unexpected end of file (no clusters found)\n");
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -51,11 +51,11 @@ int mp_input_joystick_init(char* dev) {
|
|||
int initialized = 0;
|
||||
struct js_event ev;
|
||||
|
||||
mp_tmsg(MSGT_INPUT,MSGL_V,"Opening joystick device %s\n",dev ? dev : JS_DEV);
|
||||
mp_msg(MSGT_INPUT,MSGL_V,"Opening joystick device %s\n",dev ? dev : JS_DEV);
|
||||
|
||||
fd = open( dev ? dev : JS_DEV , O_RDONLY | O_NONBLOCK );
|
||||
if(fd < 0) {
|
||||
mp_tmsg(MSGT_INPUT,MSGL_ERR,"Can't open joystick device %s: %s\n",dev ? dev : JS_DEV,strerror(errno));
|
||||
mp_msg(MSGT_INPUT,MSGL_ERR,"Can't open joystick device %s: %s\n",dev ? dev : JS_DEV,strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ int mp_input_joystick_init(char* dev) {
|
|||
initialized = 1;
|
||||
break;
|
||||
}
|
||||
mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n",strerror(errno));
|
||||
mp_msg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n",strerror(errno));
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ int mp_input_joystick_init(char* dev) {
|
|||
}
|
||||
if((unsigned int)l < sizeof(struct js_event)) {
|
||||
if(l > 0)
|
||||
mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick: We lose %d bytes of data\n",l);
|
||||
mp_msg(MSGT_INPUT,MSGL_WARN,"Joystick: We lose %d bytes of data\n",l);
|
||||
break;
|
||||
}
|
||||
if(ev.type == JS_EVENT_BUTTON)
|
||||
|
@ -102,9 +102,9 @@ int mp_input_joystick_read(void *ctx, int fd) {
|
|||
else if(errno == EAGAIN)
|
||||
return MP_INPUT_NOTHING;
|
||||
if( r < 0)
|
||||
mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n",strerror(errno));
|
||||
mp_msg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n",strerror(errno));
|
||||
else
|
||||
mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n","EOF");
|
||||
mp_msg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n","EOF");
|
||||
return MP_INPUT_DEAD;
|
||||
}
|
||||
l += r;
|
||||
|
@ -112,12 +112,12 @@ int mp_input_joystick_read(void *ctx, int fd) {
|
|||
|
||||
if((unsigned int)l < sizeof(struct js_event)) {
|
||||
if(l > 0)
|
||||
mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick: We lose %d bytes of data\n",l);
|
||||
mp_msg(MSGT_INPUT,MSGL_WARN,"Joystick: We lose %d bytes of data\n",l);
|
||||
return MP_INPUT_NOTHING;
|
||||
}
|
||||
|
||||
if(ev.type & JS_EVENT_INIT) {
|
||||
mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick: warning init event, we have lost sync with driver.\n");
|
||||
mp_msg(MSGT_INPUT,MSGL_WARN,"Joystick: warning init event, we have lost sync with driver.\n");
|
||||
ev.type &= ~JS_EVENT_INIT;
|
||||
if(ev.type == JS_EVENT_BUTTON) {
|
||||
int s = (btns >> ev.number) & 1;
|
||||
|
@ -154,7 +154,7 @@ int mp_input_joystick_read(void *ctx, int fd) {
|
|||
} else
|
||||
return MP_INPUT_NOTHING;
|
||||
} else {
|
||||
mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick warning unknown event type %d\n",ev.type);
|
||||
mp_msg(MSGT_INPUT,MSGL_WARN,"Joystick warning unknown event type %d\n",ev.type);
|
||||
return MP_INPUT_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,9 +40,9 @@ mp_input_lirc_init(void) {
|
|||
int lirc_sock;
|
||||
int mode;
|
||||
|
||||
mp_tmsg(MSGT_LIRC,MSGL_V,"Setting up LIRC support...\n");
|
||||
mp_msg(MSGT_LIRC,MSGL_V,"Setting up LIRC support...\n");
|
||||
if((lirc_sock=lirc_init("mpv",0))==-1){
|
||||
mp_tmsg(MSGT_LIRC,MSGL_V,"Failed to open LIRC support. You will not be able to use your remote control.\n");
|
||||
mp_msg(MSGT_LIRC,MSGL_V,"Failed to open LIRC support. You will not be able to use your remote control.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ mp_input_lirc_init(void) {
|
|||
}
|
||||
|
||||
if(lirc_readconfig( lirc_configfile,&lirc_config,NULL )!=0 ){
|
||||
mp_tmsg(MSGT_LIRC,MSGL_ERR,"Failed to read LIRC config file %s.\n",
|
||||
mp_msg(MSGT_LIRC,MSGL_ERR,"Failed to read LIRC config file %s.\n",
|
||||
lirc_configfile == NULL ? "~/.lircrc" : lirc_configfile);
|
||||
lirc_deinit();
|
||||
return -1;
|
||||
|
|
|
@ -75,11 +75,11 @@ static int parse_profile(struct m_config *config, const struct m_option *opt,
|
|||
if (!bstrcmp0(param, "help")) {
|
||||
struct m_profile *p;
|
||||
if (!config->profiles) {
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_INFO,
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_INFO,
|
||||
"No profiles have been defined.\n");
|
||||
return M_OPT_EXIT - 1;
|
||||
}
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "Available profiles:\n");
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_INFO, "Available profiles:\n");
|
||||
for (p = config->profiles; p; p = p->next)
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\t%s\t%s\n", p->name,
|
||||
p->desc ? p->desc : "");
|
||||
|
@ -96,7 +96,7 @@ static int parse_profile(struct m_config *config, const struct m_option *opt,
|
|||
for (int i = 0; list[i]; i++) {
|
||||
struct m_profile *p = m_config_get_profile0(config, list[i]);
|
||||
if (!p) {
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_WARN, "Unknown profile '%s'.\n",
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_WARN, "Unknown profile '%s'.\n",
|
||||
list[i]);
|
||||
r = M_OPT_INVALID;
|
||||
} else if (set)
|
||||
|
@ -113,12 +113,12 @@ static int show_profile(struct m_config *config, bstr param)
|
|||
if (!param.len)
|
||||
return M_OPT_MISSING_PARAM;
|
||||
if (!(p = m_config_get_profile(config, param))) {
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "Unknown profile '%.*s'.\n",
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Unknown profile '%.*s'.\n",
|
||||
BSTR_P(param));
|
||||
return M_OPT_EXIT - 1;
|
||||
}
|
||||
if (!config->profile_depth)
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "Profile %s: %s\n", p->name,
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_INFO, "Profile %s: %s\n", p->name,
|
||||
p->desc ? p->desc : "");
|
||||
config->profile_depth++;
|
||||
for (i = 0; i < p->num_opts; i++) {
|
||||
|
@ -284,7 +284,7 @@ void m_config_backup_opt(struct m_config *config, const char *opt)
|
|||
if (co) {
|
||||
ensure_backup(config, co);
|
||||
} else {
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "Option %s not found.\n", opt);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s not found.\n", opt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -496,14 +496,14 @@ static int m_config_parse_option(struct m_config *config, struct bstr name,
|
|||
|
||||
// Check if this option isn't forbidden in the current mode
|
||||
if ((flags & M_SETOPT_FROM_CONFIG_FILE) && (co->opt->flags & M_OPT_NOCFG)) {
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
|
||||
"The %.*s option can't be used in a config file.\n",
|
||||
BSTR_P(name));
|
||||
return M_OPT_INVALID;
|
||||
}
|
||||
if (flags & M_SETOPT_BACKUP) {
|
||||
if (co->opt->flags & M_OPT_GLOBAL) {
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
|
||||
"The %.*s option is global and can't be set per-file.\n",
|
||||
BSTR_P(name));
|
||||
return M_OPT_INVALID;
|
||||
|
@ -563,7 +563,7 @@ static int parse_subopts(struct m_config *config, char *name, char *prefix,
|
|||
r = m_config_parse_option(config,bstr0(n), bstr0(lst[2 * i + 1]), flags);
|
||||
if (r < 0) {
|
||||
if (r > M_OPT_EXIT) {
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
|
||||
"Error parsing suboption %s/%s (%s)\n",
|
||||
name, lst[2 * i], m_option_strerror(r));
|
||||
r = M_OPT_INVALID;
|
||||
|
@ -582,7 +582,7 @@ int m_config_parse_suboptions(struct m_config *config, char *name,
|
|||
return 0;
|
||||
int r = parse_subopts(config, name, "", bstr0(subopts), 0);
|
||||
if (r < 0 && r > M_OPT_EXIT) {
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "Error parsing suboption %s (%s)\n",
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Error parsing suboption %s (%s)\n",
|
||||
name, m_option_strerror(r));
|
||||
r = M_OPT_INVALID;
|
||||
}
|
||||
|
@ -594,7 +594,7 @@ int m_config_set_option_ext(struct m_config *config, struct bstr name,
|
|||
{
|
||||
int r = m_config_parse_option(config, name, param, flags);
|
||||
if (r < 0 && r > M_OPT_EXIT) {
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "Error parsing option %.*s (%s)\n",
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Error parsing option %.*s (%s)\n",
|
||||
BSTR_P(name), m_option_strerror(r));
|
||||
r = M_OPT_INVALID;
|
||||
}
|
||||
|
@ -633,7 +633,7 @@ void m_config_print_option_list(const struct m_config *config)
|
|||
int count = 0;
|
||||
const char *prefix = config->is_toplevel ? "--" : "";
|
||||
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "Options:\n\n");
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_INFO, "Options:\n\n");
|
||||
for (int i = 0; i < config->num_opts; i++) {
|
||||
struct m_config_option *co = &config->opts[i];
|
||||
const struct m_option *opt = co->opt;
|
||||
|
@ -675,7 +675,7 @@ void m_config_print_option_list(const struct m_config *config)
|
|||
mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\n");
|
||||
count++;
|
||||
}
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "\nTotal: %d options\n", count);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\nTotal: %d options\n", count);
|
||||
}
|
||||
|
||||
struct m_profile *m_config_get_profile(const struct m_config *config, bstr name)
|
||||
|
@ -731,7 +731,7 @@ void m_config_set_profile(struct m_config *config, struct m_profile *p,
|
|||
int flags)
|
||||
{
|
||||
if (config->profile_depth > MAX_PROFILE_DEPTH) {
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_WARN,
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_WARN,
|
||||
"WARNING: Profile inclusion too deep.\n");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -45,18 +45,18 @@ char *m_option_strerror(int code)
|
|||
{
|
||||
switch (code) {
|
||||
case M_OPT_UNKNOWN:
|
||||
return mp_gtext("option not found");
|
||||
return "option not found";
|
||||
case M_OPT_MISSING_PARAM:
|
||||
return mp_gtext("option requires parameter");
|
||||
return "option requires parameter";
|
||||
case M_OPT_INVALID:
|
||||
return mp_gtext("option parameter could not be parsed");
|
||||
return "option parameter could not be parsed";
|
||||
case M_OPT_OUT_OF_RANGE:
|
||||
return mp_gtext("parameter is outside values allowed for option");
|
||||
return "parameter is outside values allowed for option";
|
||||
case M_OPT_DISALLOW_PARAM:
|
||||
return mp_gtext("option doesn't take a parameter");
|
||||
return "option doesn't take a parameter";
|
||||
case M_OPT_PARSER_ERR:
|
||||
default:
|
||||
return mp_gtext("parser error");
|
||||
return "parser error";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1161,7 +1161,8 @@ static int parse_print(const m_option_t *opt, struct bstr name,
|
|||
struct bstr param, void *dst)
|
||||
{
|
||||
if (opt->type == CONF_TYPE_PRINT) {
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_INFO, "%s", mp_gtext(opt->p));
|
||||
const char *msg = opt->p;
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_INFO, "%s", msg);
|
||||
} else {
|
||||
char *name0 = bstrdup0(NULL, name);
|
||||
char *param0 = bstrdup0(NULL, param);
|
||||
|
|
|
@ -306,7 +306,7 @@ void m_properties_print_help_list(const m_option_t *list)
|
|||
char min[50], max[50];
|
||||
int i, count = 0;
|
||||
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_INFO,
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_INFO,
|
||||
"\n Name Type Min Max\n\n");
|
||||
for (i = 0; list[i].name; i++) {
|
||||
const m_option_t *opt = &list[i];
|
||||
|
@ -326,7 +326,7 @@ void m_properties_print_help_list(const m_option_t *list)
|
|||
max);
|
||||
count++;
|
||||
}
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "\nTotal: %d properties\n", count);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\nTotal: %d properties\n", count);
|
||||
}
|
||||
|
||||
int m_property_int_ro(const m_option_t *prop, int action,
|
||||
|
|
|
@ -137,13 +137,9 @@ bool mp_msg_test_log(struct mp_log *log, int lev);
|
|||
#include "config.h"
|
||||
#include "mpvcore/mp_common.h"
|
||||
|
||||
#define mp_gtext(x) ((char*)(x))
|
||||
|
||||
// Note: using mp_msg_log or the MP_ERR/... macros is preferred.
|
||||
void mp_msg_va(int mod, int lev, const char *format, va_list va);
|
||||
void mp_msg(int mod, int lev, const char *format, ... ) PRINTF_ATTRIBUTE(3, 4);
|
||||
#define mp_tmsg mp_msg
|
||||
#define mp_dbg mp_msg
|
||||
|
||||
struct mp_log *mp_log_new(void *talloc_ctx, struct mp_log *parent,
|
||||
const char *name);
|
||||
|
@ -170,7 +166,7 @@ void mp_msg_log(struct mp_log *log, int lev, const char *format, ...)
|
|||
#define mp_warn(log, ...) mp_msg_log(log, MSGL_WARN, __VA_ARGS__)
|
||||
#define mp_info(log, ...) mp_msg_log(log, MSGL_INFO, __VA_ARGS__)
|
||||
#define mp_verbose(log, ...) mp_msg_log(log, MSGL_V, __VA_ARGS__)
|
||||
//#define mp_dbg(log, ...) mp_msg_log(log, MSGL_DBG2, __VA_ARGS__)
|
||||
#define mp_dbg(log, ...) mp_msg_log(log, MSGL_DBG2, __VA_ARGS__)
|
||||
#define mp_trace(log, ...) mp_msg_log(log, MSGL_DBG5, __VA_ARGS__)
|
||||
|
||||
struct mpv_global;
|
||||
|
|
|
@ -104,7 +104,7 @@ static bool split_opt(struct parse_state *p)
|
|||
return r == 0;
|
||||
p->error = true;
|
||||
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_FATAL,
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_FATAL,
|
||||
"Error parsing commandline option %.*s: %s\n",
|
||||
BSTR_P(p->arg), m_option_strerror(r));
|
||||
return false;
|
||||
|
@ -138,7 +138,7 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files,
|
|||
goto err_out;
|
||||
}
|
||||
if (r < 0) {
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_FATAL,
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_FATAL,
|
||||
"Setting commandline option --%.*s=%.*s failed.\n",
|
||||
BSTR_P(p.arg), BSTR_P(p.param));
|
||||
goto err_out;
|
||||
|
@ -192,7 +192,7 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files,
|
|||
struct playlist *pl = playlist_parse_file(param0, opts);
|
||||
talloc_free(param0);
|
||||
if (!pl) {
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_FATAL,
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_FATAL,
|
||||
"Error reading playlist '%.*s'", BSTR_P(p.param));
|
||||
goto err_out;
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files,
|
|||
playlist_add_file(files, f);
|
||||
}
|
||||
} else
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
|
||||
"Invalid play entry %s\n", file0);
|
||||
|
||||
} else // dvd:// or dvd://x entry
|
||||
|
@ -252,7 +252,7 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files,
|
|||
goto err_out;
|
||||
|
||||
if (mode != GLOBAL) {
|
||||
mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
|
||||
"Missing closing --} on command line.\n");
|
||||
goto err_out;
|
||||
}
|
||||
|
|
|
@ -1022,7 +1022,7 @@ static int property_switch_track(m_option_t *prop, int action, void *arg,
|
|||
else {
|
||||
char *lang = track->lang;
|
||||
if (!lang)
|
||||
lang = mp_gtext("unknown");
|
||||
lang = "unknown";
|
||||
|
||||
if (track->title)
|
||||
*(char **)arg = talloc_asprintf(NULL, "(%d) %s (\"%s\")",
|
||||
|
@ -2148,7 +2148,7 @@ static void show_property_osd(MPContext *mpctx, const char *pname, int osd_mode)
|
|||
for (p = property_osd_display; p->name; p++) {
|
||||
if (!strcmp(p->name, prop.name)) {
|
||||
osd_progbar = p->seek_bar ? 1 : p->osd_progbar;
|
||||
osd_name = p->seek_msg ? "" : mp_gtext(p->osd_name);
|
||||
osd_name = p->seek_msg ? "" : p->osd_name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2215,7 +2215,7 @@ static void show_property_osd(MPContext *mpctx, const char *pname, int osd_mode)
|
|||
int index = p - property_osd_display;
|
||||
osd_id = p->osd_id ? p->osd_id : OSD_MSG_PROPERTY + index;
|
||||
}
|
||||
set_osd_tmsg(mpctx, osd_id, 1, opts->osd_duration, "%s", osd_msg);
|
||||
set_osd_msg(mpctx, osd_id, 1, opts->osd_duration, "%s", osd_msg);
|
||||
}
|
||||
|
||||
talloc_free(tmp);
|
||||
|
@ -2314,7 +2314,7 @@ static int edit_filters_osd(struct MPContext *mpctx, enum stream_type mediatype,
|
|||
const char *prop = filter_opt[mediatype];
|
||||
show_property_osd(mpctx, prop, MP_ON_OSD_MSG);
|
||||
} else {
|
||||
set_osd_tmsg(mpctx, OSD_MSG_TEXT, 1, mpctx->opts->osd_duration,
|
||||
set_osd_msg(mpctx, OSD_MSG_TEXT, 1, mpctx->opts->osd_duration,
|
||||
"Changing filters failed!");
|
||||
}
|
||||
}
|
||||
|
@ -2729,7 +2729,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
|||
if (cmd->id == MP_CMD_SUB_STEP) {
|
||||
opts->sub_delay += a[0];
|
||||
osd_changed_all(mpctx->osd);
|
||||
set_osd_tmsg(mpctx, OSD_MSG_SUB_DELAY, osdl, osd_duration,
|
||||
set_osd_msg(mpctx, OSD_MSG_SUB_DELAY, osdl, osd_duration,
|
||||
"Sub delay: %d ms", ROUND(opts->sub_delay * 1000));
|
||||
} else {
|
||||
// We can easily get stuck by failing to seek to the video
|
||||
|
@ -2760,7 +2760,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
|||
else
|
||||
opts->osd_level = v > max ? max : v;
|
||||
if (msg_osd && opts->osd_level <= 1)
|
||||
set_osd_tmsg(mpctx, OSD_MSG_OSD_STATUS, 0, osd_duration,
|
||||
set_osd_msg(mpctx, OSD_MSG_OSD_STATUS, 0, osd_duration,
|
||||
"OSD: %s", opts->osd_level ? "yes" : "no");
|
||||
else
|
||||
rm_osd_msg(mpctx, OSD_MSG_OSD_STATUS);
|
||||
|
@ -2810,7 +2810,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
|||
mp_set_playlist_entry(mpctx, e ? e : mpctx->playlist->first);
|
||||
}
|
||||
} else {
|
||||
mp_tmsg(MSGT_CPLAYER, MSGL_ERR,
|
||||
mp_msg(MSGT_CPLAYER, MSGL_ERR,
|
||||
"\nUnable to load playlist %s.\n", filename);
|
||||
}
|
||||
break;
|
||||
|
@ -2877,7 +2877,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
|||
else
|
||||
radio_step_channel(mpctx->stream, RADIO_CHANNEL_LOWER);
|
||||
if (radio_get_channel_name(mpctx->stream)) {
|
||||
set_osd_tmsg(mpctx, OSD_MSG_RADIO_CHANNEL, osdl, osd_duration,
|
||||
set_osd_msg(mpctx, OSD_MSG_RADIO_CHANNEL, osdl, osd_duration,
|
||||
"Channel: %s",
|
||||
radio_get_channel_name(mpctx->stream));
|
||||
}
|
||||
|
@ -2888,7 +2888,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
|||
if (mpctx->stream && mpctx->stream->type == STREAMTYPE_RADIO) {
|
||||
radio_set_channel(mpctx->stream, cmd->args[0].v.s);
|
||||
if (radio_get_channel_name(mpctx->stream)) {
|
||||
set_osd_tmsg(mpctx, OSD_MSG_RADIO_CHANNEL, osdl, osd_duration,
|
||||
set_osd_msg(mpctx, OSD_MSG_RADIO_CHANNEL, osdl, osd_duration,
|
||||
"Channel: %s",
|
||||
radio_get_channel_name(mpctx->stream));
|
||||
}
|
||||
|
@ -2951,7 +2951,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
|||
tv_step_channel(get_tvh(mpctx), TV_CHANNEL_LOWER);
|
||||
}
|
||||
if (tv_channel_list) {
|
||||
set_osd_tmsg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration,
|
||||
set_osd_msg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration,
|
||||
"Channel: %s", tv_channel_current->name);
|
||||
}
|
||||
}
|
||||
|
@ -2987,7 +2987,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
|||
if (get_tvh(mpctx)) {
|
||||
tv_set_channel(get_tvh(mpctx), cmd->args[0].v.s);
|
||||
if (tv_channel_list) {
|
||||
set_osd_tmsg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration,
|
||||
set_osd_msg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration,
|
||||
"Channel: %s", tv_channel_current->name);
|
||||
}
|
||||
}
|
||||
|
@ -3018,7 +3018,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
|||
if (get_tvh(mpctx)) {
|
||||
tv_last_channel(get_tvh(mpctx));
|
||||
if (tv_channel_list) {
|
||||
set_osd_tmsg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration,
|
||||
set_osd_msg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration,
|
||||
"Channel: %s", tv_channel_current->name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ void mp_load_per_protocol_config(m_config_t *conf, const char * const file)
|
|||
protocol[strlen(PROFILE_CFG_PROTOCOL) + strlen(file) - strlen(str)] = '\0';
|
||||
p = m_config_get_profile0(conf, protocol);
|
||||
if (p) {
|
||||
mp_tmsg(MSGT_CPLAYER, MSGL_INFO,
|
||||
mp_msg(MSGT_CPLAYER, MSGL_INFO,
|
||||
"Loading protocol-related profile '%s'\n", protocol);
|
||||
m_config_set_profile(conf, p, FILE_LOCAL_FLAGS);
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ void mp_load_per_extension_config(m_config_t *conf, const char * const file)
|
|||
strncat(extension, ++str, 7);
|
||||
p = m_config_get_profile0(conf, extension);
|
||||
if (p) {
|
||||
mp_tmsg(MSGT_CPLAYER, MSGL_INFO,
|
||||
mp_msg(MSGT_CPLAYER, MSGL_INFO,
|
||||
"Loading extension-related profile '%s'\n", extension);
|
||||
m_config_set_profile(conf, p, FILE_LOCAL_FLAGS);
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ void mp_load_per_output_config(m_config_t *conf, char *cfg, char *out)
|
|||
sprintf(profile, "%s%s", cfg, out);
|
||||
p = m_config_get_profile0(conf, profile);
|
||||
if (p) {
|
||||
mp_tmsg(MSGT_CPLAYER, MSGL_INFO,
|
||||
mp_msg(MSGT_CPLAYER, MSGL_INFO,
|
||||
"Loading extension-related profile '%s'\n", profile);
|
||||
m_config_set_profile(conf, p, FILE_LOCAL_FLAGS);
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ static int try_load_config(m_config_t *conf, const char *file, int flags)
|
|||
{
|
||||
if (!mp_path_exists(file))
|
||||
return 0;
|
||||
mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "Loading config '%s'\n", file);
|
||||
mp_msg(MSGT_CPLAYER, MSGL_INFO, "Loading config '%s'\n", file);
|
||||
m_config_parse_config_file(conf, file, flags);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -366,7 +366,7 @@ static int mpv_main(int argc, char *argv[])
|
|||
|
||||
if (!mpctx->playlist->first && !opts->player_idle_mode) {
|
||||
mp_print_version(true);
|
||||
MP_INFO(mpctx, "%s", mp_gtext(mp_help_text));
|
||||
MP_INFO(mpctx, "%s", mp_help_text);
|
||||
exit_player(mpctx, EXIT_NONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -408,8 +408,6 @@ void set_osd_bar(struct MPContext *mpctx, int type, const char* name,
|
|||
double min, double max, double val);
|
||||
void set_osd_msg(struct MPContext *mpctx, int id, int level, int time,
|
||||
const char* fmt, ...) PRINTF_ATTRIBUTE(5,6);
|
||||
void set_osd_tmsg(struct MPContext *mpctx, int id, int level, int time,
|
||||
const char* fmt, ...) PRINTF_ATTRIBUTE(5,6);
|
||||
void rm_osd_msg(struct MPContext *mpctx, int id);
|
||||
void set_osd_function(struct MPContext *mpctx, int osd_function);
|
||||
void set_osd_subtitle(struct MPContext *mpctx, const char *text);
|
||||
|
|
|
@ -213,15 +213,6 @@ void set_osd_msg(struct MPContext *mpctx, int id, int level, int time,
|
|||
va_end(ap);
|
||||
}
|
||||
|
||||
void set_osd_tmsg(struct MPContext *mpctx, int id, int level, int time,
|
||||
const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
set_osd_msg_va(mpctx, id, level, time, mp_gtext(fmt), ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Remove a message from the OSD stack
|
||||
*
|
||||
|
@ -451,14 +442,14 @@ static void add_seek_osd_messages(struct MPContext *mpctx)
|
|||
}
|
||||
if (mpctx->add_osd_seek_info & OSD_SEEK_INFO_CHAPTER_TEXT) {
|
||||
char *chapter = chapter_display_name(mpctx, get_current_chapter(mpctx));
|
||||
set_osd_tmsg(mpctx, OSD_MSG_TEXT, 1, mpctx->opts->osd_duration,
|
||||
set_osd_msg(mpctx, OSD_MSG_TEXT, 1, mpctx->opts->osd_duration,
|
||||
"Chapter: %s", chapter);
|
||||
talloc_free(chapter);
|
||||
}
|
||||
if ((mpctx->add_osd_seek_info & OSD_SEEK_INFO_EDITION)
|
||||
&& mpctx->master_demuxer)
|
||||
{
|
||||
set_osd_tmsg(mpctx, OSD_MSG_TEXT, 1, mpctx->opts->osd_duration,
|
||||
set_osd_msg(mpctx, OSD_MSG_TEXT, 1, mpctx->opts->osd_duration,
|
||||
"Playing edition %d of %d.",
|
||||
mpctx->master_demuxer->edition + 1,
|
||||
mpctx->master_demuxer->num_editions);
|
||||
|
|
|
@ -606,7 +606,7 @@ static void update_avsync(struct MPContext *mpctx)
|
|||
mpctx->last_av_difference = MP_NOPTS_VALUE;
|
||||
if (mpctx->last_av_difference > 0.5 && mpctx->drop_frame_cnt > 50
|
||||
&& !mpctx->drop_message_shown) {
|
||||
MP_WARN(mpctx, "%s", mp_gtext(av_desync_help_text));
|
||||
MP_WARN(mpctx, "%s", av_desync_help_text);
|
||||
mpctx->drop_message_shown = true;
|
||||
}
|
||||
}
|
||||
|
@ -1017,7 +1017,7 @@ void run_playloop(struct MPContext *mpctx)
|
|||
}
|
||||
}
|
||||
|
||||
mp_dbg(MSGT_AVSYNC, MSGL_DBG2, "*** ftime=%5.3f ***\n", frame_time);
|
||||
mp_msg(MSGT_AVSYNC, MSGL_DBG2, "*** ftime=%5.3f ***\n", frame_time);
|
||||
if (mpctx->d_video->vfilter && mpctx->d_video->vfilter->initialized < 0)
|
||||
{
|
||||
MP_FATAL(mpctx, "\nFATAL: Could not initialize video filters "
|
||||
|
@ -1059,7 +1059,7 @@ void run_playloop(struct MPContext *mpctx)
|
|||
mpctx->time_frame -= get_relative_time(mpctx);
|
||||
if (full_audio_buffers && !mpctx->restart_playback) {
|
||||
buffered_audio = ao_get_delay(mpctx->ao);
|
||||
mp_dbg(MSGT_AVSYNC, MSGL_DBG2, "delay=%f\n", buffered_audio);
|
||||
mp_msg(MSGT_AVSYNC, MSGL_DBG2, "delay=%f\n", buffered_audio);
|
||||
|
||||
if (opts->autosync) {
|
||||
/* Smooth reported playback position from AO by averaging
|
||||
|
|
|
@ -80,7 +80,7 @@ static void screenshot_msg(screenshot_ctx *ctx, int status, const char *msg,
|
|||
|
||||
mp_msg(MSGT_CPLAYER, status == SMSG_ERR ? MSGL_ERR : MSGL_INFO, "%s\n", s);
|
||||
if (ctx->osd) {
|
||||
set_osd_tmsg(ctx->mpctx, OSD_MSG_TEXT, 1, ctx->mpctx->opts->osd_duration,
|
||||
set_osd_msg(ctx->mpctx, OSD_MSG_TEXT, 1, ctx->mpctx->opts->osd_duration,
|
||||
"%s", s);
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ void update_subtitles(struct MPContext *mpctx)
|
|||
if (!demux_has_packet(sh_stream))
|
||||
break;
|
||||
if (subpts_s > curpts_s) {
|
||||
mp_dbg(MSGT_CPLAYER, MSGL_DBG2,
|
||||
mp_msg(MSGT_CPLAYER, MSGL_DBG2,
|
||||
"Sub early: c_pts=%5.3f s_pts=%5.3f\n",
|
||||
curpts_s, subpts_s);
|
||||
// Libass handled subs can be fed to it in advance
|
||||
|
@ -118,7 +118,7 @@ void update_subtitles(struct MPContext *mpctx)
|
|||
break;
|
||||
}
|
||||
struct demux_packet *pkt = demux_read_packet(sh_stream);
|
||||
mp_dbg(MSGT_CPLAYER, MSGL_V, "Sub: c_pts=%5.3f s_pts=%5.3f "
|
||||
mp_msg(MSGT_CPLAYER, MSGL_V, "Sub: c_pts=%5.3f s_pts=%5.3f "
|
||||
"duration=%5.3f len=%d\n", curpts_s, pkt->pts, pkt->duration,
|
||||
pkt->len);
|
||||
sub_decode(dec_sub, pkt);
|
||||
|
|
|
@ -58,7 +58,7 @@ void set_priority(void)
|
|||
if (strcasecmp(priority_presets_defs[i].name, proc_priority) == 0)
|
||||
break;
|
||||
}
|
||||
mp_tmsg(MSGT_CPLAYER, MSGL_STATUS, "Setting process priority: %s\n",
|
||||
mp_msg(MSGT_CPLAYER, MSGL_STATUS, "Setting process priority: %s\n",
|
||||
priority_presets_defs[i].name);
|
||||
|
||||
SetPriorityClass(GetCurrentProcess(), priority_presets_defs[i].prio);
|
||||
|
|
|
@ -40,27 +40,27 @@ int ai_alsa_setup(audio_in_t *ai)
|
|||
|
||||
err = snd_pcm_hw_params_any(ai->alsa.handle, params);
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Broken configuration for this PCM: no configurations available.\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Broken configuration for this PCM: no configurations available.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
err = snd_pcm_hw_params_set_access(ai->alsa.handle, params,
|
||||
SND_PCM_ACCESS_RW_INTERLEAVED);
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Access type not available.\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Access type not available.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
err = snd_pcm_hw_params_set_format(ai->alsa.handle, params, SND_PCM_FORMAT_S16_LE);
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Sample format not available.\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Sample format not available.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
err = snd_pcm_hw_params_set_channels(ai->alsa.handle, params, ai->req_channels);
|
||||
if (err < 0) {
|
||||
snd_pcm_hw_params_get_channels(params, &ai->channels);
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Channel count not available - reverting to default: %d\n",
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Channel count not available - reverting to default: %d\n",
|
||||
ai->channels);
|
||||
} else {
|
||||
ai->channels = ai->req_channels;
|
||||
|
@ -70,7 +70,7 @@ int ai_alsa_setup(audio_in_t *ai)
|
|||
rate = ai->req_samplerate;
|
||||
err = snd_pcm_hw_params_set_rate_near(ai->alsa.handle, params, &rate, &dir);
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Cannot set samplerate.\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Cannot set samplerate.\n");
|
||||
}
|
||||
ai->samplerate = rate;
|
||||
|
||||
|
@ -79,7 +79,7 @@ int ai_alsa_setup(audio_in_t *ai)
|
|||
err = snd_pcm_hw_params_set_buffer_time_near(ai->alsa.handle, params,
|
||||
&ai->alsa.buffer_time, &dir);
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Cannot set buffer time.\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Cannot set buffer time.\n");
|
||||
}
|
||||
|
||||
dir = 0;
|
||||
|
@ -87,12 +87,12 @@ int ai_alsa_setup(audio_in_t *ai)
|
|||
err = snd_pcm_hw_params_set_period_time_near(ai->alsa.handle, params,
|
||||
&ai->alsa.period_time, &dir);
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Cannot set period time.\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Cannot set period time.\n");
|
||||
}
|
||||
|
||||
err = snd_pcm_hw_params(ai->alsa.handle, params);
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to install hardware parameters: %s", snd_strerror(err));
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Unable to install hardware parameters: %s", snd_strerror(err));
|
||||
snd_pcm_hw_params_dump(params, ai->alsa.log);
|
||||
return -1;
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ int ai_alsa_setup(audio_in_t *ai)
|
|||
snd_pcm_hw_params_get_buffer_size(params, &buffer_size);
|
||||
ai->alsa.chunk_size = period_size;
|
||||
if (period_size == buffer_size) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Can't use period equal to buffer size (%u == %lu)\n", ai->alsa.chunk_size, (long)buffer_size);
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Can't use period equal to buffer size (%u == %lu)\n", ai->alsa.chunk_size, (long)buffer_size);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ int ai_alsa_setup(audio_in_t *ai)
|
|||
err = snd_pcm_sw_params_set_stop_threshold(ai->alsa.handle, swparams, buffer_size);
|
||||
|
||||
if (snd_pcm_sw_params(ai->alsa.handle, swparams) < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to install software parameters:\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Unable to install software parameters:\n");
|
||||
snd_pcm_sw_params_dump(swparams, ai->alsa.log);
|
||||
return -1;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ int ai_alsa_init(audio_in_t *ai)
|
|||
|
||||
err = snd_pcm_open(&ai->alsa.handle, ai->alsa.device, SND_PCM_STREAM_CAPTURE, 0);
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Error opening audio: %s\n", snd_strerror(err));
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Error opening audio: %s\n", snd_strerror(err));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ int ai_alsa_xrun(audio_in_t *ai)
|
|||
|
||||
snd_pcm_status_alloca(&status);
|
||||
if ((res = snd_pcm_status(ai->alsa.handle, status))<0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA status error: %s", snd_strerror(res));
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "ALSA status error: %s", snd_strerror(res));
|
||||
return -1;
|
||||
}
|
||||
if (snd_pcm_status_get_state(status) == SND_PCM_STATE_XRUN) {
|
||||
|
@ -179,18 +179,18 @@ int ai_alsa_xrun(audio_in_t *ai)
|
|||
gettimeofday(&now, 0);
|
||||
snd_pcm_status_get_trigger_tstamp(status, &tstamp);
|
||||
timersub(&now, &tstamp, &diff);
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA xrun!!! (at least %.3f ms long)\n",
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "ALSA xrun!!! (at least %.3f ms long)\n",
|
||||
diff.tv_sec * 1000 + diff.tv_usec / 1000.0);
|
||||
if (mp_msg_test(MSGT_TV, MSGL_V)) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA Status:\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "ALSA Status:\n");
|
||||
snd_pcm_status_dump(status, ai->alsa.log);
|
||||
}
|
||||
if ((res = snd_pcm_prepare(ai->alsa.handle))<0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA xrun: prepare error: %s", snd_strerror(res));
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "ALSA xrun: prepare error: %s", snd_strerror(res));
|
||||
return -1;
|
||||
}
|
||||
return 0; /* ok, data should be accepted again */
|
||||
}
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA read/write error");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "ALSA read/write error");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ int ai_oss_set_channels(audio_in_t *ai)
|
|||
mp_msg(MSGT_TV, MSGL_V, "ioctl dsp channels: %d\n",
|
||||
err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_CHANNELS, &ioctl_param));
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set channel count: %d\n",
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Unable to set channel count: %d\n",
|
||||
ai->req_channels);
|
||||
return -1;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ int ai_oss_set_channels(audio_in_t *ai)
|
|||
err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_STEREO, &ioctl_param),
|
||||
ioctl_param);
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set stereo: %d\n",
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Unable to set stereo: %d\n",
|
||||
ai->req_channels == 2);
|
||||
return -1;
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ int ai_oss_init(audio_in_t *ai)
|
|||
ai->oss.audio_fd = open(ai->oss.device, O_RDONLY | O_CLOEXEC);
|
||||
if (ai->oss.audio_fd < 0)
|
||||
{
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to open '%s': %s\n",
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Unable to open '%s': %s\n",
|
||||
ai->oss.device, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
@ -101,13 +101,13 @@ int ai_oss_init(audio_in_t *ai)
|
|||
|
||||
mp_msg(MSGT_TV, MSGL_V, "Supported formats: %x\n", ioctl_param);
|
||||
if (!(ioctl_param & AFMT_S16_LE))
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "unsupported format\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "unsupported format\n");
|
||||
|
||||
ioctl_param = AFMT_S16_LE;
|
||||
mp_msg(MSGT_TV, MSGL_V, "ioctl dsp setfmt: %d\n",
|
||||
err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_SETFMT, &ioctl_param));
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set audio format.");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Unable to set audio format.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ int ai_oss_init(audio_in_t *ai)
|
|||
mp_msg(MSGT_TV, MSGL_V, "ioctl dsp speed: %d\n",
|
||||
err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_SPEED, &ioctl_param));
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set samplerate: %d\n",
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Unable to set samplerate: %d\n",
|
||||
ai->req_samplerate);
|
||||
return -1;
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ int ai_oss_init(audio_in_t *ai)
|
|||
mp_msg(MSGT_TV, MSGL_V, "ioctl dsp trigger: %d\n",
|
||||
err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_SETTRIGGER, &ioctl_param));
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set trigger: %d\n",
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Unable to set trigger: %d\n",
|
||||
PCM_ENABLE_INPUT);
|
||||
}
|
||||
|
||||
|
@ -138,17 +138,17 @@ int ai_oss_init(audio_in_t *ai)
|
|||
mp_msg(MSGT_TV, MSGL_V, "ioctl dsp getblocksize: %d\n",
|
||||
err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_GETBLKSIZE, &ai->blocksize));
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to get block size!\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Unable to get block size!\n");
|
||||
}
|
||||
mp_msg(MSGT_TV, MSGL_V, "blocksize: %d\n", ai->blocksize);
|
||||
|
||||
// correct the blocksize to a reasonable value
|
||||
if (ai->blocksize <= 0) {
|
||||
ai->blocksize = 4096*ai->channels*2;
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Audio block size is zero, setting to %d!\n", ai->blocksize);
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Audio block size is zero, setting to %d!\n", ai->blocksize);
|
||||
} else if (ai->blocksize < 4096*ai->channels*2) {
|
||||
ai->blocksize *= 4096*ai->channels*2/ai->blocksize;
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Audio block size too low, setting to %d!\n", ai->blocksize);
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Audio block size too low, setting to %d!\n", ai->blocksize);
|
||||
}
|
||||
|
||||
ai->samplesize = 16;
|
||||
|
|
|
@ -247,16 +247,16 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer)
|
|||
ret = snd_pcm_readi(ai->alsa.handle, buffer, ai->alsa.chunk_size);
|
||||
if (ret != ai->alsa.chunk_size) {
|
||||
if (ret < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", snd_strerror(ret));
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", snd_strerror(ret));
|
||||
if (ret == -EPIPE) {
|
||||
if (ai_alsa_xrun(ai) == 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Recovered from cross-run, some frames may be left out!\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Recovered from cross-run, some frames may be left out!\n");
|
||||
} else {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Fatal error, cannot recover!\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Fatal error, cannot recover!\n");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n");
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
@ -281,9 +281,9 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer)
|
|||
ret = sio_read(ai->sndio.hdl, buffer, ai->blocksize);
|
||||
if (ret != ai->blocksize) {
|
||||
if (ret < 0) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", strerror(errno));
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", strerror(errno));
|
||||
} else {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n");
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -546,7 +546,7 @@ int stream_cache_init(stream_t *cache, stream_t *stream, int64_t size,
|
|||
if (size < 1)
|
||||
return -1;
|
||||
|
||||
mp_tmsg(MSGT_NETWORK, MSGL_INFO, "Cache size set to %" PRId64 " KiB\n",
|
||||
mp_msg(MSGT_NETWORK, MSGL_INFO, "Cache size set to %" PRId64 " KiB\n",
|
||||
size / 1024);
|
||||
|
||||
if (size > SIZE_MAX) {
|
||||
|
@ -610,7 +610,7 @@ int stream_cache_init(stream_t *cache, stream_t *stream, int64_t size,
|
|||
break;
|
||||
if (stream_control(s->cache, STREAM_CTRL_GET_CACHE_IDLE, &idle) < 0)
|
||||
break;
|
||||
mp_tmsg(MSGT_CACHE, MSGL_STATUS, "\rCache fill: %5.2f%% "
|
||||
mp_msg(MSGT_CACHE, MSGL_STATUS, "\rCache fill: %5.2f%% "
|
||||
"(%" PRId64 " bytes) ", 100.0 * fill / s->buffer_size, fill);
|
||||
if (fill >= min)
|
||||
break;
|
||||
|
|
|
@ -40,7 +40,7 @@ cd_info_new(void) {
|
|||
|
||||
cd_info = malloc(sizeof(cd_info_t));
|
||||
if( cd_info==NULL ) {
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
|
||||
mp_msg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -74,14 +74,14 @@ cd_info_add_track(cd_info_t *cd_info, char *track_name, unsigned int track_nb, u
|
|||
|
||||
cd_track = malloc(sizeof(cd_track_t));
|
||||
if( cd_track==NULL ) {
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
|
||||
mp_msg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
|
||||
return NULL;
|
||||
}
|
||||
memset(cd_track, 0, sizeof(cd_track_t));
|
||||
|
||||
cd_track->name = malloc(strlen(track_name)+1);
|
||||
if( cd_track->name==NULL ) {
|
||||
mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
|
||||
mp_msg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
|
||||
free(cd_track);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -228,13 +228,13 @@ static bool parse_url(struct stream *st, struct m_config *config)
|
|||
if (f[n].len) {
|
||||
const char *opt = find_url_opt(st, f_names[n]);
|
||||
if (!opt) {
|
||||
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Stream type '%s' accepts no '%s' "
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "Stream type '%s' accepts no '%s' "
|
||||
"field in URLs.\n", st->info->name, f_names[n]);
|
||||
return false;
|
||||
}
|
||||
int r = m_config_set_option(config, bstr0(opt), f[n]);
|
||||
if (r < 0) {
|
||||
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Error setting stream option: %s\n",
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "Error setting stream option: %s\n",
|
||||
m_option_strerror(r));
|
||||
return false;
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ static int open_internal(const stream_info_t *sinfo, struct stream *underlying,
|
|||
struct m_config *config = m_config_from_obj_desc(s, &desc);
|
||||
s->priv = config->optstruct;
|
||||
if (s->info->url_options && !parse_url(s, config)) {
|
||||
mp_tmsg(MSGT_OPEN, MSGL_ERR, "URL parsing failed on url %s\n", url);
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "URL parsing failed on url %s\n", url);
|
||||
talloc_free(s);
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
|
@ -351,13 +351,13 @@ struct stream *stream_create(const char *url, int flags, struct MPOpts *options)
|
|||
if (r == STREAM_NO_MATCH || r == STREAM_UNSUPPORTED)
|
||||
continue;
|
||||
if (r != STREAM_OK) {
|
||||
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Failed to open %s.\n", url);
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "Failed to open %s.\n", url);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (!s) {
|
||||
mp_tmsg(MSGT_OPEN, MSGL_ERR, "No stream found to handle url %s\n", url);
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "No stream found to handle url %s\n", url);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -432,7 +432,7 @@ void stream_set_capture_file(stream_t *s, const char *filename)
|
|||
if (s->capture_file) {
|
||||
s->capture_filename = talloc_strdup(NULL, filename);
|
||||
} else {
|
||||
mp_tmsg(MSGT_GLOBAL, MSGL_ERR,
|
||||
mp_msg(MSGT_GLOBAL, MSGL_ERR,
|
||||
"Error opening capture file: %s\n", strerror(errno));
|
||||
}
|
||||
}
|
||||
|
@ -443,7 +443,7 @@ static void stream_capture_write(stream_t *s, void *buf, size_t len)
|
|||
{
|
||||
if (s->capture_file && len > 0) {
|
||||
if (fwrite(buf, len, 1, s->capture_file) < 1) {
|
||||
mp_tmsg(MSGT_GLOBAL, MSGL_ERR, "Error writing capture file: %s\n",
|
||||
mp_msg(MSGT_GLOBAL, MSGL_ERR, "Error writing capture file: %s\n",
|
||||
strerror(errno));
|
||||
stream_set_capture_file(s, NULL);
|
||||
}
|
||||
|
@ -619,16 +619,16 @@ static int stream_seek_unbuffered(stream_t *s, int64_t newpos)
|
|||
{
|
||||
if (newpos != s->pos) {
|
||||
if (newpos > s->pos && !(s->flags & MP_STREAM_SEEK_FW)) {
|
||||
mp_tmsg(MSGT_STREAM, MSGL_ERR, "Can not seek in this stream\n");
|
||||
mp_msg(MSGT_STREAM, MSGL_ERR, "Can not seek in this stream\n");
|
||||
return 0;
|
||||
}
|
||||
if (newpos < s->pos && !(s->flags & MP_STREAM_SEEK_BW)) {
|
||||
mp_tmsg(MSGT_STREAM, MSGL_ERR,
|
||||
mp_msg(MSGT_STREAM, MSGL_ERR,
|
||||
"Cannot seek backward in linear streams!\n");
|
||||
return 1;
|
||||
}
|
||||
if (s->seek(s, newpos) <= 0) {
|
||||
mp_tmsg(MSGT_STREAM, MSGL_ERR, "Seek failed\n");
|
||||
mp_msg(MSGT_STREAM, MSGL_ERR, "Seek failed\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -680,7 +680,7 @@ static int stream_seek_long(stream_t *s, int64_t pos)
|
|||
int stream_seek(stream_t *s, int64_t pos)
|
||||
{
|
||||
|
||||
mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%llX\n", (long long)pos);
|
||||
mp_msg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%llX\n", (long long)pos);
|
||||
|
||||
if (pos == stream_tell(s))
|
||||
return 1;
|
||||
|
|
|
@ -307,7 +307,7 @@ static int bluray_stream_open(stream_t *s, int mode)
|
|||
device = bluray_device;
|
||||
|
||||
if (!device) {
|
||||
mp_tmsg(MSGT_OPEN, MSGL_ERR,
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR,
|
||||
"No Blu-ray device/location was specified ...\n");
|
||||
return STREAM_UNSUPPORTED;
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ static int bluray_stream_open(stream_t *s, int mode)
|
|||
/* open device */
|
||||
bd = bd_open(device, NULL);
|
||||
if (!bd) {
|
||||
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Couldn't open Blu-ray device: %s\n",
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "Couldn't open Blu-ray device: %s\n",
|
||||
device);
|
||||
return STREAM_UNSUPPORTED;
|
||||
}
|
||||
|
@ -400,7 +400,7 @@ err_no_info:
|
|||
s->flags = MP_STREAM_SEEK;
|
||||
s->priv = b;
|
||||
|
||||
mp_tmsg(MSGT_OPEN, MSGL_V, "Blu-ray successfully opened.\n");
|
||||
mp_msg(MSGT_OPEN, MSGL_V, "Blu-ray successfully opened.\n");
|
||||
|
||||
return STREAM_OK;
|
||||
}
|
||||
|
|
|
@ -340,7 +340,7 @@ static int open_cdda(stream_t *st, int m)
|
|||
#endif
|
||||
|
||||
if (!cdd) {
|
||||
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Can't open CDDA device.\n");
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "Can't open CDDA device.\n");
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
|
||||
|
@ -350,13 +350,13 @@ static int open_cdda(stream_t *st, int m)
|
|||
cdd->nsectors = p->sector_size;
|
||||
|
||||
if (cdda_open(cdd) != 0) {
|
||||
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Can't open disc.\n");
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "Can't open disc.\n");
|
||||
cdda_close(cdd);
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
|
||||
cd_info = cd_info_new();
|
||||
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Found audio CD with %d tracks.\n",
|
||||
mp_msg(MSGT_OPEN, MSGL_INFO, "Found audio CD with %d tracks.\n",
|
||||
(int)cdda_tracks(cdd));
|
||||
for (i = 0; i < cdd->tracks; i++) {
|
||||
char track_name[80];
|
||||
|
|
|
@ -123,14 +123,14 @@ int dvd_aid_from_lang(stream_t *stream, char **lang) {
|
|||
code = lang[n][1] | (lang[n][0] << 8);
|
||||
for(i=0;i<d->nr_of_channels;i++) {
|
||||
if(d->audio_streams[i].language==code) {
|
||||
mp_tmsg(MSGT_OPEN,MSGL_INFO,"Selected DVD audio channel: %d language: %c%c\n",
|
||||
mp_msg(MSGT_OPEN,MSGL_INFO,"Selected DVD audio channel: %d language: %c%c\n",
|
||||
d->audio_streams[i].id, lang[n][0], lang[n][1]);
|
||||
return d->audio_streams[i].id;
|
||||
}
|
||||
//printf("%X != %X (%c%c)\n",code,d->audio_streams[i].language,lang[0],lang[1]);
|
||||
}
|
||||
}
|
||||
mp_tmsg(MSGT_OPEN,MSGL_WARN,"No matching DVD audio language found!\n");
|
||||
mp_msg(MSGT_OPEN,MSGL_WARN,"No matching DVD audio language found!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -164,12 +164,12 @@ int dvd_sid_from_lang(stream_t *stream, char **lang) {
|
|||
code = lang[n][1] | (lang[n][0] << 8);
|
||||
for(i=0;i<d->nr_of_subtitles;i++) {
|
||||
if(d->subtitles[i].language==code) {
|
||||
mp_tmsg(MSGT_OPEN,MSGL_INFO,"Selected DVD subtitle channel: %d language: %c%c\n", i, lang[n][0], lang[n][1]);
|
||||
mp_msg(MSGT_OPEN,MSGL_INFO,"Selected DVD subtitle channel: %d language: %c%c\n", i, lang[n][0], lang[n][1]);
|
||||
return d->subtitles[i].id;
|
||||
}
|
||||
}
|
||||
}
|
||||
mp_tmsg(MSGT_OPEN,MSGL_WARN,"No matching DVD subtitle language found!\n");
|
||||
mp_msg(MSGT_OPEN,MSGL_WARN,"No matching DVD subtitle language found!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -772,12 +772,12 @@ static int open_s(stream_t *stream, int mode)
|
|||
snprintf(temp_device, len, "/dev/rdisk%d", i);
|
||||
dvd = DVDOpen(temp_device);
|
||||
if(!dvd) {
|
||||
mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno));
|
||||
mp_msg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno));
|
||||
} else {
|
||||
#if DVDREAD_VERSION <= LIBDVDREAD_VERSION(0,9,4)
|
||||
dvd_file_t *dvdfile = DVDOpenFile(dvd,dvd_title,DVD_READ_INFO_FILE);
|
||||
if(!dvdfile) {
|
||||
mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno));
|
||||
mp_msg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno));
|
||||
DVDClose(dvd);
|
||||
continue;
|
||||
}
|
||||
|
@ -796,7 +796,7 @@ static int open_s(stream_t *stream, int mode)
|
|||
{
|
||||
dvd = DVDOpen(dvd_device_current);
|
||||
if(!dvd) {
|
||||
mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",dvd_device_current, strerror(errno));
|
||||
mp_msg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",dvd_device_current, strerror(errno));
|
||||
return STREAM_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
|
@ -809,7 +809,7 @@ static int open_s(stream_t *stream, int mode)
|
|||
*/
|
||||
vmg_file = ifoOpen(dvd, 0);
|
||||
if(!vmg_file) {
|
||||
mp_tmsg(MSGT_OPEN,MSGL_ERR, "Can't open VMG info!\n");
|
||||
mp_msg(MSGT_OPEN,MSGL_ERR, "Can't open VMG info!\n");
|
||||
DVDClose( dvd );
|
||||
return STREAM_UNSUPPORTED;
|
||||
}
|
||||
|
@ -845,9 +845,9 @@ static int open_s(stream_t *stream, int mode)
|
|||
/**
|
||||
* Make sure our title number is valid.
|
||||
*/
|
||||
mp_tmsg(MSGT_OPEN,MSGL_STATUS, "There are %d titles on this DVD.\n", tt_srpt->nr_of_srpts );
|
||||
mp_msg(MSGT_OPEN,MSGL_STATUS, "There are %d titles on this DVD.\n", tt_srpt->nr_of_srpts );
|
||||
if(dvd_title < 1 || dvd_title > tt_srpt->nr_of_srpts) {
|
||||
mp_tmsg(MSGT_OPEN,MSGL_ERR, "Invalid DVD title number: %d\n", dvd_title);
|
||||
mp_msg(MSGT_OPEN,MSGL_ERR, "Invalid DVD title number: %d\n", dvd_title);
|
||||
ifoClose( vmg_file );
|
||||
DVDClose( dvd );
|
||||
return STREAM_UNSUPPORTED;
|
||||
|
@ -857,9 +857,9 @@ static int open_s(stream_t *stream, int mode)
|
|||
/**
|
||||
* Make sure the angle number is valid for this title.
|
||||
*/
|
||||
mp_tmsg(MSGT_OPEN,MSGL_STATUS, "There are %d angles in this DVD title.\n", tt_srpt->title[dvd_title].nr_of_angles);
|
||||
mp_msg(MSGT_OPEN,MSGL_STATUS, "There are %d angles in this DVD title.\n", tt_srpt->title[dvd_title].nr_of_angles);
|
||||
if(dvd_angle<1 || dvd_angle>tt_srpt->title[dvd_title].nr_of_angles) {
|
||||
mp_tmsg(MSGT_OPEN,MSGL_ERR, "Invalid DVD angle number: %d\n", dvd_angle);
|
||||
mp_msg(MSGT_OPEN,MSGL_ERR, "Invalid DVD angle number: %d\n", dvd_angle);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -869,7 +869,7 @@ static int open_s(stream_t *stream, int mode)
|
|||
*/
|
||||
vts_file = ifoOpen( dvd, tt_srpt->title[dvd_title].title_set_nr );
|
||||
if(!vts_file) {
|
||||
mp_tmsg(MSGT_OPEN,MSGL_ERR, "Cannot open the IFO file for DVD title %d.\n", tt_srpt->title[dvd_title].title_set_nr );
|
||||
mp_msg(MSGT_OPEN,MSGL_ERR, "Cannot open the IFO file for DVD title %d.\n", tt_srpt->title[dvd_title].title_set_nr );
|
||||
goto fail;
|
||||
}
|
||||
/**
|
||||
|
@ -877,7 +877,7 @@ static int open_s(stream_t *stream, int mode)
|
|||
*/
|
||||
title = DVDOpenFile(dvd, tt_srpt->title[dvd_title].title_set_nr, DVD_READ_TITLE_VOBS);
|
||||
if(!title) {
|
||||
mp_tmsg(MSGT_OPEN,MSGL_ERR, "Cannot open title VOBS (VTS_%02d_1.VOB).\n", tt_srpt->title[dvd_title].title_set_nr);
|
||||
mp_msg(MSGT_OPEN,MSGL_ERR, "Cannot open title VOBS (VTS_%02d_1.VOB).\n", tt_srpt->title[dvd_title].title_set_nr);
|
||||
ifoClose( vts_file );
|
||||
goto fail;
|
||||
}
|
||||
|
@ -936,7 +936,7 @@ static int open_s(stream_t *stream, int mode)
|
|||
// 1 - stereo
|
||||
// 5 - 5.1
|
||||
audio_stream->channels=audio->channels;
|
||||
mp_tmsg(MSGT_OPEN,MSGL_STATUS,"audio stream: %d format: %s (%s) language: %s aid: %d.\n",
|
||||
mp_msg(MSGT_OPEN,MSGL_STATUS,"audio stream: %d format: %s (%s) language: %s aid: %d.\n",
|
||||
d->nr_of_channels,
|
||||
dvd_audio_stream_types[ audio->audio_format ],
|
||||
dvd_audio_stream_channels[ audio->channels ],
|
||||
|
@ -950,7 +950,7 @@ static int open_s(stream_t *stream, int mode)
|
|||
d->nr_of_channels++;
|
||||
}
|
||||
}
|
||||
mp_tmsg(MSGT_OPEN,MSGL_STATUS,"number of audio channels on disk: %d.\n",d->nr_of_channels );
|
||||
mp_msg(MSGT_OPEN,MSGL_STATUS,"number of audio channels on disk: %d.\n",d->nr_of_channels );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -982,13 +982,13 @@ static int open_s(stream_t *stream, int mode)
|
|||
else if(video->display_aspect_ratio == 3) /* 16:9 */
|
||||
sub_stream->id = pgc->subp_control[i] >> 8 & 31;
|
||||
|
||||
mp_tmsg(MSGT_OPEN,MSGL_STATUS,"subtitle ( sid ): %d language: %s\n", sub_stream->id, tmp);
|
||||
mp_msg(MSGT_OPEN,MSGL_STATUS,"subtitle ( sid ): %d language: %s\n", sub_stream->id, tmp);
|
||||
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SUBTITLE_ID=%d\n", sub_stream->id);
|
||||
if(language && tmp[0])
|
||||
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SID_%d_LANG=%s\n", sub_stream->id, tmp);
|
||||
d->nr_of_subtitles++;
|
||||
}
|
||||
mp_tmsg(MSGT_OPEN,MSGL_STATUS,"number of subtitles on disk: %d\n",d->nr_of_subtitles);
|
||||
mp_msg(MSGT_OPEN,MSGL_STATUS,"number of subtitles on disk: %d\n",d->nr_of_subtitles);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1038,7 +1038,7 @@ fail:
|
|||
DVDClose(dvd);
|
||||
return STREAM_UNSUPPORTED;
|
||||
}
|
||||
mp_tmsg(MSGT_DVD,MSGL_ERR,"mpv was compiled without DVD support, exiting.\n");
|
||||
mp_msg(MSGT_DVD,MSGL_ERR,"mpv was compiled without DVD support, exiting.\n");
|
||||
return STREAM_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
|
|
@ -69,13 +69,13 @@ void dvd_set_speed(char *device, unsigned speed)
|
|||
return;
|
||||
case -1: /* restore default value */
|
||||
if (dvd_speed == 0) return; /* we haven't touched the speed setting */
|
||||
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Restoring DVD speed... ");
|
||||
mp_msg(MSGT_OPEN, MSGL_INFO, "Restoring DVD speed... ");
|
||||
break;
|
||||
default: /* limit to <speed> KB/s */
|
||||
// speed < 100 is multiple of DVD single speed (1350KB/s)
|
||||
if (speed < 100)
|
||||
speed *= 1350;
|
||||
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Limiting DVD speed to %dKB/s... ", speed);
|
||||
mp_msg(MSGT_OPEN, MSGL_INFO, "Limiting DVD speed to %dKB/s... ", speed);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -108,14 +108,14 @@ void dvd_set_speed(char *device, unsigned speed)
|
|||
|
||||
fd = open(device, O_RDWR | O_NONBLOCK | O_CLOEXEC);
|
||||
if (fd == -1) {
|
||||
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Couldn't open DVD device for writing, changing DVD speed needs write access.\n");
|
||||
mp_msg(MSGT_OPEN, MSGL_INFO, "Couldn't open DVD device for writing, changing DVD speed needs write access.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ioctl(fd, SG_IO, &sghdr) < 0)
|
||||
mp_tmsg(MSGT_OPEN, MSGL_INFO, "failed\n");
|
||||
mp_msg(MSGT_OPEN, MSGL_INFO, "failed\n");
|
||||
else
|
||||
mp_tmsg(MSGT_OPEN, MSGL_INFO, "successful\n");
|
||||
mp_msg(MSGT_OPEN, MSGL_INFO, "successful\n");
|
||||
|
||||
close(fd);
|
||||
#endif
|
||||
|
|
|
@ -661,7 +661,7 @@ static int open_s(stream_t *stream, int mode)
|
|||
else
|
||||
filename = DEFAULT_DVD_DEVICE;
|
||||
if (!new_dvdnav_stream(priv, filename)) {
|
||||
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Couldn't open DVD device: %s\n",
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "Couldn't open DVD device: %s\n",
|
||||
filename);
|
||||
return STREAM_UNSUPPORTED;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ static int open_f(stream_t *stream, int mode)
|
|||
|
||||
if (!strcmp(filename, "-")) {
|
||||
if (mode == STREAM_READ) {
|
||||
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Reading from stdin...\n");
|
||||
mp_msg(MSGT_OPEN, MSGL_INFO, "Reading from stdin...\n");
|
||||
fd = 0;
|
||||
#if HAVE_SETMODE
|
||||
setmode(fileno(stdin), O_BINARY);
|
||||
|
@ -144,14 +144,14 @@ static int open_f(stream_t *stream, int mode)
|
|||
#endif
|
||||
fd = open(filename, m | O_BINARY, openmode);
|
||||
if (fd < 0) {
|
||||
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Cannot open file '%s': %s\n",
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "Cannot open file '%s': %s\n",
|
||||
filename, strerror(errno));
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
#ifndef __MINGW32__
|
||||
struct stat st;
|
||||
if (fstat(fd, &st) == 0 && S_ISDIR(st.st_mode)) {
|
||||
mp_tmsg(MSGT_OPEN, MSGL_ERR, "File is a directory: '%s'\n",
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "File is a directory: '%s'\n",
|
||||
filename);
|
||||
close(fd);
|
||||
return STREAM_ERROR;
|
||||
|
|
|
@ -152,7 +152,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){
|
|||
/*parsing channels string*/
|
||||
channels=priv->radio_param->channels;
|
||||
|
||||
mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Radio channel names detected.\n");
|
||||
mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Radio channel names detected.\n");
|
||||
priv->radio_channel_list = malloc(sizeof(radio_channels_t));
|
||||
priv->radio_channel_list->index=1;
|
||||
priv->radio_channel_list->next=NULL;
|
||||
|
@ -170,7 +170,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){
|
|||
priv->radio_channel_current->freq=atof(tmp);
|
||||
|
||||
if ((priv->radio_channel_current->freq>priv->rangehigh)||(priv->radio_channel_current->freq<priv->rangelow))
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong frequency for channel %s\n",
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong frequency for channel %s\n",
|
||||
priv->radio_channel_current->name);
|
||||
|
||||
while ((sep=strchr(priv->radio_channel_current->name, '_'))) sep[0] = ' ';
|
||||
|
@ -196,17 +196,17 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){
|
|||
priv->radio_channel_current = priv->radio_channel_current->next;
|
||||
if (priv->radio_channel_current->index!=channel){
|
||||
if (((float)((int)freq_channel))!=freq_channel)
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %.2f\n",freq_channel);
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %.2f\n",freq_channel);
|
||||
else
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %d\n",(int)freq_channel);
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %d\n",(int)freq_channel);
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index,
|
||||
mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index,
|
||||
priv->radio_channel_current->name, priv->radio_channel_current->freq);
|
||||
*pfreq=priv->radio_channel_current->freq;
|
||||
}else{
|
||||
if (freq_channel){
|
||||
mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Radio frequency parameter detected.\n");
|
||||
mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Radio frequency parameter detected.\n");
|
||||
priv->radio_channel_list=malloc(sizeof(radio_channels_t));
|
||||
priv->radio_channel_list->next=NULL;
|
||||
priv->radio_channel_list->prev=NULL;
|
||||
|
@ -217,7 +217,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){
|
|||
*pfreq=freq_channel;
|
||||
}
|
||||
}
|
||||
mp_tmsg(MSGT_RADIO, MSGL_DBG2, "[radio] Done parsing channels.\n");
|
||||
mp_msg(MSGT_RADIO, MSGL_DBG2, "[radio] Done parsing channels.\n");
|
||||
return STREAM_OK;
|
||||
}
|
||||
|
||||
|
@ -240,25 +240,25 @@ static int init_frac_v4l2(radio_priv_t* priv){
|
|||
memset(&tuner,0,sizeof(tuner));
|
||||
tuner.index=0;
|
||||
if (ioctl(priv->radio_fd, VIDIOC_G_TUNER, &tuner)<0){
|
||||
mp_tmsg(MSGT_RADIO,MSGL_WARN,"[radio] Warning: ioctl get tuner failed: %s. Setting frac to %d.\n",strerror(errno),priv->frac);
|
||||
mp_msg(MSGT_RADIO,MSGL_WARN,"[radio] Warning: ioctl get tuner failed: %s. Setting frac to %d.\n",strerror(errno),priv->frac);
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
if(tuner.type!=V4L2_TUNER_RADIO){
|
||||
mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] %s is no radio device!\n",priv->radio_param->device);
|
||||
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] %s is no radio device!\n",priv->radio_param->device);
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
if(tuner.capability & V4L2_TUNER_CAP_LOW){
|
||||
priv->frac=16000;
|
||||
mp_tmsg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:yes frac=%d\n",priv->frac);
|
||||
mp_msg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:yes frac=%d\n",priv->frac);
|
||||
}
|
||||
else{
|
||||
priv->frac=16;
|
||||
mp_tmsg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:no frac=%d\n",priv->frac);
|
||||
mp_msg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:no frac=%d\n",priv->frac);
|
||||
}
|
||||
|
||||
priv->rangelow=((float)tuner.rangelow)/priv->frac;
|
||||
priv->rangehigh=((float)tuner.rangehigh)/priv->frac;
|
||||
mp_tmsg(MSGT_RADIO,MSGL_V,"[radio] Allowed frequency range is %.2f-%.2f MHz.\n",priv->rangelow,priv->rangehigh);
|
||||
mp_msg(MSGT_RADIO,MSGL_V,"[radio] Allowed frequency range is %.2f-%.2f MHz.\n",priv->rangelow,priv->rangehigh);
|
||||
return STREAM_OK;
|
||||
}
|
||||
|
||||
|
@ -275,7 +275,7 @@ static int set_frequency_v4l2(radio_priv_t* priv,float frequency){
|
|||
freq.type=V4L2_TUNER_RADIO;
|
||||
freq.frequency=frequency*priv->frac;
|
||||
if(ioctl(priv->radio_fd,VIDIOC_S_FREQUENCY,&freq)<0){
|
||||
mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl set frequency 0x%x (%.2f) failed: %s\n",freq.frequency,
|
||||
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl set frequency 0x%x (%.2f) failed: %s\n",freq.frequency,
|
||||
frequency,strerror(errno));
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ static int get_frequency_v4l2(radio_priv_t* priv,float* frequency){
|
|||
struct v4l2_frequency freq;
|
||||
memset(&freq,0,sizeof(freq));
|
||||
if (ioctl(priv->radio_fd, VIDIOC_G_FREQUENCY, &freq) < 0) {
|
||||
mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl get frequency failed: %s\n",strerror(errno));
|
||||
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl get frequency failed: %s\n",strerror(errno));
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
*frequency=((float)freq.frequency)/priv->frac;
|
||||
|
@ -315,13 +315,13 @@ static void set_volume_v4l2(radio_priv_t* priv,int volume){
|
|||
control.id=V4L2_CID_AUDIO_MUTE;
|
||||
control.value = (volume==0?1:0);
|
||||
if (ioctl(priv->radio_fd, VIDIOC_S_CTRL, &control)<0){
|
||||
mp_tmsg(MSGT_RADIO,MSGL_WARN,"[radio] ioctl set mute failed: %s\n",strerror(errno));
|
||||
mp_msg(MSGT_RADIO,MSGL_WARN,"[radio] ioctl set mute failed: %s\n",strerror(errno));
|
||||
}
|
||||
|
||||
memset(&qctrl,0,sizeof(qctrl));
|
||||
qctrl.id = V4L2_CID_AUDIO_VOLUME;
|
||||
if (ioctl(priv->radio_fd, VIDIOC_QUERYCTRL, &qctrl) < 0) {
|
||||
mp_tmsg(MSGT_RADIO, MSGL_WARN, "[radio] ioctl query control failed: %s\n",strerror(errno));
|
||||
mp_msg(MSGT_RADIO, MSGL_WARN, "[radio] ioctl query control failed: %s\n",strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -329,7 +329,7 @@ static void set_volume_v4l2(radio_priv_t* priv,int volume){
|
|||
control.id=V4L2_CID_AUDIO_VOLUME;
|
||||
control.value=qctrl.minimum+volume*(qctrl.maximum-qctrl.minimum)/100;
|
||||
if (ioctl(priv->radio_fd, VIDIOC_S_CTRL, &control) < 0) {
|
||||
mp_tmsg(MSGT_RADIO, MSGL_WARN,"[radio] ioctl set volume failed: %s\n",strerror(errno));
|
||||
mp_msg(MSGT_RADIO, MSGL_WARN,"[radio] ioctl set volume failed: %s\n",strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -345,14 +345,14 @@ static int get_volume_v4l2(radio_priv_t* priv,int* volume){
|
|||
memset(&qctrl,0,sizeof(qctrl));
|
||||
qctrl.id = V4L2_CID_AUDIO_VOLUME;
|
||||
if (ioctl(priv->radio_fd, VIDIOC_QUERYCTRL, &qctrl) < 0) {
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] ioctl query control failed: %s\n",strerror(errno));
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] ioctl query control failed: %s\n",strerror(errno));
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
|
||||
memset(&control,0,sizeof(control));
|
||||
control.id=V4L2_CID_AUDIO_VOLUME;
|
||||
if (ioctl(priv->radio_fd, VIDIOC_G_CTRL, &control) < 0) {
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR,"[radio] ioctl get volume failed: %s\n",strerror(errno));
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR,"[radio] ioctl get volume failed: %s\n",strerror(errno));
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
|
||||
|
@ -385,7 +385,7 @@ static inline int init_frac(radio_priv_t* priv){
|
|||
}
|
||||
static inline int set_frequency(radio_priv_t* priv,float frequency){
|
||||
if ((frequency<priv->rangelow)||(frequency>priv->rangehigh)){
|
||||
mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong frequency: %.2f\n",frequency);
|
||||
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong frequency: %.2f\n",frequency);
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
if(priv->driver->set_frequency(priv,frequency)!=STREAM_OK)
|
||||
|
@ -393,7 +393,7 @@ static inline int set_frequency(radio_priv_t* priv,float frequency){
|
|||
|
||||
#if HAVE_RADIO_CAPTURE
|
||||
if(clear_buffer(priv)!=STREAM_OK){
|
||||
mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Clearing buffer failed: %s\n",strerror(errno));
|
||||
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] Clearing buffer failed: %s\n",strerror(errno));
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
@ -448,16 +448,16 @@ static int read_chunk(audio_in_t *ai, unsigned char *buffer)
|
|||
if (ret != ai->alsa.chunk_size) {
|
||||
if (ret < 0) {
|
||||
if (ret==-EAGAIN) return -1;
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "\nError reading audio: %s\n", snd_strerror(ret));
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "\nError reading audio: %s\n", snd_strerror(ret));
|
||||
if (ret == -EPIPE) {
|
||||
if (ai_alsa_xrun(ai) == 0) {
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "Recovered from cross-run, some frames may be left out!\n");
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "Recovered from cross-run, some frames may be left out!\n");
|
||||
} else {
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "Fatal error, cannot recover!\n");
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "Fatal error, cannot recover!\n");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "\nNot enough audio samples!\n");
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "\nNot enough audio samples!\n");
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
@ -479,7 +479,7 @@ static int read_chunk(audio_in_t *ai, unsigned char *buffer)
|
|||
if (ret<0){
|
||||
if (errno==EAGAIN && bt==0) return -1; //no data avail yet
|
||||
if (errno==EAGAIN) { usleep(1000); continue;} //nilling buffer to blocksize size
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "\nError reading audio: %s\n", strerror(errno));
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "\nError reading audio: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
bt+=ret;
|
||||
|
@ -511,7 +511,7 @@ static int read_chunk(audio_in_t *ai, unsigned char *buffer)
|
|||
static int grab_audio_frame(radio_priv_t *priv, char *buffer, int len)
|
||||
{
|
||||
int i;
|
||||
mp_tmsg(MSGT_RADIO, MSGL_DBG3, "[radio] %s: in buffer=%d dropped=%d\n","grab_audio_frame",priv->audio_cnt,priv->audio_drop);
|
||||
mp_msg(MSGT_RADIO, MSGL_DBG3, "[radio] %s: in buffer=%d dropped=%d\n","grab_audio_frame",priv->audio_cnt,priv->audio_drop);
|
||||
/* Cache buffer must be filled by some audio packets when playing starts.
|
||||
Otherwise MPlayer will quit with EOF error.
|
||||
Probably, there is need more carefull checking rather than simple 'for' loop
|
||||
|
@ -561,7 +561,7 @@ static int init_audio(radio_priv_t *priv)
|
|||
}
|
||||
|
||||
priv->do_capture=1;
|
||||
mp_tmsg(MSGT_RADIO,MSGL_V,"[radio] Starting capture stuff.\n");
|
||||
mp_msg(MSGT_RADIO,MSGL_V,"[radio] Starting capture stuff.\n");
|
||||
#if HAVE_ALSA
|
||||
while ((tmp = strrchr(priv->radio_param->adevice, '='))){
|
||||
tmp[0] = ':';
|
||||
|
@ -573,7 +573,7 @@ static int init_audio(radio_priv_t *priv)
|
|||
#endif
|
||||
|
||||
if(audio_in_init(&priv->audio_in, is_oss?AUDIO_IN_OSS:AUDIO_IN_ALSA)<0){
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] audio_in_init failed.\n");
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] audio_in_init failed.\n");
|
||||
}
|
||||
|
||||
audio_in_set_device(&priv->audio_in, priv->radio_param->adevice);
|
||||
|
@ -581,7 +581,7 @@ static int init_audio(radio_priv_t *priv)
|
|||
audio_in_set_samplerate(&priv->audio_in, priv->radio_param->arate);
|
||||
|
||||
if (audio_in_setup(&priv->audio_in) < 0) {
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] audio_in_setup call failed: %s\n", strerror(errno));
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] audio_in_setup call failed: %s\n", strerror(errno));
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
#if HAVE_OSS_AUDIO
|
||||
|
@ -597,12 +597,12 @@ static int init_audio(radio_priv_t *priv)
|
|||
priv->audio_in.bytes_per_sample+priv->audio_in.blocksize;
|
||||
if (priv->audio_buffer_size < 256*priv->audio_in.blocksize)
|
||||
priv->audio_buffer_size = 256*priv->audio_in.blocksize;
|
||||
mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Audio capture - buffer=%d bytes (block=%d bytes).\n",
|
||||
mp_msg(MSGT_RADIO, MSGL_V, "[radio] Audio capture - buffer=%d bytes (block=%d bytes).\n",
|
||||
priv->audio_buffer_size,priv->audio_in.blocksize);
|
||||
/* start capture */
|
||||
priv->audio_ringbuffer = calloc(1, priv->audio_buffer_size);
|
||||
if (!priv->audio_ringbuffer) {
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] cannot allocate audio buffer (block=%d,buf=%d): %s\n",priv->audio_in.blocksize, priv->audio_buffer_size, strerror(errno));
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] cannot allocate audio buffer (block=%d,buf=%d): %s\n",priv->audio_in.blocksize, priv->audio_buffer_size, strerror(errno));
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
priv->audio_head = 0;
|
||||
|
@ -650,7 +650,7 @@ int radio_set_freq(struct stream *stream, float frequency){
|
|||
if (get_frequency(priv,&frequency)!=STREAM_OK){
|
||||
return 0;
|
||||
}
|
||||
mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Current frequency: %.2f\n",frequency);
|
||||
mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Current frequency: %.2f\n",frequency);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -695,7 +695,7 @@ int radio_step_channel(struct stream *stream, int direction) {
|
|||
priv->radio_channel_current = priv->radio_channel_list;
|
||||
if(!radio_set_freq(stream,priv->radio_channel_current->freq))
|
||||
return 0;
|
||||
mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n",
|
||||
mp_msg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n",
|
||||
priv->radio_channel_current->index, priv->radio_channel_current->name,
|
||||
priv->radio_channel_current->freq);
|
||||
break;
|
||||
|
@ -707,13 +707,13 @@ int radio_step_channel(struct stream *stream, int direction) {
|
|||
priv->radio_channel_current = priv->radio_channel_current->next;
|
||||
if(!radio_set_freq(stream,priv->radio_channel_current->freq))
|
||||
return 0;
|
||||
mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n",
|
||||
mp_msg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n",
|
||||
priv->radio_channel_current->index, priv->radio_channel_current->name,
|
||||
priv->radio_channel_current->freq);
|
||||
break;
|
||||
}
|
||||
}else
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Can not change channel: no channel list given.\n");
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Can not change channel: no channel list given.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -732,7 +732,7 @@ int radio_set_channel(struct stream *stream, char *channel) {
|
|||
char* endptr;
|
||||
|
||||
if (*channel=='\0')
|
||||
mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel name: %s\n",channel);
|
||||
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel name: %s\n",channel);
|
||||
|
||||
if (priv->radio_channel_list) {
|
||||
channel_int = strtol(channel,&endptr,10);
|
||||
|
@ -743,7 +743,7 @@ int radio_set_channel(struct stream *stream, char *channel) {
|
|||
if (!strncmp(channel,tmp->name,sizeof(tmp->name)-1))
|
||||
break;
|
||||
if (!tmp){
|
||||
mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel name: %s\n",channel);
|
||||
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel name: %s\n",channel);
|
||||
return 0;
|
||||
}
|
||||
}else{
|
||||
|
@ -753,17 +753,17 @@ int radio_set_channel(struct stream *stream, char *channel) {
|
|||
else
|
||||
break;
|
||||
if (tmp->index!=channel_int){
|
||||
mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel number: %d\n",channel_int);
|
||||
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel number: %d\n",channel_int);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
priv->radio_channel_current=tmp;
|
||||
mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index,
|
||||
mp_msg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index,
|
||||
priv->radio_channel_current->name, priv->radio_channel_current->freq);
|
||||
if(!radio_set_freq(stream, priv->radio_channel_current->freq))
|
||||
return 0;
|
||||
} else
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Can not change channel: no channel list given.\n");
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Can not change channel: no channel list given.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -851,7 +851,7 @@ static int open_s(stream_t *stream,int mode)
|
|||
else
|
||||
priv->driver=NULL;
|
||||
|
||||
mp_tmsg(MSGT_RADIO,MSGL_V,"[radio] Available drivers: ");
|
||||
mp_msg(MSGT_RADIO,MSGL_V,"[radio] Available drivers: ");
|
||||
for(i=0;radio_drivers[i];i++){
|
||||
mp_msg(MSGT_RADIO,MSGL_V,"%s, ",radio_drivers[i]->name);
|
||||
if(strcmp(priv->radio_param->driver,radio_drivers[i]->name)==0)
|
||||
|
@ -862,7 +862,7 @@ static int open_s(stream_t *stream,int mode)
|
|||
if(priv->driver)
|
||||
mp_msg(MSGT_RADIO, MSGL_INFO, priv->driver->info);
|
||||
else{
|
||||
mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Unknown driver name: %s\n",priv->radio_param->driver);
|
||||
mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Unknown driver name: %s\n",priv->radio_param->driver);
|
||||
close_s(stream);
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
|
@ -882,12 +882,12 @@ static int open_s(stream_t *stream,int mode)
|
|||
|
||||
priv->radio_fd = open(priv->radio_param->device, O_RDONLY | O_CLOEXEC);
|
||||
if (priv->radio_fd < 0) {
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Unable to open '%s': %s\n",
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Unable to open '%s': %s\n",
|
||||
priv->radio_param->device, strerror(errno));
|
||||
close_s(stream);
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Radio fd: %d, %s\n", priv->radio_fd,priv->radio_param->device);
|
||||
mp_msg(MSGT_RADIO, MSGL_V, "[radio] Radio fd: %d, %s\n", priv->radio_fd,priv->radio_param->device);
|
||||
fcntl(priv->radio_fd, F_SETFD, FD_CLOEXEC);
|
||||
|
||||
get_volume(priv, &priv->old_snd_volume);
|
||||
|
@ -904,11 +904,11 @@ static int open_s(stream_t *stream,int mode)
|
|||
}
|
||||
|
||||
if ((frequency<priv->rangelow)||(frequency>priv->rangehigh)){
|
||||
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong frequency: %.2f\n",frequency);
|
||||
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong frequency: %.2f\n",frequency);
|
||||
close_s(stream);
|
||||
return STREAM_ERROR;
|
||||
}else
|
||||
mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Using frequency: %.2f.\n",frequency);
|
||||
mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Using frequency: %.2f.\n",frequency);
|
||||
|
||||
if(set_frequency(priv,frequency)!=STREAM_OK){
|
||||
close_s(stream);
|
||||
|
|
|
@ -135,13 +135,13 @@ static int open_f (stream_t *stream, int mode)
|
|||
|
||||
err = smbc_init(smb_auth_fn, 1);
|
||||
if (err < 0) {
|
||||
mp_tmsg(MSGT_OPEN,MSGL_ERR,"Cannot init the libsmbclient library: %d\n",err);
|
||||
mp_msg(MSGT_OPEN,MSGL_ERR,"Cannot init the libsmbclient library: %d\n",err);
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
|
||||
fd = smbc_open(filename, m,0644);
|
||||
if (fd < 0) {
|
||||
mp_tmsg(MSGT_OPEN,MSGL_ERR,"Could not open from LAN: '%s'\n", filename);
|
||||
mp_msg(MSGT_OPEN,MSGL_ERR,"Could not open from LAN: '%s'\n", filename);
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ static int open_s(stream_t *stream,int mode)
|
|||
f=open(dev,O_RDONLY | O_CLOEXEC);
|
||||
#endif
|
||||
if(f<0){
|
||||
mp_tmsg(MSGT_OPEN,MSGL_ERR,"CD-ROM Device '%s' not found.\n",dev);
|
||||
mp_msg(MSGT_OPEN,MSGL_ERR,"CD-ROM Device '%s' not found.\n",dev);
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
|
||||
|
@ -129,16 +129,14 @@ static int open_s(stream_t *stream,int mode)
|
|||
}
|
||||
ret2=vcd_get_track_end(vcd,1);
|
||||
if(ret2<0){
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "%s (get)\n",
|
||||
mp_gtext("Error selecting VCD track."));
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "%s (get)\n", "Error selecting VCD track.");
|
||||
close(f);
|
||||
free(vcd);
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
ret=vcd_seek_to_track(vcd,1);
|
||||
if(ret<0){
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "%s (seek)\n",
|
||||
mp_gtext("Error selecting VCD track."));
|
||||
mp_msg(MSGT_OPEN, MSGL_ERR, "%s (seek)\n", "Error selecting VCD track.");
|
||||
close(f);
|
||||
free(vcd);
|
||||
return STREAM_ERROR;
|
||||
|
|
62
stream/tv.c
62
stream/tv.c
|
@ -124,7 +124,7 @@ static void tv_scan(tvi_handle_t *tvh)
|
|||
//Channel scanner without tuner is useless and causes crash due to uninitialized chanlist_s
|
||||
if (tvh->functions->control(tvh->priv, TVI_CONTROL_IS_TUNER, 0) != TVI_CONTROL_TRUE)
|
||||
{
|
||||
mp_tmsg(MSGT_TV, MSGL_WARN, "Channel scanner is not available without tuner\n");
|
||||
mp_msg(MSGT_TV, MSGL_WARN, "Channel scanner is not available without tuner\n");
|
||||
tvh->tv_param->scan=0;
|
||||
return;
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ static int norm_from_string(tvi_handle_t *tvh, char* norm)
|
|||
|
||||
if(ret!=TVI_CONTROL_UNKNOWN)
|
||||
{
|
||||
mp_tmsg(MSGT_TV, MSGL_WARN, "tv.c: norm_from_string(%s): Bogus norm parameter, setting %s.\n", norm,"default");
|
||||
mp_msg(MSGT_TV, MSGL_WARN, "tv.c: norm_from_string(%s): Bogus norm parameter, setting %s.\n", norm,"default");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -295,7 +295,7 @@ static int norm_from_string(tvi_handle_t *tvh, char* norm)
|
|||
else if (!strcasecmp(norm, "ntscjp"))
|
||||
return TV_NORM_NTSCJP;
|
||||
else {
|
||||
mp_tmsg(MSGT_TV, MSGL_WARN, "tv.c: norm_from_string(%s): Bogus norm parameter, setting %s.\n", norm, "PAL");
|
||||
mp_msg(MSGT_TV, MSGL_WARN, "tv.c: norm_from_string(%s): Bogus norm parameter, setting %s.\n", norm, "PAL");
|
||||
return TV_NORM_PAL;
|
||||
}
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ static void parse_channels(tvi_handle_t *tvh)
|
|||
{
|
||||
char** channels = tvh->tv_param->channels;
|
||||
|
||||
mp_tmsg(MSGT_TV, MSGL_INFO, "TV channel names detected.\n");
|
||||
mp_msg(MSGT_TV, MSGL_INFO, "TV channel names detected.\n");
|
||||
tv_channel_list = malloc(sizeof(tv_channels_t));
|
||||
tv_channel_list->index=1;
|
||||
tv_channel_list->next=NULL;
|
||||
|
@ -344,7 +344,7 @@ static void parse_channels(tvi_handle_t *tvh)
|
|||
}
|
||||
}
|
||||
if (tv_channel_current->freq == 0)
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Couldn't find frequency for channel %s (%s)\n",
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Couldn't find frequency for channel %s (%s)\n",
|
||||
tv_channel_current->number, tv_channel_current->name);
|
||||
else {
|
||||
sep = strchr(tv_channel_current->name, '-');
|
||||
|
@ -384,9 +384,9 @@ int tv_set_norm(tvi_handle_t *tvh, char* norm)
|
|||
{
|
||||
tvh->norm = norm_from_string(tvh, norm);
|
||||
|
||||
mp_tmsg(MSGT_TV, MSGL_V, "Selected norm : %s\n", norm);
|
||||
mp_msg(MSGT_TV, MSGL_V, "Selected norm : %s\n", norm);
|
||||
if (tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
@ -396,9 +396,9 @@ static int tv_set_norm_i(tvi_handle_t *tvh, int norm)
|
|||
{
|
||||
tvh->norm = norm;
|
||||
|
||||
mp_tmsg(MSGT_TV, MSGL_V, "Selected norm id: %d\n", norm);
|
||||
mp_msg(MSGT_TV, MSGL_V, "Selected norm id: %d\n", norm);
|
||||
if (tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -430,7 +430,7 @@ static int open_tv(tvi_handle_t *tvh)
|
|||
|
||||
if (funcs->control(tvh->priv, TVI_CONTROL_IS_VIDEO, 0) != TVI_CONTROL_TRUE)
|
||||
{
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Error: No video input present!\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Error: No video input present!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -458,7 +458,7 @@ static int open_tv(tvi_handle_t *tvh)
|
|||
case MP_FOURCC_BGR15:
|
||||
break;
|
||||
default:
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR,
|
||||
mp_msg(MSGT_TV, MSGL_ERR,
|
||||
"==================================================================\n"\
|
||||
" WARNING: UNTESTED OR UNKNOWN OUTPUT IMAGE FORMAT REQUESTED (0x%x)\n"\
|
||||
" This may cause buggy playback or program crash! Bug reports will\n"\
|
||||
|
@ -492,7 +492,7 @@ static int open_tv(tvi_handle_t *tvh)
|
|||
funcs->control(tvh->priv, TVI_CONTROL_VID_SET_WIDTH, &tvh->tv_param->width);
|
||||
else
|
||||
{
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set requested width: %d\n", tvh->tv_param->width);
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Unable to set requested width: %d\n", tvh->tv_param->width);
|
||||
funcs->control(tvh->priv, TVI_CONTROL_VID_GET_WIDTH, &tvh->tv_param->width);
|
||||
}
|
||||
}
|
||||
|
@ -504,14 +504,14 @@ static int open_tv(tvi_handle_t *tvh)
|
|||
funcs->control(tvh->priv, TVI_CONTROL_VID_SET_HEIGHT, &tvh->tv_param->height);
|
||||
else
|
||||
{
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set requested height: %d\n", tvh->tv_param->height);
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Unable to set requested height: %d\n", tvh->tv_param->height);
|
||||
funcs->control(tvh->priv, TVI_CONTROL_VID_GET_HEIGHT, &tvh->tv_param->height);
|
||||
}
|
||||
}
|
||||
|
||||
if (funcs->control(tvh->priv, TVI_CONTROL_IS_TUNER, 0) != TVI_CONTROL_TRUE)
|
||||
{
|
||||
mp_tmsg(MSGT_TV, MSGL_WARN, "Selected input hasn't got a tuner!\n");
|
||||
mp_msg(MSGT_TV, MSGL_WARN, "Selected input hasn't got a tuner!\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -527,16 +527,16 @@ static int open_tv(tvi_handle_t *tvh)
|
|||
}
|
||||
|
||||
if (tvh->chanlist == -1) {
|
||||
mp_tmsg(MSGT_TV, MSGL_WARN, "Unable to find selected channel list! (%s)\n",
|
||||
mp_msg(MSGT_TV, MSGL_WARN, "Unable to find selected channel list! (%s)\n",
|
||||
tvh->tv_param->chanlist);
|
||||
return 0;
|
||||
} else
|
||||
mp_tmsg(MSGT_TV, MSGL_V, "Selected channel list: %s (including %d channels)\n",
|
||||
mp_msg(MSGT_TV, MSGL_V, "Selected channel list: %s (including %d channels)\n",
|
||||
chanlists[tvh->chanlist].name, chanlists[tvh->chanlist].count);
|
||||
|
||||
if (tvh->tv_param->freq && tvh->tv_param->channel)
|
||||
{
|
||||
mp_tmsg(MSGT_TV, MSGL_WARN, "You can't set frequency and channel simultaneously!\n");
|
||||
mp_msg(MSGT_TV, MSGL_WARN, "You can't set frequency and channel simultaneously!\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -589,14 +589,14 @@ static int open_tv(tvi_handle_t *tvh)
|
|||
funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_FREQ, &freq);
|
||||
|
||||
funcs->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, &freq);
|
||||
mp_tmsg(MSGT_TV, MSGL_V, "Selected frequency: %lu (%.3f)\n",
|
||||
mp_msg(MSGT_TV, MSGL_V, "Selected frequency: %lu (%.3f)\n",
|
||||
freq, freq/16.0);
|
||||
}
|
||||
|
||||
if (tvh->tv_param->channel) {
|
||||
struct CHANLIST cl;
|
||||
|
||||
mp_tmsg(MSGT_TV, MSGL_V, "Requested channel: %s\n", tvh->tv_param->channel);
|
||||
mp_msg(MSGT_TV, MSGL_V, "Requested channel: %s\n", tvh->tv_param->channel);
|
||||
for (i = 0; i < chanlists[tvh->chanlist].count; i++)
|
||||
{
|
||||
cl = tvh->chanlist_s[i];
|
||||
|
@ -606,7 +606,7 @@ static int open_tv(tvi_handle_t *tvh)
|
|||
{
|
||||
strcpy(tv_channel_last_real, cl.name);
|
||||
tvh->channel = i;
|
||||
mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n",
|
||||
mp_msg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n",
|
||||
cl.name, cl.freq/1000.0);
|
||||
tv_set_freq_float(tvh, cl.freq);
|
||||
break;
|
||||
|
@ -644,7 +644,7 @@ static tvi_handle_t *tv_begin(tv_param_t* tv_param)
|
|||
int i;
|
||||
tvi_handle_t* h;
|
||||
if(tv_param->driver && !strcmp(tv_param->driver,"help")){
|
||||
mp_tmsg(MSGT_TV,MSGL_INFO,"Available drivers:\n");
|
||||
mp_msg(MSGT_TV,MSGL_INFO,"Available drivers:\n");
|
||||
for(i=0;tvi_driver_list[i];i++){
|
||||
mp_msg(MSGT_TV,MSGL_INFO," %s\t%s",tvi_driver_list[i]->short_name,tvi_driver_list[i]->name);
|
||||
if(tvi_driver_list[i]->comment)
|
||||
|
@ -665,7 +665,7 @@ static tvi_handle_t *tv_begin(tv_param_t* tv_param)
|
|||
continue;
|
||||
|
||||
h->tv_param=tv_param;
|
||||
mp_tmsg(MSGT_TV, MSGL_INFO, "Selected driver: %s\n name: %s\n author: %s\n comment: %s\n", tvi_driver_list[i]->short_name,
|
||||
mp_msg(MSGT_TV, MSGL_INFO, "Selected driver: %s\n name: %s\n author: %s\n comment: %s\n", tvi_driver_list[i]->short_name,
|
||||
tvi_driver_list[i]->name,
|
||||
tvi_driver_list[i]->author,
|
||||
tvi_driver_list[i]->comment?tvi_driver_list[i]->comment:"");
|
||||
|
@ -675,9 +675,9 @@ static tvi_handle_t *tv_begin(tv_param_t* tv_param)
|
|||
}
|
||||
|
||||
if(tv_param->driver)
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "No such driver: %s\n", tv_param->driver);
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "No such driver: %s\n", tv_param->driver);
|
||||
else
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "TV driver autodetection failed.\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "TV driver autodetection failed.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -784,7 +784,7 @@ static int demux_open_tv(demuxer_t *demuxer, enum demux_check check)
|
|||
break;
|
||||
case AF_FORMAT_MPEG2:
|
||||
default:
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Audio type '%s' unsupported!\n",
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Audio type '%s' unsupported!\n",
|
||||
af_fmt_to_str(audio_format));
|
||||
goto no_audio;
|
||||
}
|
||||
|
@ -816,7 +816,7 @@ static int demux_open_tv(demuxer_t *demuxer, enum demux_check check)
|
|||
sh_audio->wf->nBlockAlign = samplesize * sh_audio->channels.num;
|
||||
sh_audio->wf->nAvgBytesPerSec = sh_audio->i_bps;
|
||||
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_V, " TV audio: %d channels, %d bits, %d Hz\n",
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_V, " TV audio: %d channels, %d bits, %d Hz\n",
|
||||
sh_audio->wf->nChannels, sh_audio->wf->wBitsPerSample,
|
||||
sh_audio->wf->nSamplesPerSec);
|
||||
}
|
||||
|
@ -865,7 +865,7 @@ int tv_set_color_options(tvi_handle_t *tvh, int opt, int value)
|
|||
case TV_COLOR_CONTRAST:
|
||||
return funcs->control(tvh->priv, TVI_CONTROL_VID_SET_CONTRAST, &value);
|
||||
default:
|
||||
mp_tmsg(MSGT_TV, MSGL_WARN, "Unknown color option (%d) specified!\n", opt);
|
||||
mp_msg(MSGT_TV, MSGL_WARN, "Unknown color option (%d) specified!\n", opt);
|
||||
}
|
||||
|
||||
return TVI_CONTROL_UNKNOWN;
|
||||
|
@ -886,7 +886,7 @@ int tv_get_color_options(tvi_handle_t *tvh, int opt, int* value)
|
|||
case TV_COLOR_CONTRAST:
|
||||
return funcs->control(tvh->priv, TVI_CONTROL_VID_GET_CONTRAST, value);
|
||||
default:
|
||||
mp_tmsg(MSGT_TV, MSGL_WARN, "Unknown color option (%d) specified!\n", opt);
|
||||
mp_msg(MSGT_TV, MSGL_WARN, "Unknown color option (%d) specified!\n", opt);
|
||||
}
|
||||
|
||||
return TVI_CONTROL_UNKNOWN;
|
||||
|
@ -897,7 +897,7 @@ int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq)
|
|||
if (tvh->functions->control(tvh->priv, TVI_CONTROL_IS_TUNER, 0) == TVI_CONTROL_TRUE)
|
||||
{
|
||||
tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, freq);
|
||||
mp_tmsg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n",
|
||||
mp_msg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n",
|
||||
*freq, *freq/16.0);
|
||||
}
|
||||
return 1;
|
||||
|
@ -913,7 +913,7 @@ int tv_set_freq(tvi_handle_t *tvh, unsigned long freq)
|
|||
tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_FREQ, &freq);
|
||||
|
||||
tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, &freq);
|
||||
mp_tmsg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n",
|
||||
mp_msg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n",
|
||||
freq, freq/16.0);
|
||||
}
|
||||
return 1;
|
||||
|
@ -1079,7 +1079,7 @@ int tv_step_norm(tvi_handle_t *tvh)
|
|||
tvh->norm = 0;
|
||||
if (tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM,
|
||||
&tvh->norm) != TVI_CONTROL_TRUE) {
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
|
||||
mp_msg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1759,7 +1759,7 @@ static void *audio_grabber(void *data)
|
|||
|
||||
static double grab_audio_frame(priv_t *priv, char *buffer, int len)
|
||||
{
|
||||
mp_dbg(MSGT_TV, MSGL_DBG2, "grab_audio_frame(priv=%p, buffer=%p, len=%d)\n",
|
||||
mp_msg(MSGT_TV, MSGL_DBG2, "grab_audio_frame(priv=%p, buffer=%p, len=%d)\n",
|
||||
priv, buffer, len);
|
||||
|
||||
// hack: if grab_audio_frame is called first, it means we are used by mplayer
|
||||
|
|
|
@ -392,7 +392,7 @@ static void convert_subrip(const char *orig, char *dest, int dest_buffer_size)
|
|||
tag->has_color = true;
|
||||
} else {
|
||||
// We didn't find any matching color
|
||||
mp_tmsg(MSGT_SUBREADER, MSGL_WARN,
|
||||
mp_msg(MSGT_SUBREADER, MSGL_WARN,
|
||||
"SubRip: unknown font color in subtitle: >%s<\n",
|
||||
orig);
|
||||
append_text(&new_line, "{\\c}");
|
||||
|
@ -406,7 +406,7 @@ static void convert_subrip(const char *orig, char *dest, int dest_buffer_size)
|
|||
tag->has_face = true;
|
||||
has_valid_attr = true;
|
||||
} else
|
||||
mp_tmsg(MSGT_SUBREADER, MSGL_WARN,"SubRip: unrecognized "
|
||||
mp_msg(MSGT_SUBREADER, MSGL_WARN,"SubRip: unrecognized "
|
||||
"attribute \"%.*s\" in font tag\n", BSTR_P(attr));
|
||||
}
|
||||
|
||||
|
|
|
@ -87,13 +87,13 @@ int video_set_colors(struct dec_video *d_video, const char *item, int value)
|
|||
data.item = item;
|
||||
data.value = value;
|
||||
|
||||
mp_dbg(MSGT_DECVIDEO, MSGL_V, "set video colors %s=%d \n", item, value);
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_V, "set video colors %s=%d \n", item, value);
|
||||
if (d_video->vfilter) {
|
||||
int ret = video_vf_vo_control(d_video, VFCTRL_SET_EQUALIZER, &data);
|
||||
if (ret == CONTROL_TRUE)
|
||||
return 1;
|
||||
}
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_V, "Video attribute '%s' is not supported by selected vo.\n",
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_V, "Video attribute '%s' is not supported by selected vo.\n",
|
||||
item);
|
||||
return 0;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ int video_get_colors(struct dec_video *d_video, const char *item, int *value)
|
|||
|
||||
data.item = item;
|
||||
|
||||
mp_dbg(MSGT_DECVIDEO, MSGL_V, "get video colors %s \n", item);
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_V, "get video colors %s \n", item);
|
||||
if (d_video->vfilter) {
|
||||
int ret = video_vf_vo_control(d_video, VFCTRL_GET_EQUALIZER, &data);
|
||||
if (ret == CONTROL_TRUE) {
|
||||
|
@ -119,7 +119,7 @@ void video_uninit(struct dec_video *d_video)
|
|||
{
|
||||
mp_image_unrefp(&d_video->waiting_decoded_mpi);
|
||||
if (d_video->vd_driver) {
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_V, "Uninit video.\n");
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_V, "Uninit video.\n");
|
||||
d_video->vd_driver->uninit(d_video);
|
||||
}
|
||||
talloc_free(d_video->priv);
|
||||
|
@ -130,7 +130,7 @@ void video_uninit(struct dec_video *d_video)
|
|||
static int init_video_codec(struct dec_video *d_video, const char *decoder)
|
||||
{
|
||||
if (!d_video->vd_driver->init(d_video, decoder)) {
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_V, "Video decoder init failed.\n");
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_V, "Video decoder init failed.\n");
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
@ -179,7 +179,7 @@ bool video_init_best_codec(struct dec_video *d_video, char* video_decoders)
|
|||
const struct vd_functions *driver = find_driver(sel->family);
|
||||
if (!driver)
|
||||
continue;
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_V, "Opening video decoder %s:%s\n",
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_V, "Opening video decoder %s:%s\n",
|
||||
sel->family, sel->decoder);
|
||||
d_video->vd_driver = driver;
|
||||
if (init_video_codec(d_video, sel->decoder)) {
|
||||
|
@ -187,7 +187,7 @@ bool video_init_best_codec(struct dec_video *d_video, char* video_decoders)
|
|||
break;
|
||||
}
|
||||
d_video->vd_driver = NULL;
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_WARN, "Video decoder init failed for "
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Video decoder init failed for "
|
||||
"%s:%s\n", sel->family, sel->decoder);
|
||||
}
|
||||
|
||||
|
@ -410,7 +410,7 @@ int video_reconfig_filters(struct dec_video *d_video,
|
|||
vf_set_dar(&p.d_w, &p.d_h, p.w, p.h, force_aspect);
|
||||
|
||||
if (abs(p.d_w - p.w) >= 4 || abs(p.d_h - p.h) >= 4) {
|
||||
mp_tmsg(MSGT_CPLAYER, MSGL_V, "Aspect ratio is %.2f:1 - "
|
||||
mp_msg(MSGT_CPLAYER, MSGL_V, "Aspect ratio is %.2f:1 - "
|
||||
"scaling to correct movie aspect.\n", sh->aspect);
|
||||
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_ASPECT=%1.4f\n", sh->aspect);
|
||||
} else {
|
||||
|
@ -434,7 +434,7 @@ int video_reconfig_filters(struct dec_video *d_video,
|
|||
p.w, p.h, p.d_w, p.d_h, p.imgfmt);
|
||||
|
||||
if (vf_reconfig(d_video->vfilter, &p) < 0) {
|
||||
mp_tmsg(MSGT_CPLAYER, MSGL_WARN, "FATAL: Cannot initialize video driver.\n");
|
||||
mp_msg(MSGT_CPLAYER, MSGL_WARN, "FATAL: Cannot initialize video driver.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ static bool probe_hwdec(struct dec_video *vd, bool autoprobe, enum hwdec_type ap
|
|||
{
|
||||
struct vd_lavc_hwdec *hwdec = find_hwcodec(api);
|
||||
if (!hwdec) {
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_V, "Requested hardware decoder not "
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_V, "Requested hardware decoder not "
|
||||
"compiled.\n");
|
||||
return false;
|
||||
}
|
||||
|
@ -229,10 +229,10 @@ static bool probe_hwdec(struct dec_video *vd, bool autoprobe, enum hwdec_type ap
|
|||
*use_decoder = hw_decoder;
|
||||
return true;
|
||||
} else if (r == HWDEC_ERR_NO_CODEC) {
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_V, "Hardware decoder '%s' not found in "
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_V, "Hardware decoder '%s' not found in "
|
||||
"libavcodec.\n", hw_decoder ? hw_decoder : decoder);
|
||||
} else if (r == HWDEC_ERR_NO_CTX && !autoprobe) {
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_WARN, "VO does not support requested "
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_WARN, "VO does not support requested "
|
||||
"hardware decoder.\n");
|
||||
}
|
||||
return false;
|
||||
|
@ -247,7 +247,7 @@ static int init(struct dec_video *vd, const char *decoder)
|
|||
ctx->non_dr1_pool = talloc_steal(ctx, mp_image_pool_new(16));
|
||||
|
||||
if (bstr_endswith0(bstr0(decoder), "_vdpau")) {
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_WARN, "VDPAU decoder '%s' was requested. "
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_WARN, "VDPAU decoder '%s' was requested. "
|
||||
"This way of enabling hardware\ndecoding is not supported "
|
||||
"anymore. Use --hwdec=vdpau instead.\nThe --hwdec-codec=... "
|
||||
"option can be used to restrict which codecs are\nenabled, "
|
||||
|
@ -272,7 +272,7 @@ static int init(struct dec_video *vd, const char *decoder)
|
|||
&hwdec, &hw_decoder);
|
||||
}
|
||||
} else {
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_V, "Not trying to use hardware decoding: "
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_V, "Not trying to use hardware decoding: "
|
||||
"codec %s is blacklisted by user.\n", decoder);
|
||||
}
|
||||
|
||||
|
@ -280,15 +280,15 @@ static int init(struct dec_video *vd, const char *decoder)
|
|||
ctx->software_fallback_decoder = talloc_strdup(ctx, decoder);
|
||||
if (hw_decoder)
|
||||
decoder = hw_decoder;
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "Trying to use hardware decoding.\n");
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_INFO, "Trying to use hardware decoding.\n");
|
||||
} else if (vd->opts->hwdec_api != HWDEC_NONE) {
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "Using software decoding.\n");
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_INFO, "Using software decoding.\n");
|
||||
}
|
||||
|
||||
init_avctx(vd, decoder, hwdec);
|
||||
if (!ctx->avctx) {
|
||||
if (ctx->software_fallback_decoder) {
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "Error initializing hardware "
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Error initializing hardware "
|
||||
"decoding, falling back to software decoding.\n");
|
||||
decoder = ctx->software_fallback_decoder;
|
||||
ctx->software_fallback_decoder = NULL;
|
||||
|
@ -455,7 +455,7 @@ static void init_avctx(struct dec_video *vd, const char *decoder,
|
|||
|
||||
/* open it */
|
||||
if (avcodec_open2(avctx, lavc_codec, NULL) < 0) {
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "Could not open codec.\n");
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Could not open codec.\n");
|
||||
uninit_avctx(vd);
|
||||
return;
|
||||
}
|
||||
|
@ -468,7 +468,7 @@ static void uninit_avctx(struct dec_video *vd)
|
|||
|
||||
if (avctx) {
|
||||
if (avctx->codec && avcodec_close(avctx) < 0)
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "Could not close codec.\n");
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Could not close codec.\n");
|
||||
|
||||
av_freep(&avctx->extradata);
|
||||
av_freep(&avctx->slice_offset);
|
||||
|
@ -762,7 +762,7 @@ static int force_fallback(struct dec_video *vd)
|
|||
vd_ffmpeg_ctx *ctx = vd->priv;
|
||||
if (ctx->software_fallback_decoder) {
|
||||
uninit_avctx(vd);
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "Error using hardware "
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Error using hardware "
|
||||
"decoding, falling back to software decoding.\n");
|
||||
const char *decoder = ctx->software_fallback_decoder;
|
||||
ctx->software_fallback_decoder = NULL;
|
||||
|
|
|
@ -225,7 +225,7 @@ static struct vf_instance *vf_open(struct vf_chain *c, const char *name,
|
|||
{
|
||||
struct m_obj_desc desc;
|
||||
if (!m_obj_list_find(&desc, &vf_obj_list, bstr0(name))) {
|
||||
mp_tmsg(MSGT_VFILTER, MSGL_ERR,
|
||||
mp_msg(MSGT_VFILTER, MSGL_ERR,
|
||||
"Couldn't find video filter '%s'.\n", name);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ static void update_formats(struct vf_chain *c, struct vf_instance *vf,
|
|||
// If there are output formats, but no input formats (meaning the
|
||||
// filters after vf work, but vf can't output any format the filters
|
||||
// after it accept), try to insert a conversion filter.
|
||||
mp_tmsg(MSGT_VFILTER, MSGL_INFO, "Using conversion filter.\n");
|
||||
mp_msg(MSGT_VFILTER, MSGL_INFO, "Using conversion filter.\n");
|
||||
struct vf_instance *conv = vf_open(c, "scale", NULL);
|
||||
if (conv) {
|
||||
conv->next = vf->next;
|
||||
|
@ -507,8 +507,8 @@ int vf_reconfig(struct vf_chain *c, const struct mp_image_params *params)
|
|||
c->initialized = r < 0 ? -1 : 1;
|
||||
int loglevel = r < 0 ? MSGL_WARN : MSGL_V;
|
||||
if (r == -2)
|
||||
mp_tmsg(MSGT_VFILTER, MSGL_ERR, "Image formats incompatible.\n");
|
||||
mp_tmsg(MSGT_VFILTER, loglevel, "Video filter chain:\n");
|
||||
mp_msg(MSGT_VFILTER, MSGL_ERR, "Image formats incompatible.\n");
|
||||
mp_msg(MSGT_VFILTER, loglevel, "Video filter chain:\n");
|
||||
vf_print_filter_chain(c, loglevel);
|
||||
return r;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ static int config(struct vf_instance *vf,
|
|||
// check:
|
||||
if(vf->priv->crop_w+vf->priv->crop_x>width ||
|
||||
vf->priv->crop_h+vf->priv->crop_y>height){
|
||||
mp_tmsg(MSGT_VFILTER, MSGL_WARN, "[CROP] Bad position/width/height - cropped area outside of the original!\n");
|
||||
mp_msg(MSGT_VFILTER, MSGL_WARN, "[CROP] Bad position/width/height - cropped area outside of the original!\n");
|
||||
return 0;
|
||||
}
|
||||
vf_rescale_dsize(&d_width, &d_height, width, height,
|
||||
|
|
|
@ -258,7 +258,7 @@ static const struct fstype fstypes[] = {
|
|||
|
||||
void fstype_help(void)
|
||||
{
|
||||
mp_tmsg(MSGT_VO, MSGL_INFO, "Available fullscreen layer change modes:\n");
|
||||
mp_msg(MSGT_VO, MSGL_INFO, "Available fullscreen layer change modes:\n");
|
||||
for (int n = 0; fstypes[n].sym; n++) {
|
||||
mp_msg(MSGT_VO, MSGL_INFO, " %-15s %s\n", fstypes[n].sym,
|
||||
fstypes[n].help);
|
||||
|
|
Loading…
Reference in New Issue