SpiceClientGLib.DisplayChannel

g GObject.Object GObject.Object SpiceClientGLib.Channel SpiceClientGLib.Channel GObject.Object->SpiceClientGLib.Channel SpiceClientGLib.DisplayChannel SpiceClientGLib.DisplayChannel SpiceClientGLib.Channel->SpiceClientGLib.DisplayChannel

Subclasses:

None

Methods

Inherited:

SpiceClientGLib.Channel (13), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

display_change_preferred_compression (compression)

display_change_preferred_video_codec_type (codec_type)

display_channel_change_preferred_compression (compression)

display_channel_change_preferred_video_codec_type (codec_type)

display_channel_change_preferred_video_codec_types (codecs)

display_channel_get_primary (surface_id, primary)

display_get_primary (surface_id, primary)

get_gl_scanout ()

gl_draw_done ()

Virtual Methods

Inherited:

SpiceClientGLib.Channel (8), GObject.Object (7)

Properties

Inherited:

SpiceClientGLib.Channel (5)

Name

Type

Flags

Short Description

gl-scanout

SpiceClientGLib.GlScanout

r

GL scanout

height

int

r

The primary surface height

monitors

GLib.Array

r

The monitors configuration

monitors-max

int

r

The current maximum number of monitors

width

int

r

The primary surface width

Signals

Inherited:

SpiceClientGLib.Channel (2), GObject.Object (1)

Name

Short Description

display-invalidate

The SpiceClientGLib.DisplayChannel ::display-invalidate signal is emitted when the rectangular region x/y/w/h of the primary buffer is updated.

display-mark

The SpiceClientGLib.DisplayChannel ::display-mark signal is emitted when the %RED_DISPLAY_MARK command is received, and the display should be exposed.

display-primary-create

The SpiceClientGLib.DisplayChannel ::display-primary-create signal provides main display buffer data.

display-primary-destroy

The SpiceClientGLib.DisplayChannel ::display-primary-destroy signal is emitted when the primary surface is freed and should not be accessed anymore.

gl-draw

The SpiceClientGLib.DisplayChannel ::gl-draw signal is emitted when the rectangular region x/y/w/h of the GL scanout is updated and must be drawn.

gst-video-overlay

The SpiceClientGLib.DisplayChannel ::gst-video-overlay signal is emitted when pipeline is ready and can be passed to widget to register GStreamer overlay interface and other GStreamer callbacks.

streaming-mode

deprecated

Fields

Inherited:

SpiceClientGLib.Channel (2), GObject.Object (1)

Name

Type

Access

Description

parent

SpiceClientGLib.Channel

r

Class Details

class SpiceClientGLib.DisplayChannel(**kwargs)
Bases:

SpiceClientGLib.Channel

Abstract:

No

Structure:

SpiceClientGLib.DisplayChannelClass

The SpiceClientGLib.DisplayChannel struct is opaque and should not be accessed directly.

display_change_preferred_compression(compression)
Parameters:

compression (int) – a #SpiceImageCompression

Tells the spice server to change the preferred image compression for the self.

New in version 0.31.

display_change_preferred_video_codec_type(codec_type)
Parameters:

codec_type (int) – a #SpiceVideoCodecType

Tells the spice server to change the preferred video codec type for streaming in self. Application can set only one preferred video codec per display channel.

New in version 0.34.

display_channel_change_preferred_compression(compression)
Parameters:

compression (int) – a #SpiceImageCompression

Tells the spice server to change the preferred image compression for the self.

New in version 0.35.

display_channel_change_preferred_video_codec_type(codec_type)
Parameters:

codec_type (int) – a #SpiceVideoCodecType

Tells the spice server to change the preferred video codec type for streaming in self. Application can set only one preferred video codec per display channel.

New in version 0.35.

display_channel_change_preferred_video_codec_types(codecs)
Parameters:

codecs ([int]) – an array of ncodecs #SpiceVideoCodecType types

Raises:

GLib.Error

Returns:

True if the preferred codec list was successfully changed, and False otherwise.

Return type:

bool

Tells the spice server the ordered preferred video codec types to use for streaming in self.

New in version 0.38.

display_channel_get_primary(surface_id, primary)
Parameters:
Returns:

True if the primary surface was found and its details collected in primary.

Return type:

bool

Retrieve primary display surface surface_id.

New in version 0.35.

display_get_primary(surface_id, primary)
Parameters:
Returns:

True if the primary surface was found and its details collected in primary.

Return type:

bool

Retrieve primary display surface surface_id.

Deprecated since version 0.35: use SpiceClientGLib.DisplayChannel.display_channel_get_primary() instead.

get_gl_scanout()
Returns:

the current GL scanout, or None if none or not valid

Return type:

SpiceClientGLib.GlScanout

