Android.Media.MediaExtractor.SetDataSource Method
Sets the data source (file-path or http URL) to use.

Syntax

[Android.Runtime.Register("setDataSource", "(Ljava/lang/String;)V", "")]
public void SetDataSource (string path)

Parameters

path
the path of the file, or the http URL of the stream

When path refers to a local file, the file may actually be opened by a process other than the calling application. This implies that the pathname should be an absolute path (as any other process runs with unspecified current working directory), and that the pathname should reference a world-readable file. As an alternative, the application could first open the file for reading, and then use the file descriptor form MediaExtractor.SetDataSource(Java.IO.FileDescriptor).

Exceptions

TypeReason
Java.IO.IOException

Remarks

Sets the data source (file-path or http URL) to use.

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 16