summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.txt11
-rw-r--r--softhddev.c5
-rw-r--r--softhddevice.cpp38
-rw-r--r--video.h3
4 files changed, 37 insertions, 20 deletions
diff --git a/README.txt b/README.txt
index e9b797b..0bd67d5 100644
--- a/README.txt
+++ b/README.txt
@@ -61,7 +61,7 @@ Install:
http://projects.vdr-developer.org/projects/plg-softhddevice/files
tar vxf vdr-softhddevice-*.tar.bz2
- cd vdr-softhddevice
+ cd softhddevice-*
make VDRDIR=<path-to-your-vdr-files> LIBDIR=.
You can edit Makefile to enable/disable VDPAU / VA-API / Alsa / OSS
@@ -146,6 +146,15 @@ Commandline:
Use vdr -h to see the command line arguments support by the plugin.
+ -a audio_device
+
+ Selects audio output module and device.
+ "" to disable audio output
+ /... to use oss audio module (if compiled with oss
+ support)
+ other to use alsa audio module (if compiled with alsa
+ support)
+
Running:
--------
diff --git a/softhddev.c b/softhddev.c
index 33e5fae..267b603 100644
--- a/softhddev.c
+++ b/softhddev.c
@@ -652,6 +652,9 @@ static int ValidateMpeg(const uint8_t * data, int size)
** supports complete packets.
** We buffer here until we receive an complete PES Packet, which
** is no problem, the audio is always far behind us.
+** cTsToPes::GetPes splits the packets.
+**
+** @todo FIXME: combine the 5 ifs at start of the function
*/
int PlayVideo(const uint8_t * data, int size)
{
@@ -695,7 +698,7 @@ int PlayVideo(const uint8_t * data, int size)
Error(_("[softhddev] invalid video packet %d bytes\n"), size);
return size;
}
- // FIXME: hack to test results
+ // buffer full: needed for replay
if (atomic_read(&VideoPacketsFilled) >= VIDEO_PACKET_MAX - 1) {
return 0;
}
diff --git a/softhddevice.cpp b/softhddevice.cpp
index b7039ff..764595b 100644
--- a/softhddevice.cpp
+++ b/softhddevice.cpp
@@ -42,7 +42,7 @@ extern "C"
//////////////////////////////////////////////////////////////////////////////
-static const char *const VERSION = "0.3.1";
+static const char *const VERSION = "0.3.5";
static const char *const DESCRIPTION =
trNOOP("A software and GPU emulated HD device");
@@ -404,10 +404,10 @@ cMenuSetupSoft::cMenuSetupSoft(void)
// cMenuEditStrItem cMenuEditStraItem cMenuEditIntItem
MakePrimary = ConfigMakePrimary;
Add(new cMenuEditBoolItem(tr("Make primary device"), &MakePrimary,
- tr("no"), tr("yes")));
+ trVDR("no"), trVDR("yes")));
HideMainMenuEntry = ConfigHideMainMenuEntry;
Add(new cMenuEditBoolItem(tr("Hide main menu entry"), &HideMainMenuEntry,
- tr("no"), tr("yes")));
+ trVDR("no"), trVDR("yes")));
//
// video
//
@@ -421,7 +421,7 @@ cMenuSetupSoft::cMenuSetupSoft(void)
deinterlace));
SkipChromaDeinterlace[i] = ConfigVideoSkipChromaDeinterlace[i];
Add(new cMenuEditBoolItem(tr("SkipChromaDeinterlace (vdpau)"),
- &SkipChromaDeinterlace[i], tr("no"), tr("yes")));
+ &SkipChromaDeinterlace[i], trVDR("no"), trVDR("yes")));
Denoise[i] = ConfigVideoDenoise[i];
Add(new cMenuEditIntItem(tr("Denoise (0..1000) (vdpau)"), &Denoise[i],
0, 1000));
@@ -508,7 +508,7 @@ class cSoftHdDevice:public cDevice
virtual int PlayVideo(const uchar *, int);
//virtual int PlayTsVideo(const uchar *, int);
-#ifdef USE_OSS // FIXME: testing only oss
+#ifndef USE_AUDIO_THREAD // FIXME: testing none threaded
virtual int PlayTsAudio(const uchar *, int);
#endif
virtual void SetAudioChannelDevice(int);
@@ -521,8 +521,6 @@ class cSoftHdDevice:public cDevice
virtual uchar *GrabImage(int &, bool, int, int, int);
- virtual int ProvidesCa(const cChannel *) const;
-
#if 0
// SPU facilities
private:
@@ -549,6 +547,11 @@ cSoftHdDevice::~cSoftHdDevice(void)
//dsyslog("[softhddev]%s:\n", __FUNCTION__);
}
+/**
+** Informs a device that it will be the primary device.
+**
+** @param on flag if becoming or loosing primary
+*/
void cSoftHdDevice::MakePrimaryDevice(bool on)
{
dsyslog("[softhddev]%s: %d\n", __FUNCTION__, on);
@@ -559,14 +562,6 @@ void cSoftHdDevice::MakePrimaryDevice(bool on)
}
}
-int cSoftHdDevice::ProvidesCa(
- __attribute__ ((unused)) const cChannel * channel) const
-{
- //dsyslog("[softhddev]%s: %p\n", __FUNCTION__, channel);
-
- return 0;
-}
-
#if 0
cSpuDecoder *cSoftHdDevice::GetSpuDecoder(void)
@@ -790,24 +785,29 @@ int cSoftHdDevice::PlayVideo(const uchar * data, int length)
///
/// Play a TS video packet.
///
-int cSoftHdDevice::PlayTsVideo(const uchar * Data, int Length)
+int cSoftHdDevice::PlayTsVideo(const uchar * data, int length)
{
// many code to repeat
}
#endif
-#ifdef USE_OSS // FIXME: testing only oss
+#ifndef USE_AUDIO_THREAD // FIXME: testing none threaded
+
///
/// Play a TS audio packet.
///
/// misuse this function as audio poller
///
+/// @param data ts data buffer
+/// @param length ts packet length
+///
int cSoftHdDevice::PlayTsAudio(const uchar * data, int length)
{
AudioPoller();
return cDevice::PlayTsAudio(data, length);
}
+
#endif
uchar *cSoftHdDevice::GrabImage(int &size, bool jpeg, int quality, int sizex,
@@ -960,7 +960,9 @@ cOsdObject *cPluginSoftHdDevice::MainMenuAction(void)
cDevice::PrimaryDevice()->StopReplay();
Suspend();
- ShutdownHandler.SetUserInactive();
+ if (ShutdownHandler.GetUserInactiveTime()) {
+ ShutdownHandler.SetUserInactive();
+ }
return NULL;
}
diff --git a/video.h b/video.h
index f26cbd2..15ba976 100644
--- a/video.h
+++ b/video.h
@@ -37,6 +37,9 @@ typedef struct _video_hw_decoder_ VideoHwDecoder;
/// Allocate new video hardware decoder.
extern VideoHwDecoder *VideoNewHwDecoder(void);
+ /// Deallocate video hardware decoder.
+extern void VideoDelHwDecoder(VideoHwDecoder *);
+
/// Get and allocate a video hardware surface.
extern unsigned VideoGetSurface(VideoHwDecoder *);