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