Implementation of #ClutterGstContent that displays video streams
with respects to their aspect ratio.
The #ClutterGstAspectratio structure contains only private data and
should not be accessed directly.
a new #ClutterGstAspectratio instance
Whether the content should fill its allocation with video rather
than adding borders.
Whether or not paint borders on the sides of the video
Base class for #ClutterGstAspectratio.
Bounding box of an area in a video texture or actor's allocation.
Coordinates are usually expressed in the [0, 1] interval.
X coordinate of the top left corner
Y coordinate of the top left corner
X coordinate of the bottom right corner
Y coordinate of the bottom right corner
Retrieves the height of the @box
the height of the box
a #ClutterGstBox
Retrieves the width of the @box
the width of the box
a #ClutterGstBox
Different buffering policies clutter-gst supports
In-memory buffering
On-disk buffering
Implementation of #ClutterGstPlayer that displays camera streams
using GStreamer.
The #ClutterGstCamera structure contains only private data and
should not be accessed directly.
Create a camera actor.
<note>This function has to be called from Clutter's main thread. While
GStreamer will spawn threads to do its work, we want all the GL calls to
happen in the same thread. Clutter-gst knows which thread it is by
assuming this constructor is called from the Clutter thread.</note>
the newly created camera actor
Retrieve the current selected camera device.
The currently selected camera device
a #ClutterGstCamera
Retrieve the current value for the color balance property @property,
This method will return FALSE if @property does not exist or color balance is not
supported on @self.
See clutter_gst_camera_supports_color_balance().
%TRUE if successful, %FALSE otherwise
a #ClutterGstCamera
Property name
Pointer to store the current value of @property
Retrieve the minimum, maximum and default values for the color balance property @property,
This method will return FALSE if @property does not exist or color balance is not
supported on @self.
See clutter_gst_camera_supports_color_balance().
%TRUE if successful, %FALSE otherwise
a #ClutterGstCamera
Property name
Pointer to store the minimum value of @property, or %NULL
Pointer to store the maximum value of @property, or %NULL
Pointer to store the default value of @property, or %NULL
Retrieve the current filter being used.
The current filter or %NULL if none is set
a #ClutterGstCamera
Retrieve the current gamma value.
This method will return FALSE if gamma correction is not
supported on @self.
See clutter_gst_camera_supports_gamma_correction().
%TRUE if successful, %FALSE otherwise
a #ClutterGstCamera
Pointer to store the current gamma value
Retrieve the minimum, maximum and default gamma values.
This method will return FALSE if gamma correction is not
supported on @self.
See clutter_gst_camera_supports_gamma_correction().
%TRUE if successful, %FALSE otherwise
a #ClutterGstCamera
Pointer to store the minimum gamma value, or %NULL
Pointer to store the maximum gamma value, or %NULL
Pointer to store the default gamma value, or %NULL
Check whether the @self is ready for video/photo capture.
%TRUE if @self is ready for capture, %FALSE otherwise
a #ClutterGstCamera
Check whether the @self is recording video.
%TRUE if @self is recording video, %FALSE otherwise
a #ClutterGstCamera
Remove the current filter, if any.
%TRUE on success, %FALSE otherwise
a #ClutterGstCamera
Set the new active camera device.
%TRUE on success, %FALSE otherwise
a #ClutterGstCamera
a #ClutterGstCameraDevice
Set the value for the color balance property @property to @value.
Allowed values can be retrieved with
clutter_gst_camera_get_color_balance_property_range().
This method will return FALSE if @property does not exist or color balance is not
supported on @self.
See clutter_gst_camera_supports_color_balance().
%TRUE if successful, %FALSE otherwise
a #ClutterGstCamera
Property name
The value to set
Set the filter element to be used.
Filters can be used for effects, image processing, etc.
%TRUE on success, %FALSE otherwise
a #ClutterGstCamera
a #GstElement for the filter
Set the gamma value.
Allowed values can be retrieved with
clutter_gst_camera_get_gamma_range().
This method will return FALSE if gamma correction is not
supported on @self.
See clutter_gst_camera_supports_gamma_correction().
%TRUE if successful, %FALSE otherwise
a #ClutterGstCamera
The value to set
Set the encoding profile to be used for photo captures.
The default profile saves photos as JPEG images.
a #ClutterGstCamera
A #GstEncodingProfile to be used for photo captures.
Set the encoding profile to be used for video recording.
The default profile saves videos as Ogg/Theora videos.
a #ClutterGstCamera
A #GstEncodingProfile to be used for video recording.
Start a video recording with the @self and save it to @filename.
This method requires that @self is playing and ready for capture.
The ::video-saved signal will be emitted when the video is saved.
%TRUE if the video recording was successfully started, %FALSE otherwise
a #ClutterGstCamera
the name of the video file to where the
recording will be saved
Stop recording video on the @self.
a #ClutterGstCamera
Check whether the @self supports color balance.
%TRUE if @self supports color balance, %FALSE otherwise
a #ClutterGstCamera
Check whether the @self supports gamma correction.
%TRUE if @self supports gamma correction, %FALSE otherwise
a #ClutterGstCamera
Take a photo with the @self and save it to @filename.
This method requires that @self is playing and ready for capture.
The ::photo-saved signal will be emitted when the video is saved.
%TRUE if the photo was successfully captured, %FALSE otherwise
a #ClutterGstCamera
the name of the file to where the
photo will be saved
Take a photo with the @self and emit it in the ::photo-taken signal as a
#GdkPixbuf.
This method requires that @self is playing and ready for capture.
%TRUE if the photo was successfully captured, %FALSE otherwise
a #ClutterGstCamera
The ::photo-saved signal is emitted when a photo was saved to disk.
The ::photo-taken signal is emitted when a photo was taken.
the photo taken as a #GdkPixbuf
The ::ready-for-capture signal is emitted whenever the value of
clutter_gst_camera_is_ready_for_capture changes.
whether the @self is ready for a new capture
The ::video-saved signal is emitted when a video was saved to disk.
Base class for #ClutterGstCamera.
GObject representing a camera device using GStreamer.
The #ClutterGstCameraDevice structure contains only private data and
should not be accessed directly.
Retrieve the current capture resolution being used by @device.
a #ClutterGstCameraDevice
Pointer to store the current capture resolution width
Pointer to store the current capture resolution height
Retrieve the name of the @device.
the device name.
a #ClutterGstCameraDevice
Retrieve the node (location) of the @device.
the device node.
a #ClutterGstCameraDevice
Retrieve the supported resolutions of the @device.
an array of #ClutterGstVideoResolution with the
supported resolutions.
a #ClutterGstCameraDevice
Set the capture resolution to be used by @device.
a #ClutterGstCameraDevice
The new capture resolution width to use
The new capture resolution height to use
The GstElementFactory for this device.
The device name.
The device node.
The ::capture-resolution-changed signal is emitted whenever the value of
clutter_gst_camera_device_get_capture_resolution changes.
The new width
The new height
Base class for #ClutterGstCameraDevice.
An object to list available cameras on the system.
The #ClutterGstCameraManager structure contains only private data and
should not be accessed directly.
Get the camera manager.
<note>This function has to be called from Clutter's main
thread.</note>
the default camera manager.
Retrieve an array of supported camera devices.
An array of #ClutterGstCameraDevice representing
the supported camera devices
a #ClutterGstCameraManager
The ::camera-added signal is emitted whenever a new camera device
is available.
a camera device added
The ::camera-removed signal is emitted whenever a camera device
is unplugged/removed from the system.
a camera device
Base class for #ClutterGstCamera.
The #ClutterGstContent structure contains only private data
and should be accessed using the provided API
a new #ClutterGstContent instance
a new #ClutterGstContent instance
The #ClutterGstFrame currently attached to @self.
A #ClutterGstContent
The #ClutterGstOverlays currently attached to @self.
A #ClutterGstContent
The #ClutterGstPlayer currently attached to @self.
A #ClutterGstContent
The #ClutterGstVideoSink currently attached to @self.
A #ClutterGstContent
Set the current frame.
A #ClutterGstContent
A #ClutterGstFrame
A #ClutterGstContent
A #ClutterGstPlayer or %NULL
A #ClutterGstContent
A #ClutterGstVideoSink or %NULL
The ::size-change signal is emitted each time the video size changes.
new width of the frames
new height of the frames
The #ClutterGstContentClass structure contains only private data
and should be accessed using the provided API
Implementation of #ClutterGstContent that displays a sub region of
video streams.
The #ClutterGstCrop structure contains only private data and
should not be accessed directly.
a new #ClutterGstCrop instance
Whether to cull the backface of the actor
Input region in the video frame (all values between 0 and 1).
Output region in the actor's allocation (all values between 0 and 1).
Whether or not paint borders on the sides of the video
Base class for #ClutterGstCrop.
Represents a frame outputted by the #ClutterGstVideoSink.
a #ClutterGstVideoResolution
a #CoglPipeline to paint a frame
ClutterGst major version (e.g. "1", if %CLUTTER_GST_VERSION is "1.2.3")
ClutterGst micro version (e.g. "3", if %CLUTTER_GST_VERSION is "1.2.3")
ClutterGst minor version (e.g. "2", if %CLUTTER_GST_VERSION is "1.2.3")
Represents a video overlay outputted by the #ClutterGstVideoSink.
a #ClutterGstBox representing the position of the
overlay within a #ClutterGstFrame.
a #CoglPipeline to paint an overlay
an array of #ClutterGstOverlay
Implementation of #ClutterGstPlayback that displays media streams
using GStreamer.
The #ClutterGstPlayback structure contains only private data and
should not be accessed directly.
Get the current audio stream. The number returned in the index of the
audio stream playing in the list returned by
clutter_gst_playback_get_audio_streams().
the index of the current audio stream, -1 if the media has no
audio stream
a #ClutterGstPlayback
Get the list of audio streams of the current media.
a list of
strings describing the available audio streams
a #ClutterGstPlayback
Retrieves the buffer duration when buffering network streams.
The buffer duration
a #ClutterGstPlayback
Retrieves the amount of the stream that is buffered.
the fill level, between 0.0 and 1.0
a #ClutterGstPlayback
Retrieves the buffer size when buffering network streams.
The buffer size
a #ClutterGstPlayback
a #ClutterGstBufferingMode
a #ClutterGstPlayback
Retrieves the duration of the media stream that @self represents.
the duration of the media stream, in seconds
a #ClutterGstPlayback
Whether the player is seeking.
TRUE if the player is seeking, FALSE otherwise.
a #ClutterGstPlayback
Retrieves the position in the media stream that @self represents.
the position in the media stream, in seconds
a #ClutterGstPlayback
Retrieves the playback progress of @self.
the playback progress, between 0.0 and 1.0
a #ClutterGstPlayback
Get the current value of the seek-flags property.
a combination of #ClutterGstSeekFlags
a #ClutterGstPlayback
Retrieves the font name currently used.
a string containing the font name. Use g_free()
to free the returned string
a #ClutterGstPlayback
Get the current subtitles track. The number returned is the index of the
subtiles track in the list returned by
clutter_gst_playback_get_subtitle_tracks().
the index of the current subtitlest track, -1 if the media has
no subtitles track or if the subtitles have been turned off
a #ClutterGstPlayback
Get the list of subtitles tracks of the current media.
a list of
strings describing the available subtitles tracks
a #ClutterGstPlayback
Retrieves the URI of the subtitle file in use.
the URI of the subtitle file. Use g_free()
to free the returned string
a #ClutterGstPlayback
Retrieves the URI from @self.
the URI of the media stream. Use g_free()
to free the returned string
a #ClutterGstPlayback
Retrieves the user agent used when streaming.
the user agent used. The returned string has to be freed with
g_free()
a #ClutterGstPlayback
Whether the player is using a live media.
TRUE if the player is using a live media, FALSE otherwise.
a #ClutterGstPlayback
Set the audio stream to play. @index_ is the index of the stream
in the list returned by clutter_gst_playback_get_audio_streams().
a #ClutterGstPlayback
the index of the audio stream
Sets the buffer duration to be used when buffering network streams.
a #ClutterGstPlayback
The new duration
Sets the buffer size to be used when buffering network streams.
a #ClutterGstPlayback
The new size
a #ClutterGstPlayback
a #ClutterGstBufferingMode
Sets the source of @self using a file path.
a #ClutterGstPlayback
A filename
Sets the playback progress of @self. The @progress is
a normalized value between 0.0 (begin) and 1.0 (end).
a #ClutterGstPlayback
the progress of the playback, between 0.0 and 1.0
Seeking can be done with several trade-offs. Clutter-gst defaults
to %CLUTTER_GST_SEEK_FLAG_NONE.
a #ClutterGstPlayback
a combination of #ClutterGstSeekFlags
Sets the font used by the subtitle renderer. The @font_name string must be
either %NULL, which means that the default font name of the underlying
implementation will be used; or must follow the grammar recognized by
pango_font_description_from_string() like:
|[
clutter_gst_playback_set_subtitle_font_name (player, "Sans 24pt");
]|
a #ClutterGstPlayback
a font name, or %NULL to set the default font name
Set the subtitles track to play. @index_ is the index of the stream
in the list returned by clutter_gst_playback_get_subtitle_tracks().
If @index_ is -1, the subtitles are turned off.
a #ClutterGstPlayback
the index of the subtitles track
Sets the location of a subtitle file to display while playing @self.
a #ClutterGstPlayback
the URI of a subtitle file
Sets the URI of @self to @uri.
a #ClutterGstPlayback
the URI of the media stream
Sets the user agent to use when streaming.
When streaming content, you might want to set a custom user agent, eg. to
promote your software, make it appear in statistics or because the server
requires a special user agent you want to impersonate.
a #ClutterGstPlayback
the user agent
Index of the current audio stream.
List of audio streams available on the current media.
The fill level of the buffer for the current stream,
as a value between 0.0 and 1.0.
Whether the current stream is seekable.
The duration of the current stream, in seconds
Whether or not the stream is being seeked.
The current progress of the playback, as a normalized
value between 0.0 and 1.0.
Flags to use when seeking.
The font used to display subtitles. The font description has to
follow the same grammar as the one recognized by
pango_font_description_from_string().
Current subtitle track being displayed.
List of subtitle tracks available.
The location of a subtitle file, expressed as a valid URI.
The location of a media file, expressed as a valid URI.
The User Agent used by #ClutterGstPlayback with network protocols.
The ::should-buffer signal is emitted every time the base class needs to
decide whether it should continue buffering in download-buffering mode.
A gst buffering query of format bytes
Base class for #ClutterGstPlayback.
#ClutterGstPlayer is an opaque structure whose members cannot be
directly accessed
Retrieves the playback volume of @self.
The playback volume between 0.0 and 1.0
a #ClutterGstPlayer
Retrieves the #ClutterGstFrame of the last frame produced by @self.
the #ClutterGstFrame of the last frame.
a #ClutterGstPlayer
Get the idle state of the pipeline.
TRUE if the pipline is in idle mode, FALSE otherwise.
a #ClutterGstPlayer
Retrieves the #GstPipeline used by the @self, for direct use with
GStreamer API.
the #GstPipeline element used by the player
a #ClutterGstPlayer
Retrieves the playing status of @self.
%TRUE if playing, %FALSE if stopped.
A #ClutterGstPlayer object
Retrieves the #ClutterGstVideoSink used by the @self.
the #ClutterGstVideoSink element used by the player
a #ClutterGstPlayer
Sets the playback volume of @self to @volume.
a #ClutterGstPlayer
the volume as a double between 0.0 and 1.0
Starts or stops playing of @self.
The implementation might be asynchronous, so the way to know whether
the actual playing state of the @self is to use the #GObject::notify
signal on the #ClutterGstPlayer:playing property and then retrieve the
current state with clutter_gst_player_get_playing(). ClutterGstVideoActor
in clutter-gst is an example of such an asynchronous implementation.
a #ClutterGstPlayer
%TRUE to start playing
Retrieves the playback volume of @self.
The playback volume between 0.0 and 1.0
a #ClutterGstPlayer
Retrieves the #ClutterGstFrame of the last frame produced by @self.
the #ClutterGstFrame of the last frame.
a #ClutterGstPlayer
Get the idle state of the pipeline.
TRUE if the pipline is in idle mode, FALSE otherwise.
a #ClutterGstPlayer
Retrieves the #GstPipeline used by the @self, for direct use with
GStreamer API.
the #GstPipeline element used by the player
a #ClutterGstPlayer
Retrieves the playing status of @self.
%TRUE if playing, %FALSE if stopped.
A #ClutterGstPlayer object
Retrieves the #ClutterGstVideoSink used by the @self.
the #ClutterGstVideoSink element used by the player
a #ClutterGstPlayer
Sets the playback volume of @self to @volume.
a #ClutterGstPlayer
the volume as a double between 0.0 and 1.0
Starts or stops playing of @self.
The implementation might be asynchronous, so the way to know whether
the actual playing state of the @self is to use the #GObject::notify
signal on the #ClutterGstPlayer:playing property and then retrieve the
current state with clutter_gst_player_get_playing(). ClutterGstVideoActor
in clutter-gst is an example of such an asynchronous implementation.
a #ClutterGstPlayer
%TRUE to start playing
The volume of the audio, as a normalized value between
0.0 and 1.0.
Whether the #ClutterGstPlayer is in idle mode.
Whether the #ClutterGstPlayer actor is playing.
The ::eos signal is emitted each time the media stream ends.
The ::error signal is emitted each time an error occurred.
the #GError
The ::ready signal is emitted each time the gstreamer pipeline
becomes ready.
the #ClutterGstFrame newly receive from the video sink
The ::ready signal is emitted each time the gstreamer pipeline
becomes ready.
The ::size-change signal is emitted each time the gstreamer pipeline
becomes ready.
new width of the frames
new height of the frames
Interface vtable for #ClutterGstPlayer implementations
the #ClutterGstFrame of the last frame.
a #ClutterGstPlayer
the #GstPipeline element used by the player
a #ClutterGstPlayer
the #ClutterGstVideoSink element used by the player
a #ClutterGstPlayer
TRUE if the pipline is in idle mode, FALSE otherwise.
a #ClutterGstPlayer
The playback volume between 0.0 and 1.0
a #ClutterGstPlayer
a #ClutterGstPlayer
the volume as a double between 0.0 and 1.0
%TRUE if playing, %FALSE if stopped.
A #ClutterGstPlayer object
a #ClutterGstPlayer
%TRUE to start playing
Flags that can be given to clutter_gst_player_set_seek_flags().
Fast seeks (key frame boundaries, default)
Accurate seeks (potentially slower)
ClutterGst full version, encoded as an hexadecimal value.
ClutterGst full version, encoded as a string.
A video resolution.
the width, in pixels
the height, in pixels
The #ClutterGstVideoSink structure contains only private data and
should be accessed using the provided API.
Creates a new #ClutterGstVideoSink
a new #ClutterGstVideoSink
Returns a #ClutterGstFrame object suitable to render the current
frame of the given video sink. An application is free to make a
copy of this pipeline and modify it for custom rendering.
A #ClutterGstFame or NULL if there
isn't a frame to be displayed yet.
The #ClutterGstVideoSink
Returns a pipeline suitable for rendering the current frame of the
given video sink. The pipeline will already have the textures for
the frame attached. For simple rendering, an application will
typically call this function immediately before it paints the
video. It can then just paint a rectangle using the returned
pipeline.
An application is free to make a copy of this
pipeline and modify it for custom rendering.
Note: it is considered an error to call this function before the
#ClutterGstVideoSink::pipeline-ready signal is emitted.
the pipeline for rendering the
current frame
The #ClutterGstVideoSink
Returns whether the pipeline is ready and so
clutter_gst_video_sink_get_pipeline() and
clutter_gst_video_sink_setup_pipeline() can be called without causing error.
Note: Normally an application will wait until the
#ClutterGstVideoSink::pipeline-ready signal is emitted instead of
polling the ready status with this api, but sometimes when a sink
is passed between components that didn't have an opportunity to
connect a signal handler this can be useful.
%TRUE if the sink is ready, else %FALSE
The #ClutterGstVideoSink
Configures the given pipeline so that will be able to render the
video for the @sink. This should only be used if the application
wants to perform some custom rendering using its own pipeline.
Typically an application will call this in response to the
#ClutterGstVideoSink::pipeline-ready signal.
Note: it is considered an error to call this function before the
#ClutterGstVideoSink::pipeline-ready signal is emitted.
The #ClutterGstVideoSink
A #CoglPipeline
The sink will emit this signal whenever there are new textures
available for a new frame of the video. After this signal is
emitted, an application can call clutter_gst_video_sink_get_pipeline()
to get a pipeline suitable for rendering the frame. If the
application is using a custom pipeline it can alternatively call
clutter_gst_video_sink_attach_frame() to attach the textures.
The sink will emit this signal whenever there are new textures
available for set of overlays on the video. After this signal is
emitted, an application can call
clutter_gst_video_sink_get_overlays() to get a set of pipelines
suitable for rendering overlays on a video frame.
The sink will emit this signal as soon as it has gathered enough
information from the video to configure a pipeline. If the
application wants to do some customized rendering, it can setup its
pipeline after this signal is emitted. The application's pipeline
will typically either be a copy of the one returned by
clutter_gst_video_sink_get_pipeline() or it can be a completely custom
pipeline which is setup using clutter_gst_video_sink_setup_pipeline().
Note that it is an error to call either of those functions before
this signal is emitted. The #ClutterGstVideoSink::new-frame signal
will only be emitted after the pipeline is ready so the application
could also create its pipeline in the handler for that.
Creates a new #ClutterGstVideoSink initialized with Clutter's Cogl context.
the newly created #ClutterGstVideoSink.
Utility function to initialize both Clutter and GStreamer.
This function should be called before calling any other GLib functions. If
this is not an option, your program must initialise the GLib thread system
using g_thread_init() before any other GLib functions are called.
A #ClutterInitError.
The number of arguments in @argv
A pointer to an array
This function does the same work as clutter_gst_init(). Additionally, it
allows you to add your own command line options, and it automatically
generates nicely formatted --help output. Clutter's and GStreamer's
#GOptionGroup<!-- -->s are added to the set of available options.
Your program must initialise the GLib thread system using g_thread_init()
before any other GLib functions are called.
%CLUTTER_INIT_SUCCESS on success, a negative integer
on failure.
The number of arguments in @argv
A pointer to an array
a string which is displayed in
the first line of <option>--help</option> output, after
<literal><replaceable>programname</replaceable> [OPTION...]</literal>
a %NULL-terminated array of #GOptionEntry<!-- -->s
describing the options of your program
a translation domain to use for translating
the <option>--help</option> output for the options in @entries
with gettext(), or %NULL