Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm

Issue 2019423006: Adding more detail to MessageQueue::Dispatch logging. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« webrtc/base/messagequeue.cc ('K') | « webrtc/pc/mediamonitor.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 CVImageBufferRef image_buffer = CMSampleBufferGetImageBuffer(sampleBuffer); 464 CVImageBufferRef image_buffer = CMSampleBufferGetImageBuffer(sampleBuffer);
465 if (image_buffer == NULL) { 465 if (image_buffer == NULL) {
466 return; 466 return;
467 } 467 }
468 468
469 // Retain the buffer and post it to the webrtc thread. It will be released 469 // Retain the buffer and post it to the webrtc thread. It will be released
470 // after it has successfully been signaled. 470 // after it has successfully been signaled.
471 CVBufferRetain(image_buffer); 471 CVBufferRetain(image_buffer);
472 AVFoundationFrame frame(image_buffer, rtc::TimeNanos()); 472 AVFoundationFrame frame(image_buffer, rtc::TimeNanos());
473 _startThread->Post(this, kMessageTypeFrame, 473 _startThread->Post(FROM_HERE, this, kMessageTypeFrame,
474 new rtc::TypedMessageData<AVFoundationFrame>(frame)); 474 new rtc::TypedMessageData<AVFoundationFrame>(frame));
475 } 475 }
476 476
477 void AVFoundationVideoCapturer::OnMessage(rtc::Message *msg) { 477 void AVFoundationVideoCapturer::OnMessage(rtc::Message *msg) {
478 switch (msg->message_id) { 478 switch (msg->message_id) {
479 case kMessageTypeFrame: { 479 case kMessageTypeFrame: {
480 rtc::TypedMessageData<AVFoundationFrame>* data = 480 rtc::TypedMessageData<AVFoundationFrame>* data =
481 static_cast<rtc::TypedMessageData<AVFoundationFrame>*>(msg->pdata); 481 static_cast<rtc::TypedMessageData<AVFoundationFrame>*>(msg->pdata);
482 const AVFoundationFrame& frame = data->data(); 482 const AVFoundationFrame& frame = data->data();
483 OnFrameMessage(frame.image_buffer, frame.capture_time); 483 OnFrameMessage(frame.image_buffer, frame.capture_time);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 // This will call a superclass method that will perform the frame conversion 537 // This will call a superclass method that will perform the frame conversion
538 // to I420. 538 // to I420.
539 SignalFrameCaptured(this, &frame); 539 SignalFrameCaptured(this, &frame);
540 540
541 CVPixelBufferUnlockBaseAddress(image_buffer, lock_flags); 541 CVPixelBufferUnlockBaseAddress(image_buffer, lock_flags);
542 CVBufferRelease(image_buffer); 542 CVBufferRelease(image_buffer);
543 } 543 }
544 544
545 } // namespace webrtc 545 } // namespace webrtc
OLDNEW
« webrtc/base/messagequeue.cc ('K') | « webrtc/pc/mediamonitor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698