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

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

Issue 231283005: Add live mode detection in WebM MediaSource parser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, 61 void InitF(bool init_ok,
62 base::TimeDelta duration, 62 base::TimeDelta duration,
63 base::Time wallclock_timeline_offset, 63 base::Time wallclock_timeline_offset,
64 bool auto_update_timestamp_offset) { 64 bool auto_update_timestamp_offset,
65 bool live_mode) {
65 DVLOG(1) << "InitF: ok=" << init_ok << ", dur=" << duration.InMilliseconds() 66 DVLOG(1) << "InitF: ok=" << init_ok << ", dur=" << duration.InMilliseconds()
66 << ", autoTimestampOffset=" << auto_update_timestamp_offset; 67 << ", autoTimestampOffset=" << auto_update_timestamp_offset
68 << ", liveMode=" << live_mode;
67 } 69 }
68 70
69 bool NewConfigF(const AudioDecoderConfig& ac, 71 bool NewConfigF(const AudioDecoderConfig& ac,
70 const VideoDecoderConfig& vc, 72 const VideoDecoderConfig& vc,
71 const StreamParser::TextTrackConfigMap& tc) { 73 const StreamParser::TextTrackConfigMap& tc) {
72 DVLOG(1) << "NewConfigF: audio=" << ac.IsValidConfig() 74 DVLOG(1) << "NewConfigF: audio=" << ac.IsValidConfig()
73 << ", video=" << vc.IsValidConfig(); 75 << ", video=" << vc.IsValidConfig();
74 configs_received_ = true; 76 configs_received_ = true;
75 return true; 77 return true;
76 } 78 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // The parser should fail instead of crash. See http://crbug.com/361347 214 // The parser should fail instead of crash. See http://crbug.com/361347
213 TEST_F(MP4StreamParserTest, MissingSampleAuxInfo) { 215 TEST_F(MP4StreamParserTest, MissingSampleAuxInfo) {
214 ParseMP4File("bear-1280x720-a_frag-cenc_missing-saiz-saio.mp4", 512); 216 ParseMP4File("bear-1280x720-a_frag-cenc_missing-saiz-saio.mp4", 512);
215 } 217 }
216 218
217 // TODO(strobe): Create and test media which uses CENC auxiliary info stored 219 // TODO(strobe): Create and test media which uses CENC auxiliary info stored
218 // inside a private box 220 // inside a private box
219 221
220 } // namespace mp4 222 } // namespace mp4
221 } // namespace media 223 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698