mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Fix subtitle position.
This commit is contained in:
parent
19a37bb0bf
commit
30d8e8afe9
@ -1,3 +1,10 @@
|
|||||||
|
User johns
|
||||||
|
Date:
|
||||||
|
|
||||||
|
Fix subtitle position.
|
||||||
|
Add SVDRP support.
|
||||||
|
Suspend when user is inactive.
|
||||||
|
|
||||||
User Christian Rupper
|
User Christian Rupper
|
||||||
Date: Tue Jan 10 22:33:14 CET 2012
|
Date: Tue Jan 10 22:33:14 CET 2012
|
||||||
|
|
||||||
|
9
Todo
9
Todo
@ -29,7 +29,8 @@ missing:
|
|||||||
multistream handling
|
multistream handling
|
||||||
ITU BT601, ITU BT709 (HD), RGB studio levels (16-235)?
|
ITU BT601, ITU BT709 (HD), RGB studio levels (16-235)?
|
||||||
suspend output / energie saver: stop audio, stop video, configurable
|
suspend output / energie saver: stop audio, stop video, configurable
|
||||||
Subtitle have the wrong position
|
Option deinterlace off / deinterlace force!
|
||||||
|
Make output drivers better moduluar.
|
||||||
|
|
||||||
vdpau:
|
vdpau:
|
||||||
1080i with temporal spatial and level 1 scaling too slow with my GT 520
|
1080i with temporal spatial and level 1 scaling too slow with my GT 520
|
||||||
@ -38,6 +39,7 @@ vdpau:
|
|||||||
Improve OSD handling, show only what is used. Big OSD costs performance
|
Improve OSD handling, show only what is used. Big OSD costs performance
|
||||||
VdpPreemptionCallback handling
|
VdpPreemptionCallback handling
|
||||||
hard channel switch
|
hard channel switch
|
||||||
|
suspendoutput didn't show logo or black picture.
|
||||||
|
|
||||||
libva:
|
libva:
|
||||||
hard channel switch
|
hard channel switch
|
||||||
@ -66,6 +68,8 @@ audio/alsa:
|
|||||||
done? video/audio asyncron
|
done? video/audio asyncron
|
||||||
random crashes in av_parser_parse2, when switching channels
|
random crashes in av_parser_parse2, when switching channels
|
||||||
sometimes alsa hangs
|
sometimes alsa hangs
|
||||||
|
snd_pcm_state: Assertion `pcm' failed. while switching channels
|
||||||
|
(thread problem)
|
||||||
|
|
||||||
better downmix of >2 channels on 2 channel hardware
|
better downmix of >2 channels on 2 channel hardware
|
||||||
remix support of unsupported sample rates
|
remix support of unsupported sample rates
|
||||||
@ -73,6 +77,9 @@ audio/alsa:
|
|||||||
ffmpeg didn't support resample of 5 to 2 channels
|
ffmpeg didn't support resample of 5 to 2 channels
|
||||||
CodecAudioOpen can fail "can't open audio codec" and does Fatal exit.
|
CodecAudioOpen can fail "can't open audio codec" and does Fatal exit.
|
||||||
|
|
||||||
|
audio:
|
||||||
|
write TS -> PES parser, which feeds audio before the next start packet
|
||||||
|
|
||||||
audio/oss:
|
audio/oss:
|
||||||
alsa oss emulation mixer "pcm" not working
|
alsa oss emulation mixer "pcm" not working
|
||||||
ring buffer overflow with alsa oss emulation
|
ring buffer overflow with alsa oss emulation
|
||||||
|
@ -42,7 +42,7 @@ extern "C"
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static const char *const VERSION = "0.3.0";
|
static const char *const VERSION = "0.3.1";
|
||||||
static const char *const DESCRIPTION =
|
static const char *const DESCRIPTION =
|
||||||
trNOOP("A software and GPU emulated HD device");
|
trNOOP("A software and GPU emulated HD device");
|
||||||
|
|
||||||
@ -132,8 +132,10 @@ extern "C" void FeedKeyPress(const char *keymap, const char *key, int repeat,
|
|||||||
|
|
||||||
class cSoftOsd:public cOsd
|
class cSoftOsd:public cOsd
|
||||||
{
|
{
|
||||||
|
int Level; ///< level: subtitle
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cSoftOsd(int, int, uint);
|
cSoftOsd(int, int, uint);
|
||||||
virtual ~ cSoftOsd(void);
|
virtual ~ cSoftOsd(void);
|
||||||
virtual void Flush(void);
|
virtual void Flush(void);
|
||||||
// virtual void SetActive(bool);
|
// virtual void SetActive(bool);
|
||||||
@ -146,6 +148,7 @@ cSoftOsd::cSoftOsd(int left, int top, uint level)
|
|||||||
dsyslog("[softhddev]%s: %dx%d+%d+%d, %d\n", __FUNCTION__, OsdWidth(),
|
dsyslog("[softhddev]%s: %dx%d+%d+%d, %d\n", __FUNCTION__, OsdWidth(),
|
||||||
OsdHeight(), left, top, level);
|
OsdHeight(), left, top, level);
|
||||||
|
|
||||||
|
this->Level = level;
|
||||||
//SetActive(true);
|
//SetActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,8 +226,24 @@ void cSoftOsd::Flush(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OsdDrawARGB(Left() + bitmap->X0(), Top() + bitmap->Y0(),
|
// check if subtitles
|
||||||
bitmap->Width(), bitmap->Height(), argb);
|
if (this->Level == OSD_LEVEL_SUBTITLES) {
|
||||||
|
int video_width;
|
||||||
|
int video_height;
|
||||||
|
|
||||||
|
if (0) {
|
||||||
|
dsyslog("[softhddev]%s: subtitle %d, %d\n", __FUNCTION__,
|
||||||
|
Left() + bitmap->X0(), Top() + bitmap->Y0());
|
||||||
|
}
|
||||||
|
video_width = 1920;
|
||||||
|
video_height = 1080;
|
||||||
|
OsdDrawARGB((1920 - video_width) / 2 + Left() + bitmap->X0(),
|
||||||
|
1080 - video_height + Top() + bitmap->Y0(),
|
||||||
|
bitmap->Width(), bitmap->Height(), argb);
|
||||||
|
} else {
|
||||||
|
OsdDrawARGB(Left() + bitmap->X0(), Top() + bitmap->Y0(),
|
||||||
|
bitmap->Width(), bitmap->Height(), argb);
|
||||||
|
}
|
||||||
|
|
||||||
bitmap->Clean();
|
bitmap->Clean();
|
||||||
free(argb);
|
free(argb);
|
||||||
@ -456,8 +475,15 @@ class cSoftHdDevice:public cDevice
|
|||||||
virtual bool Poll(cPoller &, int = 0);
|
virtual bool Poll(cPoller &, int = 0);
|
||||||
virtual bool Flush(int = 0);
|
virtual bool Flush(int = 0);
|
||||||
virtual int64_t GetSTC(void);
|
virtual int64_t GetSTC(void);
|
||||||
|
virtual void GetVideoSize(int &width, int &height, double &aspect)
|
||||||
|
{
|
||||||
|
width = 1920;
|
||||||
|
height = 1080;
|
||||||
|
aspect = (double)width / height;
|
||||||
|
}
|
||||||
virtual void GetOsdSize(int &, int &, double &);
|
virtual void GetOsdSize(int &, int &, double &);
|
||||||
virtual int PlayVideo(const uchar *, int);
|
virtual int PlayVideo(const uchar *, int);
|
||||||
|
|
||||||
//virtual int PlayTsVideo(const uchar *, int);
|
//virtual int PlayTsVideo(const uchar *, int);
|
||||||
#ifdef USE_OSS // FIXME: testing only oss
|
#ifdef USE_OSS // FIXME: testing only oss
|
||||||
virtual int PlayTsAudio(const uchar *, int);
|
virtual int PlayTsAudio(const uchar *, int);
|
||||||
@ -474,11 +500,13 @@ class cSoftHdDevice:public cDevice
|
|||||||
|
|
||||||
virtual int ProvidesCa(const cChannel *) const;
|
virtual int ProvidesCa(const cChannel *) const;
|
||||||
|
|
||||||
|
#if 0
|
||||||
// SPU facilities
|
// SPU facilities
|
||||||
private:
|
private:
|
||||||
cDvbSpuDecoder * spuDecoder;
|
cDvbSpuDecoder * spuDecoder;
|
||||||
public:
|
public:
|
||||||
virtual cSpuDecoder * GetSpuDecoder(void);
|
virtual cSpuDecoder * GetSpuDecoder(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void MakePrimaryDevice(bool);
|
virtual void MakePrimaryDevice(bool);
|
||||||
@ -488,7 +516,9 @@ cSoftHdDevice::cSoftHdDevice(void)
|
|||||||
{
|
{
|
||||||
//dsyslog("[softhddev]%s\n", __FUNCTION__);
|
//dsyslog("[softhddev]%s\n", __FUNCTION__);
|
||||||
|
|
||||||
|
#if 0
|
||||||
spuDecoder = NULL;
|
spuDecoder = NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
cSoftHdDevice::~cSoftHdDevice(void)
|
cSoftHdDevice::~cSoftHdDevice(void)
|
||||||
@ -506,15 +536,18 @@ void cSoftHdDevice::MakePrimaryDevice(bool on)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int cSoftHdDevice::ProvidesCa(
|
int cSoftHdDevice::ProvidesCa(
|
||||||
__attribute__ ((unused)) const cChannel * channel) const
|
__attribute__ ((unused)) const cChannel *
|
||||||
{
|
channel) const
|
||||||
//dsyslog("[softhddev]%s: %p\n", __FUNCTION__, channel);
|
{
|
||||||
|
//dsyslog("[softhddev]%s: %p\n", __FUNCTION__, channel);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cSpuDecoder *cSoftHdDevice::GetSpuDecoder(void)
|
#if 0
|
||||||
|
|
||||||
|
cSpuDecoder *cSoftHdDevice::GetSpuDecoder(void)
|
||||||
{
|
{
|
||||||
dsyslog("[softhddev]%s:\n", __FUNCTION__);
|
dsyslog("[softhddev]%s:\n", __FUNCTION__);
|
||||||
|
|
||||||
@ -524,6 +557,8 @@ cSpuDecoder *cSoftHdDevice::GetSpuDecoder(void)
|
|||||||
return spuDecoder;
|
return spuDecoder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
bool cSoftHdDevice::HasDecoder(void) const
|
bool cSoftHdDevice::HasDecoder(void) const
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@ -890,9 +925,9 @@ cOsdObject *cPluginSoftHdDevice::MainMenuAction(void)
|
|||||||
{
|
{
|
||||||
dsyslog("[softhddev]%s:\n", __FUNCTION__);
|
dsyslog("[softhddev]%s:\n", __FUNCTION__);
|
||||||
|
|
||||||
//cDevice::PrimaryDevice()->StopReplay();
|
cDevice::PrimaryDevice()->StopReplay();
|
||||||
ShutdownHandler.SetUserInactive();
|
|
||||||
Suspend();
|
Suspend();
|
||||||
|
ShutdownHandler.SetUserInactive();
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -1029,7 +1064,8 @@ const char **cPluginSoftHdDevice::SVDRPHelpPages(void)
|
|||||||
** Handle SVDRP commands.
|
** Handle SVDRP commands.
|
||||||
*/
|
*/
|
||||||
cString cPluginSoftHdDevice::SVDRPCommand(const char *command,
|
cString cPluginSoftHdDevice::SVDRPCommand(const char *command,
|
||||||
const char *option, int &reply_code)
|
__attribute__ ((unused)) const char *option,
|
||||||
|
__attribute__ ((unused)) int &reply_code)
|
||||||
{
|
{
|
||||||
if (!strcasecmp(command, "SUSP")) {
|
if (!strcasecmp(command, "SUSP")) {
|
||||||
Suspend();
|
Suspend();
|
||||||
|
Loading…
Reference in New Issue
Block a user