Docs/clutter-camera

From Apertis
Jump to: navigation, search

Contents

ClutterGst Camera support

Spec

Develop a clutter-gst extension that can be used to display camera streams using Clutter and be able manipulate the data for image processing.

Requirements

The API should be on top of clutter-gst version we are using (1.6.0)

Features supported

The following features are supported by the API:

- getting list of supported camera devices
- get/set active camera device
- get/set color balance (saturation,hue,brightness,contrast)
- get/set gamma correction
- get/set custom filter for image processing
- get supported resolutions per device
- get/set capture resolution per device
- set photo/video profile (the profile to use to save data, using ogg/theora for video and jpeg for photos as default values)
- take picture (save to file or as pixbuf)
- record video to file
- methods to retrieve camerabin and pipeline elements for directly usage with GStreamer

... and a few other convenience methods for play/stop and alike

Source

The source can be found at http://cgit.collabora.com/git/user/andrunko/clutter-gst.git/tree/?h=camera-1.6.0

Example

The shipped example (clutter-gst/examples/camera-player.c) demonstrates the usage of all features listed above.

See QA/Test Cases/R2.6.1/clutter-camera-player for more details.

Architecture

The following new classes were added:

- ClutterGstActor - base actor for ClutterGst actors
- ClutterGstCameraActor - camera actor
- ClutterGstCameraDevice - represent a camera device
- ClutterGstVideoResolution - represent a video resolution (int width, height)
- ClutterGstVideoActor - video actor replacing ClutterGstVideoTexture but using ClutterGstActor instead, required as ClutterTexture is deprecated upstream (see issues below)
  Ps: can be removed from this version if appropriate, but it is an upstream requirement
- cluttersink2 - gstreamer plugin similar to cluttersink but expecting a ClutterGstActor instead of a ClutterTexture

Missing

Port to current clutter-gst upstream master, and address review comments.

Issues

- The code contains 2 workarounds to circumvent GStreamer bugs found during development:

 See https://bugzilla.gnome.org/show_bug.cgi?id=681562 and https://bugzilla.gnome.org/show_bug.cgi?id=681564 for details

- Parts of the code were already submitted for upstream review, but the camera specific code still requires camerabin to be ported to gstreamer 1.0 before submission.

 - See https://bugzilla.gnome.org/show_bug.cgi?id=682502

Notes

Note that as the changes here are on top of clutter-gst 1.6.0, once we start using a new clutter-gst version based on clutter-gst upstream/master some changes will be required, as follows:

 - ClutterGstPlayer should be used in favour of ClutterMedia
 - ClutterGstVideoActor should be used in favour of ClutterGstVideoTexture
Personal tools
Namespaces

Variants
Actions
Navigation
Tools