gpg::VideoManager

#include <video_manager.h>

Gets and sets various video-related data.

Summary

Public types

CaptureCapabilitiesCallback typedef
std::function< void(const GetCaptureCapabilitiesResponse &)>
Defines a callback type that receives a GetCaptureCapabilitiesResponse.
CaptureStateCallback typedef
std::function< void(const GetCaptureStateResponse &)>
Defines a callback type that receives a GetCaptureStateResponse.
IsCaptureAvailableCallback typedef
std::function< void(const IsCaptureAvailableResponse &)>
Defines a callback type that receives a IsCaptureAvailableResponse.

Public functions

GetCaptureCapabilities(CaptureCapabilitiesCallback callback)
void
Asynchronously fetches the video capabilities of the service, whether the mic or front-facing camera are supported, if the service can write to external storage, and what capture modes and quality levels are available.
GetCaptureCapabilitiesBlocking()
Synchronously fetches the video capabilities of the service, whether the mic or front-facing camera are supported, if the service can write to external storage, and what capture modes and quality levels are available.
GetCaptureCapabilitiesBlocking(Timeout timeout)
Synchronously fetches the video capabilities of the service, whether the mic or front-facing camera are supported, if the service can write to external storage, and what capture modes and quality levels are available.
GetCaptureState(CaptureStateCallback callback)
void
Asynchronously fetches the current state of the capture service.
GetCaptureStateBlocking()
Synchronously fetches the current state of the capture service.
GetCaptureStateBlocking(Timeout timeout)
Synchronously fetches the current state of the capture service.
IsCaptureAvailable(VideoCaptureMode capture_mode, IsCaptureAvailableCallback callback)
void
Asynchronously fetches if the capture service is already in use or not.
IsCaptureAvailableBlocking(VideoCaptureMode capture_mode)
Synchronously fetches if the capture service is already in use or not.
IsCaptureAvailableBlocking(Timeout timeout, VideoCaptureMode capture_mode)
Synchronously fetches if the capture service is already in use or not.
IsCaptureSupported()
bool
Synchronous simple check to determine if the device supports capture.
RegisterCaptureOverlayStateChangedListener(ICaptureOverlayStateListener *listener)
void
Register a listener to listen for changes to the overlay state launched by ShowCaptureOverlay.
RegisterCaptureOverlayStateChangedListener(CaptureOverlayStateListenerHelper helper)
void
Register a listener to listen for changes to the overlay state launched by ShowCaptureOverlay.
ShowCaptureOverlay()
void
Launches the video capture overlay.
UnregisterCaptureOverlayStateChangedListener()
void
Unregisters this client's overlay state update listener, if any.

Structs

gpg::VideoManager::GetCaptureCapabilitiesResponse

Holds data for video capabilities, along with a response status.

gpg::VideoManager::GetCaptureStateResponse

Holds data for video capture state, along with a response status.

gpg::VideoManager::IsCaptureAvailableResponse

Holds whether or not a capture mode (specified in IsCaptureAvailable) is available, along with a response status.

Public types

CaptureCapabilitiesCallback

std::function< void(const GetCaptureCapabilitiesResponse &)> CaptureCapabilitiesCallback

Defines a callback type that receives a GetCaptureCapabilitiesResponse.

This callback type is provided to the GetCaptureCapabilities(*) functions below.

CaptureStateCallback

std::function< void(const GetCaptureStateResponse &)> CaptureStateCallback

Defines a callback type that receives a GetCaptureStateResponse.

This callback type is provided to the GetCaptureState(*) functions below.

IsCaptureAvailableCallback

std::function< void(const IsCaptureAvailableResponse &)> IsCaptureAvailableCallback

Defines a callback type that receives a IsCaptureAvailableResponse.

This callback type is provided to the IsCaptureAvailable(*) functions below.

Public functions

GetCaptureCapabilities

void GetCaptureCapabilities(
  CaptureCapabilitiesCallback callback
)

Asynchronously fetches the video capabilities of the service, whether the mic or front-facing camera are supported, if the service can write to external storage, and what capture modes and quality levels are available.

GetCaptureCapabilitiesBlocking

GetCaptureCapabilitiesResponse GetCaptureCapabilitiesBlocking()

