31 #include <nsThreadUtils.h>
39 static PRLogModuleInfo* gMediacoreFactoryWrapper = nsnull;
40 #define TRACE(args) PR_LOG(gMediacoreFactoryWrapper, PR_LOG_DEBUG, args)
41 #define LOG(args) PR_LOG(gMediacoreFactoryWrapper, PR_LOG_WARN, args)
55 if (!gMediacoreFactoryWrapper)
56 gMediacoreFactoryWrapper = PR_NewLogModule(
"sbMediacoreFactoryWrapper");
59 TRACE((
"sbMediacoreFactoryWrapper[0x%x] - Created",
this));
64 TRACE((
"sbMediacoreFactoryWrapper[0x%x] - Destroyed",
this));
71 NS_ENSURE_SUCCESS(rv, rv);
81 sbMediacoreFactoryWrapper::Initialize(
const nsAString &aFactoryName,
82 const nsAString &aContractID,
86 NS_ENSURE_FALSE(aFactoryName.IsEmpty(), NS_ERROR_INVALID_ARG);
87 NS_ENSURE_FALSE(aContractID.IsEmpty(), NS_ERROR_INVALID_ARG);
88 NS_ENSURE_ARG_POINTER(aCapabilities);
89 NS_ENSURE_ARG_POINTER(aListener);
96 nsCOMPtr<nsIThread>
target;
97 nsresult rv = NS_GetMainThread(getter_AddRefs(target));
98 NS_ENSURE_SUCCESS(rv, rv);
103 NS_PROXY_SYNC | NS_PROXY_ALWAYS,
105 NS_ENSURE_SUCCESS(rv, rv);
134 nsresult rv =
mListener->OnCreate(aInstanceName, _retval);
135 NS_ENSURE_SUCCESS(rv, rv);
nsresult do_GetProxyForObject(nsIEventTarget *aTarget, REFNSIID aIID, nsISupports *aObj, PRInt32 aProxyType, void **aProxyObject)