In MediaRecorder.java
, setOutputFile
is handled at the Java
layer itself without a corresponding native implementation. In the Java
implementation, the path is stored into mPath
.
When prepare
is called, a FileOutputStream
is created and passed to the native implementation of setOutputFile
which takes in a File Descriptor
as can be observed from this implementation. This method i.e. taking in a File Descriptor
is supported by the native implementation and hence, the output is generated and stored into the file system.
Hence, in examples such as MediaRecorderTest.java
, one can observe that MediaRecorder
object is initialized with a string
for the output file path.