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

Side by Side Diff: media/formats/webm/tracks_builder.cc

Issue 1731403002: media: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/formats/webm/tracks_builder.h ('k') | media/formats/webm/webm_cluster_parser.h » ('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 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/formats/webm/tracks_builder.h" 5 #include "media/formats/webm/tracks_builder.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/formats/webm/webm_constants.h" 8 #include "media/formats/webm/webm_constants.h"
9 9
10 namespace media { 10 namespace media {
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 if (track_type == kWebMTrackTypeAudio) { 287 if (track_type == kWebMTrackTypeAudio) {
288 CHECK_GT(audio_channels_, 0); 288 CHECK_GT(audio_channels_, 0);
289 CHECK_GT(audio_sampling_frequency_, 0.0); 289 CHECK_GT(audio_sampling_frequency_, 0.0);
290 } else { 290 } else {
291 CHECK_EQ(audio_channels_, -1); 291 CHECK_EQ(audio_channels_, -1);
292 CHECK_EQ(audio_sampling_frequency_, -1.0); 292 CHECK_EQ(audio_sampling_frequency_, -1.0);
293 } 293 }
294 } 294 }
295 } 295 }
296 296
297 TracksBuilder::Track::Track(const Track& other) = default;
298
297 int TracksBuilder::Track::GetSize() const { 299 int TracksBuilder::Track::GetSize() const {
298 return MasterElementSize(kWebMIdTrackEntry, GetPayloadSize()); 300 return MasterElementSize(kWebMIdTrackEntry, GetPayloadSize());
299 } 301 }
300 302
301 int TracksBuilder::Track::GetVideoPayloadSize() const { 303 int TracksBuilder::Track::GetVideoPayloadSize() const {
302 int payload_size = 0; 304 int payload_size = 0;
303 305
304 if (video_pixel_width_ >= 0) 306 if (video_pixel_width_ >= 0)
305 payload_size += UIntElementSize(kWebMIdPixelWidth, video_pixel_width_); 307 payload_size += UIntElementSize(kWebMIdPixelWidth, video_pixel_width_);
306 if (video_pixel_height_ >= 0) 308 if (video_pixel_height_ >= 0)
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 WriteUIntElement(buf, buf_size, kWebMIdChannels, audio_channels_); 388 WriteUIntElement(buf, buf_size, kWebMIdChannels, audio_channels_);
387 389
388 if (audio_sampling_frequency_ >= 0) { 390 if (audio_sampling_frequency_ >= 0) {
389 WriteDoubleElement(buf, buf_size, kWebMIdSamplingFrequency, 391 WriteDoubleElement(buf, buf_size, kWebMIdSamplingFrequency,
390 audio_sampling_frequency_); 392 audio_sampling_frequency_);
391 } 393 }
392 } 394 }
393 } 395 }
394 396
395 } // namespace media 397 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/webm/tracks_builder.h ('k') | media/formats/webm/webm_cluster_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698