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

Side by Side Diff: media/formats/mp4/mp4_stream_parser_unittest.cc

Issue 195973006: Allow StreamParsers to request automatic timestampOffset updates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 while (start < end) { 51 while (start < end) {
52 size_t append_size = std::min(piece_size, 52 size_t append_size = std::min(piece_size,
53 static_cast<size_t>(end - start)); 53 static_cast<size_t>(end - start));
54 if (!AppendData(start, append_size)) 54 if (!AppendData(start, append_size))
55 return false; 55 return false;
56 start += append_size; 56 start += append_size;
57 } 57 }
58 return true; 58 return true;
59 } 59 }
60 60
61 void InitF(bool init_ok, base::TimeDelta duration) { 61 void InitF(bool init_ok,
62 DVLOG(1) << "InitF: ok=" << init_ok 62 base::TimeDelta duration,
63 << ", dur=" << duration.InMilliseconds(); 63 bool auto_update_timestamp_offset) {
64 DVLOG(1) << "OnInit: ok=" << init_ok
acolwell GONE FROM CHROMIUM 2014/03/17 22:52:17 nit: s/OnInit/InitF since that is the actual name
DaleCurtis 2014/03/18 00:14:02 Done.
65 << ", dur=" << duration.InMilliseconds()
66 << ", autoTimestampOffset=" << auto_update_timestamp_offset;
64 } 67 }
65 68
66 bool NewConfigF(const AudioDecoderConfig& ac, 69 bool NewConfigF(const AudioDecoderConfig& ac,
67 const VideoDecoderConfig& vc, 70 const VideoDecoderConfig& vc,
68 const StreamParser::TextTrackConfigMap& tc) { 71 const StreamParser::TextTrackConfigMap& tc) {
69 DVLOG(1) << "NewConfigF: audio=" << ac.IsValidConfig() 72 DVLOG(1) << "NewConfigF: audio=" << ac.IsValidConfig()
70 << ", video=" << vc.IsValidConfig(); 73 << ", video=" << vc.IsValidConfig();
71 configs_received_ = true; 74 configs_received_ = true;
72 return true; 75 return true;
73 } 76 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 EXPECT_TRUE(AppendDataInPieces(buffer->data() + kFirstMoofOffset, 205 EXPECT_TRUE(AppendDataInPieces(buffer->data() + kFirstMoofOffset,
203 buffer->data_size() - kFirstMoofOffset, 206 buffer->data_size() - kFirstMoofOffset,
204 512)); 207 512));
205 } 208 }
206 209
207 // TODO(strobe): Create and test media which uses CENC auxiliary info stored 210 // TODO(strobe): Create and test media which uses CENC auxiliary info stored
208 // inside a private box 211 // inside a private box
209 212
210 } // namespace mp4 213 } // namespace mp4
211 } // namespace media 214 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698