MediaStream.realize

Called by users to attach the media stream to a gdk.surface.Surface they manage.

The stream can then access the resources of surface for its rendering purposes. In particular, media streams might want to create a gdk.glcontext.GLContext or sync to the gdk.frame_clock.FrameClock.

Whoever calls this function is responsible for calling gtk.media_stream.MediaStream.unrealize before either the stream or surface get destroyed.

Multiple calls to this function may happen from different users of the video, even with the same surface. Each of these calls must be followed by its own call to gtk.media_stream.MediaStream.unrealize.

It is not required to call this function to make a media stream work.

class MediaStream
void
realize

Parameters

surface gdk.surface.Surface