| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 void InitF(bool init_ok, base::TimeDelta duration) { | 56 void InitF(bool init_ok, base::TimeDelta duration) { |
| 57 DVLOG(1) << "InitF: ok=" << init_ok | 57 DVLOG(1) << "InitF: ok=" << init_ok |
| 58 << ", dur=" << duration.InMilliseconds(); | 58 << ", dur=" << duration.InMilliseconds(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool NewConfigF(const AudioDecoderConfig& ac, | 61 bool NewConfigF(const AudioDecoderConfig& ac, |
| 62 const VideoDecoderConfig& vc) { | 62 const VideoDecoderConfig& vc) { |
| 63 DVLOG(1) << "NewConfigF: audio=" << ac.IsValidConfig() | 63 DVLOG(1) << "NewConfigF: audio=" << ac.IsValidConfig() |
| 64 << ", video=" << vc.IsValidConfig(); | 64 << ", video=" << vc.IsValidConfig(); |
| 65 | |
| 66 // TODO(strobe): Until http://crbug.com/122913 is fixed, we want to make | |
| 67 // sure that this callback isn't called more than once per stream. Remove | |
| 68 // when that bug is fixed. | |
| 69 EXPECT_FALSE(configs_received_); | |
| 70 configs_received_ = true; | 65 configs_received_ = true; |
| 71 return true; | 66 return true; |
| 72 } | 67 } |
| 73 | 68 |
| 74 bool NewBuffersF(const StreamParser::BufferQueue& bufs) { | 69 bool NewBuffersF(const StreamParser::BufferQueue& bufs) { |
| 75 DVLOG(2) << "NewBuffersF: " << bufs.size() << " buffers"; | 70 DVLOG(2) << "NewBuffersF: " << bufs.size() << " buffers"; |
| 76 for (StreamParser::BufferQueue::const_iterator buf = bufs.begin(); | 71 for (StreamParser::BufferQueue::const_iterator buf = bufs.begin(); |
| 77 buf != bufs.end(); buf++) { | 72 buf != bufs.end(); buf++) { |
| 78 DVLOG(3) << " n=" << buf - bufs.begin() | 73 DVLOG(3) << " n=" << buf - bufs.begin() |
| 79 << ", size=" << (*buf)->GetDataSize() | 74 << ", size=" << (*buf)->GetDataSize() |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 EXPECT_TRUE(AppendDataInPieces(buffer->GetData(), | 156 EXPECT_TRUE(AppendDataInPieces(buffer->GetData(), |
| 162 buffer->GetDataSize(), | 157 buffer->GetDataSize(), |
| 163 512)); | 158 512)); |
| 164 } | 159 } |
| 165 | 160 |
| 166 // TODO(strobe): Create and test media which uses CENC auxiliary info stored | 161 // TODO(strobe): Create and test media which uses CENC auxiliary info stored |
| 167 // inside a private box | 162 // inside a private box |
| 168 | 163 |
| 169 } // namespace mp4 | 164 } // namespace mp4 |
| 170 } // namespace media | 165 } // namespace media |
| OLD | NEW |