RealtimeMediaSourceSupportedConstraints.h [plain text]
#ifndef RealtimeMediaSourceSupportedConstraints_h
#define RealtimeMediaSourceSupportedConstraints_h
#if ENABLE(MEDIA_STREAM)
#include <wtf/text/WTFString.h>
namespace WebCore {
enum class MediaConstraintType {
Unknown,
Width,
Height,
AspectRatio,
FrameRate,
FacingMode,
Volume,
SampleRate,
SampleSize,
EchoCancellation,
DeviceId,
GroupId
};
class RealtimeMediaSourceSupportedConstraints {
public:
RealtimeMediaSourceSupportedConstraints()
{
}
bool supportsWidth() const { return m_supportsWidth; }
void setSupportsWidth(bool value) { m_supportsWidth = value; }
bool supportsHeight() const { return m_supportsHeight; }
void setSupportsHeight(bool value) { m_supportsHeight = value; }
bool supportsAspectRatio() const { return m_supportsAspectRatio; }
void setSupportsAspectRatio(bool value) { m_supportsAspectRatio = value; }
bool supportsFrameRate() const { return m_supportsFrameRate; }
void setSupportsFrameRate(bool value) { m_supportsFrameRate = value; }
bool supportsFacingMode() const { return m_supportsFacingMode; }
void setSupportsFacingMode(bool value) { m_supportsFacingMode = value; }
bool supportsVolume() const { return m_supportsVolume; }
void setSupportsVolume(bool value) { m_supportsVolume = value; }
bool supportsSampleRate() const { return m_supportsSampleRate; }
void setSupportsSampleRate(bool value) { m_supportsSampleRate = value; }
bool supportsSampleSize() const { return m_supportsSampleSize; }
void setSupportsSampleSize(bool value) { m_supportsSampleSize = value; }
bool supportsEchoCancellation() const { return m_supportsEchoCancellation; }
void setSupportsEchoCancellation(bool value) { m_supportsEchoCancellation = value; }
bool supportsDeviceId() const { return m_supportsDeviceId; }
void setSupportsDeviceId(bool value) { m_supportsDeviceId = value; }
bool supportsGroupId() const { return m_supportsGroupId; }
void setSupportsGroupId(bool value) { m_supportsGroupId = value; }
bool supportsConstraint(MediaConstraintType) const;
static const AtomicString& nameForConstraint(MediaConstraintType);
static MediaConstraintType constraintFromName(const String&);
private:
bool m_supportsWidth { false };
bool m_supportsHeight { false };
bool m_supportsAspectRatio { false };
bool m_supportsFrameRate { false };
bool m_supportsFacingMode { false };
bool m_supportsVolume { false };
bool m_supportsSampleRate { false };
bool m_supportsSampleSize { false };
bool m_supportsEchoCancellation { false };
bool m_supportsDeviceId { false };
bool m_supportsGroupId { false };
};
}
#endif // ENABLE(MEDIA_STREAM)
#endif // RealtimeMediaSourceSupportedConstraints_h