[X2Go-Commits] [telekinesis] 01/02: drop sub: mediaFileINFO. Not needed in TeKi anymore
git-admin at x2go.org
git-admin at x2go.org
Sun Jun 22 14:46:12 CEST 2014
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository telekinesis.
commit f9ce2cbf97c34fd8aebdc508bce25362d76adff4
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Sat Jun 21 23:11:27 2014 +0200
drop sub: mediaFileINFO. Not needed in TeKi anymore
---
X2Go/Telekinesis/Apps/AppCore.pm | 35 +----------------------------------
1 file changed, 1 insertion(+), 34 deletions(-)
diff --git a/X2Go/Telekinesis/Apps/AppCore.pm b/X2Go/Telekinesis/Apps/AppCore.pm
index d0b6a35..69b9594 100644
--- a/X2Go/Telekinesis/Apps/AppCore.pm
+++ b/X2Go/Telekinesis/Apps/AppCore.pm
@@ -25,7 +25,7 @@ package X2Go::Telekinesis::Apps::AppCore;
use strict;
use Glib qw/TRUE FALSE/;
use Exporter qw(import);
-our @EXPORT_OK = qw(getTeKiPaths tkappDie appDBugLog cleanUpOldAppSession checkAppSesLOCKnDirs mediaFileINFO initLOCKandDirs getXWinPosNDim showAboutPOP getBasicServersideInfo getCmdFlags getBasicClientsideInfo epicFailPOP);
+our @EXPORT_OK = qw(getTeKiPaths tkappDie appDBugLog cleanUpOldAppSession checkAppSesLOCKnDirs initLOCKandDirs getXWinPosNDim showAboutPOP getBasicServersideInfo getCmdFlags getBasicClientsideInfo epicFailPOP);
use X2Go::Telekinesis::CommonCore qw(tcDie sanitizer genRandFID checkPID sanitizeFilePath sanitizeDirPath genRandSID clups dbugPrint);
use File::Path qw(make_path remove_tree);
@@ -230,39 +230,6 @@ sub getBasicClientsideInfo {
return ($UserName,$UserHome,$X2GoSID,$X2GoSesHome,$X2GoTKCHome,$TeKiLSockPath);
}
-sub mediaFileINFO { # Initially we we're using another perl module for this but it turned out to have some (b) ithchy dependencies on some never distros so fk that...
- # "Self made" is not always well made.... but it takes less to rigg this short sub rather than debugging 3rd party crud.
- # Plan to expand on the content of the returned %FileInfo but at the moment this is all we need for preliminary validation that the file is actually a playable file.
- my $FilePath = sanitizeFilePath($_[0]);
- my %FileInfo;
- if (-f $FilePath) {
- open(MPINFO,"-|","/usr/bin/mplayer",'-vo','null','-ao','null', '-identify','-frames','0','-nolirc',$FilePath);
- my @MPInfo = <MPINFO>;
- close(MPINFO);
- foreach my $line (@MPInfo) {
- $line =~ s/\n//g;
- if ($line =~ /^ID\_LENGTH\=([\d\.]*)$/) {
- $FileInfo{'length'} = $1;
- } elsif ($line =~ /^ID\_VIDEO\_CODEC\=(.*)$/) {
- $FileInfo{'vcodec'} = $1;
- } elsif ($line =~ /^ID\_AUDIO\_CODEC\=(.*)$/) {
- $FileInfo{'acodec'} = $1;
- }
- }
- if ($FileInfo{'length'} > 0) {
- if ($FileInfo{'vcodec'}) {
- return (1,"V",%FileInfo);
- } else {
- if ($FileInfo{'acodec'}) {
- return (1,"A",%FileInfo);
- } else {return 0;}
- }
- } else {return 0;}
- } else {
- return 0;
- }
-}
-
sub showAboutPOP {
my $dialog = Gtk2::Dialog->new ("About $::APPDNAME v$::APPVER", undef, [qw/modal destroy-with-parent/],
'gtk-ok' => 'ok',
--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/telekinesis.git
More information about the x2go-commits
mailing list