2009-02-06 10:06:23 +00:00
|
|
|
/* GStreamer
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
|
|
|
|
*
|
|
|
|
* photography.h: photography interface for digital imaging
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_PHOTOGRAPHY_H__
|
|
|
|
#define __GST_PHOTOGRAPHY_H__
|
|
|
|
|
2009-03-04 21:30:30 +00:00
|
|
|
#ifndef GST_USE_UNSTABLE_API
|
|
|
|
#warning "The GstPhotography interface is unstable API and may change in future."
|
|
|
|
#warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
|
|
|
|
#endif
|
|
|
|
|
2009-02-06 10:06:23 +00:00
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <gst/interfaces/photography-enumtypes.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GST_TYPE_PHOTOGRAPHY \
|
|
|
|
(gst_photography_get_type ())
|
|
|
|
#define GST_PHOTOGRAPHY(obj) \
|
2011-10-04 12:26:21 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PHOTOGRAPHY, GstPhotography))
|
2009-02-06 10:06:23 +00:00
|
|
|
#define GST_IS_PHOTOGRAPHY(obj) \
|
2011-10-04 12:26:21 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PHOTOGRAPHY))
|
2011-10-21 13:04:05 +00:00
|
|
|
#define GST_PHOTOGRAPHY_GET_INTERFACE(inst) \
|
2009-02-06 10:06:23 +00:00
|
|
|
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_PHOTOGRAPHY, GstPhotographyInterface))
|
|
|
|
|
|
|
|
|
2010-10-13 07:55:17 +00:00
|
|
|
/**
|
|
|
|
* GST_PHOTOGRAPHY_AUTOFOCUS_DONE:
|
|
|
|
*
|
|
|
|
* Name of custom GstMessage that will be posted to #GstBus when autofocusing
|
|
|
|
* is complete.
|
|
|
|
* This message contains following fields:
|
|
|
|
* <itemizedlist>
|
|
|
|
* <listitem>
|
|
|
|
* <para>
|
|
|
|
* #GstPhotographyFocusStatus
|
|
|
|
* <classname>"status"</classname>:
|
|
|
|
* Tells if focusing succeeded or failed.
|
|
|
|
* </para>
|
|
|
|
* </listitem>
|
|
|
|
* <listitem>
|
|
|
|
* <para>
|
|
|
|
* #G_TYPE_INT
|
|
|
|
* <classname>"focus-window-rows"</classname>:
|
|
|
|
* Tells number of focus matrix rows.
|
|
|
|
* </para>
|
|
|
|
* </listitem>
|
|
|
|
* <listitem>
|
|
|
|
* <para>
|
|
|
|
* #G_TYPE_INT
|
|
|
|
* <classname>"focus-window-columns"</classname>:
|
|
|
|
* Tells number of focus matrix columns.
|
|
|
|
* </para>
|
|
|
|
* </listitem>
|
|
|
|
* <listitem>
|
|
|
|
* <para>
|
|
|
|
* #G_TYPE_INT
|
|
|
|
* <classname>"focus-window-mask"</classname>:
|
|
|
|
* Bitmask containing rows x columns bits which mark the focus points in the
|
|
|
|
* focus matrix. Lowest bit (LSB) always represents the top-left corner of the
|
|
|
|
* focus matrix. This field is only valid when focusing status is SUCCESS.
|
|
|
|
* </para>
|
|
|
|
* </listitem>
|
|
|
|
* </itemizedlist>
|
|
|
|
*/
|
2009-02-06 10:06:23 +00:00
|
|
|
#define GST_PHOTOGRAPHY_AUTOFOCUS_DONE "autofocus-done"
|
|
|
|
|
2010-10-13 07:55:17 +00:00
|
|
|
/**
|
|
|
|
* GST_PHOTOGRAPHY_SHAKE_RISK:
|
|
|
|
*
|
|
|
|
* Name of custom GstMessage that is posted to #GstBus during autofocusing
|
|
|
|
* process. It is posted if there is change in the risk of captured image
|
|
|
|
* becoming "shaken" due to camera movement and too long exposure time.
|
|
|
|
*
|
|
|
|
* This message contains following fields:
|
|
|
|
* <itemizedlist>
|
|
|
|
* <listitem>
|
|
|
|
* <para>
|
|
|
|
* #GstPhotographyShakeRisk
|
|
|
|
* <classname>"status"</classname>:
|
|
|
|
* Tells risk level of capturing shaken image.
|
|
|
|
* </para>
|
|
|
|
* </listitem>
|
|
|
|
* </itemizedlist>
|
|
|
|
*/
|
2009-02-06 10:06:23 +00:00
|
|
|
#define GST_PHOTOGRAPHY_SHAKE_RISK "shake-risk"
|
|
|
|
|
2010-10-14 07:49:55 +00:00
|
|
|
/* Maximum white point values used in #GstPhotographySettings */
|
|
|
|
#define MAX_WHITE_POINT_VALUES 4
|
|
|
|
|
2009-11-27 12:38:04 +00:00
|
|
|
/* Interface property names */
|
|
|
|
#define GST_PHOTOGRAPHY_PROP_WB_MODE "white-balance-mode"
|
2010-10-08 08:33:31 +00:00
|
|
|
#define GST_PHOTOGRAPHY_PROP_COLOR_TONE "color-tone-mode"
|
2009-11-27 12:38:04 +00:00
|
|
|
#define GST_PHOTOGRAPHY_PROP_SCENE_MODE "scene-mode"
|
|
|
|
#define GST_PHOTOGRAPHY_PROP_FLASH_MODE "flash-mode"
|
2010-09-28 08:35:53 +00:00
|
|
|
#define GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION "noise-reduction"
|
2009-11-27 12:38:04 +00:00
|
|
|
#define GST_PHOTOGRAPHY_PROP_FOCUS_STATUS "focus-status"
|
|
|
|
#define GST_PHOTOGRAPHY_PROP_CAPABILITIES "capabilities"
|
|
|
|
#define GST_PHOTOGRAPHY_PROP_SHAKE_RISK "shake-risk"
|
|
|
|
#define GST_PHOTOGRAPHY_PROP_EV_COMP "ev-compensation"
|
|
|
|
#define GST_PHOTOGRAPHY_PROP_ISO_SPEED "iso-speed"
|
|
|
|
#define GST_PHOTOGRAPHY_PROP_APERTURE "aperture"
|
2010-10-14 07:49:55 +00:00
|
|
|
#define GST_PHOTOGRAPHY_PROP_EXPOSURE_TIME "exposure-time"
|
2009-09-21 14:47:20 +00:00
|
|
|
#define GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS \
|
|
|
|
"image-capture-supported-caps"
|
2010-04-29 10:24:18 +00:00
|
|
|
#define GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS \
|
|
|
|
"image-preview-supported-caps"
|
2010-01-26 13:18:24 +00:00
|
|
|
#define GST_PHOTOGRAPHY_PROP_FLICKER_MODE "flicker-mode"
|
|
|
|
#define GST_PHOTOGRAPHY_PROP_FOCUS_MODE "focus-mode"
|
2010-09-19 21:51:35 +00:00
|
|
|
#define GST_PHOTOGRAPHY_PROP_ZOOM "zoom"
|
2010-10-14 07:49:55 +00:00
|
|
|
#define GST_PHOTOGRAPHY_PROP_COLOR_TEMPERATURE "color-temperature"
|
|
|
|
#define GST_PHOTOGRAPHY_PROP_WHITE_POINT "white-point"
|
|
|
|
#define GST_PHOTOGRAPHY_PROP_ANALOG_GAIN "analog-gain"
|
|
|
|
#define GST_PHOTOGRAPHY_PROP_EXPOSURE_MODE "exposure-mode"
|
|
|
|
#define GST_PHOTOGRAPHY_PROP_LENS_FOCUS "lens-focus"
|
|
|
|
#define GST_PHOTOGRAPHY_PROP_MIN_EXPOSURE_TIME "min-exposure-time"
|
|
|
|
#define GST_PHOTOGRAPHY_PROP_MAX_EXPOSURE_TIME "max-exposure-time"
|
2009-11-27 12:38:04 +00:00
|
|
|
|
2009-02-06 10:06:23 +00:00
|
|
|
/**
|
|
|
|
* GstPhotography:
|
|
|
|
*
|
|
|
|
* Opaque #GstPhotography data structure.
|
|
|
|
*/
|
|
|
|
typedef struct _GstPhotography GstPhotography;
|
|
|
|
|
2010-09-28 08:35:53 +00:00
|
|
|
/**
|
|
|
|
* GstPhotographyNoiseReduction:
|
|
|
|
* @GST_PHOTOGRAPHY_NOISE_REDUCTION_BAYER: Adaptive noise reduction on Bayer
|
|
|
|
* format
|
|
|
|
* @GST_PHOTOGRAPHY_NOISE_REDUCTION_YCC: reduces the noise on Y and 2-chroma
|
|
|
|
* images.
|
|
|
|
* @GST_PHOTOGRAPHY_NOISE_REDUCTION_TEMPORAL: Multi-frame adaptive NR,
|
|
|
|
* provided for the video mode
|
2010-10-13 07:55:17 +00:00
|
|
|
* @GST_PHOTOGRAPHY_NOISE_REDUCTION_FIXED: Fixed Pattern Noise refers to noise
|
2010-09-28 08:35:53 +00:00
|
|
|
* that does not change between frames. The noise is removed from the sensor
|
|
|
|
* image, by subtracting a previously-captured black image in memory.
|
|
|
|
* @GST_PHOTOGRAPHY_NOISE_REDUCTION_EXTRA: Extra Noise Reduction. In the case
|
|
|
|
* of high-ISO capturing, some noise remains after YCC NR. XNR reduces this
|
|
|
|
* remaining noise.
|
|
|
|
*
|
|
|
|
* Noise Reduction features of a photography capture or filter element.
|
|
|
|
*
|
|
|
|
* Since: 0.10.21
|
|
|
|
*/
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GST_PHOTOGRAPHY_NOISE_REDUCTION_BAYER = ( 1<<0 ),
|
|
|
|
GST_PHOTOGRAPHY_NOISE_REDUCTION_YCC = ( 1<<1 ),
|
|
|
|
GST_PHOTOGRAPHY_NOISE_REDUCTION_TEMPORAL= ( 1<< 2),
|
|
|
|
GST_PHOTOGRAPHY_NOISE_REDUCTION_FIXED = (1 << 3),
|
|
|
|
GST_PHOTOGRAPHY_NOISE_REDUCTION_EXTRA = (1 << 4)
|
|
|
|
} GstPhotographyNoiseReduction;
|
|
|
|
|
2010-10-13 07:55:17 +00:00
|
|
|
/**
|
|
|
|
* GstPhotographyWhiteBalanceMode:
|
|
|
|
* @GST_PHOTOGRAPHY_WB_MODE_AUTO: Choose white balance mode automatically
|
|
|
|
* @GST_PHOTOGRAPHY_WB_MODE_DAYLIGHT: Mode for daylight conditions
|
|
|
|
* @GST_PHOTOGRAPHY_WB_MODE_CLOUDY: Mode for cloudy conditions
|
|
|
|
* @GST_PHOTOGRAPHY_WB_MODE_SUNSET: Mode for sunset conditions
|
|
|
|
* @GST_PHOTOGRAPHY_WB_MODE_TUNGSTEN: Mode for tungsten lighting
|
|
|
|
* @GST_PHOTOGRAPHY_WB_MODE_FLUORESCENT: Mode for fluorescent lighting
|
|
|
|
* @GST_PHOTOGRAPHY_WB_MODE_MANUAL: Disable automatic white balance adjustment
|
|
|
|
* and keep current values.
|
|
|
|
*
|
|
|
|
* Modes for white balance control.
|
|
|
|
*/
|
2009-02-06 10:06:23 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GST_PHOTOGRAPHY_WB_MODE_AUTO = 0,
|
|
|
|
GST_PHOTOGRAPHY_WB_MODE_DAYLIGHT,
|
|
|
|
GST_PHOTOGRAPHY_WB_MODE_CLOUDY,
|
|
|
|
GST_PHOTOGRAPHY_WB_MODE_SUNSET,
|
|
|
|
GST_PHOTOGRAPHY_WB_MODE_TUNGSTEN,
|
2010-10-14 07:49:55 +00:00
|
|
|
GST_PHOTOGRAPHY_WB_MODE_FLUORESCENT,
|
|
|
|
GST_PHOTOGRAPHY_WB_MODE_MANUAL
|
2010-10-08 08:33:31 +00:00
|
|
|
} GstPhotographyWhiteBalanceMode;
|
2009-02-06 10:06:23 +00:00
|
|
|
|
2010-10-13 07:55:17 +00:00
|
|
|
/**
|
|
|
|
* GstPhotographyColorToneMode:
|
|
|
|
* @GST_PHOTOGRAPHY_COLOR_TONE_MODE_NORMAL: No effects
|
|
|
|
* @GST_PHOTOGRAPHY_COLOR_TONE_MODE_SEPIA: Sepia
|
|
|
|
* @GST_PHOTOGRAPHY_COLOR_TONE_MODE_NEGATIVE: Negative
|
|
|
|
* @GST_PHOTOGRAPHY_COLOR_TONE_MODE_GRAYSCALE: Grayscale
|
|
|
|
* @GST_PHOTOGRAPHY_COLOR_TONE_MODE_NATURAL: Natural
|
|
|
|
* @GST_PHOTOGRAPHY_COLOR_TONE_MODE_VIVID: Vivid
|
|
|
|
* @GST_PHOTOGRAPHY_COLOR_TONE_MODE_COLORSWAP: Colorswap
|
|
|
|
* @GST_PHOTOGRAPHY_COLOR_TONE_MODE_SOLARIZE: Solarize
|
|
|
|
* @GST_PHOTOGRAPHY_COLOR_TONE_MODE_OUT_OF_FOCUS: Out of focus
|
|
|
|
* @GST_PHOTOGRAPHY_COLOR_TONE_MODE_SKY_BLUE: Sky blue
|
|
|
|
* @GST_PHOTOGRAPHY_COLOR_TONE_MODE_GRASS_GREEN: Grass green
|
|
|
|
* @GST_PHOTOGRAPHY_COLOR_TONE_MODE_SKIN_WHITEN: Skin whiten
|
|
|
|
*
|
|
|
|
* Modes for special color effects.
|
|
|
|
*/
|
2009-02-06 10:06:23 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
2010-10-08 08:33:31 +00:00
|
|
|
GST_PHOTOGRAPHY_COLOR_TONE_MODE_NORMAL = 0,
|
|
|
|
GST_PHOTOGRAPHY_COLOR_TONE_MODE_SEPIA,
|
|
|
|
GST_PHOTOGRAPHY_COLOR_TONE_MODE_NEGATIVE,
|
|
|
|
GST_PHOTOGRAPHY_COLOR_TONE_MODE_GRAYSCALE,
|
|
|
|
GST_PHOTOGRAPHY_COLOR_TONE_MODE_NATURAL,
|
|
|
|
GST_PHOTOGRAPHY_COLOR_TONE_MODE_VIVID,
|
|
|
|
GST_PHOTOGRAPHY_COLOR_TONE_MODE_COLORSWAP,
|
|
|
|
GST_PHOTOGRAPHY_COLOR_TONE_MODE_SOLARIZE,
|
|
|
|
GST_PHOTOGRAPHY_COLOR_TONE_MODE_OUT_OF_FOCUS,
|
|
|
|
GST_PHOTOGRAPHY_COLOR_TONE_MODE_SKY_BLUE,
|
|
|
|
GST_PHOTOGRAPHY_COLOR_TONE_MODE_GRASS_GREEN,
|
|
|
|
GST_PHOTOGRAPHY_COLOR_TONE_MODE_SKIN_WHITEN
|
|
|
|
} GstPhotographyColorToneMode;
|
2009-02-06 10:06:23 +00:00
|
|
|
|
2010-10-13 07:55:17 +00:00
|
|
|
/**
|
|
|
|
* GstPhotographySceneMode:
|
|
|
|
* @GST_PHOTOGRAPHY_SCENE_MODE_MANUAL: Set individual options manually
|
|
|
|
* @GST_PHOTOGRAPHY_SCENE_MODE_CLOSEUP: Mode for close objects
|
|
|
|
* @GST_PHOTOGRAPHY_SCENE_MODE_PORTRAIT: Mode for portraits
|
|
|
|
* @GST_PHOTOGRAPHY_SCENE_MODE_LANDSCAPE: Mode for landscapes
|
|
|
|
* @GST_PHOTOGRAPHY_SCENE_MODE_SPORT: Mode for scene with fast motion
|
|
|
|
* @GST_PHOTOGRAPHY_SCENE_MODE_NIGHT: Mode for night conditions
|
|
|
|
* @GST_PHOTOGRAPHY_SCENE_MODE_AUTO: Choose scene mode automatically
|
|
|
|
*
|
|
|
|
* Each mode contains preset #GstPhotography options in order to produce
|
|
|
|
* good capturing result in certain scene.
|
|
|
|
*/
|
2009-02-06 10:06:23 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GST_PHOTOGRAPHY_SCENE_MODE_MANUAL = 0,
|
|
|
|
GST_PHOTOGRAPHY_SCENE_MODE_CLOSEUP,
|
|
|
|
GST_PHOTOGRAPHY_SCENE_MODE_PORTRAIT,
|
|
|
|
GST_PHOTOGRAPHY_SCENE_MODE_LANDSCAPE,
|
|
|
|
GST_PHOTOGRAPHY_SCENE_MODE_SPORT,
|
|
|
|
GST_PHOTOGRAPHY_SCENE_MODE_NIGHT,
|
|
|
|
GST_PHOTOGRAPHY_SCENE_MODE_AUTO
|
2010-10-08 08:33:31 +00:00
|
|
|
} GstPhotographySceneMode;
|
2009-02-06 10:06:23 +00:00
|
|
|
|
2010-10-13 07:55:17 +00:00
|
|
|
/**
|
|
|
|
* GstPhotographyFlashMode:
|
|
|
|
* @GST_PHOTOGRAPHY_FLASH_MODE_AUTO: Fire flash automatically according to
|
|
|
|
* lighting conditions.
|
|
|
|
* @GST_PHOTOGRAPHY_FLASH_MODE_OFF: Never fire flash
|
|
|
|
* @GST_PHOTOGRAPHY_FLASH_MODE_ON: Always fire flash
|
|
|
|
* @GST_PHOTOGRAPHY_FLASH_MODE_FILL_IN: Fill in flash
|
|
|
|
* @GST_PHOTOGRAPHY_FLASH_MODE_RED_EYE: Flash mode for reducing chance of
|
|
|
|
* capturing red eyes
|
|
|
|
*
|
|
|
|
* Modes for flash control.
|
|
|
|
*/
|
2009-02-06 10:06:23 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GST_PHOTOGRAPHY_FLASH_MODE_AUTO = 0,
|
|
|
|
GST_PHOTOGRAPHY_FLASH_MODE_OFF,
|
|
|
|
GST_PHOTOGRAPHY_FLASH_MODE_ON,
|
|
|
|
GST_PHOTOGRAPHY_FLASH_MODE_FILL_IN,
|
|
|
|
GST_PHOTOGRAPHY_FLASH_MODE_RED_EYE
|
2010-10-08 08:33:31 +00:00
|
|
|
} GstPhotographyFlashMode;
|
2009-02-06 10:06:23 +00:00
|
|
|
|
2010-10-13 07:55:17 +00:00
|
|
|
/**
|
|
|
|
* GstPhotographyFocusStatus:
|
|
|
|
* @GST_PHOTOGRAPHY_FOCUS_STATUS_NONE: No status available
|
|
|
|
* @GST_PHOTOGRAPHY_FOCUS_STATUS_RUNNING: Focusing is ongoing
|
|
|
|
* @GST_PHOTOGRAPHY_FOCUS_STATUS_FAIL: Focusing failed
|
|
|
|
* @GST_PHOTOGRAPHY_FOCUS_STATUS_SUCCESS: Focusing succeeded
|
|
|
|
*
|
|
|
|
* Status of the focusing operation, used in #GST_PHOTOGRAPHY_AUTOFOCUS_DONE
|
|
|
|
* message.
|
|
|
|
*/
|
2009-02-06 10:06:23 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GST_PHOTOGRAPHY_FOCUS_STATUS_NONE = 0,
|
|
|
|
GST_PHOTOGRAPHY_FOCUS_STATUS_RUNNING,
|
|
|
|
GST_PHOTOGRAPHY_FOCUS_STATUS_FAIL,
|
|
|
|
GST_PHOTOGRAPHY_FOCUS_STATUS_SUCCESS
|
2010-10-08 08:33:31 +00:00
|
|
|
} GstPhotographyFocusStatus;
|
2009-02-06 10:06:23 +00:00
|
|
|
|
2010-10-13 07:55:17 +00:00
|
|
|
/**
|
|
|
|
* GstPhotographyCaps:
|
|
|
|
*
|
|
|
|
* Bitmask that indicates which #GstPhotography interface features an instance
|
|
|
|
* supports.
|
|
|
|
*/
|
2009-02-06 10:06:23 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GST_PHOTOGRAPHY_CAPS_NONE = (0 << 0),
|
|
|
|
GST_PHOTOGRAPHY_CAPS_EV_COMP = (1 << 0),
|
|
|
|
GST_PHOTOGRAPHY_CAPS_ISO_SPEED = (1 << 1),
|
|
|
|
GST_PHOTOGRAPHY_CAPS_WB_MODE = (1 << 2),
|
|
|
|
GST_PHOTOGRAPHY_CAPS_TONE = (1 << 3),
|
|
|
|
GST_PHOTOGRAPHY_CAPS_SCENE = (1 << 4),
|
|
|
|
GST_PHOTOGRAPHY_CAPS_FLASH = (1 << 5),
|
|
|
|
GST_PHOTOGRAPHY_CAPS_ZOOM = (1 << 6),
|
|
|
|
GST_PHOTOGRAPHY_CAPS_FOCUS = (1 << 7),
|
|
|
|
GST_PHOTOGRAPHY_CAPS_APERTURE = (1 << 8),
|
|
|
|
GST_PHOTOGRAPHY_CAPS_EXPOSURE = (1 << 9),
|
2010-12-20 09:14:49 +00:00
|
|
|
GST_PHOTOGRAPHY_CAPS_SHAKE = (1 << 10),
|
2010-10-14 07:49:55 +00:00
|
|
|
GST_PHOTOGRAPHY_CAPS_WHITE_BALANCE = (1 << 11),
|
|
|
|
GST_PHOTOGRAPHY_CAPS_NOISE_REDUCTION = (1 << 12),
|
|
|
|
GST_PHOTOGRAPHY_CAPS_FLICKER_REDUCTION = (1 << 13),
|
2011-07-21 05:58:27 +00:00
|
|
|
GST_PHOTOGRAPHY_CAPS_ALL = (~0)
|
2010-10-08 08:33:31 +00:00
|
|
|
} GstPhotographyCaps;
|
2009-02-06 10:06:23 +00:00
|
|
|
|
2010-10-13 07:55:17 +00:00
|
|
|
/**
|
|
|
|
* GstPhotographyShakeRisk:
|
|
|
|
* @GST_PHOTOGRAPHY_SHAKE_RISK_LOW: Low risk
|
|
|
|
* @GST_PHOTOGRAPHY_SHAKE_RISK_MEDIUM: Medium risk
|
|
|
|
* @GST_PHOTOGRAPHY_SHAKE_RISK_HIGH: High risk
|
|
|
|
*
|
|
|
|
* Risk level of captured image becoming "shaken" due to camera movement and
|
|
|
|
* too long exposure time. Used in #GST_PHOTOGRAPHY_SHAKE_RISK #GstMessage.
|
|
|
|
*/
|
2009-02-06 10:06:23 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GST_PHOTOGRAPHY_SHAKE_RISK_LOW = 0,
|
|
|
|
GST_PHOTOGRAPHY_SHAKE_RISK_MEDIUM,
|
|
|
|
GST_PHOTOGRAPHY_SHAKE_RISK_HIGH,
|
2010-10-08 08:33:31 +00:00
|
|
|
} GstPhotographyShakeRisk;
|
2009-02-06 10:06:23 +00:00
|
|
|
|
2010-10-13 07:55:17 +00:00
|
|
|
/**
|
|
|
|
* GstPhotographyFlickerReductionMode:
|
|
|
|
* @GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF: Disable flicker reduction
|
|
|
|
* @GST_PHOTOGRAPHY_FLICKER_REDUCTION_50HZ: 50Hz flicker reduction
|
|
|
|
* @GST_PHOTOGRAPHY_FLICKER_REDUCTION_60HZ: 60Hz flicker reduction
|
|
|
|
* @GST_PHOTOGRAPHY_FLICKER_REDUCTION_AUTO: Choose mode automatically
|
|
|
|
*
|
|
|
|
* Reduce flicker in video caused by light source fluctuation.
|
|
|
|
*/
|
2010-01-26 13:18:24 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF = 0,
|
|
|
|
GST_PHOTOGRAPHY_FLICKER_REDUCTION_50HZ,
|
|
|
|
GST_PHOTOGRAPHY_FLICKER_REDUCTION_60HZ,
|
|
|
|
GST_PHOTOGRAPHY_FLICKER_REDUCTION_AUTO,
|
2010-10-08 08:33:31 +00:00
|
|
|
} GstPhotographyFlickerReductionMode;
|
2010-01-26 13:18:24 +00:00
|
|
|
|
2010-10-13 07:55:17 +00:00
|
|
|
/**
|
|
|
|
* GstPhotographyFocusMode:
|
|
|
|
* @GST_PHOTOGRAPHY_FOCUS_MODE_AUTO: Choose focus mode automatically
|
|
|
|
* @GST_PHOTOGRAPHY_FOCUS_MODE_MACRO: Mode for focusing objects close to lens
|
|
|
|
* @GST_PHOTOGRAPHY_FOCUS_MODE_PORTRAIT: Mode for portraits
|
|
|
|
* @GST_PHOTOGRAPHY_FOCUS_MODE_INFINITY: Mode for landscapes and far away objects
|
|
|
|
* @GST_PHOTOGRAPHY_FOCUS_MODE_HYPERFOCAL: Mode for maximum depth of field, keeping
|
|
|
|
* focus acceptable both in infinify and as close objects as possible
|
|
|
|
* @GST_PHOTOGRAPHY_FOCUS_MODE_EXTENDED: Extended focus mode
|
|
|
|
* @GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_NORMAL: Continuous autofocus mode
|
|
|
|
* @GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_EXTENDED: Extended continuous
|
|
|
|
* autofocus mode
|
|
|
|
* @GST_PHOTOGRAPHY_FOCUS_MODE_MANUAL: Disable automatic focusing
|
|
|
|
* and keep current value. #GstPhotography:lens-focus property can
|
|
|
|
* be used to change focus manually.
|
|
|
|
*
|
|
|
|
* Choose mode for focusing algorithm.
|
|
|
|
*/
|
2010-01-26 13:18:24 +00:00
|
|
|
typedef enum {
|
|
|
|
GST_PHOTOGRAPHY_FOCUS_MODE_AUTO = 0,
|
|
|
|
GST_PHOTOGRAPHY_FOCUS_MODE_MACRO,
|
|
|
|
GST_PHOTOGRAPHY_FOCUS_MODE_PORTRAIT,
|
|
|
|
GST_PHOTOGRAPHY_FOCUS_MODE_INFINITY,
|
|
|
|
GST_PHOTOGRAPHY_FOCUS_MODE_HYPERFOCAL,
|
|
|
|
GST_PHOTOGRAPHY_FOCUS_MODE_EXTENDED,
|
|
|
|
GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_NORMAL,
|
|
|
|
GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_EXTENDED,
|
2010-10-14 07:49:55 +00:00
|
|
|
GST_PHOTOGRAPHY_FOCUS_MODE_MANUAL
|
2010-10-08 08:33:31 +00:00
|
|
|
} GstPhotographyFocusMode;
|
2010-01-26 13:18:24 +00:00
|
|
|
|
2010-10-13 07:55:17 +00:00
|
|
|
/**
|
|
|
|
* GstPhotographyExposureMode:
|
|
|
|
* @GST_PHOTOGRAPHY_EXPOSURE_MODE_AUTO: Adjust exposure automatically
|
|
|
|
* @GST_PHOTOGRAPHY_EXPOSURE_MODE_MANUAL: Disable automatic exposure adjustment
|
|
|
|
* and keep current values.
|
|
|
|
*
|
|
|
|
*/
|
2010-10-14 07:49:55 +00:00
|
|
|
typedef enum {
|
|
|
|
GST_PHOTOGRAPHY_EXPOSURE_MODE_AUTO = 0,
|
|
|
|
GST_PHOTOGRAPHY_EXPOSURE_MODE_MANUAL
|
|
|
|
} GstPhotographyExposureMode;
|
|
|
|
|
2010-10-13 07:55:17 +00:00
|
|
|
/**
|
|
|
|
* GstPhotographySettings:
|
|
|
|
*
|
|
|
|
* Structure containing all #GstPhotography settings, used to set all
|
|
|
|
* settings in one call with @gst_photography_set_config().
|
|
|
|
*/
|
2009-02-06 10:06:23 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyWhiteBalanceMode wb_mode;
|
|
|
|
GstPhotographyColorToneMode tone_mode;
|
|
|
|
GstPhotographySceneMode scene_mode;
|
|
|
|
GstPhotographyFlashMode flash_mode;
|
2010-10-14 07:49:55 +00:00
|
|
|
guint32 exposure_time;
|
2009-02-06 10:06:23 +00:00
|
|
|
guint aperture;
|
|
|
|
gfloat ev_compensation;
|
|
|
|
guint iso_speed;
|
|
|
|
gfloat zoom;
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyFlickerReductionMode flicker_mode;
|
|
|
|
GstPhotographyFocusMode focus_mode;
|
2011-02-10 02:35:18 +00:00
|
|
|
GstPhotographyNoiseReduction noise_reduction;
|
2010-10-14 07:49:55 +00:00
|
|
|
GstPhotographyExposureMode exposure_mode;
|
|
|
|
guint color_temperature;
|
|
|
|
guint white_point[MAX_WHITE_POINT_VALUES];
|
|
|
|
gfloat analog_gain;
|
|
|
|
gfloat lens_focus;
|
|
|
|
guint min_exposure_time;
|
|
|
|
guint max_exposure_time;
|
2010-10-08 08:33:31 +00:00
|
|
|
} GstPhotographySettings;
|
2009-02-06 10:06:23 +00:00
|
|
|
|
|
|
|
/**
|
2010-10-08 08:33:31 +00:00
|
|
|
* GstPhotographyCapturePrepared:
|
2009-02-06 10:06:23 +00:00
|
|
|
* @data: user data that has been given, when registering the callback
|
2009-02-20 10:03:03 +00:00
|
|
|
* @configured_caps: #GstCaps defining the configured capture format.
|
|
|
|
* Ownership of these caps stays in the element.
|
2009-02-06 10:06:23 +00:00
|
|
|
*
|
|
|
|
* This callback will be called when the element has finished preparations
|
2010-10-13 07:55:17 +00:00
|
|
|
* and is ready for image capture. The next buffer that element produces
|
|
|
|
* will be of @configured_caps format, so this callback allows the application
|
|
|
|
* to e.g. reconfigure capsfilters in pipeline if any.
|
2009-02-06 10:06:23 +00:00
|
|
|
*/
|
2010-10-08 08:33:31 +00:00
|
|
|
typedef void (*GstPhotographyCapturePrepared) (gpointer data,
|
2009-02-20 10:03:03 +00:00
|
|
|
const GstCaps *configured_caps);
|
2009-02-06 10:06:23 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstPhotographyInterface:
|
|
|
|
* @parent: parent interface type.
|
|
|
|
* @get_ev_compensation: vmethod to get ev exposure compensation value
|
|
|
|
* @get_iso_speed: vmethod to get iso speed (light sensitivity) value
|
|
|
|
* @get_aperture: vmethod to get aperture value
|
|
|
|
* @get_exposure: vmethod to get exposure time value
|
|
|
|
* @get_white_balance_mode: vmethod to get white balance mode value
|
2010-10-08 08:33:31 +00:00
|
|
|
* @get_color_tone_mode: vmethod to get color tone mode value
|
2009-02-06 10:06:23 +00:00
|
|
|
* @get_scene_mode: vmethod to get scene mode value
|
|
|
|
* @get_flash_mode: vmethod to get flash mode value
|
2010-09-28 08:35:53 +00:00
|
|
|
* @get_noise_reduction: vmethod to get noise reduction mode value
|
2009-02-06 10:06:23 +00:00
|
|
|
* @get_zoom: vmethod to get zoom factor value
|
|
|
|
* @set_ev_compensation: vmethod to set ev exposure compensation value
|
|
|
|
* @set_iso_speed: vmethod to set iso speed (light sensitivity) value
|
|
|
|
* @set_aperture: vmethod to set aperture value
|
|
|
|
* @set_exposure: vmethod to set exposure time value
|
|
|
|
* @set_white_balance_mode: vmethod to set white balance mode value
|
2010-10-08 08:33:31 +00:00
|
|
|
* @set_color_tone_mode: vmethod to set color tone mode value
|
2009-02-06 10:06:23 +00:00
|
|
|
* @set_scene_mode: vmethod to set scene mode value
|
|
|
|
* @set_flash_mode: vmethod to set flash mode value
|
2010-09-28 08:35:53 +00:00
|
|
|
* @set_noise_reduction: vmethod to set noise reduction mode value
|
2009-02-06 10:06:23 +00:00
|
|
|
* @set_zoom: vmethod to set zoom factor value
|
|
|
|
* @get_capabilities: vmethod to get supported capabilities of the interface
|
|
|
|
* @prepare_for_capture: vmethod to tell the element to prepare for capturing
|
|
|
|
* @set_autofocus: vmethod to set autofocus on/off
|
2009-04-20 14:05:49 +00:00
|
|
|
* @set_config: vmethod to set all configuration parameters at once
|
|
|
|
* @get_config: vmethod to get all configuration parameters at once
|
2009-09-21 14:47:20 +00:00
|
|
|
* @get_image_capture_supported_caps: vmethod to get caps describing supported image capture formats
|
2009-02-06 10:06:23 +00:00
|
|
|
*
|
|
|
|
* #GstPhotographyInterface interface.
|
|
|
|
*/
|
|
|
|
typedef struct _GstPhotographyInterface
|
|
|
|
{
|
|
|
|
GTypeInterface parent;
|
|
|
|
|
|
|
|
/* virtual functions */
|
2010-10-14 20:03:19 +00:00
|
|
|
gboolean (*get_ev_compensation) (GstPhotography * photo, gfloat * ev_comp);
|
|
|
|
gboolean (*get_iso_speed) (GstPhotography * photo, guint * iso_speed);
|
|
|
|
gboolean (*get_aperture) (GstPhotography * photo, guint * aperture);
|
|
|
|
gboolean (*get_exposure) (GstPhotography * photo, guint32 * exposure);
|
|
|
|
gboolean (*get_white_balance_mode) (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyWhiteBalanceMode * wb_mode);
|
|
|
|
gboolean (*get_color_tone_mode) (GstPhotography * photo,
|
|
|
|
GstPhotographyColorToneMode * tone_mode);
|
2010-10-14 20:03:19 +00:00
|
|
|
gboolean (*get_scene_mode) (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographySceneMode * scene_mode);
|
2010-10-14 20:03:19 +00:00
|
|
|
gboolean (*get_flash_mode) (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyFlashMode * flash_mode);
|
2010-10-14 20:03:19 +00:00
|
|
|
gboolean (*get_zoom) (GstPhotography * photo, gfloat * zoom);
|
2010-10-08 08:33:31 +00:00
|
|
|
gboolean (*get_flicker_mode) (GstPhotography * photo,
|
|
|
|
GstPhotographyFlickerReductionMode * flicker_mode);
|
2010-10-14 20:03:19 +00:00
|
|
|
gboolean (*get_focus_mode) (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyFocusMode * focus_mode);
|
2009-02-06 10:06:23 +00:00
|
|
|
|
2010-10-14 20:03:19 +00:00
|
|
|
gboolean (*set_ev_compensation) (GstPhotography * photo, gfloat ev_comp);
|
|
|
|
gboolean (*set_iso_speed) (GstPhotography * photo, guint iso_speed);
|
|
|
|
gboolean (*set_aperture) (GstPhotography * photo, guint aperture);
|
|
|
|
gboolean (*set_exposure) (GstPhotography * photo, guint32 exposure);
|
|
|
|
gboolean (*set_white_balance_mode) (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyWhiteBalanceMode wb_mode);
|
|
|
|
gboolean (*set_color_tone_mode) (GstPhotography * photo,
|
|
|
|
GstPhotographyColorToneMode tone_mode);
|
2010-10-14 20:03:19 +00:00
|
|
|
gboolean (*set_scene_mode) (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographySceneMode scene_mode);
|
2010-10-14 20:03:19 +00:00
|
|
|
gboolean (*set_flash_mode) (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyFlashMode flash_mode);
|
2010-10-14 20:03:19 +00:00
|
|
|
gboolean (*set_zoom) (GstPhotography * photo, gfloat zoom);
|
|
|
|
gboolean (*set_flicker_mode) (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyFlickerReductionMode flicker_mode);
|
2010-10-14 20:03:19 +00:00
|
|
|
gboolean (*set_focus_mode) (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyFocusMode focus_mode);
|
2009-02-06 10:06:23 +00:00
|
|
|
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyCaps (*get_capabilities) (GstPhotography * photo);
|
2010-10-14 20:03:19 +00:00
|
|
|
gboolean (*prepare_for_capture) (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyCapturePrepared func, GstCaps *capture_caps, gpointer user_data);
|
2009-02-06 10:06:23 +00:00
|
|
|
void (*set_autofocus) (GstPhotography * photo, gboolean on);
|
2010-10-08 08:33:31 +00:00
|
|
|
gboolean (*set_config) (GstPhotography * photo, GstPhotographySettings * config);
|
|
|
|
gboolean (*get_config) (GstPhotography * photo, GstPhotographySettings * config);
|
2009-02-06 10:06:23 +00:00
|
|
|
|
2010-10-14 16:41:00 +00:00
|
|
|
gboolean (*get_noise_reduction) (GstPhotography * photo,
|
2010-10-14 20:04:15 +00:00
|
|
|
GstPhotographyNoiseReduction * noise_reduction);
|
2010-10-14 16:41:00 +00:00
|
|
|
gboolean (*set_noise_reduction) (GstPhotography * photo,
|
2010-10-14 20:04:15 +00:00
|
|
|
GstPhotographyNoiseReduction noise_reduction);
|
2010-10-14 16:41:00 +00:00
|
|
|
|
2009-02-06 10:06:23 +00:00
|
|
|
/*< private > */
|
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
|
|
|
} GstPhotographyInterface;
|
|
|
|
|
|
|
|
GType gst_photography_get_type (void);
|
|
|
|
|
|
|
|
/* virtual class function wrappers */
|
|
|
|
gboolean gst_photography_get_ev_compensation (GstPhotography * photo,
|
|
|
|
gfloat * ev_comp);
|
|
|
|
gboolean gst_photography_get_iso_speed (GstPhotography * photo,
|
|
|
|
guint * iso_speed);
|
|
|
|
gboolean gst_photography_get_aperture (GstPhotography * photo,
|
|
|
|
guint * aperture);
|
|
|
|
gboolean gst_photography_get_exposure (GstPhotography * photo,
|
|
|
|
guint32 * exposure);
|
|
|
|
gboolean gst_photography_get_white_balance_mode (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyWhiteBalanceMode * wb_mode);
|
|
|
|
gboolean gst_photography_get_color_tone_mode (GstPhotography * photo,
|
|
|
|
GstPhotographyColorToneMode * tone_mode);
|
2009-02-06 10:06:23 +00:00
|
|
|
gboolean gst_photography_get_scene_mode (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographySceneMode * scene_mode);
|
2009-02-06 10:06:23 +00:00
|
|
|
gboolean gst_photography_get_flash_mode (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyFlashMode * flash_mode);
|
2010-09-28 08:35:53 +00:00
|
|
|
gboolean gst_photography_get_noise_reduction (GstPhotography * photo,
|
2011-02-10 02:35:18 +00:00
|
|
|
GstPhotographyNoiseReduction * noise_reduction);
|
2009-02-06 10:06:23 +00:00
|
|
|
gboolean gst_photography_get_zoom (GstPhotography * photo, gfloat * zoom);
|
2010-01-26 13:18:24 +00:00
|
|
|
gboolean gst_photography_get_flicker_mode (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyFlickerReductionMode *mode);
|
2010-01-26 13:18:24 +00:00
|
|
|
gboolean gst_photography_get_focus_mode (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyFocusMode *mode);
|
2009-02-06 10:06:23 +00:00
|
|
|
|
|
|
|
gboolean gst_photography_set_ev_compensation (GstPhotography * photo,
|
|
|
|
gfloat ev_comp);
|
|
|
|
gboolean gst_photography_set_iso_speed (GstPhotography * photo,
|
|
|
|
guint iso_speed);
|
|
|
|
gboolean gst_photography_set_aperture (GstPhotography * photo, guint aperture);
|
|
|
|
gboolean gst_photography_set_exposure (GstPhotography * photo, guint exposure);
|
|
|
|
gboolean gst_photography_set_white_balance_mode (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyWhiteBalanceMode wb_mode);
|
|
|
|
gboolean gst_photography_set_color_tone_mode (GstPhotography * photo,
|
|
|
|
GstPhotographyColorToneMode tone_mode);
|
2009-02-06 10:06:23 +00:00
|
|
|
gboolean gst_photography_set_scene_mode (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographySceneMode scene_mode);
|
2009-02-06 10:06:23 +00:00
|
|
|
gboolean gst_photography_set_flash_mode (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyFlashMode flash_mode);
|
2010-09-28 08:35:53 +00:00
|
|
|
gboolean gst_photography_set_noise_reduction (GstPhotography * photo,
|
2011-02-10 02:35:18 +00:00
|
|
|
GstPhotographyNoiseReduction noise_reduction);
|
2009-02-06 10:06:23 +00:00
|
|
|
gboolean gst_photography_set_zoom (GstPhotography * photo, gfloat zoom);
|
2010-01-26 13:18:24 +00:00
|
|
|
gboolean gst_photography_set_flicker_mode (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyFlickerReductionMode mode);
|
2010-01-26 13:18:24 +00:00
|
|
|
gboolean gst_photography_set_focus_mode (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyFocusMode mode);
|
2009-02-06 10:06:23 +00:00
|
|
|
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyCaps gst_photography_get_capabilities (GstPhotography * photo);
|
2009-02-06 10:06:23 +00:00
|
|
|
|
2009-02-20 10:03:03 +00:00
|
|
|
gboolean gst_photography_prepare_for_capture (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographyCapturePrepared func, GstCaps *capture_caps, gpointer user_data);
|
2009-02-06 10:06:23 +00:00
|
|
|
|
|
|
|
void gst_photography_set_autofocus (GstPhotography * photo, gboolean on);
|
|
|
|
|
2009-04-20 14:05:49 +00:00
|
|
|
gboolean gst_photography_set_config (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographySettings * config);
|
2009-04-20 14:05:49 +00:00
|
|
|
gboolean gst_photography_get_config (GstPhotography * photo,
|
2010-10-08 08:33:31 +00:00
|
|
|
GstPhotographySettings * config);
|
2009-04-20 14:05:49 +00:00
|
|
|
|
2009-02-06 10:06:23 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_PHOTOGRAPHY_H__ */
|