}
mozilla::ipc::IPCResult CamerasChild::RecvReplyFailure(void) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
MonitorAutoLock monitor(mReplyMonitor);
mReceivedReply = true;
mReplySuccess = false;
}
mozilla::ipc::IPCResult CamerasChild::RecvReplySuccess(void) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
MonitorAutoLock monitor(mReplyMonitor);
mReceivedReply = true;
mReplySuccess = true;
mozilla::ipc::IPCResult CamerasChild::RecvReplyNumberOfCapabilities(
const int& numdev) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
MonitorAutoLock monitor(mReplyMonitor);
mReceivedReply = true;
mReplySuccess = true;
int CamerasChild::NumberOfCapabilities(CaptureEngine aCapEngine,
const char* deviceUniqueIdUTF8) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
LOG(("NumberOfCapabilities for %s", deviceUniqueIdUTF8));
nsCString unique_id(deviceUniqueIdUTF8);
nsCOMPtr<nsIRunnable> runnable =
}
int CamerasChild::NumberOfCaptureDevices(CaptureEngine aCapEngine) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
nsCOMPtr<nsIRunnable> runnable = mozilla::NewRunnableMethod<CaptureEngine>(
"camera::PCamerasChild::SendNumberOfCaptureDevices", this,
&CamerasChild::SendNumberOfCaptureDevices, aCapEngine);
mozilla::ipc::IPCResult CamerasChild::RecvReplyNumberOfCaptureDevices(
const int& numdev) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
MonitorAutoLock monitor(mReplyMonitor);
mReceivedReply = true;
mReplySuccess = true;
}
int CamerasChild::EnsureInitialized(CaptureEngine aCapEngine) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
nsCOMPtr<nsIRunnable> runnable = mozilla::NewRunnableMethod<CaptureEngine>(
"camera::PCamerasChild::SendEnsureInitialized", this,
&CamerasChild::SendEnsureInitialized, aCapEngine);
mozilla::ipc::IPCResult CamerasChild::RecvReplyGetCaptureCapability(
const VideoCaptureCapability& ipcCapability) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
MonitorAutoLock monitor(mReplyMonitor);
mReceivedReply = true;
mReplySuccess = true;
CaptureEngine aCapEngine, unsigned int list_number, char* device_nameUTF8,
const unsigned int device_nameUTF8Length, char* unique_idUTF8,
const unsigned int unique_idUTF8Length, bool* scary) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
nsCOMPtr<nsIRunnable> runnable =
mozilla::NewRunnableMethod<CaptureEngine, unsigned int>(
"camera::PCamerasChild::SendGetCaptureDevice", this,
mozilla::ipc::IPCResult CamerasChild::RecvReplyGetCaptureDevice(
const nsCString& device_name, const nsCString& device_id,
const bool& scary) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
MonitorAutoLock monitor(mReplyMonitor);
mReceivedReply = true;
mReplySuccess = true;
CaptureEngine aCapEngine, const char* unique_idUTF8,
const unsigned int unique_idUTF8Length, int& aStreamId,
const mozilla::ipc::PrincipalInfo& aPrincipalInfo) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
nsCString unique_id(unique_idUTF8);
nsCOMPtr<nsIRunnable> runnable =
mozilla::NewRunnableMethod<CaptureEngine, nsCString,
mozilla::ipc::IPCResult CamerasChild::RecvReplyAllocateCaptureDevice(
const int& numdev) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
MonitorAutoLock monitor(mReplyMonitor);
mReceivedReply = true;
mReplySuccess = true;
int CamerasChild::ReleaseCaptureDevice(CaptureEngine aCapEngine,
const int capture_id) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
nsCOMPtr<nsIRunnable> runnable =
mozilla::NewRunnableMethod<CaptureEngine, int>(
"camera::PCamerasChild::SendReleaseCaptureDevice", this,
int CamerasChild::StartCapture(CaptureEngine aCapEngine, const int capture_id,
webrtc::VideoCaptureCapability& webrtcCaps,
FrameRelay* cb) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
AddCallback(aCapEngine, capture_id, cb);
VideoCaptureCapability capCap(
webrtcCaps.width, webrtcCaps.height, webrtcCaps.maxFPS,
int CamerasChild::FocusOnSelectedSource(CaptureEngine aCapEngine,
const int aCaptureId) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
nsCOMPtr<nsIRunnable> runnable =
mozilla::NewRunnableMethod<CaptureEngine, int>(
"camera::PCamerasChild::SendFocusOnSelectedSource", this,
}
int CamerasChild::StopCapture(CaptureEngine aCapEngine, const int capture_id) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
nsCOMPtr<nsIRunnable> runnable =
mozilla::NewRunnableMethod<CaptureEngine, int>(
"camera::PCamerasChild::SendStopCapture", this,
// InputObserver is owned by CamerasParent, and it has a ref to CamerasParent
void InputObserver::OnDeviceChange() {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
MOZ_ASSERT(mParent);
RefPtr<InputObserver> self(this);
}
void CamerasParent::StopVideoCapture() {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
// We are called from the main thread (xpcom-shutdown) or
// from PBackground (when the Actor shuts down).
// Shut down the WebRTC stack (on the capture thread)
}
void CallbackHelper::OnFrame(const webrtc::VideoFrame& aVideoFrame) {
- LOG_VERBOSE((__PRETTY_FUNCTION__));
+ LOG_VERBOSE(("%s", __PRETTY_FUNCTION__));
RefPtr<DeliverFrameRunnable> runnable = nullptr;
// Get frame properties
camera::VideoFrameProperties properties;
}
bool CamerasParent::SetupEngine(CaptureEngine aCapEngine) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
StaticRefPtr<VideoEngine>& engine = sEngines[aCapEngine];
if (!engine) {
}
void CamerasParent::CloseEngines() {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
if (!mWebRTCAlive) {
return;
}
}
VideoEngine* CamerasParent::EnsureInitialized(int aEngine) {
- LOG_VERBOSE((__PRETTY_FUNCTION__));
+ LOG_VERBOSE(("%s", __PRETTY_FUNCTION__));
// We're shutting down, don't try to do new WebRTC ops.
if (!mWebRTCAlive) {
return nullptr;
// perhaps via Promises.
mozilla::ipc::IPCResult CamerasParent::RecvNumberOfCaptureDevices(
const CaptureEngine& aCapEngine) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
LOG(("CaptureEngine=%d", aCapEngine));
RefPtr<CamerasParent> self(this);
RefPtr<Runnable> webrtc_runnable = NewRunnableFrom([self, aCapEngine]() {
mozilla::ipc::IPCResult CamerasParent::RecvEnsureInitialized(
const CaptureEngine& aCapEngine) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
RefPtr<CamerasParent> self(this);
RefPtr<Runnable> webrtc_runnable = NewRunnableFrom([self, aCapEngine]() {
mozilla::ipc::IPCResult CamerasParent::RecvNumberOfCapabilities(
const CaptureEngine& aCapEngine, const nsCString& unique_id) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
LOG(("Getting caps for %s", unique_id.get()));
RefPtr<CamerasParent> self(this);
mozilla::ipc::IPCResult CamerasParent::RecvGetCaptureCapability(
const CaptureEngine& aCapEngine, const nsCString& unique_id,
const int& num) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
LOG(("RecvGetCaptureCapability: %s %d", unique_id.get(), num));
RefPtr<CamerasParent> self(this);
mozilla::ipc::IPCResult CamerasParent::RecvGetCaptureDevice(
const CaptureEngine& aCapEngine, const int& aListNumber) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
RefPtr<CamerasParent> self(this);
RefPtr<Runnable> webrtc_runnable = NewRunnableFrom([self, aCapEngine,
mozilla::ipc::IPCResult CamerasParent::RecvReleaseCaptureDevice(
const CaptureEngine& aCapEngine, const int& numdev) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
LOG(("RecvReleaseCamera device nr %d", numdev));
RefPtr<CamerasParent> self(this);
mozilla::ipc::IPCResult CamerasParent::RecvStartCapture(
const CaptureEngine& aCapEngine, const int& capnum,
const VideoCaptureCapability& ipcCaps) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
RefPtr<CamerasParent> self(this);
RefPtr<Runnable> webrtc_runnable = NewRunnableFrom([self, aCapEngine, capnum,
ipcCaps]() {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
CallbackHelper** cbh;
int error = -1;
if (self->EnsureInitialized(aCapEngine)) {
mozilla::ipc::IPCResult CamerasParent::RecvFocusOnSelectedSource(
const CaptureEngine& aCapEngine, const int& aCapNum) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
RefPtr<Runnable> webrtc_runnable = NewRunnableFrom(
[self = RefPtr<CamerasParent>(this), aCapEngine, aCapNum]() {
if (auto engine = self->EnsureInitialized(aCapEngine)) {
mozilla::ipc::IPCResult CamerasParent::RecvStopCapture(
const CaptureEngine& aCapEngine, const int& capnum) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
RefPtr<CamerasParent> self(this);
RefPtr<Runnable> webrtc_runnable =
}
mozilla::ipc::IPCResult CamerasParent::RecvAllDone() {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
// Don't try to send anything to the child now
mChildIsAlive = false;
IProtocol* mgr = Manager();
void CamerasParent::ActorDestroy(ActorDestroyReason aWhy) {
// No more IPC from here
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
StopIPC();
// Shut down WebRTC (if we're not in full shutdown, else this
// will already have happened)
virtual ~OriginKeyStore() {
StaticMutexAutoLock lock(sOriginKeyStoreMutex);
sOriginKeyStore = nullptr;
- LOG((__FUNCTION__));
+ LOG(("%s", __FUNCTION__));
}
public:
void Parent<Super>::ActorDestroy(ActorDestroyReason aWhy) {
// No more IPC from here
mDestroyed = true;
- LOG((__FUNCTION__));
+ LOG(("%s", __FUNCTION__));
}
template <class Super>
int VideoEngine::sId = 0;
#if defined(ANDROID)
int VideoEngine::SetAndroidObjects() {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
JavaVM* const javaVM = mozilla::jni::GetVM();
if (!javaVM || webrtc::SetCaptureAndroidVM(javaVM) != 0) {
void VideoEngine::CreateVideoCapture(int32_t& id,
const char* deviceUniqueIdUTF8) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
MOZ_ASSERT(deviceUniqueIdUTF8);
id = GenerateId();
std::shared_ptr<webrtc::VideoCaptureModule::DeviceInfo>
VideoEngine::GetOrCreateVideoCaptureDeviceInfo() {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
int64_t currentTime = 0;
const char* capDevTypeName =
already_AddRefed<VideoEngine> VideoEngine::Create(
UniquePtr<const webrtc::Config>&& aConfig) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
LOG(("Creating new VideoEngine with CaptureDeviceType %s",
aConfig->Get<webrtc::CaptureDeviceInfo>().TypeName()));
return do_AddRef(new VideoEngine(std::move(aConfig)));
mCaptureDevInfo(aConfig->Get<webrtc::CaptureDeviceInfo>()),
mDeviceInfo(nullptr),
mConfig(std::move(aConfig)) {
- LOG((__PRETTY_FUNCTION__));
+ LOG(("%s", __PRETTY_FUNCTION__));
}
} // namespace camera
}
void MediaEngineRemoteVideoSource::Init() {
- LOG(__PRETTY_FUNCTION__);
+ LOG("%s", __PRETTY_FUNCTION__);
AssertIsOnOwningThread();
char deviceName[kMaxDeviceNameLength];
}
void MediaEngineRemoteVideoSource::Shutdown() {
- LOG(__PRETTY_FUNCTION__);
+ LOG("%s", __PRETTY_FUNCTION__);
AssertIsOnOwningThread();
if (!mInitDone) {
}
void MediaEngineRemoteVideoSource::SetName(nsString aName) {
- LOG(__PRETTY_FUNCTION__);
+ LOG("%s", __PRETTY_FUNCTION__);
AssertIsOnOwningThread();
mDeviceName = std::move(aName);
const nsString& aDeviceId,
const mozilla::ipc::PrincipalInfo& aPrincipalInfo,
const char** aOutBadConstraint) {
- LOG(__PRETTY_FUNCTION__);
+ LOG("%s", __PRETTY_FUNCTION__);
AssertIsOnOwningThread();
MOZ_ASSERT(mState == kReleased);
}
nsresult MediaEngineRemoteVideoSource::Deallocate() {
- LOG(__PRETTY_FUNCTION__);
+ LOG("%s", __PRETTY_FUNCTION__);
AssertIsOnOwningThread();
MOZ_ASSERT(mState == kStopped || mState == kAllocated);
void MediaEngineRemoteVideoSource::SetTrack(
const RefPtr<SourceMediaStream>& aStream, TrackID aTrackID,
const PrincipalHandle& aPrincipal) {
- LOG(__PRETTY_FUNCTION__);
+ LOG("%s", __PRETTY_FUNCTION__);
AssertIsOnOwningThread();
MOZ_ASSERT(mState == kAllocated);
}
nsresult MediaEngineRemoteVideoSource::Start() {
- LOG(__PRETTY_FUNCTION__);
+ LOG("%s", __PRETTY_FUNCTION__);
AssertIsOnOwningThread();
MOZ_ASSERT(mState == kAllocated || mState == kStopped);
}
nsresult MediaEngineRemoteVideoSource::FocusOnSelectedSource() {
- LOG(__PRETTY_FUNCTION__);
+ LOG("%s", __PRETTY_FUNCTION__);
AssertIsOnOwningThread();
int result;
}
nsresult MediaEngineRemoteVideoSource::Stop() {
- LOG(__PRETTY_FUNCTION__);
+ LOG("%s", __PRETTY_FUNCTION__);
AssertIsOnOwningThread();
if (mState == kStopped || mState == kAllocated) {
nsresult MediaEngineRemoteVideoSource::Reconfigure(
const MediaTrackConstraints& aConstraints, const MediaEnginePrefs& aPrefs,
const nsString& aDeviceId, const char** aOutBadConstraint) {
- LOG(__PRETTY_FUNCTION__);
+ LOG("%s", __PRETTY_FUNCTION__);
AssertIsOnOwningThread();
MOZ_ASSERT(mInitDone);
const NormalizedConstraints& aConstraints, const MediaEnginePrefs& aPrefs,
const nsString& aDeviceId, webrtc::CaptureCapability& aCapability,
const DistanceCalculation aCalculate) {
- LOG(__PRETTY_FUNCTION__);
+ LOG("%s", __PRETTY_FUNCTION__);
AssertIsOnOwningThread();
if (MOZ_LOG_TEST(gMediaManagerLog, LogLevel::Debug)) {
}
void MediaEngineRemoteVideoSource::Refresh(int aIndex) {
- LOG(__PRETTY_FUNCTION__);
+ LOG("%s", __PRETTY_FUNCTION__);
AssertIsOnOwningThread();
// NOTE: mCaptureIndex might have changed when allocated!