aboutsummaryrefslogtreecommitdiff
path: root/src/tests/procs.cpp
blob: c4b3ebc690538bae98e5dd0aacef0fd7fd5f7c27 (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()
{
	//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;
}