C# Class Unosquare.FFmpegMediaElement.Helper

Provides methods and constants for miscellaneous operations
ファイルを表示 Open project: bbougot/Popcorn

Private Properties

Property Type Description
ExtractFFmpegDlls string
IsNoPtsValue bool

Public Methods

Method Description
GetFFmpegErrorMessage ( int code ) : string

Gets the FFmpeg error mesage based on the error code

RegisterFFmpeg ( ) : void

Registers FFmpeg library and initializes its components.

RoundSeconds ( decimal seconds ) : decimal
RoundTicks ( long ticks ) : long
SecondsToTimestamp ( decimal seconds, FFmpeg.AutoGen.AVRational streamTimeBase ) : long

Converts seconds to a timestamp value.

TimestampToSeconds ( long ts, FFmpeg.AutoGen.AVRational streamTimeBase ) : decimal

Converts a Timestamp to seconds.

Private Methods

Method Description
ExtractFFmpegDlls ( string resourcePrefix ) : string

Extracts the FFmpeg Dlls.

IsNoPtsValue ( long timestamp ) : bool

Method Details

GetFFmpegErrorMessage() public static method

Gets the FFmpeg error mesage based on the error code
public static GetFFmpegErrorMessage ( int code ) : string
code int The code.
return string

RegisterFFmpeg() public static method

Registers FFmpeg library and initializes its components.
public static RegisterFFmpeg ( ) : void
return void

RoundSeconds() public static method

public static RoundSeconds ( decimal seconds ) : decimal
seconds decimal
return decimal

RoundTicks() public static method

public static RoundTicks ( long ticks ) : long
ticks long
return long

SecondsToTimestamp() public static method

Converts seconds to a timestamp value.
public static SecondsToTimestamp ( decimal seconds, FFmpeg.AutoGen.AVRational streamTimeBase ) : long
seconds decimal The seconds.
streamTimeBase FFmpeg.AutoGen.AVRational The stream time base.
return long

TimestampToSeconds() public static method

Converts a Timestamp to seconds.
public static TimestampToSeconds ( long ts, FFmpeg.AutoGen.AVRational streamTimeBase ) : decimal
ts long The ts.
streamTimeBase FFmpeg.AutoGen.AVRational The stream time base.
return decimal