Gtk.MediaStream.realize

### Method

# Gtk MediaStreamrealize

#### Declaration [src]

    void
    gtk_media_stream_realize (
      GtkMediaStream* self,
      GdkSurface* surface
    )

#### Description [src]

Called by users to attach the media stream to a `GdkSurface` they manage.

The stream can then access the resources of `surface` for its rendering purposes. In particular, media streams might want to create a `GdkGLContext` or sync to the `GdkFrameClock`.

Whoever calls this function is responsible for calling `gtk_media_stream_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_unrealize()`.

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

#### Parameters

`surface` | `GdkSurface*`
| A `GdkSurface`
| The data is owned by the caller of the function.