| OLD | NEW | 
|---|
| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 50     while (start < end) { | 50     while (start < end) { | 
| 51       size_t append_size = std::min(piece_size, | 51       size_t append_size = std::min(piece_size, | 
| 52                                     static_cast<size_t>(end - start)); | 52                                     static_cast<size_t>(end - start)); | 
| 53       if (!AppendData(start, append_size)) | 53       if (!AppendData(start, append_size)) | 
| 54         return false; | 54         return false; | 
| 55       start += append_size; | 55       start += append_size; | 
| 56     } | 56     } | 
| 57     return true; | 57     return true; | 
| 58   } | 58   } | 
| 59 | 59 | 
| 60   void OnInit(bool init_ok, base::TimeDelta duration) { | 60   void OnInit(bool init_ok, | 
|  | 61               base::TimeDelta duration, | 
|  | 62               bool auto_update_timestamp_offset) { | 
| 61     DVLOG(1) << "OnInit: ok=" << init_ok | 63     DVLOG(1) << "OnInit: ok=" << init_ok | 
| 62              << ", dur=" << duration.InMilliseconds(); | 64              << ", dur=" << duration.InMilliseconds() | 
|  | 65              << ", autoTimestampOffset=" << auto_update_timestamp_offset; | 
| 63   } | 66   } | 
| 64 | 67 | 
| 65   bool OnNewConfig(const AudioDecoderConfig& ac, | 68   bool OnNewConfig(const AudioDecoderConfig& ac, | 
| 66                    const VideoDecoderConfig& vc, | 69                    const VideoDecoderConfig& vc, | 
| 67                    const StreamParser::TextTrackConfigMap& tc) { | 70                    const StreamParser::TextTrackConfigMap& tc) { | 
| 68     DVLOG(1) << "OnNewConfig: audio=" << ac.IsValidConfig() | 71     DVLOG(1) << "OnNewConfig: audio=" << ac.IsValidConfig() | 
| 69              << ", video=" << vc.IsValidConfig(); | 72              << ", video=" << vc.IsValidConfig(); | 
| 70     return true; | 73     return true; | 
| 71   } | 74   } | 
| 72 | 75 | 
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 175   // (close to 2^33 / 90000) which results in timestamps wrap around | 178   // (close to 2^33 / 90000) which results in timestamps wrap around | 
| 176   // in the Mpeg2 TS stream. | 179   // in the Mpeg2 TS stream. | 
| 177   ParseMpeg2TsFile("bear-1280x720_ptswraparound.ts", 512); | 180   ParseMpeg2TsFile("bear-1280x720_ptswraparound.ts", 512); | 
| 178   EXPECT_EQ(video_frame_count_, 81); | 181   EXPECT_EQ(video_frame_count_, 81); | 
| 179   EXPECT_GE(video_min_dts_, base::TimeDelta::FromSeconds(95443 - 10)); | 182   EXPECT_GE(video_min_dts_, base::TimeDelta::FromSeconds(95443 - 10)); | 
| 180   EXPECT_LE(video_max_dts_, base::TimeDelta::FromSeconds(95443 + 10)); | 183   EXPECT_LE(video_max_dts_, base::TimeDelta::FromSeconds(95443 + 10)); | 
| 181 } | 184 } | 
| 182 | 185 | 
| 183 }  // namespace mp2t | 186 }  // namespace mp2t | 
| 184 }  // namespace media | 187 }  // namespace media | 
| OLD | NEW | 
|---|