Refactor webrtc specific Event implementation to an EventFactory.
Review URL: https://webrtc-codereview.appspot.com/1187005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3664 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -11,10 +11,11 @@
|
||||
#ifndef WEBRTC_MODULES_INTERFACE_VIDEO_CODING_H_
|
||||
#define WEBRTC_MODULES_INTERFACE_VIDEO_CODING_H_
|
||||
|
||||
#include "common_video/interface/i420_video_frame.h"
|
||||
#include "modules/interface/module.h"
|
||||
#include "modules/interface/module_common_types.h"
|
||||
#include "modules/video_coding/main/interface/video_coding_defines.h"
|
||||
#include "webrtc/common_video/interface/i420_video_frame.h"
|
||||
#include "webrtc/modules/interface/module.h"
|
||||
#include "webrtc/modules/interface/module_common_types.h"
|
||||
#include "webrtc/modules/video_coding/main/interface/video_coding_defines.h"
|
||||
#include "webrtc/system_wrappers/interface/event_wrapper.h"
|
||||
|
||||
namespace webrtc
|
||||
{
|
||||
@ -24,6 +25,22 @@ class VideoEncoder;
|
||||
class VideoDecoder;
|
||||
struct CodecSpecificInfo;
|
||||
|
||||
class EventFactory {
|
||||
public:
|
||||
virtual ~EventFactory() {}
|
||||
|
||||
virtual EventWrapper* CreateEvent() = 0;
|
||||
};
|
||||
|
||||
class EventFactoryImpl : public EventFactory {
|
||||
public:
|
||||
virtual ~EventFactoryImpl() {}
|
||||
|
||||
virtual EventWrapper* CreateEvent() {
|
||||
return EventWrapper::Create();
|
||||
}
|
||||
};
|
||||
|
||||
class VideoCodingModule : public Module
|
||||
{
|
||||
public:
|
||||
@ -49,7 +66,8 @@ public:
|
||||
static VideoCodingModule* Create(const WebRtc_Word32 id);
|
||||
|
||||
static VideoCodingModule* Create(const WebRtc_Word32 id,
|
||||
Clock* clock);
|
||||
Clock* clock,
|
||||
EventFactory* event_factory);
|
||||
|
||||
static void Destroy(VideoCodingModule* module);
|
||||
|
||||
|
Reference in New Issue
Block a user