Remove clang:find_bad_constructs suppression from modules/video_capture.
This CL removes //build/config/clang:find_bad_constructs from the suppressed_configs list, which means that clang:find_bad_constructs is now enabled on these translation units. Bug: webrtc:9251, webrtc:163 Change-Id: I71350feb45c23d5a0e17e4828c514ce1c353f6a7 Reviewed-on: https://webrtc-review.googlesource.com/96700 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24524}
This commit is contained in:

committed by
Commit Bot

parent
bb095aa99b
commit
5aec1f68f1
@ -40,11 +40,6 @@ rtc_static_library("video_capture_module") {
|
|||||||
"../../system_wrappers",
|
"../../system_wrappers",
|
||||||
"//third_party/libyuv",
|
"//third_party/libyuv",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (!build_with_chromium && is_clang) {
|
|
||||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
||||||
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rtc_static_library("video_capture") {
|
rtc_static_library("video_capture") {
|
||||||
@ -59,11 +54,6 @@ rtc_static_library("video_capture") {
|
|||||||
"../../rtc_base:rtc_base_approved",
|
"../../rtc_base:rtc_base_approved",
|
||||||
"../../system_wrappers",
|
"../../system_wrappers",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (!build_with_chromium && is_clang) {
|
|
||||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
||||||
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!build_with_chromium) {
|
if (!build_with_chromium) {
|
||||||
@ -99,11 +89,6 @@ if (!build_with_chromium) {
|
|||||||
]
|
]
|
||||||
|
|
||||||
all_dependent_configs = [ ":video_capture_internal_impl_config" ]
|
all_dependent_configs = [ ":video_capture_internal_impl_config" ]
|
||||||
|
|
||||||
if (!build_with_chromium && is_clang) {
|
|
||||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
||||||
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,11 +148,6 @@ if (!build_with_chromium) {
|
|||||||
|
|
||||||
all_dependent_configs = [ ":video_capture_internal_impl_config" ]
|
all_dependent_configs = [ ":video_capture_internal_impl_config" ]
|
||||||
|
|
||||||
if (!build_with_chromium && is_clang) {
|
|
||||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
||||||
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
if (build_with_mozilla && is_android) {
|
if (build_with_mozilla && is_android) {
|
||||||
include_dirs = [
|
include_dirs = [
|
||||||
"/config/external/nspr",
|
"/config/external/nspr",
|
||||||
@ -216,11 +196,6 @@ if (!build_with_chromium) {
|
|||||||
"//testing/gtest",
|
"//testing/gtest",
|
||||||
]
|
]
|
||||||
deps += [ "../../test:test_main" ]
|
deps += [ "../../test:test_main" ]
|
||||||
|
|
||||||
if (!build_with_chromium && is_clang) {
|
|
||||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
||||||
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,18 +21,17 @@ namespace videocapturemodule {
|
|||||||
class DeviceInfoImpl : public VideoCaptureModule::DeviceInfo {
|
class DeviceInfoImpl : public VideoCaptureModule::DeviceInfo {
|
||||||
public:
|
public:
|
||||||
DeviceInfoImpl();
|
DeviceInfoImpl();
|
||||||
virtual ~DeviceInfoImpl(void);
|
~DeviceInfoImpl(void) override;
|
||||||
virtual int32_t NumberOfCapabilities(const char* deviceUniqueIdUTF8);
|
int32_t NumberOfCapabilities(const char* deviceUniqueIdUTF8) override;
|
||||||
virtual int32_t GetCapability(const char* deviceUniqueIdUTF8,
|
int32_t GetCapability(const char* deviceUniqueIdUTF8,
|
||||||
const uint32_t deviceCapabilityNumber,
|
const uint32_t deviceCapabilityNumber,
|
||||||
VideoCaptureCapability& capability);
|
VideoCaptureCapability& capability) override;
|
||||||
|
|
||||||
virtual int32_t GetBestMatchedCapability(
|
int32_t GetBestMatchedCapability(const char* deviceUniqueIdUTF8,
|
||||||
const char* deviceUniqueIdUTF8,
|
|
||||||
const VideoCaptureCapability& requested,
|
const VideoCaptureCapability& requested,
|
||||||
VideoCaptureCapability& resulting);
|
VideoCaptureCapability& resulting) override;
|
||||||
virtual int32_t GetOrientation(const char* deviceUniqueIdUTF8,
|
int32_t GetOrientation(const char* deviceUniqueIdUTF8,
|
||||||
VideoRotation& orientation);
|
VideoRotation& orientation) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/* Initialize this object*/
|
/* Initialize this object*/
|
||||||
|
@ -18,29 +18,28 @@ namespace videocapturemodule {
|
|||||||
class ExternalDeviceInfo : public DeviceInfoImpl {
|
class ExternalDeviceInfo : public DeviceInfoImpl {
|
||||||
public:
|
public:
|
||||||
ExternalDeviceInfo() {}
|
ExternalDeviceInfo() {}
|
||||||
virtual ~ExternalDeviceInfo() {}
|
~ExternalDeviceInfo() override {}
|
||||||
virtual uint32_t NumberOfDevices() { return 0; }
|
uint32_t NumberOfDevices() override { return 0; }
|
||||||
virtual int32_t DisplayCaptureSettingsDialogBox(
|
int32_t DisplayCaptureSettingsDialogBox(const char* /*deviceUniqueIdUTF8*/,
|
||||||
const char* /*deviceUniqueIdUTF8*/,
|
|
||||||
const char* /*dialogTitleUTF8*/,
|
const char* /*dialogTitleUTF8*/,
|
||||||
void* /*parentWindow*/,
|
void* /*parentWindow*/,
|
||||||
uint32_t /*positionX*/,
|
uint32_t /*positionX*/,
|
||||||
uint32_t /*positionY*/) {
|
uint32_t /*positionY*/) override {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
virtual int32_t GetDeviceName(uint32_t deviceNumber,
|
int32_t GetDeviceName(uint32_t deviceNumber,
|
||||||
char* deviceNameUTF8,
|
char* deviceNameUTF8,
|
||||||
uint32_t deviceNameLength,
|
uint32_t deviceNameLength,
|
||||||
char* deviceUniqueIdUTF8,
|
char* deviceUniqueIdUTF8,
|
||||||
uint32_t deviceUniqueIdUTF8Length,
|
uint32_t deviceUniqueIdUTF8Length,
|
||||||
char* productUniqueIdUTF8 = 0,
|
char* productUniqueIdUTF8 = 0,
|
||||||
uint32_t productUniqueIdUTF8Length = 0) {
|
uint32_t productUniqueIdUTF8Length = 0) override {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
virtual int32_t CreateCapabilityMap(const char* deviceUniqueIdUTF8) {
|
int32_t CreateCapabilityMap(const char* deviceUniqueIdUTF8) override {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
virtual int32_t Init() { return 0; }
|
int32_t Init() override { return 0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
VideoCaptureModule::DeviceInfo* VideoCaptureImpl::CreateDeviceInfo() {
|
VideoCaptureModule::DeviceInfo* VideoCaptureImpl::CreateDeviceInfo() {
|
||||||
|
@ -192,6 +192,15 @@ int32_t DeviceInfoLinux::CreateCapabilityMap(const char* deviceUniqueIdUTF8) {
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t DeviceInfoLinux::DisplayCaptureSettingsDialogBox(
|
||||||
|
const char* /*deviceUniqueIdUTF8*/,
|
||||||
|
const char* /*dialogTitleUTF8*/,
|
||||||
|
void* /*parentWindow*/,
|
||||||
|
uint32_t /*positionX*/,
|
||||||
|
uint32_t /*positionY*/) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
bool DeviceInfoLinux::IsDeviceNameMatches(const char* name,
|
bool DeviceInfoLinux::IsDeviceNameMatches(const char* name,
|
||||||
const char* deviceUniqueIdUTF8) {
|
const char* deviceUniqueIdUTF8) {
|
||||||
if (strncmp(deviceUniqueIdUTF8, name, strlen(name)) == 0)
|
if (strncmp(deviceUniqueIdUTF8, name, strlen(name)) == 0)
|
||||||
|
@ -19,30 +19,27 @@ namespace videocapturemodule {
|
|||||||
class DeviceInfoLinux : public DeviceInfoImpl {
|
class DeviceInfoLinux : public DeviceInfoImpl {
|
||||||
public:
|
public:
|
||||||
DeviceInfoLinux();
|
DeviceInfoLinux();
|
||||||
virtual ~DeviceInfoLinux();
|
~DeviceInfoLinux() override;
|
||||||
virtual uint32_t NumberOfDevices();
|
uint32_t NumberOfDevices() override;
|
||||||
virtual int32_t GetDeviceName(uint32_t deviceNumber,
|
int32_t GetDeviceName(uint32_t deviceNumber,
|
||||||
char* deviceNameUTF8,
|
char* deviceNameUTF8,
|
||||||
uint32_t deviceNameLength,
|
uint32_t deviceNameLength,
|
||||||
char* deviceUniqueIdUTF8,
|
char* deviceUniqueIdUTF8,
|
||||||
uint32_t deviceUniqueIdUTF8Length,
|
uint32_t deviceUniqueIdUTF8Length,
|
||||||
char* productUniqueIdUTF8 = 0,
|
char* productUniqueIdUTF8 = 0,
|
||||||
uint32_t productUniqueIdUTF8Length = 0);
|
uint32_t productUniqueIdUTF8Length = 0) override;
|
||||||
/*
|
/*
|
||||||
* Fills the membervariable _captureCapabilities with capabilites for the
|
* Fills the membervariable _captureCapabilities with capabilites for the
|
||||||
* given device name.
|
* given device name.
|
||||||
*/
|
*/
|
||||||
virtual int32_t CreateCapabilityMap(const char* deviceUniqueIdUTF8);
|
int32_t CreateCapabilityMap(const char* deviceUniqueIdUTF8) override;
|
||||||
virtual int32_t DisplayCaptureSettingsDialogBox(
|
int32_t DisplayCaptureSettingsDialogBox(const char* /*deviceUniqueIdUTF8*/,
|
||||||
const char* /*deviceUniqueIdUTF8*/,
|
|
||||||
const char* /*dialogTitleUTF8*/,
|
const char* /*dialogTitleUTF8*/,
|
||||||
void* /*parentWindow*/,
|
void* /*parentWindow*/,
|
||||||
uint32_t /*positionX*/,
|
uint32_t /*positionX*/,
|
||||||
uint32_t /*positionY*/) {
|
uint32_t /*positionY*/) override;
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
int32_t FillCapabilities(int fd);
|
int32_t FillCapabilities(int fd);
|
||||||
int32_t Init();
|
int32_t Init() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool IsDeviceNameMatches(const char* name, const char* deviceUniqueIdUTF8);
|
bool IsDeviceNameMatches(const char* name, const char* deviceUniqueIdUTF8);
|
||||||
|
@ -23,12 +23,12 @@ namespace videocapturemodule {
|
|||||||
class VideoCaptureModuleV4L2 : public VideoCaptureImpl {
|
class VideoCaptureModuleV4L2 : public VideoCaptureImpl {
|
||||||
public:
|
public:
|
||||||
VideoCaptureModuleV4L2();
|
VideoCaptureModuleV4L2();
|
||||||
virtual ~VideoCaptureModuleV4L2();
|
~VideoCaptureModuleV4L2() override;
|
||||||
virtual int32_t Init(const char* deviceUniqueId);
|
int32_t Init(const char* deviceUniqueId);
|
||||||
virtual int32_t StartCapture(const VideoCaptureCapability& capability);
|
int32_t StartCapture(const VideoCaptureCapability& capability) override;
|
||||||
virtual int32_t StopCapture();
|
int32_t StopCapture() override;
|
||||||
virtual bool CaptureStarted();
|
bool CaptureStarted() override;
|
||||||
virtual int32_t CaptureSettings(VideoCaptureCapability& settings);
|
int32_t CaptureSettings(VideoCaptureCapability& settings) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum { kNoOfV4L2Bufffers = 4 };
|
enum { kNoOfV4L2Bufffers = 4 };
|
||||||
|
@ -21,7 +21,7 @@ namespace videocapturemodule {
|
|||||||
class DeviceInfoIos : public DeviceInfoImpl {
|
class DeviceInfoIos : public DeviceInfoImpl {
|
||||||
public:
|
public:
|
||||||
DeviceInfoIos();
|
DeviceInfoIos();
|
||||||
virtual ~DeviceInfoIos();
|
~DeviceInfoIos() override;
|
||||||
|
|
||||||
// Implementation of DeviceInfoImpl.
|
// Implementation of DeviceInfoImpl.
|
||||||
int32_t Init() override;
|
int32_t Init() override;
|
||||||
|
@ -21,7 +21,7 @@ namespace videocapturemodule {
|
|||||||
class VideoCaptureIos : public VideoCaptureImpl {
|
class VideoCaptureIos : public VideoCaptureImpl {
|
||||||
public:
|
public:
|
||||||
VideoCaptureIos();
|
VideoCaptureIos();
|
||||||
virtual ~VideoCaptureIos();
|
~VideoCaptureIos() override;
|
||||||
|
|
||||||
static rtc::scoped_refptr<VideoCaptureModule> Create(
|
static rtc::scoped_refptr<VideoCaptureModule> Create(
|
||||||
const char* device_unique_id_utf8);
|
const char* device_unique_id_utf8);
|
||||||
|
@ -64,7 +64,7 @@ class TestVideoCaptureCallback
|
|||||||
timing_warnings_(0),
|
timing_warnings_(0),
|
||||||
rotate_frame_(webrtc::kVideoRotation_0) {}
|
rotate_frame_(webrtc::kVideoRotation_0) {}
|
||||||
|
|
||||||
~TestVideoCaptureCallback() {
|
~TestVideoCaptureCallback() override {
|
||||||
if (timing_warnings_ > 0)
|
if (timing_warnings_ > 0)
|
||||||
printf("No of timing warnings %d\n", timing_warnings_);
|
printf("No of timing warnings %d\n", timing_warnings_);
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ class VideoCaptureTest : public testing::Test {
|
|||||||
public:
|
public:
|
||||||
VideoCaptureTest() : number_of_devices_(0) {}
|
VideoCaptureTest() : number_of_devices_(0) {}
|
||||||
|
|
||||||
void SetUp() {
|
void SetUp() override {
|
||||||
device_info_.reset(VideoCaptureFactory::CreateDeviceInfo());
|
device_info_.reset(VideoCaptureFactory::CreateDeviceInfo());
|
||||||
assert(device_info_.get());
|
assert(device_info_.get());
|
||||||
number_of_devices_ = device_info_->NumberOfDevices();
|
number_of_devices_ = device_info_->NumberOfDevices();
|
||||||
@ -348,7 +348,7 @@ TEST_F(VideoCaptureTest, DISABLED_TestTwoCameras) {
|
|||||||
// such as frame rate and picture alarm.
|
// such as frame rate and picture alarm.
|
||||||
class VideoCaptureExternalTest : public testing::Test {
|
class VideoCaptureExternalTest : public testing::Test {
|
||||||
public:
|
public:
|
||||||
void SetUp() {
|
void SetUp() override {
|
||||||
capture_module_ = VideoCaptureFactory::Create(capture_input_interface_);
|
capture_module_ = VideoCaptureFactory::Create(capture_input_interface_);
|
||||||
|
|
||||||
VideoCaptureCapability capability;
|
VideoCaptureCapability capability;
|
||||||
@ -374,7 +374,7 @@ class VideoCaptureExternalTest : public testing::Test {
|
|||||||
capture_module_->RegisterCaptureDataCallback(&capture_callback_);
|
capture_module_->RegisterCaptureDataCallback(&capture_callback_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TearDown() {}
|
void TearDown() override {}
|
||||||
|
|
||||||
webrtc::VideoCaptureExternal* capture_input_interface_;
|
webrtc::VideoCaptureExternal* capture_input_interface_;
|
||||||
rtc::scoped_refptr<VideoCaptureModule> capture_module_;
|
rtc::scoped_refptr<VideoCaptureModule> capture_module_;
|
||||||
|
@ -109,7 +109,7 @@ class VideoCaptureModule : public rtc::RefCountInterface {
|
|||||||
virtual bool GetApplyRotation() = 0;
|
virtual bool GetApplyRotation() = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~VideoCaptureModule(){};
|
~VideoCaptureModule() override{};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -205,6 +205,25 @@ int32_t VideoCaptureImpl::IncomingFrame(uint8_t* videoFrame,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t VideoCaptureImpl::StartCapture(
|
||||||
|
const VideoCaptureCapability& capability) {
|
||||||
|
_requestedCapability = capability;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t VideoCaptureImpl::StopCapture() {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool VideoCaptureImpl::CaptureStarted() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t VideoCaptureImpl::CaptureSettings(
|
||||||
|
VideoCaptureCapability& /*settings*/) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
int32_t VideoCaptureImpl::SetCaptureRotation(VideoRotation rotation) {
|
int32_t VideoCaptureImpl::SetCaptureRotation(VideoRotation rotation) {
|
||||||
rtc::CritScope cs(&_apiCs);
|
rtc::CritScope cs(&_apiCs);
|
||||||
_rotateFrame = rotation;
|
_rotateFrame = rotation;
|
||||||
@ -219,6 +238,10 @@ bool VideoCaptureImpl::SetApplyRotation(bool enable) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool VideoCaptureImpl::GetApplyRotation() {
|
||||||
|
return apply_rotation_;
|
||||||
|
}
|
||||||
|
|
||||||
void VideoCaptureImpl::UpdateFrameCount() {
|
void VideoCaptureImpl::UpdateFrameCount() {
|
||||||
if (_incomingFrameTimesNanos[0] / rtc::kNumNanosecsPerMicrosec == 0) {
|
if (_incomingFrameTimesNanos[0] / rtc::kNumNanosecsPerMicrosec == 0) {
|
||||||
// first no shift
|
// first no shift
|
||||||
|
@ -62,7 +62,7 @@ class VideoCaptureImpl : public VideoCaptureModule,
|
|||||||
|
|
||||||
int32_t SetCaptureRotation(VideoRotation rotation) override;
|
int32_t SetCaptureRotation(VideoRotation rotation) override;
|
||||||
bool SetApplyRotation(bool enable) override;
|
bool SetApplyRotation(bool enable) override;
|
||||||
bool GetApplyRotation() override { return apply_rotation_; }
|
bool GetApplyRotation() override;
|
||||||
|
|
||||||
const char* CurrentDeviceName() const override;
|
const char* CurrentDeviceName() const override;
|
||||||
|
|
||||||
@ -74,19 +74,14 @@ class VideoCaptureImpl : public VideoCaptureModule,
|
|||||||
int64_t captureTime = 0) override;
|
int64_t captureTime = 0) override;
|
||||||
|
|
||||||
// Platform dependent
|
// Platform dependent
|
||||||
int32_t StartCapture(const VideoCaptureCapability& capability) override {
|
int32_t StartCapture(const VideoCaptureCapability& capability) override;
|
||||||
_requestedCapability = capability;
|
int32_t StopCapture() override;
|
||||||
return -1;
|
bool CaptureStarted() override;
|
||||||
}
|
int32_t CaptureSettings(VideoCaptureCapability& /*settings*/) override;
|
||||||
int32_t StopCapture() override { return -1; }
|
|
||||||
bool CaptureStarted() override { return false; }
|
|
||||||
int32_t CaptureSettings(VideoCaptureCapability& /*settings*/) override {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
VideoCaptureImpl();
|
VideoCaptureImpl();
|
||||||
virtual ~VideoCaptureImpl();
|
~VideoCaptureImpl() override;
|
||||||
int32_t DeliverCapturedFrame(VideoFrame& captureFrame);
|
int32_t DeliverCapturedFrame(VideoFrame& captureFrame);
|
||||||
|
|
||||||
char* _deviceUniqueId; // current Device unique name;
|
char* _deviceUniqueId; // current Device unique name;
|
||||||
|
@ -33,31 +33,30 @@ class DeviceInfoDS : public DeviceInfoImpl {
|
|||||||
static DeviceInfoDS* Create();
|
static DeviceInfoDS* Create();
|
||||||
|
|
||||||
DeviceInfoDS();
|
DeviceInfoDS();
|
||||||
virtual ~DeviceInfoDS();
|
~DeviceInfoDS() override;
|
||||||
|
|
||||||
int32_t Init();
|
int32_t Init() override;
|
||||||
virtual uint32_t NumberOfDevices();
|
uint32_t NumberOfDevices() override;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns the available capture devices.
|
* Returns the available capture devices.
|
||||||
*/
|
*/
|
||||||
virtual int32_t GetDeviceName(uint32_t deviceNumber,
|
int32_t GetDeviceName(uint32_t deviceNumber,
|
||||||
char* deviceNameUTF8,
|
char* deviceNameUTF8,
|
||||||
uint32_t deviceNameLength,
|
uint32_t deviceNameLength,
|
||||||
char* deviceUniqueIdUTF8,
|
char* deviceUniqueIdUTF8,
|
||||||
uint32_t deviceUniqueIdUTF8Length,
|
uint32_t deviceUniqueIdUTF8Length,
|
||||||
char* productUniqueIdUTF8,
|
char* productUniqueIdUTF8,
|
||||||
uint32_t productUniqueIdUTF8Length);
|
uint32_t productUniqueIdUTF8Length) override;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Display OS /capture device specific settings dialog
|
* Display OS /capture device specific settings dialog
|
||||||
*/
|
*/
|
||||||
virtual int32_t DisplayCaptureSettingsDialogBox(
|
int32_t DisplayCaptureSettingsDialogBox(const char* deviceUniqueIdUTF8,
|
||||||
const char* deviceUniqueIdUTF8,
|
|
||||||
const char* dialogTitleUTF8,
|
const char* dialogTitleUTF8,
|
||||||
void* parentWindow,
|
void* parentWindow,
|
||||||
uint32_t positionX,
|
uint32_t positionX,
|
||||||
uint32_t positionY);
|
uint32_t positionY) override;
|
||||||
|
|
||||||
// Windows specific
|
// Windows specific
|
||||||
|
|
||||||
@ -86,7 +85,7 @@ class DeviceInfoDS : public DeviceInfoImpl {
|
|||||||
char* productUniqueIdUTF8,
|
char* productUniqueIdUTF8,
|
||||||
uint32_t productUniqueIdUTF8Length);
|
uint32_t productUniqueIdUTF8Length);
|
||||||
|
|
||||||
virtual int32_t CreateCapabilityMap(const char* deviceUniqueIdUTF8);
|
int32_t CreateCapabilityMap(const char* deviceUniqueIdUTF8) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ICreateDevEnum* _dsDevEnum;
|
ICreateDevEnum* _dsDevEnum;
|
||||||
|
@ -20,25 +20,24 @@ namespace videocapturemodule {
|
|||||||
class DeviceInfoMF : public DeviceInfoImpl {
|
class DeviceInfoMF : public DeviceInfoImpl {
|
||||||
public:
|
public:
|
||||||
DeviceInfoMF();
|
DeviceInfoMF();
|
||||||
virtual ~DeviceInfoMF();
|
~DeviceInfoMF() override;
|
||||||
|
|
||||||
int32_t Init();
|
int32_t Init() override;
|
||||||
virtual uint32_t NumberOfDevices();
|
uint32_t NumberOfDevices() override;
|
||||||
|
|
||||||
virtual int32_t GetDeviceName(uint32_t deviceNumber,
|
int32_t GetDeviceName(uint32_t deviceNumber,
|
||||||
char* deviceNameUTF8,
|
char* deviceNameUTF8,
|
||||||
uint32_t deviceNameLength,
|
uint32_t deviceNameLength,
|
||||||
char* deviceUniqueIdUTF8,
|
char* deviceUniqueIdUTF8,
|
||||||
uint32_t deviceUniqueIdUTF8Length,
|
uint32_t deviceUniqueIdUTF8Length,
|
||||||
char* productUniqueIdUTF8,
|
char* productUniqueIdUTF8,
|
||||||
uint32_t productUniqueIdUTF8Length);
|
uint32_t productUniqueIdUTF8Length) override;
|
||||||
|
|
||||||
virtual int32_t DisplayCaptureSettingsDialogBox(
|
int32_t DisplayCaptureSettingsDialogBox(const char* deviceUniqueIdUTF8,
|
||||||
const char* deviceUniqueIdUTF8,
|
|
||||||
const char* dialogTitleUTF8,
|
const char* dialogTitleUTF8,
|
||||||
void* parentWindow,
|
void* parentWindow,
|
||||||
uint32_t positionX,
|
uint32_t positionX,
|
||||||
uint32_t positionY);
|
uint32_t positionY) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace videocapturemodule
|
} // namespace videocapturemodule
|
||||||
|
@ -35,11 +35,11 @@ class CaptureInputPin : public CBaseInputPin {
|
|||||||
IN CCritSec* pLock,
|
IN CCritSec* pLock,
|
||||||
OUT HRESULT* pHr,
|
OUT HRESULT* pHr,
|
||||||
IN LPCWSTR pszName);
|
IN LPCWSTR pszName);
|
||||||
virtual ~CaptureInputPin();
|
~CaptureInputPin() override;
|
||||||
|
|
||||||
HRESULT GetMediaType(IN int iPos, OUT CMediaType* pmt);
|
HRESULT GetMediaType(IN int iPos, OUT CMediaType* pmt) override;
|
||||||
HRESULT CheckMediaType(IN const CMediaType* pmt);
|
HRESULT CheckMediaType(IN const CMediaType* pmt) override;
|
||||||
STDMETHODIMP Receive(IN IMediaSample*);
|
STDMETHODIMP Receive(IN IMediaSample*) override;
|
||||||
HRESULT SetMatchingMediaType(const VideoCaptureCapability& capability);
|
HRESULT SetMatchingMediaType(const VideoCaptureCapability& capability);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ class CaptureSinkFilter : public CBaseFilter {
|
|||||||
IN LPUNKNOWN punk,
|
IN LPUNKNOWN punk,
|
||||||
OUT HRESULT* phr,
|
OUT HRESULT* phr,
|
||||||
VideoCaptureExternal& captureObserver);
|
VideoCaptureExternal& captureObserver);
|
||||||
virtual ~CaptureSinkFilter();
|
~CaptureSinkFilter() override;
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// class methods
|
// class methods
|
||||||
@ -72,11 +72,11 @@ class CaptureSinkFilter : public CBaseFilter {
|
|||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// CBaseFilter methods
|
// CBaseFilter methods
|
||||||
int GetPinCount();
|
int GetPinCount() override;
|
||||||
CBasePin* GetPin(IN int Index);
|
CBasePin* GetPin(IN int Index) override;
|
||||||
STDMETHODIMP Pause();
|
STDMETHODIMP Pause() override;
|
||||||
STDMETHODIMP Stop();
|
STDMETHODIMP Stop() override;
|
||||||
STDMETHODIMP GetClassID(OUT CLSID* pCLSID);
|
STDMETHODIMP GetClassID(OUT CLSID* pCLSID) override;
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// class factory calls this
|
// class factory calls this
|
||||||
static CUnknown* CreateInstance(IN LPUNKNOWN punk, OUT HRESULT* phr);
|
static CUnknown* CreateInstance(IN LPUNKNOWN punk, OUT HRESULT* phr);
|
||||||
|
@ -33,8 +33,8 @@ class VideoCaptureDS : public VideoCaptureImpl {
|
|||||||
* Start/Stop
|
* Start/Stop
|
||||||
*
|
*
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
virtual int32_t StartCapture(const VideoCaptureCapability& capability);
|
int32_t StartCapture(const VideoCaptureCapability& capability) override;
|
||||||
virtual int32_t StopCapture();
|
int32_t StopCapture() override;
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
*
|
*
|
||||||
@ -42,11 +42,11 @@ class VideoCaptureDS : public VideoCaptureImpl {
|
|||||||
*
|
*
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
virtual bool CaptureStarted();
|
bool CaptureStarted() override;
|
||||||
virtual int32_t CaptureSettings(VideoCaptureCapability& settings);
|
int32_t CaptureSettings(VideoCaptureCapability& settings) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~VideoCaptureDS();
|
~VideoCaptureDS() override;
|
||||||
|
|
||||||
// Help functions
|
// Help functions
|
||||||
|
|
||||||
|
@ -27,13 +27,13 @@ class VideoCaptureMF : public VideoCaptureImpl {
|
|||||||
int32_t Init(const char* device_id);
|
int32_t Init(const char* device_id);
|
||||||
|
|
||||||
// Overrides from VideoCaptureImpl.
|
// Overrides from VideoCaptureImpl.
|
||||||
virtual int32_t StartCapture(const VideoCaptureCapability& capability);
|
int32_t StartCapture(const VideoCaptureCapability& capability) override;
|
||||||
virtual int32_t StopCapture();
|
int32_t StopCapture() override;
|
||||||
virtual bool CaptureStarted();
|
bool CaptureStarted() override;
|
||||||
virtual int32_t CaptureSettings(VideoCaptureCapability& settings); // NOLINT
|
int32_t CaptureSettings(VideoCaptureCapability& settings) override; // NOLINT
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~VideoCaptureMF();
|
~VideoCaptureMF() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace videocapturemodule
|
} // namespace videocapturemodule
|
||||||
|
Reference in New Issue
Block a user