Freigeben über


MediaRecorder.SetOutputFile Method

Definition

Overloads

SetOutputFile(File)

Pass in the file object to be written.

SetOutputFile(FileDescriptor)

Pass in the file descriptor of the file to be written.

SetOutputFile(String)

Sets the path of the output file to be produced.

SetOutputFile(File)

Pass in the file object to be written.

[Android.Runtime.Register("setOutputFile", "(Ljava/io/File;)V", "GetSetOutputFile_Ljava_io_File_Handler", ApiSince=26)]
public virtual void SetOutputFile (Java.IO.File? file);
[<Android.Runtime.Register("setOutputFile", "(Ljava/io/File;)V", "GetSetOutputFile_Ljava_io_File_Handler", ApiSince=26)>]
abstract member SetOutputFile : Java.IO.File -> unit
override this.SetOutputFile : Java.IO.File -> unit

Parameters

file
File

the file object to be written into.

Attributes

Remarks

Pass in the file object to be written. Call this after setOutputFormat() but before prepare(). File should be seekable. After setting the next output file, application should not use the file until #stop. Application is responsible for cleaning up unused files after #stop is called.

Java documentation for android.media.MediaRecorder.setOutputFile(java.io.File).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

SetOutputFile(FileDescriptor)

Pass in the file descriptor of the file to be written.

[Android.Runtime.Register("setOutputFile", "(Ljava/io/FileDescriptor;)V", "GetSetOutputFile_Ljava_io_FileDescriptor_Handler")]
public virtual void SetOutputFile (Java.IO.FileDescriptor? fd);
[<Android.Runtime.Register("setOutputFile", "(Ljava/io/FileDescriptor;)V", "GetSetOutputFile_Ljava_io_FileDescriptor_Handler")>]
abstract member SetOutputFile : Java.IO.FileDescriptor -> unit
override this.SetOutputFile : Java.IO.FileDescriptor -> unit

Parameters

fd
FileDescriptor

an open file descriptor to be written into.

Attributes

Exceptions

if it is called before setOutputFormat() or after prepare()

Remarks

Pass in the file descriptor of the file to be written. Call this after setOutputFormat() but before prepare().

Java documentation for android.media.MediaRecorder.setOutputFile(java.io.FileDescriptor).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

SetOutputFile(String)

Sets the path of the output file to be produced.

[Android.Runtime.Register("setOutputFile", "(Ljava/lang/String;)V", "GetSetOutputFile_Ljava_lang_String_Handler")]
public virtual void SetOutputFile (string? path);
[<Android.Runtime.Register("setOutputFile", "(Ljava/lang/String;)V", "GetSetOutputFile_Ljava_lang_String_Handler")>]
abstract member SetOutputFile : string -> unit
override this.SetOutputFile : string -> unit

Parameters

path
String

The pathname to use.

Attributes

Exceptions

if it is called before setOutputFormat() or after prepare()

Remarks

Sets the path of the output file to be produced. Call this after setOutputFormat() but before prepare().

Java documentation for android.media.MediaRecorder.setOutputFile(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to