0
我試圖創建一個基於FFmpeg的元數據檢索器。由於原始的Android應用程序資源通常只能使用文件描述符訪問,所以我需要通過JNI將這些數據傳遞給FFmpeg。我知道FFmpeg的支持「管道」協議:Android和JNI,管道數據FFmpeg
UNIX pipe access protocol.
Allow to read and write from UNIX pipes.
The accepted syntax is:
pipe:[number]
number is the number corresponding to the file descriptor of the pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If number is not specified, by default the stdout file descriptor will be used for writing, stdin for reading.
For example: cat test.wav | ffmpeg -i pipe:0
我的問題是,如何以編程方式使用JNI和avformat_open_input使用FileDescriptor效仿cat test.wav | ffmpeg -i pipe:0
?這可能嗎?
怎麼樣這個問題? – crossle
我不確定我是否明白你在問什麼,你可以重述一下這個問題嗎? –
我想問如何在Java Layer中創建一個命名管道,並傳遞JNI – crossle