raspi: use decoder implementation from pidvbip

* remove ilclient
* use a decoder implementation similar to pidvbip instead,
  see https://github.com/linuxstb/pidvbip
* video is decoded in hardware (videocore)
* audio is decoded by libavcodec
* add a AVDec wrapper class for both audio and video decoders
* very raw, needs more polishing. But decodes audio and video :-)
* only tested with h264
This commit is contained in:
Stefan Seyfried
2013-10-13 22:36:45 +02:00
parent 19b0ff20e1
commit 510b655710
17 changed files with 2695 additions and 3468 deletions

View File

@@ -22,6 +22,7 @@
#include "audio_lib.h"
#include "dmx_lib.h"
#include "avdec.h"
#include "lt_debug.h"
#define lt_debug(args...) _lt_debug(HAL_DEBUG_AUDIO, this, args)
@@ -29,6 +30,9 @@
cAudio * audioDecoder = NULL;
extern cDemux *audioDemux;
extern AVDec *avdec;
cAudio::cAudio(void *, void *, void *)
{
lt_debug("%s\n", __func__);
@@ -52,24 +56,34 @@ void cAudio::closeDevice(void)
int cAudio::do_mute(bool enable, bool remember)
{
lt_debug("%s(%d, %d)\n", __func__, enable, remember);
if (enable)
avdec->set_volume(0);
else
avdec->set_volume(volume);
return 0;
}
int cAudio::setVolume(unsigned int left, unsigned int right)
{
lt_debug("%s(%d, %d)\n", __func__, left, right);
volume = (left + right)/2;
avdec->set_volume(volume);
return 0;
}
int cAudio::Start(void)
{
lt_debug("%s >\n", __func__);
lt_info("%s >\n", __func__);
avdec->start_audio();
lt_info("%s <\n", __func__);
return 0;
}
int cAudio::Stop(void)
{
lt_debug("%s >\n", __func__);
lt_info("%s >\n", __func__);
avdec->stop_audio();
lt_info("%s <\n", __func__);
return 0;
}
@@ -151,4 +165,3 @@ void cAudio::setBypassMode(bool disable)
{
lt_debug("%s %d\n", __func__, disable);
}