class P1::CameraSdk::ILiveViewSubscription

Overview

Subscribe / unsubscribe to a LiveView stream of images. More…

#include <C_P1CameraCommonSubscriptions.h>

class ILiveViewSubscription: public P1::CameraSdk::ISubscription
{
public:
    // typedefs

    typedef std::vector<ImageFormat> SupportedFormats;

    // methods

    virtual EXPORT_API SupportedFormats ImageFormatsSupported() const = 0;
    virtual EXPORT_API void Subscribe(ImageFormat format) = 0;
    virtual void Subscribe() = 0;
    virtual EXPORT_API ImageFormat Format() const = 0;
    virtual EXPORT_API ValueRect Crop() const = 0;
    virtual EXPORT_API uint32_t PreferredMaxDimension() const = 0;
    virtual EXPORT_API ValueArea FullImageSize() const = 0;
    virtual EXPORT_API float Lightness() const = 0;
    virtual EXPORT_API void SetFormat(ImageFormat format) = 0;
    virtual EXPORT_API void SetCrop(ValueRect const& cropRect) = 0;
    virtual EXPORT_API void ResetCrop() = 0;
    virtual EXPORT_API void SetPreferredMaxDimension(uint32_t const maxDimensionValue) = 0;
    virtual EXPORT_API void SetWhiteBalancePoint(ValuePoint const& whitePoint) = 0;
    virtual EXPORT_API void SetLightness(float const lightness) = 0;
    virtual EXPORT_API std::string ToString() const = 0;
};

Inherited Members

public:
    // methods

    virtual bool IsSupported() const = 0;
    virtual bool IsSubscribed() const = 0;
    virtual void Subscribe() = 0;
    virtual void Unsubscribe() = 0;

Detailed Documentation

Subscribe / unsubscribe to a LiveView stream of images.

Subscribing to this tells the camera that we would like a video stream of images from the camera. Also using this class interface, LiveView subscriptions can be configured for format and size.

Subscribing to this subscription will activate LiveView the camera, and stream image frames to your host, as long as the subscription is active.

Version 3.0

See also:

ISubscriptionManager

Methods

virtual EXPORT_API SupportedFormats ImageFormatsSupported() const = 0

Get supported formats that can be set with SetFormat()

virtual EXPORT_API void Subscribe(ImageFormat format) = 0

Subscribe to live view

virtual void Subscribe() = 0

Subscribe to previews using the format defined by Format.

See ImageFormatsSupported for supported formats for the camera

virtual EXPORT_API ImageFormat Format() const = 0

Get the current bitmap format setting of LiveView.

virtual EXPORT_API ValueRect Crop() const = 0

Get the current crop applied to the LiveView.

virtual EXPORT_API uint32_t PreferredMaxDimension() const = 0

Get the current desired max output dimension of the LiveView.

virtual EXPORT_API ValueArea FullImageSize() const = 0

Helper method to reset a current crop, back to “no crop”.

If you “zoomed” in the LiveView by setting the crop, use this method to get the original width and height of the full image.

virtual EXPORT_API float Lightness() const = 0

An abstract value for exposure compensation.

This values maps to the exposure compensation, but does not use the same EV values. Instead it uses an opaque float point value.

Returns:

float The current lightness

virtual EXPORT_API void SetFormat(ImageFormat format) = 0

Set the LiveView image’s bitmap format. Some formats might not be supported for older camera firmware versions. To check that the value has been set correctly, poll with ImageFormatsSupported().

virtual EXPORT_API void SetWhiteBalancePoint(ValuePoint const& whitePoint) = 0

Set the Custom C1 white balance, by the sampling a position in full image coordinates.

Cameras like IQ4 defines a set of white balance settings. The defaults are Daylight, Tungsten, etc. Besides the default settings, there are used definable ones. One of these are Custom C1.

This method changes the cameras white balance property to Custom C1 setting. And the white balance vector for Custom C1 is changed to reflect the sample position provided by this method. This means the cameras white balance setting is changed!

Use the white balance property, to change white balance back to Auto or Daylight, etc.

virtual EXPORT_API void SetLightness(float const lightness) = 0

Set a exposure compensation -like value applied to the live view.