Språk

MediaExtractor.SetDataSourceAsync Method

Definition

Overloads

Name Description
SetDataSourceAsync(AssetFileDescriptor)

Configures an asset-based media source on a background task.

SetDataSourceAsync(MediaDataSource)

Configures a callback-based media source on a background task.

SetDataSourceAsync(FileDescriptor)

Configures media from a file descriptor on a background task.

SetDataSourceAsync(String)

Configures path-based media input on a background task.

SetDataSourceAsync(String, IDictionary<String,String>)

Configures path-based media input with request headers on a background task.

SetDataSourceAsync(Context, Uri, IDictionary<String,String>)

Configures URI-based media input on a background task.

SetDataSourceAsync(FileDescriptor, Int64, Int64)

Configures a file-descriptor media region on a background task.

SetDataSourceAsync(AssetFileDescriptor)

Configures an asset-based media source on a background task.

public System.Threading.Tasks.Task SetDataSourceAsync(Android.Content.Res.AssetFileDescriptor afd);
member this.SetDataSourceAsync : Android.Content.Res.AssetFileDescriptor -> System.Threading.Tasks.Task

Parameters

afd
AssetFileDescriptor

The asset descriptor; its declared range is used when a length is available.

Returns

A task representing completion of the asset-descriptor source setup.

Remarks

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

SetDataSourceAsync(MediaDataSource)

Configures a callback-based media source on a background task.

public System.Threading.Tasks.Task SetDataSourceAsync(Android.Media.MediaDataSource dataSource);
member this.SetDataSourceAsync : Android.Media.MediaDataSource -> System.Threading.Tasks.Task

Parameters

dataSource
MediaDataSource

The callback-based source that supplies the media bytes.

Returns

A task representing completion of the custom data-source setup.

Remarks

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

SetDataSourceAsync(FileDescriptor)

Configures media from a file descriptor on a background task.

public System.Threading.Tasks.Task SetDataSourceAsync(Java.IO.FileDescriptor fd);
member this.SetDataSourceAsync : Java.IO.FileDescriptor -> System.Threading.Tasks.Task

Parameters

fd
FileDescriptor

The seekable descriptor for the media data.

Returns

A task representing completion of the file-descriptor source setup.

Remarks

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

SetDataSourceAsync(String)

Configures path-based media input on a background task.

public System.Threading.Tasks.Task SetDataSourceAsync(string path);
member this.SetDataSourceAsync : string -> System.Threading.Tasks.Task

Parameters

path
String

A media file path or HTTP URL.

Returns

A task representing completion of the path-based source setup.

Remarks

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

SetDataSourceAsync(String, IDictionary<String,String>)

Configures path-based media input with request headers on a background task.

public System.Threading.Tasks.Task SetDataSourceAsync(string path, System.Collections.Generic.IDictionary<string,string>? headers);
member this.SetDataSourceAsync : string * System.Collections.Generic.IDictionary<string, string> -> System.Threading.Tasks.Task

Parameters

path
String

A media file path or HTTP URL.

headers
IDictionary<String,String>

HTTP request headers, or null when no extra headers are needed.

Returns

A task representing completion of the source setup with the supplied headers.

Remarks

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

SetDataSourceAsync(Context, Uri, IDictionary<String,String>)

Configures URI-based media input on a background task.

public System.Threading.Tasks.Task SetDataSourceAsync(Android.Content.Context context, Android.Net.Uri uri, System.Collections.Generic.IDictionary<string,string>? headers);
member this.SetDataSourceAsync : Android.Content.Context * Android.Net.Uri * System.Collections.Generic.IDictionary<string, string> -> System.Threading.Tasks.Task

Parameters

context
Context

The context to use when content-provider resolution is needed.

uri
Uri

The URI identifying the media data.

headers
IDictionary<String,String>

Optional HTTP headers for a network source.

Returns

A task representing completion of the URI-based source setup.

Remarks

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

SetDataSourceAsync(FileDescriptor, Int64, Int64)

Configures a file-descriptor media region on a background task.

public System.Threading.Tasks.Task SetDataSourceAsync(Java.IO.FileDescriptor fd, long offset, long length);
member this.SetDataSourceAsync : Java.IO.FileDescriptor * int64 * int64 -> System.Threading.Tasks.Task

Parameters

fd
FileDescriptor

The seekable descriptor containing the media data.

offset
Int64

The starting byte offset of the media region within the file.

length
Int64

The number of bytes in the media region.

Returns

A task representing completion of the file-region source setup.

Remarks

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