r1725 - in vdr/vdradmin/trunk/debian: . patches
Thomas Schmidt
tschmidt at costa.debian.org
Sat Jan 14 21:27:41 UTC 2006
Author: tschmidt
Date: 2006-01-14 21:27:38 +0000 (Sat, 14 Jan 2006)
New Revision: 1725
Added:
vdr/vdradmin/trunk/debian/patches/02_grab_over_svdrp.dpatch
Modified:
vdr/vdradmin/trunk/debian/changelog
vdr/vdradmin/trunk/debian/patches/00list
vdr/vdradmin/trunk/debian/patches/02_sectmpfiles.dpatch
Log:
vdradmin: Added 02_grab_over_svdrp - to grab the screenshots over svdrp with vdr >= 1.3.38
Modified: vdr/vdradmin/trunk/debian/changelog
===================================================================
--- vdr/vdradmin/trunk/debian/changelog 2006-01-12 16:58:02 UTC (rev 1724)
+++ vdr/vdradmin/trunk/debian/changelog 2006-01-14 21:27:38 UTC (rev 1725)
@@ -3,6 +3,8 @@
* NOT RELEASED YET
* Thomas Schmidt <tschmidt at debian.org>
+ - Added 02_grab_over_svdrp.dpatch
+ - Updated 02_sectmpfiles.dpatch
- Added 05_vdr-1.3.38-fix.dpatch
-- Debian VDR Team <pkg-vdr-dvb-devel at lists.alioth.debian.org> Tue, 10 Jan 2006 19:59:02 +0100
Modified: vdr/vdradmin/trunk/debian/patches/00list
===================================================================
--- vdr/vdradmin/trunk/debian/patches/00list 2006-01-12 16:58:02 UTC (rev 1724)
+++ vdr/vdradmin/trunk/debian/patches/00list 2006-01-14 21:27:38 UTC (rev 1725)
@@ -1,4 +1,5 @@
01_dist-var
+02_grab_over_svdrp
02_sectmpfiles
03_cfgfiles-fhs
04_epg_filename
Added: vdr/vdradmin/trunk/debian/patches/02_grab_over_svdrp.dpatch
===================================================================
--- vdr/vdradmin/trunk/debian/patches/02_grab_over_svdrp.dpatch 2006-01-12 16:58:02 UTC (rev 1724)
+++ vdr/vdradmin/trunk/debian/patches/02_grab_over_svdrp.dpatch 2006-01-14 21:27:38 UTC (rev 1725)
@@ -0,0 +1,70 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+
+## 02_grab_over_svdrp.dpatch by Thomas Schmidt <tschmidt at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Make use of the feature to send the screenshot directly over
+## DP: SVDRP, vdr does not need to write a file itself
+## DP: (needs VDR >= 1.3.38)
+
+ at DPATCH@
+diff -urNad vdradmin-0.97-am3.4.2/vdradmind.pl /tmp/dpep.OfaTVv/vdradmin-0.97-am3.4.2/vdradmind.pl
+--- vdradmin-0.97-am3.4.2/vdradmind.pl 2006-01-14 21:50:28.279569000 +0100
++++ /tmp/dpep.OfaTVv/vdradmin-0.97-am3.4.2/vdradmind.pl 2006-01-14 21:50:28.531584750 +0100
+@@ -4569,8 +4569,6 @@
+ #############################################################################
+ sub grab_picture {
+ my $size = $q->param("size");
+- my $file = new File::Temp(TEMPLATE => "vdr-XXXXX", DIR => File::Spec->tmpdir(), UNLINK => 1, SUFFIX => ".jpg");
+- chmod 0666,$file;
+ my $maxwidth = 768;
+ my $maxheight = 576;
+ my($width, $height);
+@@ -4583,20 +4581,33 @@
+ } else {
+ ($width, $height) = ($maxwidth / 4, $maxheight / 4);
+ }
+-
+- SendCMD("grab $file jpeg 70 $width $height");
+- #SendCMD("grab $file jpeg");
+- if(-e $file && -r $file) {
+- return(header("200", "image/jpeg", ReadFile($file)));
+- } else {
+- print "Expected $file does not exist.\n";
+- print "Obviously VDR Admin could not find the screenshot file. Ensure that:\n";
+- print " - VDR has the rights to write $file\n";
+- print " - VDR and VDR Admin run on the same machine\n";
+- print " - VDR Admin may read $file\n";
+- print " - VDR has access to /dev/video* files\n";
+- print " - you have a full featured card\n";
+- }
++
++ my $file = new File::Temp(TEMPLATE => "vdr-XXXXX", DIR => File::Spec->tmpdir(), UNLINK => 1, SUFFIX => ".jpg");
++
++ if ($VDRVERSION < 10338) {
++ chmod 0666,$file;
++ SendCMD("grab $file jpeg 70 $width $height");
++ } else {
++ my @data = SendCMD("grab - 70 $width $height");
++ my @uu = grep(!/^Grabbed/, @data);
++ if(scalar @uu > 0) {
++ open(FILE, ">$file");
++ binmode(FILE);
++ foreach (@uu) { print FILE MIME::Base64::decode_base64($_); }
++ close FILE;
++ }
++ }
++ if(-e $file && -r $file) {
++ return(header("200", "image/jpeg", ReadFile($file)));
++ } else {
++ print "Expected $file does not exist.\n";
++ print "Obviously VDR Admin could not find the screenshot file. Ensure that:\n";
++ print " - VDR has the rights to write $file\n";
++ print " - VDR and VDR Admin run on the same machine\n";
++ print " - VDR Admin may read $file\n";
++ print " - VDR has access to /dev/video* files\n";
++ print " - you have a full featured card\n";
++ }
+ }
+
+ sub force_update {
Property changes on: vdr/vdradmin/trunk/debian/patches/02_grab_over_svdrp.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Modified: vdr/vdradmin/trunk/debian/patches/02_sectmpfiles.dpatch
===================================================================
--- vdr/vdradmin/trunk/debian/patches/02_sectmpfiles.dpatch 2006-01-12 16:58:02 UTC (rev 1724)
+++ vdr/vdradmin/trunk/debian/patches/02_sectmpfiles.dpatch 2006-01-14 21:27:38 UTC (rev 1725)
@@ -1,36 +1,39 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02_sectmpfiles.dpatch by Thomas Schmidt <thomas.schmidt at in.stud.tu-ilmenau.de>
+
+## 02_sectmpfiles.dpatch by Thomas Schmidt <tschmidt at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
-## DP: Use File::Temp to create temporary files in a secure way
+## DP: lets vdr save the screenshots in a predefined temporary directory,
+## DP: which is created by vdradmin's init-script (not needed with vdr
+## DP: >=1.3.38, keeping it for compatibility with older vdr versions)
@DPATCH@
-diff -urNad vdradmin-0.97-am3.4.2/vdradmind.pl /tmp/dpep.oWSsKj/vdradmin-0.97-am3.4.2/vdradmind.pl
---- vdradmin-0.97-am3.4.2/vdradmind.pl 2005-12-08 15:52:30.500358500 +0100
-+++ /tmp/dpep.oWSsKj/vdradmin-0.97-am3.4.2/vdradmind.pl 2005-12-08 15:55:12.106458250 +0100
-@@ -4569,7 +4569,13 @@
- #############################################################################
- sub grab_picture {
- my $size = $q->param("size");
-- my $file = new File::Temp(TEMPLATE => "vdr-XXXXX", DIR => File::Spec->tmpdir(), UNLINK => 1, SUFFIX => ".jpg");
-+ my $file;
-+
-+ if (! $ENV{TEMPDIR} == "") {
-+ $file = "$ENV{TEMPDIR}/vdradmin.$$.jpg";
+diff -urNad vdradmin-0.97-am3.4.2/vdradmind.pl /tmp/dpep.2eLRN4/vdradmin-0.97-am3.4.2/vdradmind.pl
+--- vdradmin-0.97-am3.4.2/vdradmind.pl 2006-01-14 22:14:33.121866000 +0100
++++ /tmp/dpep.2eLRN4/vdradmin-0.97-am3.4.2/vdradmind.pl 2006-01-14 22:16:58.734966250 +0100
+@@ -4582,7 +4582,13 @@
+ ($width, $height) = ($maxwidth / 4, $maxheight / 4);
+ }
+
+- my $file = new File::Temp(TEMPLATE => "vdr-XXXXX", DIR => File::Spec->tmpdir(), UNLINK => 1, SUFFIX => ".jpg");
++ my $file;
++
++ if (! $ENV{TEMPDIR} == "" && $VDRVERSION < 10338) {
++ $file = "$ENV{TEMPDIR}/vdradmin.$$.jpg";
+ } else {
+ $file = new File::Temp(TEMPLATE => "vdr-XXXXX", DIR => File::Spec->tmpdir(), UNLINK => 1, SUFFIX => ".jpg");
+ }
- chmod 0666,$file;
- my $maxwidth = 768;
- my $maxheight = 576;
-@@ -4587,7 +4593,9 @@
- SendCMD("grab $file jpeg 70 $width $height");
- #SendCMD("grab $file jpeg");
- if(-e $file && -r $file) {
-- return(header("200", "image/jpeg", ReadFile($file)));
-+ my $image = header("200", "image/jpeg", ReadFile($file));
-+ unlink($file);
-+ return($image);
- } else {
- print "Expected $file does not exist.\n";
- print "Obviously VDR Admin could not find the screenshot file. Ensure that:\n";
+
+ if ($VDRVERSION < 10338) {
+ chmod 0666,$file;
+@@ -4598,7 +4604,9 @@
+ }
+ }
+ if(-e $file && -r $file) {
+- return(header("200", "image/jpeg", ReadFile($file)));
++ my $image = header("200", "image/jpeg", ReadFile($file));
++ unlink($file);
++ return($image);
+ } else {
+ print "Expected $file does not exist.\n";
+ print "Obviously VDR Admin could not find the screenshot file. Ensure that:\n";
More information about the pkg-vdr-dvb-changes
mailing list