Synchronously fetches the video capabilities of the service, whether the mic or front-facing camera are supported, if the service can write to external storage, and what capture modes and quality levels are available.

Timeout specified as 10 years by default.

GetCaptureCapabilitiesBlocking

GetCaptureCapabilitiesResponse GetCaptureCapabilitiesBlocking(
  Timeout timeout
)

Synchronously fetches the video capabilities of the service, whether the mic or front-facing camera are supported, if the service can write to external storage, and what capture modes and quality levels are available.

Specify timeout as an arbitrary number of milliseconds.

GetCaptureState

void GetCaptureState(
  CaptureStateCallback callback
)

Asynchronously fetches the current state of the capture service.

This will inform about whether the capture overlay is visible, if the overlay is actively being used to capture, and much more. See VideoCaptureState for more details.

GetCaptureStateBlocking

GetCaptureStateResponse GetCaptureStateBlocking()

Synchronously fetches the current state of the capture service.

This will inform about whether the capture overlay is visible, if the overlay is actively being used to capture, and much more. See VideoCaptureState for more details. Timeout specified as 10 years by default.

GetCaptureStateBlocking

GetCaptureStateResponse GetCaptureStateBlocking(
  Timeout timeout
)

Synchronously fetches the current state of the capture service.

This will inform about whether the capture overlay is visible, if the overlay is actively being used to capture, and much more. See VideoCaptureState for more details. Specify timeout as an arbitrary number of milliseconds.

IsCaptureAvailable

void IsCaptureAvailable(
  VideoCaptureMode capture_mode,
  IsCaptureAvailableCallback callback
)

Asynchronously fetches if the capture service is already in use or not.

Use this call to check if a start capture api call will return ResponseStatus::ERROR_VIDEO_ALREADY_CAPTURING. If this returns true, then its safe to start capturing.

Do not use this call to check if capture is supported, instead use IsCaptureSupported or GetCaptureCapabilities.

IsCaptureAvailableBlocking

IsCaptureAvailableResponse IsCaptureAvailableBlocking(
  VideoCaptureMode capture_mode
)

Synchronously fetches if the capture service is already in use or not.

Use this call to check if a start capture api call will return ResponseStatus::ERROR_VIDEO_ALREADY_CAPTURING. If this returns true, then its safe to start capturing. Timeout specified as 10 years by default.

Do not use this call to check if capture is supported, instead use IsCaptureSupported or GetCaptureCapabilities.

IsCaptureAvailableBlocking

IsCaptureAvailableResponse IsCaptureAvailableBlocking(
  Timeout timeout,
  VideoCaptureMode capture_mode
)

Synchronously fetches if the capture service is already in use or not.

Use this call to check if a start capture api call will return ResponseStatus::ERROR_VIDEO_ALREADY_CAPTURING. If this returns true, then its safe to start capturing. Specify timeout as an arbitrary number of milliseconds.

Do not use this call to check if capture is supported, instead use IsCaptureSupported or GetCaptureCapabilities.

IsCaptureSupported

bool IsCaptureSupported()

Synchronous simple check to determine if the device supports capture.

RegisterCaptureOverlayStateChangedListener

void RegisterCaptureOverlayStateChangedListener(
  ICaptureOverlayStateListener *listener
)

Register a listener to listen for changes to the overlay state launched by ShowCaptureOverlay.

Note that only one overlay state listener may be active at a time. Calling this method while another overlay state listener was previously registered will replace the original listener with the new one.

RegisterCaptureOverlayStateChangedListener

void RegisterCaptureOverlayStateChangedListener(
  CaptureOverlayStateListenerHelper helper
)

Register a listener to listen for changes to the overlay state launched by ShowCaptureOverlay.

Takes a CaptureOverlayStateListenerHelper to create the listener.

Note that only one overlay state listener may be active at a time. Calling this method while another overlay state listener was previously registered will replace the original listener with the new one.

ShowCaptureOverlay

void ShowCaptureOverlay()

Launches the video capture overlay.

UnregisterCaptureOverlayStateChangedListener

void UnregisterCaptureOverlayStateChangedListener()

Unregisters this client's overlay state update listener, if any.