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

Side by Side Diff: media/cast/sender/h264_vt_encoder.cc

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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
OLDNEW
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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/big_endian.h" 10 #include "base/big_endian.h"
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 // keyframe (at least I think, VT documentation is, erm, sparse). Could 718 // keyframe (at least I think, VT documentation is, erm, sparse). Could
719 // alternatively use kCMSampleAttachmentKey_DependsOnOthers == false. 719 // alternatively use kCMSampleAttachmentKey_DependsOnOthers == false.
720 keyframe = !CFDictionaryContainsKey( 720 keyframe = !CFDictionaryContainsKey(
721 sample_attachments, 721 sample_attachments,
722 CoreMediaGlue::kCMSampleAttachmentKey_NotSync()); 722 CoreMediaGlue::kCMSampleAttachmentKey_NotSync());
723 has_frame_data = true; 723 has_frame_data = true;
724 } 724 }
725 725
726 // Increment the encoder-scoped frame id and assign the new value to this 726 // Increment the encoder-scoped frame id and assign the new value to this
727 // frame. VideoToolbox calls the output callback serially, so this is safe. 727 // frame. VideoToolbox calls the output callback serially, so this is safe.
728 const uint32 frame_id = ++encoder->last_frame_id_; 728 const uint32_t frame_id = ++encoder->last_frame_id_;
729 729
730 scoped_ptr<SenderEncodedFrame> encoded_frame(new SenderEncodedFrame()); 730 scoped_ptr<SenderEncodedFrame> encoded_frame(new SenderEncodedFrame());
731 encoded_frame->frame_id = frame_id; 731 encoded_frame->frame_id = frame_id;
732 encoded_frame->reference_time = request->reference_time; 732 encoded_frame->reference_time = request->reference_time;
733 encoded_frame->rtp_timestamp = request->rtp_timestamp; 733 encoded_frame->rtp_timestamp = request->rtp_timestamp;
734 if (keyframe) { 734 if (keyframe) {
735 encoded_frame->dependency = EncodedFrame::KEY; 735 encoded_frame->dependency = EncodedFrame::KEY;
736 encoded_frame->referenced_frame_id = frame_id; 736 encoded_frame->referenced_frame_id = frame_id;
737 } else { 737 } else {
738 encoded_frame->dependency = EncodedFrame::DEPENDENT; 738 encoded_frame->dependency = EncodedFrame::DEPENDENT;
(...skipping 18 matching lines...) Expand all
757 encoded_frame->encode_completion_time = 757 encoded_frame->encode_completion_time =
758 encoder->cast_environment_->Clock()->NowTicks(); 758 encoder->cast_environment_->Clock()->NowTicks();
759 encoder->cast_environment_->PostTask( 759 encoder->cast_environment_->PostTask(
760 CastEnvironment::MAIN, FROM_HERE, 760 CastEnvironment::MAIN, FROM_HERE,
761 base::Bind(request->frame_encoded_callback, 761 base::Bind(request->frame_encoded_callback,
762 base::Passed(&encoded_frame))); 762 base::Passed(&encoded_frame)));
763 } 763 }
764 764
765 } // namespace cast 765 } // namespace cast
766 } // namespace media 766 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698