Revert of Add DesktopCapturerId and attach it to DesktopFrame (patchset #4 id:100002 of https://codereview.webrtc.org/2759493002/ )

Reason for revert:
I suspect that this CL breaks Chromium WebRTC FYI bots. (Thanks kjellander@ for spotting.) The added dep in BUILD.gn would be the problem.

Example:

https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.webrtc.fyi%2FLinux_Builder%2F15058%2F%2B%2Frecipes%2Fsteps%2Fcompile%2F0%2Fstdout

FAILED: newlib_pnacl/obj/third_party/webrtc/api/libjingle_peerconnection_api/mediaconstraintsinterface.o
/b/c/goma_client/gomacc ../../native_client/toolchain/linux_x86/pnacl_newlib/bin/pnacl-clang++ -MMD -MF newlib_pnacl/obj/third_party/webrtc/api/libjingle_peerconnection_api/mediaconstraintsinterface.o.d -DNACL_TC_REV=5dfe030a71ca66e72c5719ef5034c2ed24706c43 -DV8_DEPRECATION_WARNINGS -DUSE_OPENSSL_CERTS=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DWEBRTC_RESTRICT_LOGGING -DEXPAT_RELATIVE_PATH -DHAVE_SCTP -DENABLE_EXTERNAL_AUTH -DHAVE_WEBRTC_VIDEO -DHAVE_WEBRTC_VOICE -DLOGGING_INSIDE_WEBRTC -DUSE_WEBRTC_DEV_BRANCH -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -I../.. -Inewlib_pnacl/gen -I../../third_party/webrtc_overrides -I../../third_party -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../third_party/webrtc/api/mediaconstraintsinterface.cc -o newlib_pnacl/obj/third_party/webrtc/api/libjingle_peerconnection_api/mediaconstraintsinterface.o
In file included from ../../third_party/webrtc/api/mediaconstraintsinterface.cc:11:
In file included from ../../third_party/webrtc/api/mediaconstraintsinterface.h:27:
In file included from ../../third_party/webrtc/api/peerconnectioninterface.h:77:
In file included from ../../third_party/webrtc/api/dtmfsenderinterface.h:16:
In file included from ../../third_party/webrtc/api/mediastreaminterface.h:33:
In file included from ../../third_party/webrtc/media/base/mediachannel.h:28:
../../third_party/webrtc/base/socket.h:18:10: fatal error: 'sys/socket.h' file not found
#include <sys/socket.h>
         ^
1 error generated.

Original issue's description:
> Add DesktopCapturerId and attach it to DesktopFrame
>
> This change adds a DesktopCapturerId namespace, and attaches an int to each
> DesktopFrame. ScreenCapturerWinGdi and ScreenCapturerWinDirectx now actively set
> this field to differentiate themselves.
>
> BUG=679523, 650926
>
> Review-Url: https://codereview.webrtc.org/2759493002
> Cr-Commit-Position: refs/heads/master@{#17329}
> Committed: 41e3d9ff3b

TBR=sergeyu@chromium.org,zijiehe@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=679523, 650926

Review-Url: https://codereview.webrtc.org/2767003002
Cr-Commit-Position: refs/heads/master@{#17336}
This commit is contained in:
henrikg 2017-03-22 01:13:39 -07:00 committed by Commit bot
parent 3af6cc0de9
commit 060987699b
7 changed files with 2 additions and 25 deletions

View File

@ -29,7 +29,6 @@ rtc_static_library("primitives") {
deps = [
"../..:webrtc_common",
"../../base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806.
"../../media:rtc_media_base",
]
}

View File

@ -1,6 +1,5 @@
include_rules = [
"+webrtc/base",
"+webrtc/media",
"+webrtc/system_wrappers",
"+third_party/libyuv",
]

View File

@ -13,7 +13,6 @@
#include <stdint.h>
#include "webrtc/media/base/videocommon.h"
#include "webrtc/typedefs.h"
namespace webrtc {
@ -37,14 +36,6 @@ const ScreenId kFullDesktopScreenId = -1;
const ScreenId kInvalidScreenId = -2;
// An integer to attach to each DesktopFrame to differentiate the generator of
// the frame.
namespace DesktopCapturerId {
constexpr uint32_t kUnknown = 0;
constexpr uint32_t kScreenCapturerWinGdi = FOURCC('G', 'D', 'I', ' ');
constexpr uint32_t kScreenCapturerWinDirectx = FOURCC('D', 'X', 'G', 'I');
} // namespace DesktopCapturerId
} // namespace webrtc
#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_TYPES_H_

View File

@ -26,8 +26,8 @@ DesktopFrame::DesktopFrame(DesktopSize size,
shared_memory_(shared_memory),
size_(size),
stride_(stride),
capture_time_ms_(0),
capturer_id_(DesktopCapturerId::kUnknown) {}
capture_time_ms_(0) {
}
DesktopFrame::~DesktopFrame() {}

View File

@ -14,7 +14,6 @@
#include <memory>
#include "webrtc/base/constructormagic.h"
#include "webrtc/modules/desktop_capture/desktop_capture_types.h"
#include "webrtc/modules/desktop_capture/desktop_geometry.h"
#include "webrtc/modules/desktop_capture/desktop_region.h"
#include "webrtc/modules/desktop_capture/shared_memory.h"
@ -69,14 +68,6 @@ class DesktopFrame {
// A helper to return the data pointer of a frame at the specified position.
uint8_t* GetFrameDataAtPos(const DesktopVector& pos) const;
// The DesktopCapturer implementation which generates current DesktopFrame.
// Not all DesktopCapturer implementations set this field; it's set to
// kUnknown by default.
uint32_t capturer_id() const { return capturer_id_; }
void set_capturer_id(uint32_t capturer_id) {
capturer_id_ = capturer_id;
}
protected:
DesktopFrame(DesktopSize size,
int stride,
@ -96,7 +87,6 @@ class DesktopFrame {
DesktopRegion updated_region_;
DesktopVector dpi_;
int64_t capture_time_ms_;
uint32_t capturer_id_;
RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrame);
};

View File

@ -137,7 +137,6 @@ void ScreenCapturerWinDirectx::CaptureFrame() {
result->set_capture_time_ms(
(rtc::TimeNanos() - capture_start_time_nanos) /
rtc::kNumNanosecsPerMillisec);
result->set_capturer_id(DesktopCapturerId::kScreenCapturerWinDirectx);
callback_->OnCaptureResult(Result::SUCCESS, std::move(result));
}

View File

@ -94,7 +94,6 @@ void ScreenCapturerWinGdi::CaptureFrame() {
frame->set_capture_time_ms(
(rtc::TimeNanos() - capture_start_time_nanos) /
rtc::kNumNanosecsPerMillisec);
frame->set_capturer_id(DesktopCapturerId::kScreenCapturerWinGdi);
callback_->OnCaptureResult(Result::SUCCESS, std::move(frame));
}