java - Android and JNI, pipe data to FFmpeg -


i'm trying create metadata retriever based on ffmpeg. since raw android application resources accessible using file descriptor need way pipe data ffmpeg via jni. know ffmpeg supports "pipe" protocol:

unix pipe access protocol.  allow read , write unix pipes.  accepted syntax is:       pipe:[number]  number number corresponding file descriptor of pipe (e.g. 0 stdin, 1 stdout, 2 stderr). if number not specified, default stdout file descriptor used writing, stdin reading.  example: cat test.wav | ffmpeg -i pipe:0 

my question is, how programmatically emulate cat test.wav | ffmpeg -i pipe:0 using jni , avformat_open_input using filedescriptor? possible?

people androidffmpeg project implemented "jni://" protocol stream data via jni, see https://github.com/appunite/androidffmpeg/blob/master/ffmpeglibrary/jni/jni-protocol.c

i not know how it's used, came across file , saw question. think use same solution.

you may want @ post: https://stackoverflow.com/a/24747137/1028256 passing filedescriptor jni


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -