blob: 4d406964c1d9bf34affd6738c7a7a9cd360145c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 <tdeprocess.h>
k9Redirect::k9Redirect()
{
}
k9Redirect::~k9Redirect()
{
}
void k9Redirect::execute() {
TDEProcess *p=new TDEProcess();
*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/tde-jmp/k9copy/tmp.mpeg" << "-ss" << "00:00:00.000" << "-endpos" << "00:00:57.360" << "-really-quiet" << "/home/jmp/t.avi";
p->start(TDEProcess::NotifyOnExit);
p->wait();
TQFile f("/tmp/tde-jmp/k9copy/tmp.mpeg");
TQFile 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();
}
|