diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-10-12 20:13:56 +0200 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-10-12 20:13:56 +0200 |
commit | aacb17750c711065a3bcf5307f40b7c25e1e49f6 (patch) | |
tree | e2714de0f24464fd43bf5123bd590965f8e121c5 | |
parent | 3d6200f096559e5cebead403b5b151bff2f7ccef (diff) | |
download | vdr-plugin-dxr3-aacb17750c711065a3bcf5307f40b7c25e1e49f6.tar.gz vdr-plugin-dxr3-aacb17750c711065a3bcf5307f40b7c25e1e49f6.tar.bz2 |
add stub cBitmap scaler
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | dxr3osd.c | 14 | ||||
-rw-r--r-- | scaler.c | 34 | ||||
-rw-r--r-- | scaler.h | 39 |
4 files changed, 88 insertions, 1 deletions
@@ -75,7 +75,7 @@ OBJS = $(PLUGIN).o dxr3multichannelaudio.o dxr3colormanager.o \ dxr3pesframe.o dxr3demuxdevice.o dxr3configdata.o \ dxr3interface_spu_encoder.o dxr3interface.o dxr3device.o \ dxr3output.o dxr3output-video.o dxr3output-audio.o dxr3osd.o dxr3spudecoder.o \ - dxr3audio-oss.o dxr3audio-alsa.o spuencoder.o spuregion.o + dxr3audio-oss.o dxr3audio-alsa.o spuencoder.o spuregion.o scaler.o ### Default target: @@ -25,6 +25,7 @@ #include "dxr3osd.h" #include "dxr3interface_spu_encoder.h" +#include "scaler.h" // ================================== // ! create osd at (Left, Top, Level) @@ -229,6 +230,19 @@ void cDxr3Osd::Flush() bmap = mergedBitmap; } + uint32_t horizontal, vertical; + cDxr3Interface::instance()->dimension(horizontal, vertical); + + // check if we need to scale the osd + if (horizontal < 720 || vertical < 576) { + + // TODO + dsyslog("SCALE ME"); + } + + if (!bmap) + return; + // encode bitmap if (bmap->Dirty(x1, y1, x2, y2)) { cSpuEncoder::instance()->encode(bmap, Top(), Left()); diff --git a/scaler.c b/scaler.c new file mode 100644 index 0000000..04e8d22 --- /dev/null +++ b/scaler.c @@ -0,0 +1,34 @@ +/* + * _ _ _ _ _____ + * __ ____| |_ __ _ __ | |_ _ __ _(_)_ __ __| |_ ___ _|___ / + * \ \ / / _` | '__|____| '_ \| | | | |/ _` | | '_ \ _____ / _` \ \/ / '__||_ \ + * \ V / (_| | | |_____| |_) | | |_| | (_| | | | | |_____| (_| |> <| | ___) | + * \_/ \__,_|_| | .__/|_|\__,_|\__, |_|_| |_| \__,_/_/\_\_| |____/ + * |_| |___/ + * + * Copyright (C) 2009 Christian Gmeiner + * + * This file is part of vdr-plugin-dxr3. + * + * vdr-plugin-dxr3 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation version 2. + * + * vdr-plugin-dxr3 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with dxr3-plugin. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include "scaler.h" +#include <vdr/osd.h> + +cBitmap *cScaler::scaleBitmap(cBitmap *src, uint32_t width, uint32_t height) +{ + // TODO + return NULL; +} diff --git a/scaler.h b/scaler.h new file mode 100644 index 0000000..0ef336f --- /dev/null +++ b/scaler.h @@ -0,0 +1,39 @@ +/* + * _ _ _ _ _____ + * __ ____| |_ __ _ __ | |_ _ __ _(_)_ __ __| |_ ___ _|___ / + * \ \ / / _` | '__|____| '_ \| | | | |/ _` | | '_ \ _____ / _` \ \/ / '__||_ \ + * \ V / (_| | | |_____| |_) | | |_| | (_| | | | | |_____| (_| |> <| | ___) | + * \_/ \__,_|_| | .__/|_|\__,_|\__, |_|_| |_| \__,_/_/\_\_| |____/ + * |_| |___/ + * + * Copyright (C) 2009 Christian Gmeiner + * + * This file is part of vdr-plugin-dxr3. + * + * vdr-plugin-dxr3 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation version 2. + * + * vdr-plugin-dxr3 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with dxr3-plugin. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#ifndef SCALER_H +#define SCALER_H + +#include <stdint.h> +#include <vdr/osd.h> + +class cScaler { +public: + static cBitmap *scaleBitmap(cBitmap *src, uint32_t width, uint32_t height); +}; + + +#endif /*SCALER_H*/ |