mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 15:32:43 +02:00
armbox: Cosmetics replace spaces with tabs and delete unnecessary tabs
Origin commit data
------------------
Branch: master
Commit: 8f242002a9
Author: max_10 <max_10@gmx.de>
Date: 2017-10-08 (Sun, 08 Oct 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -52,18 +52,18 @@ extern cAudio * audioDecoder;
|
|||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GST_PLAY_FLAG_VIDEO = (1 << 0),
|
GST_PLAY_FLAG_VIDEO = (1 << 0),
|
||||||
GST_PLAY_FLAG_AUDIO = (1 << 1),
|
GST_PLAY_FLAG_AUDIO = (1 << 1),
|
||||||
GST_PLAY_FLAG_TEXT = (1 << 2),
|
GST_PLAY_FLAG_TEXT = (1 << 2),
|
||||||
GST_PLAY_FLAG_VIS = (1 << 3),
|
GST_PLAY_FLAG_VIS = (1 << 3),
|
||||||
GST_PLAY_FLAG_SOFT_VOLUME = (1 << 4),
|
GST_PLAY_FLAG_SOFT_VOLUME = (1 << 4),
|
||||||
GST_PLAY_FLAG_NATIVE_AUDIO = (1 << 5),
|
GST_PLAY_FLAG_NATIVE_AUDIO = (1 << 5),
|
||||||
GST_PLAY_FLAG_NATIVE_VIDEO = (1 << 6),
|
GST_PLAY_FLAG_NATIVE_VIDEO = (1 << 6),
|
||||||
GST_PLAY_FLAG_DOWNLOAD = (1 << 7),
|
GST_PLAY_FLAG_DOWNLOAD = (1 << 7),
|
||||||
GST_PLAY_FLAG_BUFFERING = (1 << 8),
|
GST_PLAY_FLAG_BUFFERING = (1 << 8),
|
||||||
GST_PLAY_FLAG_DEINTERLACE = (1 << 9),
|
GST_PLAY_FLAG_DEINTERLACE = (1 << 9),
|
||||||
GST_PLAY_FLAG_SOFT_COLORBALANCE = (1 << 10),
|
GST_PLAY_FLAG_SOFT_COLORBALANCE = (1 << 10),
|
||||||
GST_PLAY_FLAG_FORCE_FILTERS = (1 << 11),
|
GST_PLAY_FLAG_FORCE_FILTERS = (1 << 11),
|
||||||
} GstPlayFlags;
|
} GstPlayFlags;
|
||||||
|
|
||||||
|
|
||||||
@@ -354,6 +354,8 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
|||||||
gst_object_unref(GST_OBJECT(videoSink));
|
gst_object_unref(GST_OBJECT(videoSink));
|
||||||
videoSink = NULL;
|
videoSink = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set audio sink
|
||||||
children = gst_bin_iterate_recurse(GST_BIN(m_gst_playbin));
|
children = gst_bin_iterate_recurse(GST_BIN(m_gst_playbin));
|
||||||
if (children && gst_iterator_find_custom(children, (GCompareFunc)match_sinktype, &r, (gpointer)"GstDVBAudioSink"))
|
if (children && gst_iterator_find_custom(children, (GCompareFunc)match_sinktype, &r, (gpointer)"GstDVBAudioSink"))
|
||||||
{
|
{
|
||||||
@@ -363,6 +365,8 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
gst_iterator_free(children);
|
gst_iterator_free(children);
|
||||||
|
|
||||||
|
// set video sink
|
||||||
children = gst_bin_iterate_recurse(GST_BIN(m_gst_playbin));
|
children = gst_bin_iterate_recurse(GST_BIN(m_gst_playbin));
|
||||||
if (children && gst_iterator_find_custom(children, (GCompareFunc)match_sinktype, &r, (gpointer)"GstDVBVideoSink"))
|
if (children && gst_iterator_find_custom(children, (GCompareFunc)match_sinktype, &r, (gpointer)"GstDVBVideoSink"))
|
||||||
{
|
{
|
||||||
@@ -370,7 +374,10 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
|||||||
g_value_unset (&r);
|
g_value_unset (&r);
|
||||||
lt_info_c( "%s %s - video sink created\n", FILENAME, __FUNCTION__);
|
lt_info_c( "%s %s - video sink created\n", FILENAME, __FUNCTION__);
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_iterator_free(children);
|
gst_iterator_free(children);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -408,13 +415,13 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data)
|
|||||||
return GST_BUS_DROP;
|
return GST_BUS_DROP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
cPlayback::cPlayback(int num)
|
cPlayback::cPlayback(int num)
|
||||||
{
|
{
|
||||||
lt_info( "%s:%s\n", FILENAME, __FUNCTION__);
|
lt_info( "%s:%s\n", FILENAME, __FUNCTION__);
|
||||||
const gchar *nano_str;
|
const gchar *nano_str;
|
||||||
guint major, minor, micro, nano;
|
guint major, minor, micro, nano;
|
||||||
|
|
||||||
|
/* init gstreamer */
|
||||||
gst_init(NULL, NULL);
|
gst_init(NULL, NULL);
|
||||||
|
|
||||||
gst_version (&major, &minor, µ, &nano);
|
gst_version (&major, &minor, µ, &nano);
|
||||||
@@ -443,6 +450,7 @@ cPlayback::cPlayback(int num)
|
|||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* called at housekepping */
|
||||||
cPlayback::~cPlayback()
|
cPlayback::~cPlayback()
|
||||||
{
|
{
|
||||||
lt_info( "%s:%s\n", FILENAME, __FUNCTION__);
|
lt_info( "%s:%s\n", FILENAME, __FUNCTION__);
|
||||||
@@ -611,12 +619,14 @@ bool cPlayback::Start(char *filename, int /*vpid*/, int /*vtype*/, int /*apid*/,
|
|||||||
flags |= GST_PLAY_FLAG_BUFFERING;
|
flags |= GST_PLAY_FLAG_BUFFERING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set flags
|
||||||
g_object_set(G_OBJECT (m_gst_playbin), "flags", flags, NULL);
|
g_object_set(G_OBJECT (m_gst_playbin), "flags", flags, NULL);
|
||||||
|
|
||||||
|
// set uri
|
||||||
g_object_set(G_OBJECT (m_gst_playbin), "uri", uri, NULL);
|
g_object_set(G_OBJECT (m_gst_playbin), "uri", uri, NULL);
|
||||||
|
|
||||||
//gstbus handler
|
//gstbus handler
|
||||||
GstBus * bus = gst_pipeline_get_bus( GST_PIPELINE(m_gst_playbin) );
|
GstBus * bus = gst_pipeline_get_bus(GST_PIPELINE(m_gst_playbin));
|
||||||
gst_bus_set_sync_handler(bus, Gst_bus_call, NULL, NULL);
|
gst_bus_set_sync_handler(bus, Gst_bus_call, NULL, NULL);
|
||||||
if (bus)
|
if (bus)
|
||||||
gst_object_unref(bus);
|
gst_object_unref(bus);
|
||||||
@@ -673,6 +683,7 @@ bool cPlayback::Stop(void)
|
|||||||
{
|
{
|
||||||
if(playing == false)
|
if(playing == false)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
lt_info( "%s:%s playing %d\n", FILENAME, __FUNCTION__, playing);
|
lt_info( "%s:%s playing %d\n", FILENAME, __FUNCTION__, playing);
|
||||||
|
|
||||||
// stop
|
// stop
|
||||||
@@ -846,7 +857,7 @@ bool cPlayback::GetPosition(int &position, int &duration)
|
|||||||
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
|
||||||
double length = 0;
|
double length = 0;
|
||||||
@@ -997,7 +1008,7 @@ void cPlayback::FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *nu
|
|||||||
gst_tag_list_free(tags);
|
gst_tag_list_free(tags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*numpida=i;
|
*numpida = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user