 4ca7d3f9fe
			
		
	
	4ca7d3f9fe
	
	
	
		
			
			MapWrapper was needed on some platforms where STL wasn't supported, we now use std::map<> directly. BUG=2164 TEST=trybots R=henrike@webrtc.org, phoglund@webrtc.org, stefan@webrtc.org, wu@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2001004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4530 4adac7df-926f-26a2-2b94-8c16560cd09d
		
			
				
	
	
		
			77 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			77 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  *  Copyright (c) 2012 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_VIDEO_ENGINE_VIE_RENDER_MANAGER_H_
 | |
| #define WEBRTC_VIDEO_ENGINE_VIE_RENDER_MANAGER_H_
 | |
| 
 | |
| #include <map>
 | |
| 
 | |
| #include "webrtc/system_wrappers/interface/list_wrapper.h"
 | |
| #include "webrtc/system_wrappers/interface/scoped_ptr.h"
 | |
| #include "webrtc/typedefs.h"
 | |
| #include "webrtc/video_engine/vie_manager_base.h"
 | |
| 
 | |
| namespace webrtc {
 | |
| 
 | |
| class CriticalSectionWrapper;
 | |
| class RWLockWrapper;
 | |
| class VideoRender;
 | |
| class VideoRenderCallback;
 | |
| class ViERenderer;
 | |
| 
 | |
| class ViERenderManager : private ViEManagerBase {
 | |
|   friend class ViERenderManagerScoped;
 | |
|  public:
 | |
|   explicit ViERenderManager(int32_t engine_id);
 | |
|   ~ViERenderManager();
 | |
| 
 | |
|   int32_t RegisterVideoRenderModule(VideoRender* render_module);
 | |
|   int32_t DeRegisterVideoRenderModule(VideoRender* render_module);
 | |
| 
 | |
|   ViERenderer* AddRenderStream(const int32_t render_id,
 | |
|                                void* window,
 | |
|                                const uint32_t z_order,
 | |
|                                const float left,
 | |
|                                const float top,
 | |
|                                const float right,
 | |
|                                const float bottom);
 | |
| 
 | |
|   int32_t RemoveRenderStream(int32_t render_id);
 | |
| 
 | |
|  private:
 | |
|   // Returns a pointer to the render module if it exists in the render list.
 | |
|   // Assumed protected.
 | |
|   VideoRender* FindRenderModule(void* window);
 | |
| 
 | |
|   // Methods used by ViERenderScoped.
 | |
|   ViERenderer* ViERenderPtr(int32_t render_id) const;
 | |
| 
 | |
|   scoped_ptr<CriticalSectionWrapper> list_cs_;
 | |
|   int32_t engine_id_;
 | |
|   // Protected by ViEManagerBase.
 | |
|   typedef std::map<int32_t, ViERenderer*> RendererMap;
 | |
|   RendererMap stream_to_vie_renderer_;
 | |
| 
 | |
|   ListWrapper render_list_;
 | |
|   bool use_external_render_module_;
 | |
| };
 | |
| 
 | |
| class ViERenderManagerScoped: private ViEManagerScopedBase {
 | |
|  public:
 | |
|   explicit ViERenderManagerScoped(const ViERenderManager& vie_render_manager);
 | |
| 
 | |
|   // Returns a pointer to the ViERender object.
 | |
|   ViERenderer* Renderer(int32_t render_id) const;
 | |
| };
 | |
| 
 | |
| }  // namespace webrtc
 | |
| 
 | |
| #endif  // WEBRTC_VIDEO_ENGINE_VIE_RENDER_MANAGER_H_
 |