## Screencast Screencast — create screencast sessions |

## Functions

void | xdp_portal_create_screencast_session ()
XdpSession * | xdp_portal_create_screencast_session_finish ()

## Types and Values

enum | XdpOutputType

## Description

A screencast session makes the content of a monitor or window available as a pipewire stream.

The underlying portal is org.freedesktop.portal.ScreenCast.

## Functions

### xdp_portal_create_screencast_session ()

    void
    xdp_portal_create_screencast_session (XdpPortal *portal,
                                          XdpOutputType outputs,
                                          XdpScreencastFlags flags,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer data);

Creates a session for a screencast.

When the request is done, `callback` will be called. You can then call `xdp_portal_create_screencast_session_finish()` to get the results.

#### Parameters

portal | a XdpPortal |
outputs | which kinds of source to offer in the dialog |
flags | options for this call |
cancellable | optional GCancellable. | [nullable]
callback | a callback to call when the request is done. | [scope async]
data | data to pass to `callback` . | [closure]

### xdp_portal_create_screencast_session_finish ()

    XdpSession *
    xdp_portal_create_screencast_session_finish
                                   (XdpPortal *portal,
                                    GAsyncResult *result,
                                    GError **error);

Finishes the create-screencast request, and returns an XdpSession.

#### Parameters

portal | a XdpPortal |
result | a GAsyncResult |
error | return location for an error |

#### Returns

a XdpSession.

[transfer full]

## Types and Values

### enum XdpOutputType

Flags to specify what kind of sources to offer for a screencast session.

#### Members

XDP_OUTPUT_MONITOR | allow selecting monitors |
XDP_OUTPUT_WINDOW | allow selecting individual application windows |