Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: webrtc/media/webrtc/webrtcvoe.h

Issue 1684163002: Rename webrtc/media/webrtc -> webrtc/media/engine (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase f396f6085f9e4f16f37471a7828e3e31308c0d52 #11590 Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/webrtc/webrtcvideoframefactory_unittest.cc ('k') | webrtc/media/webrtc/webrtcvoiceengine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/webrtc/webrtcvoe.h
diff --git a/webrtc/media/webrtc/webrtcvoe.h b/webrtc/media/webrtc/webrtcvoe.h
deleted file mode 100644
index f23cc07974c8b1755e13c490cec0160adedf4c6f..0000000000000000000000000000000000000000
--- a/webrtc/media/webrtc/webrtcvoe.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_MEDIA_WEBRTC_WEBRTCVOE_H_
-#define WEBRTC_MEDIA_WEBRTC_WEBRTCVOE_H_
-
-#include "webrtc/base/common.h"
-#include "webrtc/media/webrtc/webrtccommon.h"
-
-#include "webrtc/common_types.h"
-#include "webrtc/modules/audio_device/include/audio_device.h"
-#include "webrtc/voice_engine/include/voe_audio_processing.h"
-#include "webrtc/voice_engine/include/voe_base.h"
-#include "webrtc/voice_engine/include/voe_codec.h"
-#include "webrtc/voice_engine/include/voe_errors.h"
-#include "webrtc/voice_engine/include/voe_hardware.h"
-#include "webrtc/voice_engine/include/voe_network.h"
-#include "webrtc/voice_engine/include/voe_rtp_rtcp.h"
-#include "webrtc/voice_engine/include/voe_volume_control.h"
-
-namespace cricket {
-// automatically handles lifetime of WebRtc VoiceEngine
-class scoped_voe_engine {
- public:
- explicit scoped_voe_engine(webrtc::VoiceEngine* e) : ptr(e) {}
- // VERIFY, to ensure that there are no leaks at shutdown
- ~scoped_voe_engine() { if (ptr) VERIFY(webrtc::VoiceEngine::Delete(ptr)); }
- // Releases the current pointer.
- void reset() {
- if (ptr) {
- VERIFY(webrtc::VoiceEngine::Delete(ptr));
- ptr = NULL;
- }
- }
- webrtc::VoiceEngine* get() const { return ptr; }
- private:
- webrtc::VoiceEngine* ptr;
-};
-
-// scoped_ptr class to handle obtaining and releasing WebRTC interface pointers
-template<class T>
-class scoped_voe_ptr {
- public:
- explicit scoped_voe_ptr(const scoped_voe_engine& e)
- : ptr(T::GetInterface(e.get())) {}
- explicit scoped_voe_ptr(T* p) : ptr(p) {}
- ~scoped_voe_ptr() { if (ptr) ptr->Release(); }
- T* operator->() const { return ptr; }
- T* get() const { return ptr; }
-
- // Releases the current pointer.
- void reset() {
- if (ptr) {
- ptr->Release();
- ptr = NULL;
- }
- }
-
- private:
- T* ptr;
-};
-
-// Utility class for aggregating the various WebRTC interface.
-// Fake implementations can also be injected for testing.
-class VoEWrapper {
- public:
- VoEWrapper()
- : engine_(webrtc::VoiceEngine::Create()), processing_(engine_),
- base_(engine_), codec_(engine_),
- hw_(engine_), network_(engine_),
- rtp_(engine_), volume_(engine_) {
- }
- VoEWrapper(webrtc::VoEAudioProcessing* processing,
- webrtc::VoEBase* base,
- webrtc::VoECodec* codec,
- webrtc::VoEHardware* hw,
- webrtc::VoENetwork* network,
- webrtc::VoERTP_RTCP* rtp,
- webrtc::VoEVolumeControl* volume)
- : engine_(NULL),
- processing_(processing),
- base_(base),
- codec_(codec),
- hw_(hw),
- network_(network),
- rtp_(rtp),
- volume_(volume) {
- }
- ~VoEWrapper() {}
- webrtc::VoiceEngine* engine() const { return engine_.get(); }
- webrtc::VoEAudioProcessing* processing() const { return processing_.get(); }
- webrtc::VoEBase* base() const { return base_.get(); }
- webrtc::VoECodec* codec() const { return codec_.get(); }
- webrtc::VoEHardware* hw() const { return hw_.get(); }
- webrtc::VoENetwork* network() const { return network_.get(); }
- webrtc::VoERTP_RTCP* rtp() const { return rtp_.get(); }
- webrtc::VoEVolumeControl* volume() const { return volume_.get(); }
- int error() { return base_->LastError(); }
-
- private:
- scoped_voe_engine engine_;
- scoped_voe_ptr<webrtc::VoEAudioProcessing> processing_;
- scoped_voe_ptr<webrtc::VoEBase> base_;
- scoped_voe_ptr<webrtc::VoECodec> codec_;
- scoped_voe_ptr<webrtc::VoEHardware> hw_;
- scoped_voe_ptr<webrtc::VoENetwork> network_;
- scoped_voe_ptr<webrtc::VoERTP_RTCP> rtp_;
- scoped_voe_ptr<webrtc::VoEVolumeControl> volume_;
-};
-} // namespace cricket
-
-#endif // WEBRTC_MEDIA_WEBRTC_WEBRTCVOE_H_
« no previous file with comments | « webrtc/media/webrtc/webrtcvideoframefactory_unittest.cc ('k') | webrtc/media/webrtc/webrtcvoiceengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698