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

Side by Side Diff: media/remoting/proto_utils.cc

Issue 2748923002: Remove dead splice_timestamp() field from DecoderBuffer. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « media/mojo/interfaces/media_types.mojom ('k') | media/remoting/rpc.proto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/remoting/proto_utils.h" 5 #include "media/remoting/proto_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/big_endian.h" 9 #include "base/big_endian.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 has_discard = true; 81 has_discard = true;
82 back_discard = 82 back_discard =
83 base::TimeDelta::FromMicroseconds(buffer_message.back_discard_usec()); 83 base::TimeDelta::FromMicroseconds(buffer_message.back_discard_usec());
84 } 84 }
85 85
86 if (has_discard) { 86 if (has_discard) {
87 buffer->set_discard_padding( 87 buffer->set_discard_padding(
88 DecoderBuffer::DiscardPadding(front_discard, back_discard)); 88 DecoderBuffer::DiscardPadding(front_discard, back_discard));
89 } 89 }
90 90
91 if (buffer_message.has_splice_timestamp_usec()) {
92 buffer->set_splice_timestamp(base::TimeDelta::FromMicroseconds(
93 buffer_message.splice_timestamp_usec()));
94 }
95
96 if (buffer_message.has_side_data()) { 91 if (buffer_message.has_side_data()) {
97 buffer->CopySideDataFrom( 92 buffer->CopySideDataFrom(
98 reinterpret_cast<const uint8_t*>(buffer_message.side_data().data()), 93 reinterpret_cast<const uint8_t*>(buffer_message.side_data().data()),
99 buffer_message.side_data().size()); 94 buffer_message.side_data().size());
100 } 95 }
101 96
102 return buffer; 97 return buffer;
103 } 98 }
104 99
105 void ConvertDecryptConfigToProto(const DecryptConfig& decrypt_config, 100 void ConvertDecryptConfigToProto(const DecryptConfig& decrypt_config,
(...skipping 27 matching lines...) Expand all
133 128
134 if (decoder_buffer.decrypt_config()) { 129 if (decoder_buffer.decrypt_config()) {
135 ConvertDecryptConfigToProto(*decoder_buffer.decrypt_config(), 130 ConvertDecryptConfigToProto(*decoder_buffer.decrypt_config(),
136 buffer_message->mutable_decrypt_config()); 131 buffer_message->mutable_decrypt_config());
137 } 132 }
138 133
139 buffer_message->set_front_discard_usec( 134 buffer_message->set_front_discard_usec(
140 decoder_buffer.discard_padding().first.InMicroseconds()); 135 decoder_buffer.discard_padding().first.InMicroseconds());
141 buffer_message->set_back_discard_usec( 136 buffer_message->set_back_discard_usec(
142 decoder_buffer.discard_padding().second.InMicroseconds()); 137 decoder_buffer.discard_padding().second.InMicroseconds());
143 buffer_message->set_splice_timestamp_usec(
144 decoder_buffer.splice_timestamp().InMicroseconds());
145 138
146 if (decoder_buffer.side_data_size()) { 139 if (decoder_buffer.side_data_size()) {
147 buffer_message->set_side_data(decoder_buffer.side_data(), 140 buffer_message->set_side_data(decoder_buffer.side_data(),
148 decoder_buffer.side_data_size()); 141 decoder_buffer.side_data_size());
149 } 142 }
150 } 143 }
151 144
152 } // namespace 145 } // namespace
153 146
154 scoped_refptr<DecoderBuffer> ByteArrayToDecoderBuffer(const uint8_t* data, 147 scoped_refptr<DecoderBuffer> ByteArrayToDecoderBuffer(const uint8_t* data,
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 CdmPromiseResult::~CdmPromiseResult() = default; 459 CdmPromiseResult::~CdmPromiseResult() = default;
467 460
468 CdmPromiseResult CdmPromiseResult::SuccessResult() { 461 CdmPromiseResult CdmPromiseResult::SuccessResult() {
469 CdmPromiseResult result(static_cast<CdmPromise::Exception>(0), 0, ""); 462 CdmPromiseResult result(static_cast<CdmPromise::Exception>(0), 0, "");
470 result.success_ = true; 463 result.success_ = true;
471 return result; 464 return result;
472 } 465 }
473 466
474 } // namespace remoting 467 } // namespace remoting
475 } // namespace media 468 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/interfaces/media_types.mojom ('k') | media/remoting/rpc.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698