mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 15:33:00 +02:00
armbox: let gst playback handle devices
This commit is contained in:
@@ -43,6 +43,10 @@
|
|||||||
#define lt_info_c(args...) _lt_info(HAL_DEBUG_PLAYBACK, NULL, args)
|
#define lt_info_c(args...) _lt_info(HAL_DEBUG_PLAYBACK, NULL, args)
|
||||||
|
|
||||||
static const char * FILENAME = "[playback.cpp]";
|
static const char * FILENAME = "[playback.cpp]";
|
||||||
|
extern cVideo * videoDecoder;
|
||||||
|
extern cAudio * audioDecoder;
|
||||||
|
extern cDemux * audioDemux;
|
||||||
|
extern cDemux * videoDemux;
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/pbutils/missing-plugins.h>
|
#include <gst/pbutils/missing-plugins.h>
|
||||||
@@ -430,7 +434,14 @@ void cPlayback::Close(void)
|
|||||||
lt_info( "%s:%s - GST playbin closed\n", FILENAME, __FUNCTION__);
|
lt_info( "%s:%s - GST playbin closed\n", FILENAME, __FUNCTION__);
|
||||||
|
|
||||||
m_gst_playbin = NULL;
|
m_gst_playbin = NULL;
|
||||||
|
|
||||||
|
videoDecoder->openDevice();
|
||||||
|
audioDecoder->openDevice();
|
||||||
|
|
||||||
|
videoDemux->Start();
|
||||||
|
audioDemux->Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// start
|
// start
|
||||||
@@ -505,6 +516,13 @@ bool cPlayback::Start(char *filename, int /*vpid*/, int /*vtype*/, int /*apid*/,
|
|||||||
|
|
||||||
if(m_gst_playbin)
|
if(m_gst_playbin)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
videoDemux->Stop();
|
||||||
|
audioDemux->Stop();
|
||||||
|
|
||||||
|
videoDecoder->closeDevice();
|
||||||
|
audioDecoder->closeDevice();
|
||||||
|
|
||||||
lt_info("%s:%s - m_gst_playbin\n", FILENAME, __FUNCTION__);
|
lt_info("%s:%s - m_gst_playbin\n", FILENAME, __FUNCTION__);
|
||||||
|
|
||||||
if(isHTTP)
|
if(isHTTP)
|
||||||
|
Reference in New Issue
Block a user