getDuration

Gets the duration of the media resource.

virtual int getDuration(int64_t& duration) = 0;

Parameters

duration
Output parameter, the total duration of the media file (in milliseconds).

Return Values

  • 0: Success.
  • < 0: Failure.