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
|
||||
Date: Tue Jan 10 22:33:14 CET 2012
|
||||
|
||||
|
9
Todo
9
Todo
@ -29,7 +29,8 @@ missing:
|
||||
multistream handling
|
||||
ITU BT601, ITU BT709 (HD), RGB studio levels (16-235)?
|
||||
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:
|
||||
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
|
||||
VdpPreemptionCallback handling
|
||||
hard channel switch
|
||||
suspendoutput didn't show logo or black picture.
|
||||
|
||||
libva:
|
||||
hard channel switch
|
||||
@ -66,6 +68,8 @@ audio/alsa:
|
||||
done? video/audio asyncron
|
||||
random crashes in av_parser_parse2, when switching channels
|
||||
sometimes alsa hangs
|
||||
snd_pcm_state: Assertion `pcm' failed. while switching channels
|
||||
(thread problem)
|
||||
|
||||
better downmix of >2 channels on 2 channel hardware
|
||||
remix support of unsupported sample rates
|
||||
@ -73,6 +77,9 @@ audio/alsa:
|
||||
ffmpeg didn't support resample of 5 to 2 channels
|
||||
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:
|
||||
alsa oss emulation mixer "pcm" not working
|
||||
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 =
|
||||
trNOOP("A software and GPU emulated HD device");
|
||||
|
||||
@ -132,6 +132,8 @@ extern "C" void FeedKeyPress(const char *keymap, const char *key, int repeat,
|
||||
|
||||
class cSoftOsd:public cOsd
|
||||
{
|
||||
int Level; ///< level: subtitle
|
||||
|
||||
public:
|
||||
cSoftOsd(int, int, uint);
|
||||
virtual ~ cSoftOsd(void);
|
||||
@ -146,6 +148,7 @@ cSoftOsd::cSoftOsd(int left, int top, uint level)
|
||||
dsyslog("[softhddev]%s: %dx%d+%d+%d, %d\n", __FUNCTION__, OsdWidth(),
|
||||
OsdHeight(), left, top, level);
|
||||
|
||||
this->Level = level;
|
||||
//SetActive(true);
|
||||
}
|
||||
|
||||
@ -223,8 +226,24 @@ void cSoftOsd::Flush(void)
|
||||
}
|
||||
}
|
||||
|
||||
// check if subtitles
|
||||
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();
|
||||
free(argb);
|
||||
@ -456,8 +475,15 @@ class cSoftHdDevice:public cDevice
|
||||
virtual bool Poll(cPoller &, int = 0);
|
||||
virtual bool Flush(int = 0);
|
||||
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 int PlayVideo(const uchar *, int);
|
||||
|
||||
//virtual int PlayTsVideo(const uchar *, int);
|
||||
#ifdef USE_OSS // FIXME: testing only oss
|
||||
virtual int PlayTsAudio(const uchar *, int);
|
||||
@ -474,11 +500,13 @@ class cSoftHdDevice:public cDevice
|
||||
|
||||
virtual int ProvidesCa(const cChannel *) const;
|
||||
|
||||
#if 0
|
||||
// SPU facilities
|
||||
private:
|
||||
cDvbSpuDecoder * spuDecoder;
|
||||
public:
|
||||
virtual cSpuDecoder * GetSpuDecoder(void);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void MakePrimaryDevice(bool);
|
||||
@ -488,7 +516,9 @@ cSoftHdDevice::cSoftHdDevice(void)
|
||||
{
|
||||
//dsyslog("[softhddev]%s\n", __FUNCTION__);
|
||||
|
||||
#if 0
|
||||
spuDecoder = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
cSoftHdDevice::~cSoftHdDevice(void)
|
||||
@ -506,15 +536,18 @@ void cSoftHdDevice::MakePrimaryDevice(bool on)
|
||||
}
|
||||
}
|
||||
|
||||
int cSoftHdDevice::ProvidesCa(
|
||||
__attribute__ ((unused)) const cChannel * channel) const
|
||||
{
|
||||
int cSoftHdDevice::ProvidesCa(
|
||||
__attribute__ ((unused)) const cChannel *
|
||||
channel) const
|
||||
{
|
||||
//dsyslog("[softhddev]%s: %p\n", __FUNCTION__, channel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
cSpuDecoder *cSoftHdDevice::GetSpuDecoder(void)
|
||||
#if 0
|
||||
|
||||
cSpuDecoder *cSoftHdDevice::GetSpuDecoder(void)
|
||||
{
|
||||
dsyslog("[softhddev]%s:\n", __FUNCTION__);
|
||||
|
||||
@ -524,6 +557,8 @@ cSpuDecoder *cSoftHdDevice::GetSpuDecoder(void)
|
||||
return spuDecoder;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool cSoftHdDevice::HasDecoder(void) const
|
||||
{
|
||||
return true;
|
||||
@ -890,9 +925,9 @@ cOsdObject *cPluginSoftHdDevice::MainMenuAction(void)
|
||||
{
|
||||
dsyslog("[softhddev]%s:\n", __FUNCTION__);
|
||||
|
||||
//cDevice::PrimaryDevice()->StopReplay();
|
||||
ShutdownHandler.SetUserInactive();
|
||||
cDevice::PrimaryDevice()->StopReplay();
|
||||
Suspend();
|
||||
ShutdownHandler.SetUserInactive();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -1029,7 +1064,8 @@ const char **cPluginSoftHdDevice::SVDRPHelpPages(void)
|
||||
** Handle SVDRP commands.
|
||||
*/
|
||||
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")) {
|
||||
Suspend();
|
||||
|
Loading…
Reference in New Issue
Block a user