OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 WebRtcCapturedFrame::WebRtcCapturedFrame(const webrtc::VideoFrame& sample, | 427 WebRtcCapturedFrame::WebRtcCapturedFrame(const webrtc::VideoFrame& sample, |
428 void* buffer, | 428 void* buffer, |
429 size_t length) { | 429 size_t length) { |
430 width = sample.width(); | 430 width = sample.width(); |
431 height = sample.height(); | 431 height = sample.height(); |
432 fourcc = FOURCC_I420; | 432 fourcc = FOURCC_I420; |
433 // TODO(hellner): Support pixel aspect ratio (for OSX). | 433 // TODO(hellner): Support pixel aspect ratio (for OSX). |
434 pixel_width = 1; | 434 pixel_width = 1; |
435 pixel_height = 1; | 435 pixel_height = 1; |
436 // Convert units from VideoFrame RenderTimeMs to CapturedFrame (nanoseconds). | 436 // Convert units from VideoFrame RenderTimeMs to CapturedFrame (nanoseconds). |
437 elapsed_time = sample.render_time_ms() * rtc::kNumNanosecsPerMillisec; | 437 time_stamp = sample.render_time_ms() * rtc::kNumNanosecsPerMillisec; |
438 time_stamp = elapsed_time; | |
439 data_size = rtc::checked_cast<uint32>(length); | 438 data_size = rtc::checked_cast<uint32>(length); |
440 data = buffer; | 439 data = buffer; |
441 rotation = sample.rotation(); | 440 rotation = sample.rotation(); |
442 } | 441 } |
443 | 442 |
444 } // namespace cricket | 443 } // namespace cricket |
445 | 444 |
446 #endif // HAVE_WEBRTC_VIDEO | 445 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |