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 "media/mp4/mp4_stream_parser.h" | 5 #include "media/mp4/mp4_stream_parser.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 27 matching lines...) Loading... |
38 is_video_track_encrypted_(false) { | 38 is_video_track_encrypted_(false) { |
39 } | 39 } |
40 | 40 |
41 MP4StreamParser::~MP4StreamParser() {} | 41 MP4StreamParser::~MP4StreamParser() {} |
42 | 42 |
43 void MP4StreamParser::Init(const InitCB& init_cb, | 43 void MP4StreamParser::Init(const InitCB& init_cb, |
44 const NewConfigCB& config_cb, | 44 const NewConfigCB& config_cb, |
45 const NewBuffersCB& new_buffers_cb, | 45 const NewBuffersCB& new_buffers_cb, |
46 const NewTextBuffersCB& /* text_cb */ , | 46 const NewTextBuffersCB& /* text_cb */ , |
47 const NeedKeyCB& need_key_cb, | 47 const NeedKeyCB& need_key_cb, |
48 const AddTextTrackCB& /* add_text_track_cb */ , | 48 const NewTextTrackCB& /* new_text_track_cb */ , |
49 const NewMediaSegmentCB& new_segment_cb, | 49 const NewMediaSegmentCB& new_segment_cb, |
50 const base::Closure& end_of_segment_cb, | 50 const base::Closure& end_of_segment_cb, |
51 const LogCB& log_cb) { | 51 const LogCB& log_cb) { |
52 DCHECK_EQ(state_, kWaitingForInit); | 52 DCHECK_EQ(state_, kWaitingForInit); |
53 DCHECK(init_cb_.is_null()); | 53 DCHECK(init_cb_.is_null()); |
54 DCHECK(!init_cb.is_null()); | 54 DCHECK(!init_cb.is_null()); |
55 DCHECK(!config_cb.is_null()); | 55 DCHECK(!config_cb.is_null()); |
56 DCHECK(!new_buffers_cb.is_null()); | 56 DCHECK(!new_buffers_cb.is_null()); |
57 DCHECK(!need_key_cb.is_null()); | 57 DCHECK(!need_key_cb.is_null()); |
58 DCHECK(!end_of_segment_cb.is_null()); | 58 DCHECK(!end_of_segment_cb.is_null()); |
(...skipping 510 matching lines...) Loading... |
569 return !err; | 569 return !err; |
570 } | 570 } |
571 | 571 |
572 void MP4StreamParser::ChangeState(State new_state) { | 572 void MP4StreamParser::ChangeState(State new_state) { |
573 DVLOG(2) << "Changing state: " << new_state; | 573 DVLOG(2) << "Changing state: " << new_state; |
574 state_ = new_state; | 574 state_ = new_state; |
575 } | 575 } |
576 | 576 |
577 } // namespace mp4 | 577 } // namespace mp4 |
578 } // namespace media | 578 } // namespace media |
OLD | NEW |