Delen via


MediaFrameReader.FrameArrived Event

Definition

Occurs when a new frame arrives from the media frame source associated with the MediaFrameReader.

// Register
event_token FrameArrived(TypedEventHandler<MediaFrameReader, MediaFrameArrivedEventArgs const&> const& handler) const;

// Revoke with event_token
void FrameArrived(event_token const* cookie) const;

// Revoke with event_revoker
MediaFrameReader::FrameArrived_revoker FrameArrived(auto_revoke_t, TypedEventHandler<MediaFrameReader, MediaFrameArrivedEventArgs const&> const& handler) const;
public event TypedEventHandler<MediaFrameReader,MediaFrameArrivedEventArgs> FrameArrived;
function onFrameArrived(eventArgs) { /* Your code */ }
mediaFrameReader.addEventListener("framearrived", onFrameArrived);
mediaFrameReader.removeEventListener("framearrived", onFrameArrived);
- or -
mediaFrameReader.onframearrived = onFrameArrived;
Public Custom Event FrameArrived As TypedEventHandler(Of MediaFrameReader, MediaFrameArrivedEventArgs) 

Event Type

Remarks

In the handler for the FrameArrived event, call TryAcquireLatestFrame to get a MediaFrameReference representing the latest frame from the media frame source.

Applies to