mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 07:22:44 +02:00
Merge branch 'master' of https://github.com/TangoCash/libstb-hal-cst-next
Origin commit data
------------------
Branch: master
Commit: 899fc00967
Author: gixxpunk <thomas.harfmann@gmail.com>
Date: 2017-11-13 (Mon, 13 Nov 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -188,8 +188,6 @@ void playbinNotifySource(GObject *object, GParamSpec *param_spec, gpointer user_
|
|||||||
|
|
||||||
GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
||||||
{
|
{
|
||||||
gchar * sourceName;
|
|
||||||
|
|
||||||
// source
|
// source
|
||||||
GstObject * source;
|
GstObject * source;
|
||||||
source = GST_MESSAGE_SRC(msg);
|
source = GST_MESSAGE_SRC(msg);
|
||||||
@@ -197,8 +195,6 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
|||||||
if (!GST_IS_OBJECT(source))
|
if (!GST_IS_OBJECT(source))
|
||||||
return GST_BUS_DROP;
|
return GST_BUS_DROP;
|
||||||
|
|
||||||
sourceName = gst_object_get_name(source);
|
|
||||||
|
|
||||||
switch (GST_MESSAGE_TYPE(msg))
|
switch (GST_MESSAGE_TYPE(msg))
|
||||||
{
|
{
|
||||||
case GST_MESSAGE_EOS:
|
case GST_MESSAGE_EOS:
|
||||||
@@ -214,6 +210,7 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
|||||||
GError *err;
|
GError *err;
|
||||||
gst_message_parse_error(msg, &err, &debug);
|
gst_message_parse_error(msg, &err, &debug);
|
||||||
g_free (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 );
|
lt_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->domain == GST_STREAM_ERROR )
|
||||||
{
|
{
|
||||||
@@ -226,6 +223,8 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_error_free(err);
|
g_error_free(err);
|
||||||
|
if(sourceName)
|
||||||
|
g_free(sourceName);
|
||||||
|
|
||||||
end_eof = 1; // NOTE: just to exit
|
end_eof = 1; // NOTE: just to exit
|
||||||
|
|
||||||
@@ -241,8 +240,12 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
|||||||
g_free (debug);
|
g_free (debug);
|
||||||
if ( inf->domain == GST_STREAM_ERROR && inf->code == GST_STREAM_ERROR_DECODE )
|
if ( inf->domain == GST_STREAM_ERROR && inf->code == GST_STREAM_ERROR_DECODE )
|
||||||
{
|
{
|
||||||
|
gchar * sourceName = gst_object_get_name(source);
|
||||||
if ( g_strrstr(sourceName, "videosink") )
|
if ( g_strrstr(sourceName, "videosink") )
|
||||||
lt_info_c( "%s:%s - GST_MESSAGE_INFO: videosink\n", FILENAME, __FUNCTION__ ); //FIXME: how shall playback handle this event???
|
lt_info_c( "%s:%s - GST_MESSAGE_INFO: videosink\n", FILENAME, __FUNCTION__ ); //FIXME: how shall playback handle this event???
|
||||||
|
if(sourceName)
|
||||||
|
g_free(sourceName);
|
||||||
|
|
||||||
}
|
}
|
||||||
g_error_free(inf);
|
g_error_free(inf);
|
||||||
break;
|
break;
|
||||||
@@ -250,9 +253,14 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
|||||||
|
|
||||||
case GST_MESSAGE_TAG:
|
case GST_MESSAGE_TAG:
|
||||||
{
|
{
|
||||||
GstTagList *tags, *result;
|
GstTagList *tags = NULL, *result = NULL;
|
||||||
gst_message_parse_tag(msg, &tags);
|
gst_message_parse_tag(msg, &tags);
|
||||||
|
|
||||||
|
if(tags == NULL)
|
||||||
|
break;
|
||||||
|
if(!GST_IS_TAG_LIST(tags))
|
||||||
|
break;
|
||||||
|
|
||||||
result = gst_tag_list_merge(m_stream_tags, tags, GST_TAG_MERGE_REPLACE);
|
result = gst_tag_list_merge(m_stream_tags, tags, GST_TAG_MERGE_REPLACE);
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
@@ -388,8 +396,6 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(sourceName)
|
|
||||||
g_free(sourceName);
|
|
||||||
|
|
||||||
return GST_BUS_DROP;
|
return GST_BUS_DROP;
|
||||||
}
|
}
|
||||||
@@ -405,6 +411,8 @@ cPlayback::cPlayback(int num)
|
|||||||
|
|
||||||
gst_version (&major, &minor, µ, &nano);
|
gst_version (&major, &minor, µ, &nano);
|
||||||
|
|
||||||
|
gst_mpegts_initialize();
|
||||||
|
|
||||||
if (nano == 1)
|
if (nano == 1)
|
||||||
nano_str = "(CVS)";
|
nano_str = "(CVS)";
|
||||||
else if (nano == 2)
|
else if (nano == 2)
|
||||||
@@ -820,8 +828,10 @@ bool cPlayback::GetPosition(int &position, int &duration)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!gst_element_query_position(m_gst_playbin, fmt, &pts))
|
if(!gst_element_query_position(m_gst_playbin, fmt, &pts))
|
||||||
|
{
|
||||||
lt_info( "%s - %d failed\n", __FUNCTION__, __LINE__);
|
lt_info( "%s - %d failed\n", __FUNCTION__, __LINE__);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
position = pts / 1000000.0;
|
position = pts / 1000000.0;
|
||||||
// duration
|
// duration
|
||||||
GstFormat fmt_d = GST_FORMAT_TIME; //Returns time in nanosecs
|
GstFormat fmt_d = GST_FORMAT_TIME; //Returns time in nanosecs
|
||||||
@@ -843,21 +853,23 @@ bool cPlayback::SetPosition(int position, bool absolute)
|
|||||||
{
|
{
|
||||||
lt_info("%s: pos %d abs %d playing %d\n", __func__, position, absolute, playing);
|
lt_info("%s: pos %d abs %d playing %d\n", __func__, position, absolute, playing);
|
||||||
|
|
||||||
gint64 time_nanoseconds;
|
|
||||||
gint64 pos;
|
|
||||||
GstFormat fmt = GST_FORMAT_TIME;
|
|
||||||
GstState state;
|
|
||||||
|
|
||||||
if(m_gst_playbin)
|
if(m_gst_playbin)
|
||||||
{
|
{
|
||||||
|
if(first){
|
||||||
|
GstState state;
|
||||||
gst_element_get_state(m_gst_playbin, &state, NULL, GST_CLOCK_TIME_NONE);
|
gst_element_get_state(m_gst_playbin, &state, NULL, GST_CLOCK_TIME_NONE);
|
||||||
|
|
||||||
if ( (state == GST_STATE_PAUSED) && first)
|
if ( (state == GST_STATE_PAUSED) && first)
|
||||||
{
|
{
|
||||||
init_jump = position;
|
init_jump = position;
|
||||||
first = false;
|
first = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gint64 time_nanoseconds;
|
||||||
|
gint64 pos;
|
||||||
|
GstFormat fmt = GST_FORMAT_TIME;
|
||||||
if (!absolute)
|
if (!absolute)
|
||||||
{
|
{
|
||||||
gst_element_query_position(m_gst_playbin, fmt, &pos);
|
gst_element_query_position(m_gst_playbin, fmt, &pos);
|
||||||
|
Reference in New Issue
Block a user