Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
C/java seem to run it reliably
#include <stdio.h>
void main(char **argv) {
int a = 0;
for(a = 0; a < 100; a++) {
FILE *lsofFile_p = popen("temp\\ffmpeg.exe -list_devices true -f dshow -i dummy 2>&1", "r");
if (!lsofFile_p)
{
printf("bad p");
return -1;
}
int b;
for(b = 0; b < 20; b++) {
char buffer[1024];
char *line_p = fgets(buffer, sizeof(buffer), lsofFile_p);
printf("got %s", buffer);
}
pclose(lsofFile_p);
printf("done file\n\n\n");
}
}
// also appears to run fine
class test {
public static void main(String... args) throws Exception {
Process process = Runtime.getRuntime().exec("temp\\ffmpeg.exe -list_devices true -f dshow -i dummy");
byte[] bytes = new byte[4000];
process.getErrorStream().read(bytes);
System.out.println("hellostderr" + new String(bytes));
bytes = new byte[2000];
process.getInputStream().read(bytes);
System.out.println("hellostdout" + new String(bytes));
process.getErrorStream().read(bytes);
System.out.println("hellostderr2" + new String(bytes));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.