
BUG=2164 R=andrew@webrtc.org, pbos@webrtc.org Review URL: https://webrtc-codereview.appspot.com/6269004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5373 4adac7df-926f-26a2-2b94-8c16560cd09d
50 lines
1.5 KiB
C++
50 lines
1.5 KiB
C++
/*
|
|
* Copyright (c) 2011 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_MODULES_UTILITY_SOURCE_PROCESS_THREAD_IMPL_H_
|
|
#define WEBRTC_MODULES_UTILITY_SOURCE_PROCESS_THREAD_IMPL_H_
|
|
|
|
#include <list>
|
|
|
|
#include "webrtc/modules/utility/interface/process_thread.h"
|
|
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
|
|
#include "webrtc/system_wrappers/interface/event_wrapper.h"
|
|
#include "webrtc/system_wrappers/interface/thread_wrapper.h"
|
|
#include "webrtc/typedefs.h"
|
|
|
|
namespace webrtc {
|
|
class ProcessThreadImpl : public ProcessThread
|
|
{
|
|
public:
|
|
ProcessThreadImpl();
|
|
virtual ~ProcessThreadImpl();
|
|
|
|
virtual int32_t Start();
|
|
virtual int32_t Stop();
|
|
|
|
virtual int32_t RegisterModule(Module* module);
|
|
virtual int32_t DeRegisterModule(const Module* module);
|
|
|
|
protected:
|
|
static bool Run(void* obj);
|
|
|
|
bool Process();
|
|
|
|
private:
|
|
typedef std::list<Module*> ModuleList;
|
|
EventWrapper& _timeEvent;
|
|
CriticalSectionWrapper* _critSectModules;
|
|
ModuleList _modules;
|
|
ThreadWrapper* _thread;
|
|
};
|
|
} // namespace webrtc
|
|
|
|
#endif // WEBRTC_MODULES_UTILITY_SOURCE_PROCESS_THREAD_IMPL_H_
|