33 #include <sbIMediacore.h>
40 static PRLogModuleInfo* gBaseMediacoreFactory = nsnull;
41 #define TRACE(args) PR_LOG(gBaseMediacoreFactory, PR_LOG_DEBUG, args)
42 #define LOG(args) PR_LOG(gBaseMediacoreFactory, PR_LOG_WARN, args)
57 if (!gBaseMediacoreFactory)
58 gBaseMediacoreFactory= PR_NewLogModule(
"sbBaseMediacoreFactory");
61 TRACE((
"sbBaseMediacoreFactory[0x%x] - Created",
this));
66 TRACE((
"sbBaseMediacoreFactory[0x%x] - Destroyed",
this));
70 nsAutoMonitor::DestroyMonitor(
mMonitor);
77 TRACE((
"sbBaseMediacoreFactory[0x%x] - InitBaseMediacoreFactory",
this));
79 mMonitor = nsAutoMonitor::NewMonitor(
"sbBaseMediacoreFactory::mMonitor");
80 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_OUT_OF_MEMORY);
88 TRACE((
"sbBaseMediacoreFactory[0x%x] - Init",
this));
89 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
100 TRACE((
"sbBaseMediacoreFactory[0x%x] - Init",
this));
101 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
110 sbBaseMediacoreFactory::GetContractID(nsAString & aContractID)
112 TRACE((
"sbBaseMediacoreFactory[0x%x] - Init",
this));
113 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
122 sbBaseMediacoreFactory::GetName(nsAString &
aName)
124 TRACE((
"sbBaseMediacoreFactory[0x%x] - Init",
this));
125 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
134 sbBaseMediacoreFactory::GetCapabilities(
137 TRACE((
"sbBaseMediacoreFactory[0x%x] - GetCapabilities",
this));
138 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
139 NS_ENSURE_ARG_POINTER(aCapabilities);
146 sbBaseMediacoreFactory::Create(
const nsAString & aInstanceName,
149 TRACE((
"sbBaseMediacoreFactory[0x%x] - Create",
this));
150 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
151 NS_ENSURE_ARG_POINTER(_retval);
155 nsresult rv =
OnCreate(aInstanceName, _retval);
156 NS_ENSURE_SUCCESS(rv, rv);
157 NS_ENSURE_TRUE(*_retval, NS_ERROR_UNEXPECTED);
178 return NS_ERROR_NOT_IMPLEMENTED;
195 return NS_ERROR_NOT_IMPLEMENTED;
208 return NS_ERROR_NOT_IMPLEMENTED;