C# 클래스 Unosquare.FFmpegMediaElement.FFmpegMedia

Represents a multimedia source with its corresponding control methods.
상속: IAudioDataProvider, INotifyPropertyChanged, IDisposable
파일 보기 프로젝트 열기: bbougot/Popcorn 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CreateMediaFrameFromDecodedPictureHolder FFmpegMediaFrame
CreateMediaFrameFromDecodedWaveHolder FFmpegMediaFrame
ExtractMediaFramesContinuously void
FillDecodedPictureHolderFrame bool
FillDecodedWaveHolderFrame bool
InitializeAudio void
InitializeMedia void
InitializeVideo void
InternalFillFramesCache void
InternalLoadFrames void
InternalSeekInput void
PullMediaFrame FFmpegMediaFrame
RenderVideoImage void
StartAudioRenderer void

공개 메소드들

메소드 설명
Dispose ( ) : void

Releases all managed and unmanaged resources

FFmpegMedia ( string filePath, MediaErrorOccurredCallback errorCallback ) : FFmpeg.AutoGen

Initializes a new instance of the FFmpegMedia class.

FFmpegMedia ( string filePath, MediaErrorOccurredCallback errorCallback, string referer, string userAgent ) : FFmpeg.AutoGen

Initializes a new instance of the FFmpegMedia class.

RenderAudioBuffer ( byte bufferToFill, int &bytesWritten ) : bool

Renders the audio buffer. This is the implementation of IAudioDataProvider.RenderAudioBufferMethod It basically gets the decoded PCM bytes from the audio buffer provider. This method is called by the audio device itself.

비공개 메소드들

메소드 설명
CreateMediaFrameFromDecodedPictureHolder ( ) : FFmpegMediaFrame
CreateMediaFrameFromDecodedWaveHolder ( ) : FFmpegMediaFrame
ExtractMediaFramesContinuously ( ) : void

Extracts the media frames continuously.

FillDecodedPictureHolderFrame ( AVPacket readingPacket, bool emptyPacket ) : bool
FillDecodedWaveHolderFrame ( AVPacket readingPacket, bool emptyPacket ) : bool
InitializeAudio ( ) : void

Initializes the audio.

InitializeMedia ( string filePath, string inputFormatName, string referer, string userAgent ) : void

Initializes the internal transcoder -- This create the input, processing, and output blocks that make up the video and audio decoding stream.

InitializeVideo ( ) : void
InternalFillFramesCache ( System.TimeSpan timeout ) : void
InternalLoadFrames ( decimal renderTime ) : void
InternalSeekInput ( decimal renderTime ) : void

Internals the seek input.

PullMediaFrame ( ) : FFmpegMediaFrame

Pulls the next-available frame. This does not queue the frame in either the video or audio queue. Please keep in mind that you will need to manually call the Release() method the returned object are done with it. If working with Media Caches, the cache will automatically release the frame

RenderVideoImage ( object sender, EventArgs e ) : void

Renders the video image. This method is called on a Dispatcher timer. It is responsible for rendering the decoded video image continuously. It also avoids rendering the same image again.

StartAudioRenderer ( ) : void

메소드 상세

Dispose() 공개 메소드

Releases all managed and unmanaged resources
public Dispose ( ) : void
리턴 void

FFmpegMedia() 공개 메소드

Initializes a new instance of the FFmpegMedia class.
public FFmpegMedia ( string filePath, MediaErrorOccurredCallback errorCallback ) : FFmpeg.AutoGen
filePath string The file path.
errorCallback MediaErrorOccurredCallback The error callback.
리턴 FFmpeg.AutoGen

FFmpegMedia() 공개 메소드

Initializes a new instance of the FFmpegMedia class.
errorCallback cannot be null /// or /// filePath cannot be null or empty errorCallback cannot be null /// or /// filePath cannot be null or empty
public FFmpegMedia ( string filePath, MediaErrorOccurredCallback errorCallback, string referer, string userAgent ) : FFmpeg.AutoGen
filePath string The file path.
errorCallback MediaErrorOccurredCallback The error callback.
referer string The referer. Leave null or emtpy to skip setting it.
userAgent string The user agent. Leave null or empty in order to skip setting a User Agent
리턴 FFmpeg.AutoGen

RenderAudioBuffer() 공개 메소드

Renders the audio buffer. This is the implementation of IAudioDataProvider.RenderAudioBufferMethod It basically gets the decoded PCM bytes from the audio buffer provider. This method is called by the audio device itself.
public RenderAudioBuffer ( byte bufferToFill, int &bytesWritten ) : bool
bufferToFill byte The buffer to fill.
bytesWritten int The bytes written.
리턴 bool