summaryrefslogtreecommitdiffstats
path: root/src/k9redirect.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-17 00:32:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-17 00:32:19 +0000
commit0d382a262c0638d0f572fc37193ccc5ed3dc895f (patch)
tree8578dcddfce4191f3f7a142a37769df7add48475 /src/k9redirect.cpp
downloadk9copy-0d382a262c0638d0f572fc37193ccc5ed3dc895f.tar.gz
k9copy-0d382a262c0638d0f572fc37193ccc5ed3dc895f.zip
Added old abandoned version of k9copy
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1091546 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/k9redirect.cpp')
-rw-r--r--src/k9redirect.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/k9redirect.cpp b/src/k9redirect.cpp
new file mode 100644
index 0000000..f5d2066
--- /dev/null
+++ b/src/k9redirect.cpp
@@ -0,0 +1,44 @@
+//
+// C++ Implementation: k9redirect
+//
+// Description:
+//
+//
+// Author: Jean-Michel PETIT <[email protected]>, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#include "k9redirect.h"
+#include <kprocess.h>
+k9Redirect::k9Redirect()
+{
+}
+
+
+k9Redirect::~k9Redirect()
+{
+}
+
+void k9Redirect::execute() {
+ KProcess *p=new KProcess();
+ *p << "mencoder";
+ *p << "-oac" << "lavc" << "-ovc" << "lavc" << "-of" << "mpeg";
+ *p << "-mpegopts" << "format=dvd" << "-vf" << "scale=720:576,harddup" << "-srate" << "48000" << "-af" << "lavcresample=48000" << "-lavcopts" << "vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:acodec=ac3:abitrate=192:aspect=16/9" << "-ofps" << "25" << "-o" << "/tmp/kde-jmp/k9copy/tmp.mpeg" << "-ss" << "00:00:00.000" << "-endpos" << "00:00:57.360" << "-really-quiet" << "/home/jmp/t.avi";
+ p->start(KProcess::NotifyOnExit);
+ p->wait();
+
+
+ QFile f("/tmp/kde-jmp/k9copy/tmp.mpeg");
+ QFile fout;
+ f.open(IO_ReadOnly );
+ fout.open(IO_WriteOnly,stdout);
+ while ( ! f.atEnd()) {
+ char *buf=new char [2048];
+ f.readBlock(buf,2048);
+ fout.writeBlock(buf,2048);
+ delete buf;
+ }
+ f.close();
+ fout.close();
+}