mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Makes audio ts parser default. Suspend fixes.
This commit is contained in:
parent
7e1a42f7ed
commit
74a62e3649
2
Makefile
2
Makefile
@ -23,7 +23,7 @@ CONFIG := #-DDEBUG
|
||||
#CONFIG += -DUSE_AC3_DRIFT_CORRECTION # build new ac-3 drift code
|
||||
CONFIG += -DAV_INFO -DAV_INFO_TIME=3000 # debug a/v sync
|
||||
#CONFIG += -DHAVE_PTHREAD_NAME # supports new pthread_setname_np
|
||||
CONFIG += -DUSE_TS_AUDIO # build new ts audio parser
|
||||
#CONFIG += -DNO_TS_AUDIO # disable ts audio parser
|
||||
#CONFIG += -DUSE_TS_VIDEO # build new ts video parser
|
||||
CONFIG += $(shell pkg-config --exists vdpau && echo "-DUSE_VDPAU")
|
||||
CONFIG += $(shell pkg-config --exists libva && echo "-DUSE_VAAPI")
|
||||
|
3
Todo
3
Todo
@ -86,7 +86,8 @@ audio:
|
||||
Starting suspended and muted, didn't register the mute.
|
||||
Relaxed audio sync checks at end of packet and already in sync
|
||||
samplerate problem resume/suspend.
|
||||
only wait for video buffers, if video is running.
|
||||
only wait for video start, if video is running.
|
||||
Not primary device, don't use and block audio/video.
|
||||
|
||||
audio/alsa:
|
||||
better downmix of >2 channels on 2 channel hardware
|
||||
|
@ -348,7 +348,7 @@ static int Ac3Check(const uint8_t * data, int size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef USE_TS_AUDIO
|
||||
#ifndef NO_TS_AUDIO
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// PES Demux
|
||||
@ -1058,7 +1058,7 @@ int PlayAudio(const uint8_t * data, int size, uint8_t id)
|
||||
return size;
|
||||
}
|
||||
|
||||
#ifdef USE_TS_AUDIO
|
||||
#ifndef NO_TS_AUDIO
|
||||
|
||||
/**
|
||||
** Play transport stream audio packet.
|
||||
@ -2369,7 +2369,7 @@ int Start(void)
|
||||
}
|
||||
pthread_mutex_init(&SuspendLockMutex, NULL);
|
||||
|
||||
#ifdef USE_TS_AUDIO
|
||||
#ifndef NO_TS_AUDIO
|
||||
PesInit(PesDemuxAudio);
|
||||
#endif
|
||||
Info(_("[softhddev] ready%s\n"), ConfigStartSuspended ? " suspended" : "");
|
||||
|
@ -832,6 +832,7 @@ eOSState cSoftHdMenu::ProcessKey(eKeys key)
|
||||
cControl::Attach();
|
||||
Suspend(ConfigSuspendClose, ConfigSuspendClose,
|
||||
ConfigSuspendX11);
|
||||
SuspendMode = SUSPEND_NORMAL;
|
||||
if (ShutdownHandler.GetUserInactiveTime()) {
|
||||
dsyslog("[softhddev]%s: set user inactive\n",
|
||||
__FUNCTION__);
|
||||
@ -876,7 +877,7 @@ class cSoftHdDevice:public cDevice
|
||||
#ifdef USE_TS_VIDEO
|
||||
virtual int PlayTsVideo(const uchar *, int);
|
||||
#endif
|
||||
#if !defined(USE_AUDIO_THREAD) || defined(USE_TS_AUDIO)
|
||||
#if !defined(USE_AUDIO_THREAD) || !defined(NO_TS_AUDIO)
|
||||
virtual int PlayTsAudio(const uchar *, int);
|
||||
#endif
|
||||
virtual void SetAudioChannelDevice(int);
|
||||
@ -986,6 +987,7 @@ bool cSoftHdDevice::SetPlayMode(ePlayMode play_mode)
|
||||
case pmExtern_THIS_SHOULD_BE_AVOIDED:
|
||||
dsyslog("[softhddev] play mode external\n");
|
||||
Suspend(1, 1, 0);
|
||||
SuspendMode = SUSPEND_EXTERNAL;
|
||||
return true;
|
||||
default:
|
||||
dsyslog("[softhddev] playmode not implemented... %d\n", play_mode);
|
||||
@ -1257,7 +1259,7 @@ int cSoftHdDevice::PlayTsVideo(const uchar * data, int length)
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(USE_AUDIO_THREAD) || defined(USE_TS_AUDIO)
|
||||
#if !defined(USE_AUDIO_THREAD) || !defined(NO_TS_AUDIO)
|
||||
|
||||
///
|
||||
/// Play a TS audio packet.
|
||||
@ -1267,7 +1269,7 @@ int cSoftHdDevice::PlayTsVideo(const uchar * data, int length)
|
||||
///
|
||||
int cSoftHdDevice::PlayTsAudio(const uchar * data, int length)
|
||||
{
|
||||
#ifdef USE_TS_AUDIO
|
||||
#ifndef NO_TS_AUDIO
|
||||
return::PlayTsAudio(data, length);
|
||||
#else
|
||||
AudioPoller();
|
||||
@ -1413,6 +1415,8 @@ bool cPluginSoftHdDevice::Start(void)
|
||||
}
|
||||
|
||||
if (!::Start()) {
|
||||
cControl::Launch(new cSoftHdControl);
|
||||
cControl::Attach();
|
||||
SuspendMode = SUSPEND_NORMAL;
|
||||
}
|
||||
|
||||
@ -1463,6 +1467,7 @@ cOsdObject *cPluginSoftHdDevice::MainMenuAction(void)
|
||||
cControl::Launch(new cSoftHdControl);
|
||||
cControl::Attach();
|
||||
Suspend(ConfigSuspendClose, ConfigSuspendClose, ConfigSuspendX11);
|
||||
SuspendMode = SUSPEND_NORMAL;
|
||||
if (ShutdownHandler.GetUserInactiveTime()) {
|
||||
dsyslog("[softhddev]%s: set user inactive\n", __FUNCTION__);
|
||||
ShutdownHandler.SetUserInactive();
|
||||
@ -1491,6 +1496,7 @@ void cPluginSoftHdDevice::MainThreadHook(void)
|
||||
if (ShutdownHandler.IsUserInactive()) {
|
||||
// this is regular called, but guarded against double calls
|
||||
Suspend(ConfigSuspendClose, ConfigSuspendClose, ConfigSuspendX11);
|
||||
SuspendMode = SUSPEND_NORMAL;
|
||||
}
|
||||
|
||||
::MainThreadHook();
|
||||
@ -1679,6 +1685,7 @@ cString cPluginSoftHdDevice::SVDRPCommand(const char *command,
|
||||
}
|
||||
// should be after suspend, but SetPlayMode resumes
|
||||
Suspend(ConfigSuspendClose, ConfigSuspendClose, ConfigSuspendX11);
|
||||
SuspendMode = SUSPEND_NORMAL;
|
||||
cControl::Launch(new cSoftHdControl);
|
||||
cControl::Attach();
|
||||
return "SoftHdDevice is suspended";
|
||||
|
Loading…
Reference in New Issue
Block a user