GData.MediaContent¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
The standard MIME type of the object. |
||
r |
The number of seconds for which the media object plays. |
||
r |
Determines if the object is a sample or the full version of the object. |
||
r |
The number of bytes of the media object. |
||
r |
The height of the media object. |
||
r |
Determines if this is the default content for the media group. |
||
r |
The type of object. |
||
r |
The direct URI to the media object. |
||
r |
The width of the media object. |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class GData.MediaContent(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
All the fields in the
GData.MediaContent
structure are private and should never be accessed directly.- download(service, cancellable)¶
- Parameters:
service (
GData.Service
) – theGData.Service
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
for the entire download stream, orNone
- Raises:
- Returns:
a
GData.DownloadStream
to download the content with, orNone
; unref withGObject.Object.unref
()- Return type:
Downloads and returns a
GData.DownloadStream
allowing the content 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 returnedGData.DownloadStream
. CallingGData.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 usingGio.Cancellable.cancel
(). Cancelling the individualGio.InputStream
operations on theGData.DownloadStream
will not cancel the entire download; merely the read or close operation in question. See theGData.DownloadStream
:cancellable
for more details.New in version 0.8.0.
- get_content_type()¶
-
Gets the
GData.MediaContent
:content-type
property.New in version 0.4.0.
- get_duration()¶
- Returns:
the content’s duration in seconds, or 0
- Return type:
Gets the
GData.MediaContent
:duration
property.New in version 0.4.0.
- get_expression()¶
- Returns:
the content’s expression, or
GData.MediaExpression.FULL
- Return type:
Gets the
GData.MediaContent
:expression
property.New in version 0.4.0.
- get_filesize()¶
- Returns:
the number of bytes in the content, or 0
- Return type:
Gets the
GData.MediaContent
:filesize
property.New in version 0.4.0.
- get_height()¶
- Returns:
the content’s height in pixels, or 0
- Return type:
Gets the
GData.MediaContent
:height
property.New in version 0.4.0.
- get_medium()¶
- Returns:
the type of the content, or
GData.MediaMedium.UNKNOWN
- Return type:
Gets the
GData.MediaContent
:medium
property.New in version 0.4.0.
- get_uri()¶
- Returns:
the content’s URI
- Return type:
Gets the
GData.MediaContent
:uri
property.New in version 0.4.0.
- get_width()¶
- Returns:
the content’s width in pixels, or 0
- Return type:
Gets the
GData.MediaContent
:width
property.New in version 0.4.0.
- is_default()¶
- Returns:
True
if theGData.MediaContent
is the default content for the media group,False
otherwise- Return type:
Gets the
GData.MediaContent
:is-default
property.New in version 0.4.0.
Property Details¶
- GData.MediaContent.props.content_type¶
-
The standard MIME type of the object.
For more information, see the Media RSS specification.
New in version 0.4.0.
- GData.MediaContent.props.duration¶
-
The number of seconds for which the media object plays.
For more information, see the Media RSS specification.
New in version 0.4.0.
- GData.MediaContent.props.expression¶
- Name:
expression
- Type:
- Default Value:
- Flags:
Determines if the object is a sample or the full version of the object, or even if it is a continuous stream.
For more information, see the Media RSS specification.
New in version 0.4.0.
- GData.MediaContent.props.filesize¶
-
The number of bytes of the media object.
For more information, see the Media RSS specification.
New in version 0.4.0.
- GData.MediaContent.props.height¶
-
The height of the media object.
For more information, see the Media RSS specification.
New in version 0.4.0.
- GData.MediaContent.props.is_default¶
-
Determines if this is the default content for the media group. There should only be one default object per media group.
For more information, see the Media RSS specification.
New in version 0.4.0.
- GData.MediaContent.props.medium¶
- Name:
medium
- Type:
- Default Value:
- Flags:
The type of object, complementing
GData.MediaContent
:content-type
. It allows the consuming application to make simpler decisions between different content objects, based on whether they’re a video or audio stream, for example.For more information, see the Media RSS specification.
New in version 0.4.0.
- GData.MediaContent.props.uri¶
-
The direct URI to the media object.
For more information, see the Media RSS specification.
New in version 0.4.0.
- GData.MediaContent.props.width¶
-
The width of the media object.
For more information, see the Media RSS specification.
New in version 0.4.0.