Skip to main content

OH_AVSource_CreateWithDataSourceExt

Function OH_AVSource_CreateWithDataSourceExt 

Source
pub unsafe extern "C" fn OH_AVSource_CreateWithDataSourceExt(
    dataSource: *mut OH_AVDataSourceExt,
    userData: *mut c_void,
) -> *mut OH_AVSource
Available on crate features api-10 and api-20 only.
Expand description

Creates an OH_AVSource instance with dataSource and userData.

Required System Capabilities: SystemCapability.Multimedia.Media.Spliter

§Arguments

  • dataSource - A pointer to the data source structure, which can obtain the input data.

  • userData - A pointer to user-defined data.

§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: 20