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

Side by Side Diff: media/mp4/mp4_stream_parser.cc

Issue 10534096: Generalize AesDecryptor to make it more spec compliant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 6 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
« no previous file with comments | « media/mp4/mp4_stream_parser.h ('k') | media/webm/webm_stream_parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/logging.h" 8 #include "base/logging.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "media/base/audio_decoder_config.h" 10 #include "media/base/audio_decoder_config.h"
(...skipping 13 matching lines...) Expand all
24 has_audio_(false), 24 has_audio_(false),
25 has_video_(false) { 25 has_video_(false) {
26 } 26 }
27 27
28 MP4StreamParser::~MP4StreamParser() {} 28 MP4StreamParser::~MP4StreamParser() {}
29 29
30 void MP4StreamParser::Init(const InitCB& init_cb, 30 void MP4StreamParser::Init(const InitCB& init_cb,
31 const NewConfigCB& config_cb, 31 const NewConfigCB& config_cb,
32 const NewBuffersCB& audio_cb, 32 const NewBuffersCB& audio_cb,
33 const NewBuffersCB& video_cb, 33 const NewBuffersCB& video_cb,
34 const KeyNeededCB& key_needed_cb, 34 const NeedKeyCB& need_key_cb,
35 const NewMediaSegmentCB& new_segment_cb) { 35 const NewMediaSegmentCB& new_segment_cb) {
36 DCHECK_EQ(state_, kWaitingForInit); 36 DCHECK_EQ(state_, kWaitingForInit);
37 DCHECK(init_cb_.is_null()); 37 DCHECK(init_cb_.is_null());
38 DCHECK(!init_cb.is_null()); 38 DCHECK(!init_cb.is_null());
39 DCHECK(!config_cb.is_null()); 39 DCHECK(!config_cb.is_null());
40 DCHECK(!audio_cb.is_null() || !video_cb.is_null()); 40 DCHECK(!audio_cb.is_null() || !video_cb.is_null());
41 DCHECK(!key_needed_cb.is_null()); 41 DCHECK(!need_key_cb.is_null());
42 42
43 ChangeState(kParsingBoxes); 43 ChangeState(kParsingBoxes);
44 init_cb_ = init_cb; 44 init_cb_ = init_cb;
45 config_cb_ = config_cb; 45 config_cb_ = config_cb;
46 audio_cb_ = audio_cb; 46 audio_cb_ = audio_cb;
47 video_cb_ = video_cb; 47 video_cb_ = video_cb;
48 key_needed_cb_ = key_needed_cb; 48 need_key_cb_ = need_key_cb;
49 new_segment_cb_ = new_segment_cb; 49 new_segment_cb_ = new_segment_cb;
50 } 50 }
51 51
52 void MP4StreamParser::Flush() { 52 void MP4StreamParser::Flush() {
53 DCHECK_NE(state_, kWaitingForInit); 53 DCHECK_NE(state_, kWaitingForInit);
54 54
55 queue_.Reset(); 55 queue_.Reset();
56 moof_head_ = 0; 56 moof_head_ = 0;
57 mdat_tail_ = 0; 57 mdat_tail_ = 0;
58 } 58 }
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 return true; 332 return true;
333 } 333 }
334 334
335 void MP4StreamParser::ChangeState(State new_state) { 335 void MP4StreamParser::ChangeState(State new_state) {
336 DVLOG(2) << "Changing state: " << new_state; 336 DVLOG(2) << "Changing state: " << new_state;
337 state_ = new_state; 337 state_ = new_state;
338 } 338 }
339 339
340 } // namespace mp4 340 } // namespace mp4
341 } // namespace media 341 } // namespace media
OLDNEW
« no previous file with comments | « media/mp4/mp4_stream_parser.h ('k') | media/webm/webm_stream_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698