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

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

Issue 611513005: Pass initDataType instead of contentType on OnNeedKey(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 "media/formats/mp4/mp4_stream_parser.h" 5 #include "media/formats/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"
11 #include "media/base/audio_decoder_config.h" 11 #include "media/base/audio_decoder_config.h"
12 #include "media/base/stream_parser_buffer.h" 12 #include "media/base/stream_parser_buffer.h"
13 #include "media/base/text_track_config.h" 13 #include "media/base/text_track_config.h"
14 #include "media/base/video_decoder_config.h" 14 #include "media/base/video_decoder_config.h"
15 #include "media/base/video_util.h" 15 #include "media/base/video_util.h"
16 #include "media/formats/mp4/box_definitions.h" 16 #include "media/formats/mp4/box_definitions.h"
17 #include "media/formats/mp4/box_reader.h" 17 #include "media/formats/mp4/box_reader.h"
18 #include "media/formats/mp4/es_descriptor.h" 18 #include "media/formats/mp4/es_descriptor.h"
19 #include "media/formats/mp4/rcheck.h" 19 #include "media/formats/mp4/rcheck.h"
20 #include "media/formats/mpeg/adts_constants.h" 20 #include "media/formats/mpeg/adts_constants.h"
21 21
22 namespace media { 22 namespace media {
23 namespace mp4 { 23 namespace mp4 {
24 24
25 // TODO(xhwang): Figure out the init data type appropriately once it's spec'ed. 25 static const char kMp4InitDataType[] = "cenc";
ddorwin 2014/09/26 22:09:18 nit: s/Mp4/Cenc/ - IDT != container :)
sandersd (OOO until July 31) 2014/09/26 22:49:56 Done.
26 static const char kMp4InitDataType[] = "video/mp4";
27 26
28 MP4StreamParser::MP4StreamParser(const std::set<int>& audio_object_types, 27 MP4StreamParser::MP4StreamParser(const std::set<int>& audio_object_types,
29 bool has_sbr) 28 bool has_sbr)
30 : state_(kWaitingForInit), 29 : state_(kWaitingForInit),
31 moof_head_(0), 30 moof_head_(0),
32 mdat_tail_(0), 31 mdat_tail_(0),
33 highest_end_offset_(0), 32 highest_end_offset_(0),
34 has_audio_(false), 33 has_audio_(false),
35 has_video_(false), 34 has_video_(false),
36 audio_track_id_(0), 35 audio_track_id_(0),
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 runs.AdvanceSample(); 625 runs.AdvanceSample();
627 } 626 }
628 runs.AdvanceRun(); 627 runs.AdvanceRun();
629 } 628 }
630 629
631 return true; 630 return true;
632 } 631 }
633 632
634 } // namespace mp4 633 } // namespace mp4
635 } // namespace media 634 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698