Retrieves the GL scanout if available

New in version 0.35.

gl_draw_done()

After a SpiceClientGLib.DisplayChannel ::gl-draw is emitted, the client should draw the current display with the current GL scanout, and must release the GL resource with a call to SpiceClientGLib.display_gl_draw_done() (failing to do so for each gl-draw may result in a frozen display).

New in version 0.35.

Signal Details

SpiceClientGLib.DisplayChannel.signals.display_invalidate(display_channel, x, y, width, height)
Signal Name:

display-invalidate

Flags:

RUN_FIRST

Parameters:

The SpiceClientGLib.DisplayChannel ::display-invalidate signal is emitted when the rectangular region x/y/w/h of the primary buffer is updated.

SpiceClientGLib.DisplayChannel.signals.display_mark(display_channel, mark)
Signal Name:

display-mark

Flags:

RUN_FIRST

Parameters:

The SpiceClientGLib.DisplayChannel ::display-mark signal is emitted when the %RED_DISPLAY_MARK command is received, and the display should be exposed.

SpiceClientGLib.DisplayChannel.signals.display_primary_create(display_channel, format, width, height, stride, shmid, imgdata)
Signal Name:

display-primary-create

Flags:

RUN_FIRST

Parameters:
  • display_channel (SpiceClientGLib.DisplayChannel) – The object which received the signal

  • format (int) – %SPICE_SURFACE_FMT_32_xRGB or %SPICE_SURFACE_FMT_16_555;

  • width (int) – width resolution

  • height (int) – height resolution

  • stride (int) – the buffer stride (“width” padding)

  • shmid (int) – identifier of the shared memory segment associated with the imgdata, or -1 if not shm

  • imgdata (object or None) – pointer to surface buffer

The SpiceClientGLib.DisplayChannel ::display-primary-create signal provides main display buffer data.

SpiceClientGLib.DisplayChannel.signals.display_primary_destroy(display_channel)
Signal Name:

display-primary-destroy

Flags:

RUN_FIRST

Parameters:

display_channel (SpiceClientGLib.DisplayChannel) – The object which received the signal

The SpiceClientGLib.DisplayChannel ::display-primary-destroy signal is emitted when the primary surface is freed and should not be accessed anymore.

SpiceClientGLib.DisplayChannel.signals.gl_draw(display_channel, x, y, width, height)
Signal Name:

gl-draw

Flags:

Parameters:

The SpiceClientGLib.DisplayChannel ::gl-draw signal is emitted when the rectangular region x/y/w/h of the GL scanout is updated and must be drawn. When the draw is finished, you must call SpiceClientGLib.display_gl_draw_done() in order to release the GL resources.

New in version 0.31.

SpiceClientGLib.DisplayChannel.signals.gst_video_overlay(display_channel, pipeline)
Signal Name:

gst-video-overlay

Flags:

Parameters:
Returns:

True if the overlay is being set

Return type:

bool

The SpiceClientGLib.DisplayChannel ::gst-video-overlay signal is emitted when pipeline is ready and can be passed to widget to register GStreamer overlay interface and other GStreamer callbacks. If the pipeline pointer is None, the drawing area of the native renderer is set visible.

New in version 0.36.

SpiceClientGLib.DisplayChannel.signals.streaming_mode(display_channel, streaming_mode)
Signal Name:

streaming-mode

Flags:

DEPRECATED

Parameters:
Returns:

handle for the display window if possible

The SpiceClientGLib.DisplayChannel ::streaming-mode signal is emitted when spice server is working in streaming mode.

Return type:

object or None

New in version 0.35.

Deprecated since version 0.36: use SpiceClientGLib.DisplayChannel ::gst-video-overlay instead

Property Details

SpiceClientGLib.DisplayChannel.props.gl_scanout
Name:

gl-scanout

Type:

SpiceClientGLib.GlScanout

Default Value:

None

Flags:

READABLE

The last SpiceClientGLib.GlScanout received.

New in version 0.31.

SpiceClientGLib.DisplayChannel.props.height
Name:

height

Type:

int

Default Value:

0

Flags:

READABLE

The primary surface height

SpiceClientGLib.DisplayChannel.props.monitors
Name:

monitors

Type:

GLib.Array

Default Value:

None

Flags:

READABLE

Current monitors configuration.

New in version 0.13.

SpiceClientGLib.DisplayChannel.props.monitors_max
Name:

monitors-max

Type:

int

Default Value:

1

Flags:

READABLE

The maximum number of monitors the server or guest supports. May change during client lifetime, for instance guest may reboot or dynamically adjust this.

New in version 0.13.

SpiceClientGLib.DisplayChannel.props.width
Name:

width

Type:

int

Default Value:

0

Flags:

READABLE

The primary surface width