aboutsummaryrefslogtreecommitdiff
path: root/src/tests/procs.cpp
blob: c2330405543a7cc33b7b75ff4cb2d2c677979b63 (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
#include "bu/process.h"

#include <stdio.h>

int main( int agrc, char *argv[] )
{
	//Bu::Process p( argv[1], argv+1 );
	    Bu::Process p("mplayer", "mplayer", "dvd://", "-framedrop",
        "-ao", "null", "-nosound", "-vf", "framestep=I,cropdetect" "-sstep",
        "197", NULL );

	char buf[1000];
	for(;;)
	{
		int iSize = p.read( buf, 1000 );
		printf("::read=%d::\n", iSize );
		if( iSize == 0 )
			break;
		fwrite( buf, iSize, 1, stdout );
		if( iSize < 1000 )
			break;
	}

	return 0;
}