mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 15:32:43 +02:00
fix gst playback
Origin commit data
------------------
Branch: master
Commit: ba0766f0c0
Author: TangoCash <eric@loxat.de>
Date: 2017-10-15 (Sun, 15 Oct 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -77,6 +77,35 @@ gint match_sinktype(const GValue *velement, const gchar *type)
|
|||||||
return strcmp(g_type_name(G_OBJECT_TYPE(element)), type);
|
return strcmp(g_type_name(G_OBJECT_TYPE(element)), type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void playbinNotifySource(GObject *object, GParamSpec *unused, gpointer /*user_data*/)
|
||||||
|
{
|
||||||
|
GstElement *source = NULL;
|
||||||
|
g_object_get(object, "source", &source, NULL);
|
||||||
|
|
||||||
|
if (source)
|
||||||
|
{
|
||||||
|
if (g_object_class_find_property(G_OBJECT_GET_CLASS(source), "timeout") != 0)
|
||||||
|
{
|
||||||
|
GstElementFactory *factory = gst_element_get_factory(source);
|
||||||
|
if (factory)
|
||||||
|
{
|
||||||
|
const gchar *sourcename = gst_plugin_feature_get_name(GST_PLUGIN_FEATURE(factory));
|
||||||
|
if (!strcmp(sourcename, "souphttpsrc"))
|
||||||
|
{
|
||||||
|
g_object_set(G_OBJECT(source), "timeout", HTTP_TIMEOUT, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_object_class_find_property(G_OBJECT_GET_CLASS(source), "ssl-strict") != 0)
|
||||||
|
{
|
||||||
|
g_object_set(G_OBJECT(source), "ssl-strict", FALSE, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
gst_object_unref(source);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GstBusSyncReply Gst_bus_call(GstBus * bus, GstMessage *msg, gpointer user_data)
|
GstBusSyncReply Gst_bus_call(GstBus * bus, GstMessage *msg, gpointer user_data)
|
||||||
{
|
{
|
||||||
gchar * sourceName;
|
gchar * sourceName;
|
||||||
@@ -419,6 +448,8 @@ bool cPlayback::Start(char *filename, int /*vpid*/, int /*vtype*/, int /*apid*/,
|
|||||||
|
|
||||||
if(isHTTP)
|
if(isHTTP)
|
||||||
{
|
{
|
||||||
|
g_signal_connect (G_OBJECT (m_gst_playbin), "notify::source", G_CALLBACK (playbinNotifySource), NULL);
|
||||||
|
|
||||||
// set buffer size
|
// set buffer size
|
||||||
g_object_set(G_OBJECT(m_gst_playbin), "buffer-size", m_buffer_size, NULL);
|
g_object_set(G_OBJECT(m_gst_playbin), "buffer-size", m_buffer_size, NULL);
|
||||||
g_object_set(G_OBJECT(m_gst_playbin), "buffer-duration", 5LL * GST_SECOND, NULL);
|
g_object_set(G_OBJECT(m_gst_playbin), "buffer-duration", 5LL * GST_SECOND, NULL);
|
||||||
|
Reference in New Issue
Block a user