AnsweredAssumed Answered

SharedFdPipe.cpp  in OpenMAXIL/src/content_pipe/shared_fd_pipe generates illegal seek error when socket or pipe is used as output of Andriod media recorder

Question asked by M Joa on Feb 12, 2015
Latest reply on Feb 12, 2015 by M Joa

Hi,

 

is it possible to stream output from Android media recorder using socket or pipe to another NDK application on the same i.MX device that in turn streams it out? I have tried the followings to set outputfile of media recorder:

 

// recorder.setOutputFile("/data/data/com.persistentsystems.videocast/files/pipe0"); //pipe

//            recorder.setOutputFile(pfd.getFileDescriptor()); //socket

            recorder.setOutputFile("/sdcard/test_video.mp4"); //file

 

SharedFdPipe.cpp (proprietary code of Freescale) in OpenMAXIL/src/content_pipe/shared_fd_pipe generates illegal seek error when socket or pipe is used

as output of Mediarecorder:

 

02-11 21:53:14.560 I/OMXPlayer( 3658): LEVEL: 1 FUNCTION: SharedFdPipe_Open LINE: 39

02-11 21:53:14.560 I/OMXPlayer( 3658): SFD open sharedfd://28:0:0

02-11 21:53:14.560 I/OMXPlayer( 3658): LEVEL: 1 FUNCTION: SharedFdPipe_Open LINE: 59

02-11 21:53:14.560 I/OMXPlayer( 3658): seek to pos: 0 failed, errno: Illegal seek

 

When file is used as output of media recorder, recording could be done successfully:

02-11 22:01:20.820 I/OMXPlayer( 4603): LEVEL: 1 FUNCTION: SharedFdPipe_Open LINE: 39

02-11 22:01:20.820 I/OMXPlayer( 4603): SFD open sharedfd://28:0:0

02-11 22:01:20.830 I/vpu-lib ( 4603): <gpu> alloc handle: 0x4c3f4cc0, paddr: 0x3e1df000, vaddr: 0x4a113000

02-11 22:01:20.830 I/xx      ( 4841): C

02-11 22:01:20.830 I/OMXPlayer( 4603): start recorder.

 

Thank you so much for your help.

Outcomes