Skip to main content

OH_AVSource_CreateWithDataSource

Function OH_AVSource_CreateWithDataSource 

Source
pub unsafe extern "C" fn OH_AVSource_CreateWithDataSource(
    dataSource: *mut OH_AVDataSource,
) -> *mut OH_AVSource
Available on crate features api-10 and api-12 only.
Expand description

Creates an OH_AVSource instance that models the media with dataSource.

Required System Capabilities: SystemCapability.Multimedia.Media.Spliter

§Arguments

  • dataSource - An Struct for a remote media resource.

§Returns

  • Returns a pointer to an OH_AVSource instance if the execution is successful, otherwise returns nullptr. Possible failure causes:
  1. dataSource is nullptr.
  2. dataSource->size == 0.
  3. set data source failed.
  4. out of memory.
  5. demuxer engine is nullptr.

Available since API-level: 12