Temporary add dummy implementation to RefCountModule. The reason is so that ADM and VideoCapture implementations can change to refcounted versions before forcing them.
Review URL: http://webrtc-codereview.appspot.com/139014 git-svn-id: http://webrtc.googlecode.com/svn/trunk@527 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
1e53166569
commit
ea72c34fb9
@ -11,6 +11,8 @@
|
||||
#ifndef MODULES_INTERFACE_MODULE_H_
|
||||
#define MODULES_INTERFACE_MODULE_H_
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -41,13 +43,23 @@ class RefCountedModule : public Module {
|
||||
public:
|
||||
// Increase the reference count by one.
|
||||
// Returns the incremented reference count.
|
||||
virtual int32_t AddRef() = 0;
|
||||
// TODO(perkj): Make this pure virtual when Chromium have implemented
|
||||
// reference counting ADM and Video capture module.
|
||||
virtual int32_t AddRef() {
|
||||
assert("Not implemented.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Decrease the reference count by one.
|
||||
// Returns the decreased reference count.
|
||||
// Returns 0 if the last reference was just released.
|
||||
// When the reference count reach 0 the object will self-destruct.
|
||||
virtual int32_t Release() = 0;
|
||||
// TODO(perkj): Make this pure virtual when Chromium have implemented
|
||||
// reference counting ADM and Video capture module.
|
||||
virtual int32_t Release() {
|
||||
assert("Not implemented.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~RefCountedModule() {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user