summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2015-03-22 14:20:09 +0100
committeranbr <vdr07@deltab.de>2015-03-22 14:20:09 +0100
commit55ab243ee544b3c311185c18f2fa72eb2aede09d (patch)
tree13924f764b7acccab2d2a60624a83a40eb1ed156
parent0a18da170fafebbbd02d2a74ad09725be370b6d1 (diff)
downloadxxv-55ab243ee544b3c311185c18f2fa72eb2aede09d.tar.gz
xxv-55ab243ee544b3c311185c18f2fa72eb2aede09d.tar.bz2
Update build description
-rw-r--r--contrib/vdr2jpeg/LIESMICH16
-rw-r--r--contrib/vdr2jpeg/README16
-rw-r--r--contrib/vdr2jpeg/ffm.cpp34
3 files changed, 13 insertions, 53 deletions
diff --git a/contrib/vdr2jpeg/LIESMICH b/contrib/vdr2jpeg/LIESMICH
index a1cf75d..f478bbf 100644
--- a/contrib/vdr2jpeg/LIESMICH
+++ b/contrib/vdr2jpeg/LIESMICH
@@ -6,16 +6,7 @@ um Vorschaubilder von Aufnahmen zu generieren.
Erfordernisse
-------------
-ffmpeg-svn (getestet mit r15589)
-
-Empfohlen
-------------
-ffmpeg als shared libary und mit Software Scaler
-
-$ cd ffmpeg && \
- ./configure --enable-shared --enable-swscale && \
- make && \
- make install
+ffmpeg
Installation
------------
@@ -27,9 +18,8 @@ $ make install
um mehr Info zu erhalten
$ make all DEBUG=1
-um ein statisches Programm zu erhalten
-$ make all STATIC=1
-=> es werden keine externen Bibliotheken zur Laufzeit benötigt.
+um ein abweichendes ffmpeg-Programm definieren
+$ make all FFMPEG_BIN=/usr/local/bin/ffmpeg
Verwendung
diff --git a/contrib/vdr2jpeg/README b/contrib/vdr2jpeg/README
index 3c1f5ba..abfee49 100644
--- a/contrib/vdr2jpeg/README
+++ b/contrib/vdr2jpeg/README
@@ -5,16 +5,7 @@ vdr2jpeg are used from xxv to generated preview images of recordings.
Requirements
-------------
-ffmpeg-svn (tested with r15589)
-
-Recommended
-------------
-ffmpeg as shared libary and with software scaler
-
-$ cd ffmpeg && \
- ./configure --enable-shared --enable-swscale && \
- make && \
- make install
+ffmpeg
Installation
------------
@@ -28,9 +19,8 @@ $ make install
or build with more diagnostic
$ make all DEBUG=1
-or to link vdr2jpeg static,
-if your want that no external libraries are needed at run-time
-$ make all STATIC=1
+or to change to a other path of ffmpeg binary
+$ make all FFMPEG_BIN=/usr/local/bin/ffmpeg
Usage
diff --git a/contrib/vdr2jpeg/ffm.cpp b/contrib/vdr2jpeg/ffm.cpp
index 23ff23b..0d4ac28 100644
--- a/contrib/vdr2jpeg/ffm.cpp
+++ b/contrib/vdr2jpeg/ffm.cpp
@@ -19,15 +19,11 @@
#define FFMPEG_BIN "ffmpeg"
#endif
-bool decode (const char* szMPVfile, /* const tPackedList & packed, */
+bool decode (const char* szMPVfile,
const char* szTmpMask,
int width, int height)
{
- int frame_width = 0;
- int frame_height = 0;
- int keep_aspect_ratio = 1;
-
#if 0
std::cerr << "szMPVfile:" << szMPVfile << std::endl;
std::cerr << "szTmpMask:" << szTmpMask << std::endl;
@@ -35,22 +31,6 @@ bool decode (const char* szMPVfile, /* const tPackedList & packed, */
std::cerr << "height:" << height << std::endl;
#endif
- if (width > 0 || height > 0) {
- if (width > 0) {
- frame_width = width;
- keep_aspect_ratio |= 1;
- } else {
- keep_aspect_ratio &= ~1;
- }
-
- if (height > 0) {
- frame_height = height;
- keep_aspect_ratio |= 2;
- } else {
- keep_aspect_ratio &= ~2;
- }
- }
-
std::stringstream ss;
ss << FFMPEG_BIN;
@@ -62,12 +42,12 @@ bool decode (const char* szMPVfile, /* const tPackedList & packed, */
#endif
ss << " -an -i '" << szMPVfile << "'";
- if((keep_aspect_ratio & 2) == keep_aspect_ratio) { // Nur Höhe wurde definiert
- ss << " -vf scale=-1:" << frame_height;
- } else if((keep_aspect_ratio & 1) == keep_aspect_ratio) { // Nur Weite wurde definiert
- ss << " -vf scale=" << frame_width << ":-1";
- } else {
- ss << " -vf scale=" << frame_width << ":" << frame_height;
+ if(width > 0 && height > 0) {
+ ss << " -vf scale=" << width << "x" << height;
+ } else if(height > 0) { // Nur Höhe wurde definiert
+ ss << " -vf scale=-1:" << height;
+ } else if(width > 0) { // Nur Weite wurde definiert
+ ss << " -vf scale=" << width << ":-1";
}
ss << " '" << szTmpMask << "'";