GData.MediaThumbnail

g GData.MediaThumbnail GData.MediaThumbnail GData.Parsable GData.Parsable GData.Parsable->GData.MediaThumbnail GObject.Object GObject.Object GObject.Object->GData.Parsable

Subclasses:

None

Methods

Inherited:

GData.Parsable (5), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

download (service, cancellable)

get_height ()

get_time ()

get_uri ()

get_width ()

Virtual Methods

Inherited:

GData.Parsable (9), GObject.Object (7)

Properties

Inherited:

GData.Parsable (1)

Name

Type

Flags

Short Description

height

int

r

The height of the thumbnail, in pixels.

time

int

r

The time offset of the thumbnail in relation to the media object, in ms.

uri

str

r

The URI of the thumbnail.

width

int

r

The width of the thumbnail, in pixels.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GData.Parsable

r

Class Details

class GData.MediaThumbnail(**kwargs)
Bases:

GData.Parsable

Abstract:

No

Structure:

GData.MediaThumbnailClass

All the fields in the GData.MediaThumbnail structure are private and should never be accessed directly.

download(service, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

a GData.DownloadStream to download the thumbnail with, or None; unref with GObject.Object.unref()

Return type:

GData.DownloadStream

Downloads and returns a GData.DownloadStream allowing the thumbnail data represented by self to be read.

To get the content type of the downloaded data, GData.DownloadStream.get_content_type() can be called on the returned GData.DownloadStream. Calling GData.DownloadStream.get_content_length() on the stream will not return a meaningful result, however, as the stream is encoded in chunks, rather than by content length.

In order to cancel the download, a Gio.Cancellable passed in to cancellable must be cancelled using Gio.Cancellable.cancel(). Cancelling the individual Gio.InputStream operations on the GData.DownloadStream will not cancel the entire download; merely the read or close operation in question. See the GData.DownloadStream :cancellable for more details.

New in version 0.8.0.

get_height()
Returns:

the thumbnail’s height in pixels, or 0

Return type:

int

Gets the GData.MediaThumbnail :height property.

New in version 0.4.0.

get_time()
Returns:

the thumbnail’s time offset in the media, or -1

Return type:

int

Gets the GData.MediaThumbnail :time property.

New in version 0.4.0.

get_uri()
Returns:

the thumbnail’s URI

Return type:

str

Gets the GData.MediaThumbnail :uri property.

New in version 0.4.0.

get_width()
Returns:

the thumbnail’s width in pixels, or 0

Return type:

int

Gets the GData.MediaThumbnail :width property.

New in version 0.4.0.

Property Details

GData.MediaThumbnail.props.height
Name:

height

Type:

int

Default Value:

0

Flags:

READABLE

The height of the thumbnail, in pixels.

For more information, see the Media RSS specification.

New in version 0.4.0.

GData.MediaThumbnail.props.time
Name:

time

Type:

int

Default Value:

-1

Flags:

READABLE

The time offset of the thumbnail in relation to the media object, in milliseconds.

For more information, see the Media RSS specification.

New in version 0.4.0.

GData.MediaThumbnail.props.uri
Name:

uri

Type:

str

Default Value:

None

Flags:

READABLE

The URI of the thumbnail.

For more information, see the Media RSS specification.

New in version 0.4.0.

GData.MediaThumbnail.props.width
Name:

width

Type:

int

Default Value:

0

Flags:

READABLE

The width of the thumbnail, in pixels.

For more information, see the Media RSS specification.

New in version 0.4.0.