| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/cast/sender/h264_vt_encoder.h" | 5 #include "media/cast/sender/h264_vt_encoder.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 // references (see |kVTCompressionPropertyKey_AllowFrameReordering|). There | 566 // references (see |kVTCompressionPropertyKey_AllowFrameReordering|). There |
| 567 // is no way to prevent multiple reference frames. | 567 // is no way to prevent multiple reference frames. |
| 568 encoded_frame->referenced_frame_id = frame_id - 1; | 568 encoded_frame->referenced_frame_id = frame_id - 1; |
| 569 } | 569 } |
| 570 | 570 |
| 571 if (has_frame_data) { | 571 if (has_frame_data) { |
| 572 video_toolbox::CopySampleBufferToAnnexBBuffer(sbuf, keyframe, | 572 video_toolbox::CopySampleBufferToAnnexBBuffer(sbuf, keyframe, |
| 573 &encoded_frame->data); | 573 &encoded_frame->data); |
| 574 } | 574 } |
| 575 | 575 |
| 576 // TODO(miu): Compute and populate the |deadline_utilization| and | 576 // TODO(miu): Compute and populate the |encoder_utilization| and |
| 577 // |lossy_utilization| performance metrics in |encoded_frame|. | 577 // |lossy_utilization| performance metrics in |encoded_frame|. |
| 578 | 578 |
| 579 encoded_frame->encode_completion_time = | 579 encoded_frame->encode_completion_time = |
| 580 encoder->cast_environment_->Clock()->NowTicks(); | 580 encoder->cast_environment_->Clock()->NowTicks(); |
| 581 encoder->cast_environment_->PostTask( | 581 encoder->cast_environment_->PostTask( |
| 582 CastEnvironment::MAIN, FROM_HERE, | 582 CastEnvironment::MAIN, FROM_HERE, |
| 583 base::Bind(request->frame_encoded_callback, | 583 base::Bind(request->frame_encoded_callback, |
| 584 base::Passed(&encoded_frame))); | 584 base::Passed(&encoded_frame))); |
| 585 } | 585 } |
| 586 | 586 |
| 587 } // namespace cast | 587 } // namespace cast |
| 588 } // namespace media | 588 } // namespace media |
| OLD | NEW |