Description | Hierarchy | Fields | Methods | Properties |
type TAdMediaHandler = class(TObject)
TAdMediaHandler is an abstract class that cares about handling the decoded media packets that come from the media decoder. For instance, a video handler should care about buffering the decoded video frames. A audio handler should buffer the audio data and pass it to the used audio engine.
![]() |
procedure FeedPackage(var APckt: TAdMediaPacket); virtual; abstract; |
![]() |
procedure Notify(AState: TAdMediaDecoderState); virtual; abstract; |
![]() |
procedure FlushBuffer; virtual; abstract; |
![]() |
function NeedsData: Boolean; virtual; abstract; |
![]() |
function Overflow: Boolean; virtual; abstract; |
![]() |
procedure FeedPackage(var APckt: TAdMediaPacket); virtual; abstract; |
This function is called, when a media packet was decoded by the media decoder. The media handler should check the type of the package and store the data in an internal buffer and pass it to the graphics/audio engine. |
![]() |
procedure Notify(AState: TAdMediaDecoderState); virtual; abstract; |
This method is called when the media handler should be notified by the media decoder about a special state change (e.g. the end of the stream). |
![]() |
procedure FlushBuffer; virtual; abstract; |
This method is called when the media handler should flush its buffer. |
![]() |
function NeedsData: Boolean; virtual; abstract; |
Return true, if your media handler experiences a buffer underrun and needs new data. |
![]() |
function Overflow: Boolean; virtual; abstract; |
Return true, if your buffer contains data for more than one or two seconds video. |