| Index: media/capture/video/mac/video_capture_device_decklink_mac.mm
|
| diff --git a/media/capture/video/mac/video_capture_device_decklink_mac.mm b/media/capture/video/mac/video_capture_device_decklink_mac.mm
|
| index c73cb406878a14138661d628af16afc940f8c012..6877f962061ac4d052d8885e8f905907faac93d3 100644
|
| --- a/media/capture/video/mac/video_capture_device_decklink_mac.mm
|
| +++ b/media/capture/video/mac/video_capture_device_decklink_mac.mm
|
| @@ -69,7 +69,8 @@ class DeckLinkCaptureDelegate
|
| ULONG Release() override;
|
|
|
| // Forwarder to VideoCaptureDeviceDeckLinkMac::SendErrorString().
|
| - void SendErrorString(const std::string& reason);
|
| + void SendErrorString(const tracked_objects::Location& from_here,
|
| + const std::string& reason);
|
|
|
| // Forwarder to VideoCaptureDeviceDeckLinkMac::SendLogString().
|
| void SendLogString(const std::string& message);
|
| @@ -143,21 +144,21 @@ void DeckLinkCaptureDelegate::AllocateAndStart(
|
| }
|
| }
|
| if (!decklink_local.get()) {
|
| - SendErrorString("Device id not found in the system");
|
| + SendErrorString(FROM_HERE, "Device id not found in the system");
|
| return;
|
| }
|
|
|
| ScopedDeckLinkPtr<IDeckLinkInput> decklink_input_local;
|
| if (decklink_local->QueryInterface(
|
| IID_IDeckLinkInput, decklink_input_local.ReceiveVoid()) != S_OK) {
|
| - SendErrorString("Error querying input interface.");
|
| + SendErrorString(FROM_HERE, "Error querying input interface.");
|
| return;
|
| }
|
|
|
| ScopedDeckLinkPtr<IDeckLinkDisplayModeIterator> display_mode_iter;
|
| if (decklink_input_local->GetDisplayModeIterator(
|
| display_mode_iter.Receive()) != S_OK) {
|
| - SendErrorString("Error creating Display Mode Iterator");
|
| + SendErrorString(FROM_HERE, "Error creating Display Mode Iterator");
|
| return;
|
| }
|
|
|
| @@ -178,7 +179,7 @@ void DeckLinkCaptureDelegate::AllocateAndStart(
|
| display_mode.Release();
|
| }
|
| if (!chosen_display_mode.get()) {
|
| - SendErrorString("Could not find a display mode");
|
| + SendErrorString(FROM_HERE, "Could not find a display mode");
|
| return;
|
| }
|
| #if !defined(NDEBUG)
|
| @@ -194,13 +195,13 @@ void DeckLinkCaptureDelegate::AllocateAndStart(
|
| if (decklink_input_local->EnableVideoInput(
|
| chosen_display_mode->GetDisplayMode(), bmdFormat8BitYUV,
|
| bmdVideoInputFlagDefault) != S_OK) {
|
| - SendErrorString("Could not select the video format we like.");
|
| + SendErrorString(FROM_HERE, "Could not select the video format we like.");
|
| return;
|
| }
|
|
|
| decklink_input_local->SetCallback(this);
|
| if (decklink_input_local->StartStreams() != S_OK)
|
| - SendErrorString("Could not start capturing");
|
| + SendErrorString(FROM_HERE, "Could not start capturing");
|
|
|
| decklink_.swap(decklink_local);
|
| decklink_input_.swap(decklink_input_local);
|
| @@ -244,7 +245,7 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(
|
| pixel_format = media::PIXEL_FORMAT_ARGB;
|
| break;
|
| default:
|
| - SendErrorString("Unsupported pixel format");
|
| + SendErrorString(FROM_HERE, "Unsupported pixel format");
|
| break;
|
| }
|
|
|
| @@ -288,10 +289,12 @@ ULONG DeckLinkCaptureDelegate::Release() {
|
| return ret_value;
|
| }
|
|
|
| -void DeckLinkCaptureDelegate::SendErrorString(const std::string& reason) {
|
| +void DeckLinkCaptureDelegate::SendErrorString(
|
| + const tracked_objects::Location& from_here,
|
| + const std::string& reason) {
|
| base::AutoLock lock(lock_);
|
| if (frame_receiver_)
|
| - frame_receiver_->SendErrorString(reason);
|
| + frame_receiver_->SendErrorString(from_here, reason);
|
| }
|
|
|
| void DeckLinkCaptureDelegate::SendLogString(const std::string& message) {
|
| @@ -453,11 +456,13 @@ void VideoCaptureDeviceDeckLinkMac::OnIncomingCapturedData(
|
| }
|
| }
|
|
|
| -void VideoCaptureDeviceDeckLinkMac::SendErrorString(const std::string& reason) {
|
| +void VideoCaptureDeviceDeckLinkMac::SendErrorString(
|
| + const tracked_objects::Location& from_here,
|
| + const std::string& reason) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| base::AutoLock lock(lock_);
|
| if (client_)
|
| - client_->OnError(reason);
|
| + client_->OnError(from_here, reason);
|
| }
|
|
|
| void VideoCaptureDeviceDeckLinkMac::SendLogString(const std::string& message) {
|
|
|