mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 07:22:44 +02:00
rename lt_debug => hal_debug; it's not only libtriple debugging
Origin commit data
------------------
Branch: master
Commit: ef4ad293cc
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-12-26 (Wed, 26 Dec 2018)
Origin message was:
------------------
- rename lt_debug => hal_debug; it's not only libtriple debugging
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -36,11 +36,11 @@
|
||||
|
||||
#include "playback_gst.h"
|
||||
|
||||
#include "lt_debug.h"
|
||||
#define lt_debug(args...) _lt_debug(HAL_DEBUG_PLAYBACK, this, args)
|
||||
#define lt_info(args...) _lt_info(HAL_DEBUG_PLAYBACK, this, args)
|
||||
#define lt_debug_c(args...) _lt_debug(HAL_DEBUG_PLAYBACK, NULL, args)
|
||||
#define lt_info_c(args...) _lt_info(HAL_DEBUG_PLAYBACK, NULL, args)
|
||||
#include "hal_debug.h"
|
||||
#define hal_debug(args...) _hal_debug(HAL_DEBUG_PLAYBACK, this, args)
|
||||
#define hal_info(args...) _hal_info(HAL_DEBUG_PLAYBACK, this, args)
|
||||
#define hal_debug_c(args...) _hal_debug(HAL_DEBUG_PLAYBACK, NULL, args)
|
||||
#define hal_info_c(args...) _hal_info(HAL_DEBUG_PLAYBACK, NULL, args)
|
||||
|
||||
static const char * FILENAME = "[playback.cpp]";
|
||||
|
||||
@@ -104,7 +104,7 @@ void processMpegTsSection(GstMpegtsSection* section)
|
||||
for (guint i = 0; i < pmt->streams->len; ++i) {
|
||||
const GstMpegtsPMTStream* stream = static_cast<const GstMpegtsPMTStream*>(g_ptr_array_index(pmt->streams, i));
|
||||
if (stream->stream_type == 0x05 || stream->stream_type >= 0x80) {
|
||||
lt_info_c( "%s:%s Audio Stream pid: %d\n", FILENAME, __FUNCTION__, stream->pid);
|
||||
hal_info_c( "%s:%s Audio Stream pid: %d\n", FILENAME, __FUNCTION__, stream->pid);
|
||||
real_apids[cnt] = stream->pid;
|
||||
cnt++;
|
||||
}
|
||||
@@ -168,7 +168,7 @@ void playbinNotifySource(GObject *object, GParamSpec *param_spec, gpointer user_
|
||||
if (!name.empty() && !value.empty())
|
||||
{
|
||||
GValue header;
|
||||
lt_info_c( "%s:%s setting extra-header '%s:%s'\n", FILENAME, __FUNCTION__, name.c_str(), value.c_str());
|
||||
hal_info_c( "%s:%s setting extra-header '%s:%s'\n", FILENAME, __FUNCTION__, name.c_str(), value.c_str());
|
||||
memset(&header, 0, sizeof(GValue));
|
||||
g_value_init(&header, G_TYPE_STRING);
|
||||
g_value_set_string(&header, value.c_str());
|
||||
@@ -176,7 +176,7 @@ void playbinNotifySource(GObject *object, GParamSpec *param_spec, gpointer user_
|
||||
}
|
||||
else
|
||||
{
|
||||
lt_info_c( "%s:%s Invalid header format %s\n", FILENAME, __FUNCTION__, _this->extra_headers.c_str());
|
||||
hal_info_c( "%s:%s Invalid header format %s\n", FILENAME, __FUNCTION__, _this->extra_headers.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -215,15 +215,15 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
||||
gst_message_parse_error(msg, &err, &debug);
|
||||
g_free (debug);
|
||||
gchar * sourceName = gst_object_get_name(source);
|
||||
lt_info_c( "%s:%s - GST_MESSAGE_ERROR: %s (%i) from %s\n", FILENAME, __FUNCTION__, err->message, err->code, sourceName );
|
||||
hal_info_c( "%s:%s - GST_MESSAGE_ERROR: %s (%i) from %s\n", FILENAME, __FUNCTION__, err->message, err->code, sourceName );
|
||||
if ( err->domain == GST_STREAM_ERROR )
|
||||
{
|
||||
if ( err->code == GST_STREAM_ERROR_CODEC_NOT_FOUND )
|
||||
{
|
||||
if ( g_strrstr(sourceName, "videosink") )
|
||||
lt_info_c( "%s:%s - GST_MESSAGE_ERROR: videosink\n", FILENAME, __FUNCTION__ ); //FIXME: how shall playback handle this event???
|
||||
hal_info_c( "%s:%s - GST_MESSAGE_ERROR: videosink\n", FILENAME, __FUNCTION__ ); //FIXME: how shall playback handle this event???
|
||||
else if ( g_strrstr(sourceName, "audiosink") )
|
||||
lt_info_c( "%s:%s - GST_MESSAGE_ERROR: audioSink\n", FILENAME, __FUNCTION__ ); //FIXME: how shall playback handle this event???
|
||||
hal_info_c( "%s:%s - GST_MESSAGE_ERROR: audioSink\n", FILENAME, __FUNCTION__ ); //FIXME: how shall playback handle this event???
|
||||
}
|
||||
}
|
||||
g_error_free(err);
|
||||
@@ -246,7 +246,7 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
||||
{
|
||||
gchar * sourceName = gst_object_get_name(source);
|
||||
if ( g_strrstr(sourceName, "videosink") )
|
||||
lt_info_c( "%s:%s - GST_MESSAGE_INFO: videosink\n", FILENAME, __FUNCTION__ ); //FIXME: how shall playback handle this event???
|
||||
hal_info_c( "%s:%s - GST_MESSAGE_INFO: videosink\n", FILENAME, __FUNCTION__ ); //FIXME: how shall playback handle this event???
|
||||
if(sourceName)
|
||||
g_free(sourceName);
|
||||
|
||||
@@ -305,12 +305,12 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
||||
int ret = write(fd, data, size);
|
||||
gst_buffer_unmap(buf_image, &map);
|
||||
close(fd);
|
||||
lt_info_c("%s:%s - /tmp/.id3coverart %d bytes written\n", FILENAME, __FUNCTION__, ret);
|
||||
hal_info_c("%s:%s - /tmp/.id3coverart %d bytes written\n", FILENAME, __FUNCTION__, ret);
|
||||
}
|
||||
}
|
||||
if (tags)
|
||||
gst_tag_list_unref(tags);
|
||||
lt_debug_c( "%s:%s - GST_MESSAGE_INFO: update info tags\n", FILENAME, __FUNCTION__); //FIXME: how shall playback handle this event???
|
||||
hal_debug_c( "%s:%s - GST_MESSAGE_INFO: update info tags\n", FILENAME, __FUNCTION__); //FIXME: how shall playback handle this event???
|
||||
break;
|
||||
}
|
||||
case GST_MESSAGE_ELEMENT:
|
||||
@@ -344,7 +344,7 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
||||
|
||||
if(old_state == new_state)
|
||||
break;
|
||||
lt_info_c( "%s:%s - GST_MESSAGE_STATE_CHANGED: state transition %s -> %s\n", FILENAME, __FUNCTION__, gst_element_state_get_name(old_state), gst_element_state_get_name(new_state));
|
||||
hal_info_c( "%s:%s - GST_MESSAGE_STATE_CHANGED: state transition %s -> %s\n", FILENAME, __FUNCTION__, gst_element_state_get_name(old_state), gst_element_state_get_name(new_state));
|
||||
|
||||
GstStateChange transition = (GstStateChange)GST_STATE_TRANSITION(old_state, new_state);
|
||||
|
||||
@@ -374,7 +374,7 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
||||
{
|
||||
audioSink = GST_ELEMENT_CAST(g_value_dup_object (&r));
|
||||
g_value_unset (&r);
|
||||
lt_info_c( "%s %s - audio sink created\n", FILENAME, __FUNCTION__);
|
||||
hal_info_c( "%s %s - audio sink created\n", FILENAME, __FUNCTION__);
|
||||
}
|
||||
|
||||
gst_iterator_free(children);
|
||||
@@ -383,7 +383,7 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
||||
{
|
||||
videoSink = GST_ELEMENT_CAST(g_value_dup_object (&r));
|
||||
g_value_unset (&r);
|
||||
lt_info_c( "%s %s - video sink created\n", FILENAME, __FUNCTION__);
|
||||
hal_info_c( "%s %s - video sink created\n", FILENAME, __FUNCTION__);
|
||||
}
|
||||
gst_iterator_free(children);
|
||||
|
||||
@@ -426,7 +426,7 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
||||
|
||||
cPlayback::cPlayback(int num)
|
||||
{
|
||||
lt_info( "%s:%s\n", FILENAME, __FUNCTION__);
|
||||
hal_info( "%s:%s\n", FILENAME, __FUNCTION__);
|
||||
const gchar *nano_str;
|
||||
guint major, minor, micro, nano;
|
||||
|
||||
@@ -445,7 +445,7 @@ cPlayback::cPlayback(int num)
|
||||
else
|
||||
nano_str = "";
|
||||
|
||||
lt_info( "%s:%s - This program is linked against GStreamer %d.%d.%d %s\n",
|
||||
hal_info( "%s:%s - This program is linked against GStreamer %d.%d.%d %s\n",
|
||||
FILENAME, __FUNCTION__,
|
||||
major, minor, micro, nano_str);
|
||||
|
||||
@@ -460,7 +460,7 @@ cPlayback::cPlayback(int num)
|
||||
|
||||
cPlayback::~cPlayback()
|
||||
{
|
||||
lt_info( "%s:%s\n", FILENAME, __FUNCTION__);
|
||||
hal_info( "%s:%s\n", FILENAME, __FUNCTION__);
|
||||
//FIXME: all deleting stuff is done in Close()
|
||||
pthread_mutex_lock (&mutex_tag_ist);
|
||||
if (m_stream_tags)
|
||||
@@ -471,7 +471,7 @@ cPlayback::~cPlayback()
|
||||
//Used by Fileplay
|
||||
bool cPlayback::Open(playmode_t PlayMode)
|
||||
{
|
||||
lt_info("%s: PlayMode %d\n", __func__, PlayMode);
|
||||
hal_info("%s: PlayMode %d\n", __func__, PlayMode);
|
||||
|
||||
init_jump = -1;
|
||||
return true;
|
||||
@@ -480,7 +480,7 @@ bool cPlayback::Open(playmode_t PlayMode)
|
||||
// used by movieplay
|
||||
void cPlayback::Close(void)
|
||||
{
|
||||
lt_info( "%s:%s\n", FILENAME, __FUNCTION__);
|
||||
hal_info( "%s:%s\n", FILENAME, __FUNCTION__);
|
||||
|
||||
Stop();
|
||||
|
||||
@@ -492,7 +492,7 @@ void cPlayback::Close(void)
|
||||
gst_bus_set_sync_handler(bus, NULL, NULL, NULL);
|
||||
if (bus)
|
||||
gst_object_unref(bus);
|
||||
lt_info( "%s:%s - GST bus handler closed\n", FILENAME, __FUNCTION__);
|
||||
hal_info( "%s:%s - GST bus handler closed\n", FILENAME, __FUNCTION__);
|
||||
}
|
||||
|
||||
// close gst
|
||||
@@ -503,7 +503,7 @@ void cPlayback::Close(void)
|
||||
gst_object_unref(GST_OBJECT(audioSink));
|
||||
audioSink = NULL;
|
||||
|
||||
lt_info( "%s:%s - GST audio Sink closed\n", FILENAME, __FUNCTION__);
|
||||
hal_info( "%s:%s - GST audio Sink closed\n", FILENAME, __FUNCTION__);
|
||||
}
|
||||
|
||||
if (videoSink)
|
||||
@@ -511,12 +511,12 @@ void cPlayback::Close(void)
|
||||
gst_object_unref(GST_OBJECT(videoSink));
|
||||
videoSink = NULL;
|
||||
|
||||
lt_info( "%s:%s - GST video Sink closed\n", FILENAME, __FUNCTION__);
|
||||
hal_info( "%s:%s - GST video Sink closed\n", FILENAME, __FUNCTION__);
|
||||
}
|
||||
|
||||
// unref m_gst_playbin
|
||||
gst_object_unref (GST_OBJECT (m_gst_playbin));
|
||||
lt_info( "%s:%s - GST playbin closed\n", FILENAME, __FUNCTION__);
|
||||
hal_info( "%s:%s - GST playbin closed\n", FILENAME, __FUNCTION__);
|
||||
|
||||
m_gst_playbin = NULL;
|
||||
|
||||
@@ -532,7 +532,7 @@ bool cPlayback::Start(std::string filename, std::string headers)
|
||||
|
||||
bool cPlayback::Start(char *filename, int /*vpid*/, int /*vtype*/, int /*apid*/, int /*ac3*/, int /*duration*/, std::string headers)
|
||||
{
|
||||
lt_info( "%s:%s\n", FILENAME, __FUNCTION__);
|
||||
hal_info( "%s:%s\n", FILENAME, __FUNCTION__);
|
||||
|
||||
if (!headers.empty())
|
||||
extra_headers = headers;
|
||||
@@ -589,7 +589,7 @@ bool cPlayback::Start(char *filename, int /*vpid*/, int /*vtype*/, int /*apid*/,
|
||||
else
|
||||
uri = g_filename_to_uri(filename, NULL, NULL);
|
||||
|
||||
lt_info("%s:%s - filename=%s\n", FILENAME, __FUNCTION__, filename);
|
||||
hal_info("%s:%s - filename=%s\n", FILENAME, __FUNCTION__, filename);
|
||||
|
||||
guint flags = GST_PLAY_FLAG_AUDIO | GST_PLAY_FLAG_VIDEO | GST_PLAY_FLAG_NATIVE_VIDEO;
|
||||
|
||||
@@ -601,7 +601,7 @@ bool cPlayback::Start(char *filename, int /*vpid*/, int /*vtype*/, int /*apid*/,
|
||||
|
||||
if(m_gst_playbin)
|
||||
{
|
||||
lt_info("%s:%s - m_gst_playbin\n", FILENAME, __FUNCTION__);
|
||||
hal_info("%s:%s - m_gst_playbin\n", FILENAME, __FUNCTION__);
|
||||
|
||||
if(isHTTP)
|
||||
{
|
||||
@@ -641,7 +641,7 @@ bool cPlayback::Start(char *filename, int /*vpid*/, int /*vtype*/, int /*apid*/,
|
||||
}
|
||||
else
|
||||
{
|
||||
lt_info("%s:%s - failed to create GStreamer pipeline!, sorry we can not play\n", FILENAME, __FUNCTION__);
|
||||
hal_info("%s:%s - failed to create GStreamer pipeline!, sorry we can not play\n", FILENAME, __FUNCTION__);
|
||||
playing = false;
|
||||
|
||||
return false;
|
||||
@@ -654,7 +654,7 @@ bool cPlayback::Start(char *filename, int /*vpid*/, int /*vtype*/, int /*apid*/,
|
||||
|
||||
bool cPlayback::Play(void)
|
||||
{
|
||||
lt_info( "%s:%s playing %d\n", FILENAME, __FUNCTION__, playing);
|
||||
hal_info( "%s:%s playing %d\n", FILENAME, __FUNCTION__, playing);
|
||||
|
||||
if(playing == true)
|
||||
return true;
|
||||
@@ -666,7 +666,7 @@ bool cPlayback::Play(void)
|
||||
playing = true;
|
||||
playstate = STATE_PLAY;
|
||||
}
|
||||
lt_info("%s:%s playing %d\n", FILENAME, __FUNCTION__, playing);
|
||||
hal_info("%s:%s playing %d\n", FILENAME, __FUNCTION__, playing);
|
||||
|
||||
return playing;
|
||||
}
|
||||
@@ -675,7 +675,7 @@ bool cPlayback::Stop(void)
|
||||
{
|
||||
if(playing == false)
|
||||
return false;
|
||||
lt_info( "%s:%s playing %d\n", FILENAME, __FUNCTION__, playing);
|
||||
hal_info( "%s:%s playing %d\n", FILENAME, __FUNCTION__, playing);
|
||||
|
||||
// stop
|
||||
if(m_gst_playbin)
|
||||
@@ -685,7 +685,7 @@ bool cPlayback::Stop(void)
|
||||
|
||||
playing = false;
|
||||
|
||||
lt_info( "%s:%s playing %d\n", FILENAME, __FUNCTION__, playing);
|
||||
hal_info( "%s:%s playing %d\n", FILENAME, __FUNCTION__, playing);
|
||||
|
||||
playstate = STATE_STOP;
|
||||
|
||||
@@ -694,7 +694,7 @@ bool cPlayback::Stop(void)
|
||||
|
||||
bool cPlayback::SetAPid(int pid, bool /*ac3*/)
|
||||
{
|
||||
lt_info("%s: pid %i\n", __func__, pid);
|
||||
hal_info("%s: pid %i\n", __func__, pid);
|
||||
|
||||
int to_audio = pid;
|
||||
|
||||
@@ -732,7 +732,7 @@ void cPlayback::trickSeek(int ratio)
|
||||
|
||||
bool cPlayback::SetSpeed(int speed)
|
||||
{
|
||||
lt_info( "%s:%s speed %d\n", FILENAME, __FUNCTION__, speed);
|
||||
hal_info( "%s:%s speed %d\n", FILENAME, __FUNCTION__, speed);
|
||||
|
||||
if(playing == false)
|
||||
return false;
|
||||
@@ -783,7 +783,7 @@ bool cPlayback::SetSpeed(int speed)
|
||||
|
||||
bool cPlayback::SetSlow(int slow)
|
||||
{
|
||||
lt_info( "%s:%s playing %d\n", FILENAME, __FUNCTION__, playing);
|
||||
hal_info( "%s:%s playing %d\n", FILENAME, __FUNCTION__, playing);
|
||||
|
||||
if(playing == false)
|
||||
return false;
|
||||
@@ -830,14 +830,14 @@ bool cPlayback::GetPosition(int &position, int &duration)
|
||||
g_signal_emit_by_name(audioSink ? audioSink : videoSink, "get-decoder-time", &pts);
|
||||
if (!GST_CLOCK_TIME_IS_VALID(pts))
|
||||
{
|
||||
lt_info( "%s - %d failed\n", __FUNCTION__, __LINE__);
|
||||
hal_info( "%s - %d failed\n", __FUNCTION__, __LINE__);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!gst_element_query_position(m_gst_playbin, fmt, &pts))
|
||||
{
|
||||
lt_info( "%s - %d failed\n", __FUNCTION__, __LINE__);
|
||||
hal_info( "%s - %d failed\n", __FUNCTION__, __LINE__);
|
||||
}
|
||||
}
|
||||
position = pts / 1000000.0;
|
||||
@@ -859,7 +859,7 @@ bool cPlayback::GetPosition(int &position, int &duration)
|
||||
|
||||
bool cPlayback::SetPosition(int position, bool absolute)
|
||||
{
|
||||
lt_info("%s: pos %d abs %d playing %d\n", __func__, position, absolute, playing);
|
||||
hal_info("%s: pos %d abs %d playing %d\n", __func__, position, absolute, playing);
|
||||
|
||||
|
||||
if(m_gst_playbin)
|
||||
@@ -898,7 +898,7 @@ bool cPlayback::SetPosition(int position, bool absolute)
|
||||
|
||||
void cPlayback::FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *numpida, std::string * language)
|
||||
{
|
||||
lt_info( "%s:%s\n", FILENAME, __FUNCTION__);
|
||||
hal_info( "%s:%s\n", FILENAME, __FUNCTION__);
|
||||
|
||||
if(m_gst_playbin)
|
||||
{
|
||||
@@ -906,7 +906,7 @@ void cPlayback::FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *nu
|
||||
|
||||
// get audio
|
||||
g_object_get (m_gst_playbin, "n-audio", &n_audio, NULL);
|
||||
lt_info("%s: %d audio\n", __FUNCTION__, n_audio);
|
||||
hal_info("%s: %d audio\n", __FUNCTION__, n_audio);
|
||||
|
||||
if(n_audio == 0)
|
||||
return;
|
||||
@@ -984,7 +984,7 @@ void cPlayback::FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *nu
|
||||
language[i] = "unk";
|
||||
else
|
||||
language[i] = slang.c_str();
|
||||
lt_info("%s: language:%s\n", __FUNCTION__, language[i].c_str());
|
||||
hal_info("%s: language:%s\n", __FUNCTION__, language[i].c_str());
|
||||
g_free(g_lang);
|
||||
}
|
||||
gst_tag_list_free(tags);
|
||||
@@ -1002,7 +1002,7 @@ void cPlayback::getMeta()
|
||||
|
||||
bool cPlayback::SyncAV(void)
|
||||
{
|
||||
lt_info( "%s:%s playing %d\n", FILENAME, __FUNCTION__, playing);
|
||||
hal_info( "%s:%s playing %d\n", FILENAME, __FUNCTION__, playing);
|
||||
|
||||
if(playing == false )
|
||||
return false;
|
||||
@@ -1157,7 +1157,7 @@ int cPlayback::GetAPid(void)
|
||||
{
|
||||
gint current_audio = 0;
|
||||
g_object_get (m_gst_playbin, "current-audio", ¤t_audio, NULL);
|
||||
lt_info("%s: %d audio\n", __FUNCTION__, current_audio);
|
||||
hal_info("%s: %d audio\n", __FUNCTION__, current_audio);
|
||||
return real_apids[current_audio] ? real_apids[current_audio] : current_audio;
|
||||
}
|
||||
|
||||
@@ -1165,7 +1165,7 @@ int cPlayback::GetVPid(void)
|
||||
{
|
||||
gint current_video = 0;
|
||||
g_object_get (m_gst_playbin, "current-video", ¤t_video, NULL);
|
||||
lt_info("%s: %d video\n", __FUNCTION__, current_video);
|
||||
hal_info("%s: %d video\n", __FUNCTION__, current_video);
|
||||
return current_video;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user