| Index: talk/media/webrtc/webrtcvideocapturer.cc
|
| diff --git a/talk/media/webrtc/webrtcvideocapturer.cc b/talk/media/webrtc/webrtcvideocapturer.cc
|
| index 7d72128d61e995980562b0addbff567fbebcd5f7..519b58a69d538936ac80eb518dc5bfed959567be 100644
|
| --- a/talk/media/webrtc/webrtcvideocapturer.cc
|
| +++ b/talk/media/webrtc/webrtcvideocapturer.cc
|
| @@ -34,6 +34,7 @@
|
| #ifdef HAVE_WEBRTC_VIDEO
|
| #include "talk/media/webrtc/webrtcvideoframe.h"
|
| #include "talk/media/webrtc/webrtcvideoframefactory.h"
|
| +#include "webrtc/base/arraysize.h"
|
| #include "webrtc/base/bind.h"
|
| #include "webrtc/base/checks.h"
|
| #include "webrtc/base/criticalsection.h"
|
| @@ -83,7 +84,7 @@ class WebRtcVcmFactory : public WebRtcVcmFactoryInterface {
|
| static bool CapabilityToFormat(const webrtc::VideoCaptureCapability& cap,
|
| VideoFormat* format) {
|
| uint32_t fourcc = 0;
|
| - for (size_t i = 0; i < ARRAY_SIZE(kSupportedFourCCs); ++i) {
|
| + for (size_t i = 0; i < arraysize(kSupportedFourCCs); ++i) {
|
| if (kSupportedFourCCs[i].webrtc_type == cap.rawType) {
|
| fourcc = kSupportedFourCCs[i].fourcc;
|
| break;
|
| @@ -103,7 +104,7 @@ static bool CapabilityToFormat(const webrtc::VideoCaptureCapability& cap,
|
| static bool FormatToCapability(const VideoFormat& format,
|
| webrtc::VideoCaptureCapability* cap) {
|
| webrtc::RawVideoType webrtc_type = webrtc::kVideoUnknown;
|
| - for (size_t i = 0; i < ARRAY_SIZE(kSupportedFourCCs); ++i) {
|
| + for (size_t i = 0; i < arraysize(kSupportedFourCCs); ++i) {
|
| if (kSupportedFourCCs[i].fourcc == format.fourcc) {
|
| webrtc_type = kSupportedFourCCs[i].webrtc_type;
|
| break;
|
| @@ -171,8 +172,8 @@ bool WebRtcVideoCapturer::Init(const Device& device) {
|
| bool found = false;
|
| for (int index = 0; index < num_cams; ++index) {
|
| char vcm_name[256];
|
| - if (info->GetDeviceName(index, vcm_name, ARRAY_SIZE(vcm_name),
|
| - vcm_id, ARRAY_SIZE(vcm_id)) != -1) {
|
| + if (info->GetDeviceName(index, vcm_name, arraysize(vcm_name), vcm_id,
|
| + arraysize(vcm_id)) != -1) {
|
| if (device.name == reinterpret_cast<char*>(vcm_name)) {
|
| found = true;
|
| break;
|
| @@ -361,7 +362,7 @@ bool WebRtcVideoCapturer::GetPreferredFourccs(std::vector<uint32_t>* fourccs) {
|
| }
|
|
|
| fourccs->clear();
|
| - for (size_t i = 0; i < ARRAY_SIZE(kSupportedFourCCs); ++i) {
|
| + for (size_t i = 0; i < arraysize(kSupportedFourCCs); ++i) {
|
| fourccs->push_back(kSupportedFourCCs[i].fourcc);
|
| }
|
| return true;
|
|
|