diff options
author | Klaus Schmidinger <Klaus (dot) Schmidinger (at) tvdr (dot) de> | 2012-06-03 12:44:00 +0200 |
---|---|---|
committer | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2012-06-05 00:33:28 +0200 |
commit | 5500959f4f73c21cef8910b3815b4ee3fa1327dd (patch) | |
tree | 34183e86d67594355be6bd81d5785e9b68fea5ae /PLUGINS | |
parent | 19b952728eb81dfb773e3157fc54be338064a0dc (diff) | |
download | vdr-patches-5500959f4f73c21cef8910b3815b4ee3fa1327dd.tar.gz vdr-patches-5500959f4f73c21cef8910b3815b4ee3fa1327dd.tar.bz2 |
Version 1.7.28
Original announce message:
VDR developer version 1.7.28 is now available at
ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.28.tar.bz2
A 'diff' against the previous version is available at
ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.27-1.7.28.diff
MD5 checksums:
3ccff2dcc42d112e23dd64f2c39f02f1 vdr-1.7.28.tar.bz2
7249ead4aca4b24e53d49d11c67e1613 vdr-1.7.27-1.7.28.diff
WARNING:
========
This is a developer version. Even though I use it in my productive
environment. I strongly recommend that you only use it under controlled
conditions and for testing and debugging.
The new default skin "LCARS" displays the signal strengths and qualities of
all devices in its main menu. For devices that have an stb0899 frontend chip
(like the TT-budget S2-3200) retrieving this information from the driver is
rather slow, which results in a sluggish response to user input in the main
menu. To speed this up you may want to apply the patches from
From the HISTORY file:
- Fixed cPixmapMemory::DrawEllipse() for quadrants -1 and -4.
- Fixed getting the maximum short channel name length in case there are no short names
at all (reported by Derek Kelly).
- The new function cDevice::DeviceType() returns a string identifying the type of
the given device.
- Now limiting the number of characters of a channel's (short) name to 16 in the
schedules menus, to keep that column from getting overly wide in case there is
a channel with a very long name that has no short name.
- Fixed EPG scan on systems with only a single DVB device that use software output
(reported by Juergen Lock).
- Skins can now inquire the menu category for which their cSkinDisplayMenu is currently
being used. This can be done either through a call to cSkinDisplayMenu::MenuCategory()
or by reimplementing cSkinDisplayMenu::SetMenuCategory(). This information allows a
skin to use special icons or decorations for the various types of menus in VDR.
- The new setup option "DVB/Standard compliance" can be used to switch between different
variations of the DVB standard (thanks to Rolf Ahrenberg). Currently there is "DVB"
(for the original DVB standard) and "ANSI/SCTE", which is used to properly handle
certain private stream types.
- The disk usage is no longer automatically added to the title of the main and
"Recordings" menus. This has always been a mekeshift solution and it is now up
to the individual skin if, where and how it wants to display this information.
A skin can use the new cVideoDiskUsage class to implement such a display. For
compatibility, the default skins "Classic VDR", "ST:TNG Panels" and "Text mode"
(i.e. curses) have been changed to behave like before. Other skins may want to
display the disk usage in totally different ways.
- A cOsdMenu can now handle skins that display different numbers of items in the
various menu categories.
- OSD and skin are now reinitialized after a plugin setup page has been confirmed,
to have them react immediately in case any change to a plugin's setup parameter
has an effect on the OSD.
- The Timers list is now marked as modified whenever a recording starts or ends.
- Fixed cDevice::StillPicture(), making sure it doesn't call the derived class's
function if no buffer has been allocated (reported by Marcus Roscher).
- Fixed the SVDRP command UPDR, which didn't update the global recordings list
(reported by Lars Hanisch).
- cControl::Control() now has an additional boolean parameter, which can be set to
true to get the current player control even if it is hidden.
- The new functions cControl::GetRecording() and cControl::GetHeader() can be used
to retrieve information about what the current player is playing.
- Fixed a possible high CPU load when pausing replay (thanks to Reinhard Nissl).
- Fixed character comparisons in cSubtitleObject::DecodeCharacterString() (reported
by Reinhard Mantey).
- Renamed the function cString::sprintf(const char *fmt, va_list &ap) to vsprintf(),
because it might inadvertently be called with a 'char *' as the second argument on
some compilers and cause a crash (reported by Sundararaj Reel).
- Removed the "bondedMasterFailed" mechanism from cDvbTuner, because it caused
problems with the EPG scan in case a transponder is not receivable in a setup with
bonded devices (reported by Michael Schneider).
- Making sure setup strings don't contain any newline characters (thanks to Joachim
Wilke).
- The new member function cSkinDisplayReplay::SetRecording() allows a skin to display
more information about the currently played recording.
- Fixed a mismatched 'delete' in cSchedules::SetEpgDataFileName() (thanks to Reinhard
Mantey).
- The DrawText() functions of the OSD now accept the new alignment flag taBorder,
which triggers keeping a proper distance from the edge that taLeft or taRight
aligns to.
- Fixed checking for UTF-8 support in cFont::Bidi() (reported by Torsten Lang).
- If a recording has no info file, the 'title' of the recording's info is now set
to the recording's name.
- cVector::Clear() now reinitializes any previously used members.
- Fixed resetting CAMs (thanks to Marco Skambraks).
- The new function RgbShade() (include osd.h) can be used to generate a brighter or
darker version of a given color.
- The new class cSortedTimers can be used to quickly get a list of all timers, sorted
by their start time.
- The new skin "LCARS" is an enhanced version of the "ST:TNG" skin (which is still
there in its original layout, for those who don't like the LCARS skin, or can't use
it due to OSD limitations). The LCARS skin utilizes the new "menu category" feature
to display additional information on the main menu page. It shows upcoming timers
and the system's devices, as well as which device is recording which timers. The
upper pane of the main menu displays the programme data in live and replay mode,
and a progress bar. An indicator on the right side of the device list shows which
device is currently used for live viewing, and whether it is in transfer mode.
The individual device displays show the device number, the device type, which CAM
(if any ) is currently assigned to the device, and the signal strength and quality.
On the left side of the OSD there is a permanent display of the current date and
time, the disk usage and the system load.
"LCARS" is the new default skin of VDR. It requires at least a 4bpp (16 color) full
screen OSD, but you can still operate it if your OSD can handle only fewer colors
(in which case you may want to switch to the "ST:TNG" or "Classic VDR" skin).
- Finally removed the code marked with __RECORDING_H_DEPRECATED_DIRECT_MEMBER_ACCESS
and LEGACY_CRECEIVER.
- Now making sure that the "small font" is never larger than the "osd font".
- Fixed font handling with fontconfig 2.9.0 or newer (thanks to Joerg Bornkessel).
- Extended the interface to the script that gets called for recordings, so that in
the "edited" case it also provides the name of the original recording (thanks to
Christian Richter).
- Added DeleteEvent() to the EPG handler interface, so that an EPG handler can trigger
deleting of an event (thanks to Christian Kaiser).
- Speeded up opening menus on systems with many (several thousands) of recordings, by
caching the information whether a recording is stored on the video directory file
system within the cRecording data (based on a patch from Torsten Lang).
Diffstat (limited to 'PLUGINS')
-rw-r--r-- | PLUGINS/src/dvbhddevice/dvbhdffdevice.c | 173 | ||||
-rw-r--r-- | PLUGINS/src/dvbhddevice/hdffosd.c | 104 | ||||
-rw-r--r-- | PLUGINS/src/pictures/HISTORY | 4 | ||||
-rw-r--r-- | PLUGINS/src/pictures/pictures.c | 4 | ||||
-rw-r--r-- | PLUGINS/src/pictures/player.c | 7 | ||||
-rw-r--r-- | PLUGINS/src/pictures/player.h | 3 | ||||
-rw-r--r-- | PLUGINS/src/skincurses/HISTORY | 5 | ||||
-rw-r--r-- | PLUGINS/src/skincurses/skincurses.c | 20 |
8 files changed, 172 insertions, 148 deletions
diff --git a/PLUGINS/src/dvbhddevice/dvbhdffdevice.c b/PLUGINS/src/dvbhddevice/dvbhdffdevice.c index ced24f5..f8b47bd 100644 --- a/PLUGINS/src/dvbhddevice/dvbhdffdevice.c +++ b/PLUGINS/src/dvbhddevice/dvbhdffdevice.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: dvbhdffdevice.c 1.41 2012/03/07 13:52:41 kls Exp $ + * $Id: dvbhdffdevice.c 1.43 2012/05/08 11:40:32 kls Exp $ */ #include <stdint.h> @@ -50,7 +50,7 @@ cDvbHdFfDevice::cDvbHdFfDevice(int Adapter, int Frontend) mHdffCmdIf = new HDFF::cHdffCmdIf(fd_osd); /* reset some stuff in case the VDR was killed before and had no chance - to clean up. */ + to clean up. */ mHdffCmdIf->CmdOsdReset(); mHdffCmdIf->CmdAvSetVideoSpeed(0, 100); @@ -183,68 +183,72 @@ void cDvbHdFfDevice::GetOsdSize(int &Width, int &Height, double &PixelAspect) gHdffSetup.GetOsdSize(Width, Height, PixelAspect); } -/*TODO obsolete? -bool cDvbHdFfDevice::SetAudioBypass(bool On) -{ - if (setTransferModeForDolbyDigital != 1) - return false; - return ioctl(fd_audio, AUDIO_SET_BYPASS_MODE, On) == 0; -} -TODO*/ - bool cDvbHdFfDevice::SetPid(cPidHandle *Handle, int Type, bool On) { - if (Handle->pid) { - dmx_pes_filter_params pesFilterParams; - memset(&pesFilterParams, 0, sizeof(pesFilterParams)); - if (On) { - if (Handle->handle < 0) { - Handle->handle = DvbOpen(DEV_DVB_DEMUX, adapter, frontend, O_RDWR | O_NONBLOCK, true); - if (Handle->handle < 0) { - LOG_ERROR; - return false; - } - } - if (Type == ptPcr) - mHdffCmdIf->CmdAvSetPcrPid(0, Handle->pid); - else if (Type == ptVideo) { - if (Handle->streamType == 0x1B) - mHdffCmdIf->CmdAvSetVideoPid(0, Handle->pid, HDFF_VIDEO_STREAM_H264); - else - mHdffCmdIf->CmdAvSetVideoPid(0, Handle->pid, HDFF_VIDEO_STREAM_MPEG2); - } - else if (Type == ptAudio) - mHdffCmdIf->CmdAvSetAudioPid(0, Handle->pid, HDFF_AUDIO_STREAM_MPEG1); - else if (Type == ptDolby) - mHdffCmdIf->CmdAvSetAudioPid(0, Handle->pid, HDFF_AUDIO_STREAM_AC3); - if (!(Type <= ptDolby && Handle->used <= 1)) { - pesFilterParams.pid = Handle->pid; - pesFilterParams.input = DMX_IN_FRONTEND; - pesFilterParams.output = DMX_OUT_TS_TAP; - pesFilterParams.pes_type= DMX_PES_OTHER; - pesFilterParams.flags = DMX_IMMEDIATE_START; - if (ioctl(Handle->handle, DMX_SET_PES_FILTER, &pesFilterParams) < 0) { - LOG_ERROR; - return false; - } - } + //printf("SetPid Type %d, On %d, PID %5d, streamtype %d, handle %d, used %d\n", Type, On, Handle->pid, Handle->streamType, Handle->handle, Handle->used); + if (Handle->pid) { + dmx_pes_filter_params pesFilterParams; + memset(&pesFilterParams, 0, sizeof(pesFilterParams)); + if (On) { + if (Handle->handle < 0) { + Handle->handle = DvbOpen(DEV_DVB_DEMUX, adapter, frontend, O_RDWR | O_NONBLOCK, true); + if (Handle->handle < 0) { + LOG_ERROR; + return false; + } + } + if (Type == ptPcr) + mHdffCmdIf->CmdAvSetPcrPid(0, Handle->pid); + else if (Type == ptVideo) { + if (Handle->streamType == 0x1B) + mHdffCmdIf->CmdAvSetVideoPid(0, Handle->pid, HDFF_VIDEO_STREAM_H264); + else + mHdffCmdIf->CmdAvSetVideoPid(0, Handle->pid, HDFF_VIDEO_STREAM_MPEG2); + } + else if (Type == ptAudio) { + if (Handle->streamType == 0x03) + mHdffCmdIf->CmdAvSetAudioPid(0, Handle->pid, HDFF_AUDIO_STREAM_MPEG1); + else if (Handle->streamType == 0x04) + mHdffCmdIf->CmdAvSetAudioPid(0, Handle->pid, HDFF_AUDIO_STREAM_MPEG2); + else if (Handle->streamType == SI::AC3DescriptorTag) + mHdffCmdIf->CmdAvSetAudioPid(0, Handle->pid, HDFF_AUDIO_STREAM_AC3); + else if (Handle->streamType == SI::EnhancedAC3DescriptorTag) + mHdffCmdIf->CmdAvSetAudioPid(0, Handle->pid, HDFF_AUDIO_STREAM_EAC3); + else if (Handle->streamType == 0x0F) + mHdffCmdIf->CmdAvSetAudioPid(0, Handle->pid, HDFF_AUDIO_STREAM_AAC); + else if (Handle->streamType == 0x11) + mHdffCmdIf->CmdAvSetAudioPid(0, Handle->pid, HDFF_AUDIO_STREAM_HE_AAC); + else + mHdffCmdIf->CmdAvSetAudioPid(0, Handle->pid, HDFF_AUDIO_STREAM_MPEG1); + } + if (!(Type <= ptDolby && Handle->used <= 1)) { + pesFilterParams.pid = Handle->pid; + pesFilterParams.input = DMX_IN_FRONTEND; + pesFilterParams.output = DMX_OUT_TS_TAP; + pesFilterParams.pes_type= DMX_PES_OTHER; + pesFilterParams.flags = DMX_IMMEDIATE_START; + if (ioctl(Handle->handle, DMX_SET_PES_FILTER, &pesFilterParams) < 0) { + LOG_ERROR; + return false; + } + } } - else if (!Handle->used) { - CHECK(ioctl(Handle->handle, DMX_STOP)); - if (Type == ptPcr) - mHdffCmdIf->CmdAvSetPcrPid(0, 0); - else if (Type == ptVideo) - mHdffCmdIf->CmdAvSetVideoPid(0, 0, HDFF_VIDEO_STREAM_MPEG1); - else if (Type == ptAudio) - mHdffCmdIf->CmdAvSetAudioPid(0, 0, HDFF_AUDIO_STREAM_MPEG1); - else if (Type == ptDolby) - mHdffCmdIf->CmdAvSetAudioPid(0, 0, HDFF_AUDIO_STREAM_AC3); - //TODO missing setting to 0x1FFF??? see cDvbDevice::SetPid() - close(Handle->handle); - Handle->handle = -1; + else if (!Handle->used) { + CHECK(ioctl(Handle->handle, DMX_STOP)); + if (Type == ptPcr) + mHdffCmdIf->CmdAvSetPcrPid(0, 0); + else if (Type == ptVideo) + mHdffCmdIf->CmdAvSetVideoPid(0, 0, HDFF_VIDEO_STREAM_MPEG1); + else if (Type == ptAudio) + mHdffCmdIf->CmdAvSetAudioPid(0, 0, HDFF_AUDIO_STREAM_MPEG1); + else if (Type == ptDolby) + mHdffCmdIf->CmdAvSetAudioPid(0, 0, HDFF_AUDIO_STREAM_AC3); + //TODO missing setting to 0x1FFF??? see cDvbDevice::SetPid() + close(Handle->handle); + Handle->handle = -1; } - } - return true; + } + return true; } void cDvbHdFfDevice::TurnOffLiveMode(bool LiveView) @@ -286,6 +290,8 @@ bool cDvbHdFfDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) if (CamSlot() && !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), CamSlot()->SlotNumber())) StartTransferMode |= LiveView && IsPrimaryDevice() && Channel->Ca() >= CA_ENCRYPTED_MIN; + //printf("SetChannelDevice Transfer %d, Live %d\n", StartTransferMode, LiveView); + bool TurnOnLivePIDs = !StartTransferMode && LiveView; // Turn off live PIDs if necessary: @@ -301,13 +307,10 @@ bool cDvbHdFfDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) // PID settings: if (TurnOnLivePIDs) { - //SetAudioBypass(false);//TODO obsolete? - if (!(AddPid(Channel->Ppid(), ptPcr) && AddPid(vpid, ptVideo, Channel->Vtype()) && AddPid(apid, ptAudio))) { + if (!(AddPid(Channel->Ppid(), ptPcr) && AddPid(vpid, ptVideo, Channel->Vtype()) && AddPid(apid ? apid : dpid, ptAudio, apid ? 0 : Channel->Dtype(0)))) { esyslog("ERROR: failed to set PIDs for channel %d on device %d", Channel->Number(), CardIndex() + 1); return false; } - if (IsPrimaryDevice()) - AddPid(Channel->Tpid(), ptTeletext);//TODO obsolete? } else if (StartTransferMode) cControl::Launch(new cTransferControl(this, Channel)); @@ -338,27 +341,31 @@ void cDvbHdFfDevice::SetDigitalAudioDevice(bool On) void cDvbHdFfDevice::SetAudioTrackDevice(eTrackType Type) { - //printf("SetAudioTrackDevice %d\n", Type); - const tTrackId *TrackId = GetTrack(Type); - if (TrackId && TrackId->id) { - if (IS_AUDIO_TRACK(Type)) { + //printf("SetAudioTrackDevice %d\n", Type); + const tTrackId *TrackId = GetTrack(Type); + if (TrackId && TrackId->id) { + int streamType = 0; + cChannel * channel = Channels.GetByNumber(CurrentChannel()); + if (channel) { + if (IS_AUDIO_TRACK(Type)) + streamType = channel->Atype(Type - ttAudioFirst); + else if (IS_DOLBY_TRACK(Type)) + streamType = channel->Dtype(Type - ttDolbyFirst); + } + //printf("SetAudioTrackDevice new %d %d, current %d\n", TrackId->id, streamType, pidHandles[ptAudio].pid); if (pidHandles[ptAudio].pid && pidHandles[ptAudio].pid != TrackId->id) { - DetachAll(pidHandles[ptAudio].pid); - if (CamSlot()) - CamSlot()->SetPid(pidHandles[ptAudio].pid, false); - pidHandles[ptAudio].pid = TrackId->id; - SetPid(&pidHandles[ptAudio], ptAudio, true); - if (CamSlot()) { - CamSlot()->SetPid(pidHandles[ptAudio].pid, true); - CamSlot()->StartDecrypting(); - } - } - } - else if (IS_DOLBY_TRACK(Type)) { - pidHandles[ptDolby].pid = TrackId->id; - SetPid(&pidHandles[ptDolby], ptDolby, true); + DetachAll(pidHandles[ptAudio].pid); + if (CamSlot()) + CamSlot()->SetPid(pidHandles[ptAudio].pid, false); + pidHandles[ptAudio].pid = TrackId->id; + pidHandles[ptAudio].streamType = streamType; + SetPid(&pidHandles[ptAudio], ptAudio, true); + if (CamSlot()) { + CamSlot()->SetPid(pidHandles[ptAudio].pid, true); + CamSlot()->StartDecrypting(); + } } - } + } } bool cDvbHdFfDevice::CanReplay(void) const diff --git a/PLUGINS/src/dvbhddevice/hdffosd.c b/PLUGINS/src/dvbhddevice/hdffosd.c index a492275..0b95707 100644 --- a/PLUGINS/src/dvbhddevice/hdffosd.c +++ b/PLUGINS/src/dvbhddevice/hdffosd.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: hdffosd.c 1.12 2011/12/04 15:31:41 kls Exp $ + * $Id: hdffosd.c 1.15 2012/05/17 13:29:50 kls Exp $ */ #include "hdffosd.h" @@ -40,7 +40,6 @@ private: int mDispHeight; bool shown; bool mChanged; - bool mBitmapModified; uint32_t mDisplay; tFontFace mFontFaces[MAX_NUM_FONTFACES]; tFont mFonts[MAX_NUM_FONTS]; @@ -53,7 +52,6 @@ protected: public: cHdffOsd(int Left, int Top, HDFF::cHdffCmdIf * pHdffCmdIf, uint Level); virtual ~cHdffOsd(); - cBitmap *GetBitmap(int Area); virtual eOsdError CanHandleAreas(const tArea *Areas, int NumAreas); virtual eOsdError SetAreas(const tArea *Areas, int NumAreas); virtual void SaveRegion(int x1, int y1, int x2, int y2); @@ -79,9 +77,8 @@ cHdffOsd::cHdffOsd(int Left, int Top, HDFF::cHdffCmdIf * pHdffCmdIf, uint Level) mTop = Top; shown = false; mChanged = false; - mBitmapModified = false; mBitmapPalette = HDFF_INVALID_HANDLE; - config.FontKerning = false; + config.FontKerning = true; config.FontAntialiasing = Setup.AntiAlias ? true : false; mHdffCmdIf->CmdOsdConfigure(&config); @@ -126,14 +123,6 @@ cHdffOsd::~cHdffOsd() mHdffCmdIf->CmdOsdDeleteDisplay(mDisplay); } -cBitmap * cHdffOsd::GetBitmap(int Area) -{ - //printf("GetBitmap %d\n", Area); - mChanged = true; - mBitmapModified = true; - return cOsd::GetBitmap(Area); -} - eOsdError cHdffOsd::CanHandleAreas(const tArea *Areas, int NumAreas) { eOsdError Result = cOsd::CanHandleAreas(Areas, NumAreas); @@ -150,6 +139,9 @@ eOsdError cHdffOsd::CanHandleAreas(const tArea *Areas, int NumAreas) eOsdError cHdffOsd::SetAreas(const tArea *Areas, int NumAreas) { + eOsdError error; + cBitmap * bitmap; + for (int i = 0; i < NumAreas; i++) { //printf("SetAreas %d: %d %d %d %d %d\n", i, Areas[i].x1, Areas[i].y1, Areas[i].x2, Areas[i].y2, Areas[i].bpp); @@ -160,7 +152,14 @@ eOsdError cHdffOsd::SetAreas(const tArea *Areas, int NumAreas) mHdffCmdIf->CmdOsdRenderDisplay(mDisplay); shown = false; } - return cOsd::SetAreas(Areas, NumAreas); + error = cOsd::SetAreas(Areas, NumAreas); + + for (int i = 0; (bitmap = GetBitmap(i)) != NULL; i++) + { + bitmap->Clean(); + } + + return error; } void cHdffOsd::SetActive(bool On) @@ -186,25 +185,22 @@ void cHdffOsd::SaveRegion(int x1, int y1, int x2, int y2) { mHdffCmdIf->CmdOsdSaveRegion(mDisplay, mLeft + x1, mTop + y1, x2 - x1 + 1, y2 - y1 + 1); mChanged = true; - mBitmapModified = false; } void cHdffOsd::RestoreRegion(void) { mHdffCmdIf->CmdOsdRestoreRegion(mDisplay); mChanged = true; - mBitmapModified = false; } void cHdffOsd::DrawPixel(int x, int y, tColor Color) { //printf("DrawPixel\n"); - mBitmapModified = false; } void cHdffOsd::DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg, tColor ColorBg, bool ReplacePalette, bool Overlay) { - //printf("DrawBitmap %d %d %d\n", x, y, Overlay); + //printf("DrawBitmap %d %d %d x %d\n", x, y, Bitmap.Width(), Bitmap.Height()); int i; int numColors; const tColor * colors = Bitmap.Colors(numColors); @@ -230,37 +226,21 @@ void cHdffOsd::DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg, t mHdffCmdIf->CmdOsdSetPaletteColors(mBitmapPalette, HDFF_COLOR_FORMAT_ARGB, 0, numColors, mBitmapColors); } - mHdffCmdIf->CmdOsdDrawBitmap(mDisplay, mLeft + x, mTop + y, - (uint8_t *) Bitmap.Data(0, 0), Bitmap.Width(), Bitmap.Height(), - Bitmap.Width() * Bitmap.Height(), HDFF_COLOR_TYPE_CLUT8, mBitmapPalette); -#if 0 - uint32_t * tmpBitmap = new uint32_t[Bitmap.Width() * Bitmap.Height()]; - for (int ix = 0; ix < Bitmap.Width(); ix++) + int width = Bitmap.Width(); + int height = Bitmap.Height(); + int chunk = MAX_BITMAP_SIZE / width; + if (chunk > height) + chunk = height; + for (int yc = 0; yc < height; yc += chunk) { - for (int iy = 0; iy < Bitmap.Height(); iy++) - { - const tIndex * pixel = Bitmap.Data(ix, iy); - tColor color = Bitmap.Color(*pixel); - if (!Overlay || *pixel != 0) - { - if (ColorFg || ColorBg) - { - if (*pixel == 0) - color = ColorBg; - else if (*pixel == 1) - color = ColorFg; - } - tmpBitmap[Bitmap.Width() * iy + ix] = color; - } - } + int hc = chunk; + if (yc + hc > height) + hc = height - yc; + mHdffCmdIf->CmdOsdDrawBitmap(mDisplay, mLeft + x, mTop + y + yc, + (uint8_t *) Bitmap.Data(0, yc), width, hc, + width * hc, HDFF_COLOR_TYPE_CLUT8, mBitmapPalette); } - mHdffCmdIf->CmdOsdDrawBitmap(mDisplay, mLeft + x, mTop + y, - (uint8_t *) tmpBitmap, Bitmap.Width(), Bitmap.Height(), - Bitmap.Width() * Bitmap.Height() * 4, HDFF::colorTypeARGB8888, InvalidHandle); - delete[] tmpBitmap; -#endif mChanged = true; - mBitmapModified = false; } void cHdffOsd::DrawText(int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width, int Height, int Alignment) @@ -365,11 +345,16 @@ void cHdffOsd::DrawText(int x, int y, const char *s, tColor ColorFg, tColor Colo if (Width) { if ((Alignment & taLeft) != 0) - ; + { + if ((Alignment & taBorder) != 0) + x += max(h / TEXT_ALIGN_BORDER, 1); + } else if ((Alignment & taRight) != 0) { if (w < Width) x += Width - w; + if ((Alignment & taBorder) != 0) + x -= max(h / TEXT_ALIGN_BORDER, 1); } else { // taCentered @@ -413,14 +398,12 @@ void cHdffOsd::DrawText(int x, int y, const char *s, tColor ColorFg, tColor Colo mHdffCmdIf->CmdOsdSetDisplayClippingArea(mDisplay, false, 0, 0, 0, 0); //Font->DrawText(this, x, y, s, ColorFg, ColorBg, limit); mChanged = true; - mBitmapModified = false; } void cHdffOsd::DrawRectangle(int x1, int y1, int x2, int y2, tColor Color) { mHdffCmdIf->CmdOsdDrawRectangle(mDisplay, mLeft + x1, mTop + y1, x2 - x1 + 1, y2 - y1 + 1, Color); mChanged = true; - mBitmapModified = false; } void cHdffOsd::DrawEllipse(int x1, int y1, int x2, int y2, tColor Color, int Quadrants) @@ -511,14 +494,12 @@ void cHdffOsd::DrawEllipse(int x1, int y1, int x2, int y2, tColor Color, int Qua } mHdffCmdIf->CmdOsdDrawEllipse(mDisplay, mLeft + cx, mTop + cy, rx, ry, Color, flags); mChanged = true; - mBitmapModified = false; } void cHdffOsd::DrawSlope(int x1, int y1, int x2, int y2, tColor Color, int Type) { //printf("DrawSlope\n"); mChanged = true; - mBitmapModified = false; } void cHdffOsd::Flush(void) @@ -526,23 +507,30 @@ void cHdffOsd::Flush(void) if (!Active()) return; - if (!mChanged) - return; - //printf("Flush\n"); - if (mBitmapModified) + cBitmap * Bitmap; + + for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++) { - cBitmap *Bitmap; - for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++) + int x1; + int y1; + int x2; + int y2; + + if (Bitmap->Dirty(x1, y1, x2, y2)) { + //printf("dirty %d %d, %d %d\n", x1, y1, x2, y2); DrawBitmap(0, 0, *Bitmap); + Bitmap->Clean(); } } + if (!mChanged) + return; + mHdffCmdIf->CmdOsdRenderDisplay(mDisplay); mChanged = false; - mBitmapModified = false; } diff --git a/PLUGINS/src/pictures/HISTORY b/PLUGINS/src/pictures/HISTORY index e0826ee..9426283 100644 --- a/PLUGINS/src/pictures/HISTORY +++ b/PLUGINS/src/pictures/HISTORY @@ -71,3 +71,7 @@ VDR Plugin 'pictures' Revision History 2012-02-27: Version 0.1.2 - Removed an obsolete command line option. + +2012-04-2r8 Version 0.1.3 + +- Added cPictureControl::GetHeader(). diff --git a/PLUGINS/src/pictures/pictures.c b/PLUGINS/src/pictures/pictures.c index 27febdf..77df0d9 100644 --- a/PLUGINS/src/pictures/pictures.c +++ b/PLUGINS/src/pictures/pictures.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: pictures.c 2.5 2012/02/27 11:40:15 kls Exp $ + * $Id: pictures.c 2.6 2012/04/28 11:58:42 kls Exp $ */ #include <getopt.h> @@ -11,7 +11,7 @@ #include "menu.h" #include "player.h" -static const char *VERSION = "0.1.2"; +static const char *VERSION = "0.1.3"; static const char *DESCRIPTION = trNOOP("A simple picture viewer"); static const char *MAINMENUENTRY = trNOOP("Pictures"); diff --git a/PLUGINS/src/pictures/player.c b/PLUGINS/src/pictures/player.c index 4b289ac..6048d4c 100644 --- a/PLUGINS/src/pictures/player.c +++ b/PLUGINS/src/pictures/player.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: player.c 2.1 2011/02/20 17:15:25 kls Exp $ + * $Id: player.c 2.2 2012/04/28 11:58:15 kls Exp $ */ #include "player.h" @@ -204,6 +204,11 @@ void cPictureControl::DisplayCaption(void) osd->Flush(); } +cString cPictureControl::GetHeader(void) +{ + return tr("Pictures"); +} + eOSState cPictureControl::ProcessKey(eKeys Key) { switch (Key) { diff --git a/PLUGINS/src/pictures/player.h b/PLUGINS/src/pictures/player.h index 67a274d..7a0b401 100644 --- a/PLUGINS/src/pictures/player.h +++ b/PLUGINS/src/pictures/player.h @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: player.h 2.0 2008/01/12 16:21:57 kls Exp $ + * $Id: player.h 2.1 2012/04/28 11:56:01 kls Exp $ */ #ifndef _PLAYER_H @@ -39,6 +39,7 @@ private: public: cPictureControl(cPictureEntry *Pictures, const cPictureEntry *PictureEntry, bool SlideShow = false); virtual ~cPictureControl(); + virtual cString GetHeader(void); virtual eOSState ProcessKey(eKeys Key); static bool Active(void) { return active > 0; } static const char *LastDisplayed(void); diff --git a/PLUGINS/src/skincurses/HISTORY b/PLUGINS/src/skincurses/HISTORY index 0ba892e..deb011b 100644 --- a/PLUGINS/src/skincurses/HISTORY +++ b/PLUGINS/src/skincurses/HISTORY @@ -96,3 +96,8 @@ VDR Plugin 'skincurses' Revision History 2012-03-11: Version 0.1.11 - Adapted menu column widths of 'skincurses' to the wider HD OSD sizes. + +2012-04-23: Version 0.1.12 + +- Now displaying disk usage in the title of the main and "Recordings" menu, + which is no longer done by the VDR core. diff --git a/PLUGINS/src/skincurses/skincurses.c b/PLUGINS/src/skincurses/skincurses.c index 1f120c7..587d0b9 100644 --- a/PLUGINS/src/skincurses/skincurses.c +++ b/PLUGINS/src/skincurses/skincurses.c @@ -3,15 +3,16 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: skincurses.c 2.8 2012/03/11 14:42:52 kls Exp $ + * $Id: skincurses.c 2.9 2012/04/23 08:53:13 kls Exp $ */ #include <ncurses.h> #include <vdr/osd.h> #include <vdr/plugin.h> #include <vdr/skins.h> +#include <vdr/videodir.h> -static const char *VERSION = "0.1.11"; +static const char *VERSION = "0.1.12"; static const char *DESCRIPTION = trNOOP("A text only skin"); static const char *MAINMENUENTRY = NULL; @@ -262,6 +263,9 @@ void cSkinCursesDisplayChannel::Flush(void) class cSkinCursesDisplayMenu : public cSkinDisplayMenu { private: cOsd *osd; + cString title; + int lastDiskUsageState; + void DrawTitle(void); void DrawScrollbar(int Total, int Offset, int Shown, int Top, int Height, bool CanScrollUp, bool CanScrollDown); void SetTextScrollbar(void); public: @@ -285,6 +289,7 @@ public: cSkinCursesDisplayMenu::cSkinCursesDisplayMenu(void) { osd = new cCursesOsd(0, 0); + lastDiskUsageState = -1; osd->DrawRectangle(0, 0, ScOsdWidth - 1, ScOsdHeight - 1, clrBackground); } @@ -332,9 +337,16 @@ void cSkinCursesDisplayMenu::Clear(void) textScroller.Reset(); } +void cSkinCursesDisplayMenu::DrawTitle(void) +{ + bool WithDisk = MenuCategory() == mcMain || MenuCategory() == mcRecording; + osd->DrawText(0, 0, WithDisk ? cString::sprintf("%s - %s", *title, *cVideoDiskUsage::String()) : title, clrBlack, clrCyan, &Font, ScOsdWidth); +} + void cSkinCursesDisplayMenu::SetTitle(const char *Title) { - osd->DrawText(0, 0, Title, clrBlack, clrCyan, &Font, ScOsdWidth); + title = Title; + DrawTitle(); } void cSkinCursesDisplayMenu::SetButtons(const char *Red, const char *Green, const char *Yellow, const char *Blue) @@ -475,6 +487,8 @@ void cSkinCursesDisplayMenu::SetText(const char *Text, bool FixedFont) void cSkinCursesDisplayMenu::Flush(void) { + if (cVideoDiskUsage::HasChanged(lastDiskUsageState)) + DrawTitle(); cString date = DayDateTime(); osd->DrawText(ScOsdWidth - Utf8StrLen(date) - 2, 0, date, clrBlack, clrCyan, &Font); osd->Flush(); |