mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added option -i to the pictures plugin's pic2mpg to ignore unknown file types
This commit is contained in:
parent
317240e970
commit
538cbdb26a
1
HISTORY
1
HISTORY
@ -5582,3 +5582,4 @@ Video Disk Recorder Revision History
|
|||||||
2008-02-01: Version 1.5.15
|
2008-02-01: Version 1.5.15
|
||||||
|
|
||||||
- Updated the Italian OSD texts (thanks to Diego Pierotto).
|
- Updated the Italian OSD texts (thanks to Diego Pierotto).
|
||||||
|
- Added option -i to the pictures plugin's pic2mpg to ignore unknown file types.
|
||||||
|
@ -14,3 +14,7 @@ VDR Plugin 'pictures' Revision History
|
|||||||
2008-01-27: Version 0.0.3
|
2008-01-27: Version 0.0.3
|
||||||
|
|
||||||
- Added French texts (thanks to Patrice Staudt <patrice.staudt@laposte.net>).
|
- Added French texts (thanks to Patrice Staudt <patrice.staudt@laposte.net>).
|
||||||
|
|
||||||
|
2008-02-02: Version 0.0.4
|
||||||
|
|
||||||
|
- Added option -i to pic2mpg to ignore unknown file types.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# See the README file for copyright information and how to reach the author.
|
# See the README file for copyright information and how to reach the author.
|
||||||
#
|
#
|
||||||
# $Id: pic2mpg 1.1 2008/01/13 11:39:12 kls Exp $
|
# $Id: pic2mpg 1.2 2008/02/02 11:34:43 kls Exp $
|
||||||
|
|
||||||
## TODO implement HDTV (1920 x 1080)
|
## TODO implement HDTV (1920 x 1080)
|
||||||
|
|
||||||
@ -20,20 +20,22 @@ Usage: $0 [options] picture-dir mpeg-dir
|
|||||||
$0 [options] picture-file mpeg-file
|
$0 [options] picture-file mpeg-file
|
||||||
|
|
||||||
Options: -a Aspect ratio 4:3 (default is 16:9)
|
Options: -a Aspect ratio 4:3 (default is 16:9)
|
||||||
-h print Help
|
|
||||||
-f Force conversion
|
-f Force conversion
|
||||||
|
-h print Help
|
||||||
|
-i Ignore unknown file types
|
||||||
-n NTSC (default is PAL)
|
-n NTSC (default is PAL)
|
||||||
-v num Verbose (0=none, 1=list files, 2=detailed)
|
-v num Verbose (0=none, 1=list files, 2=detailed)
|
||||||
-x percent X overscan in percent
|
-x percent X overscan in percent
|
||||||
-y percent Y overscan in percent
|
-y percent Y overscan in percent
|
||||||
};
|
};
|
||||||
|
|
||||||
getopts("ahfnv:x:y:") || die $Usage;
|
getopts("afhinv:x:y:") || die $Usage;
|
||||||
|
|
||||||
die $Usage if $opt_h;
|
die $Usage if $opt_h;
|
||||||
|
|
||||||
$Aspect = $opt_a;
|
$Aspect = $opt_a;
|
||||||
$Force = $opt_f;
|
$Force = $opt_f;
|
||||||
|
$Ignore = $opt_i;
|
||||||
$NTSC = $opt_n;
|
$NTSC = $opt_n;
|
||||||
$Verbose = $opt_v;
|
$Verbose = $opt_v;
|
||||||
$OverscanX = $opt_x;
|
$OverscanX = $opt_x;
|
||||||
@ -142,7 +144,10 @@ sub ConvertFile
|
|||||||
{
|
{
|
||||||
my ($Pict, $Mpeg) = @_;
|
my ($Pict, $Mpeg) = @_;
|
||||||
(my $Type) = $Pict =~ /\.([^\.]*)$/;
|
(my $Type) = $Pict =~ /\.([^\.]*)$/;
|
||||||
die "unknown file type '$Type': '$Pict'\n" unless defined $PNMCONV{$Type};
|
if (!defined $PNMCONV{$Type}) {
|
||||||
|
return if ($Ignore);
|
||||||
|
die "unknown file type '$Type': '$Pict'\n";
|
||||||
|
}
|
||||||
my ($w, $h) = imgsize($Pict);
|
my ($w, $h) = imgsize($Pict);
|
||||||
print "image size is $w x $h\n" if ($Detailed);
|
print "image size is $w x $h\n" if ($Detailed);
|
||||||
if ($w / $h <= $ScreenRatio) {
|
if ($w / $h <= $ScreenRatio) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: pictures.c 1.3 2008/01/27 15:44:58 kls Exp $
|
* $Id: pictures.c 1.4 2008/02/02 11:32:50 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@ -11,7 +11,7 @@
|
|||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
|
|
||||||
static const char *VERSION = "0.0.3";
|
static const char *VERSION = "0.0.4";
|
||||||
static const char *DESCRIPTION = trNOOP("A simple picture viewer");
|
static const char *DESCRIPTION = trNOOP("A simple picture viewer");
|
||||||
static const char *MAINMENUENTRY = trNOOP("Pictures");
|
static const char *MAINMENUENTRY = trNOOP("Pictures");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user