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

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

Issue 812643005: Re-add AC3/EAC3 audio demuxing support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unit tests also for MSE mp4 parser code path (by using fragmented mp4) Created 5 years, 11 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 <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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 // Test a file where all video samples start with an Access Unit 241 // Test a file where all video samples start with an Access Unit
242 // Delimiter (AUD) NALU. 242 // Delimiter (AUD) NALU.
243 TEST_F(MP4StreamParserTest, VideoSamplesStartWithAUDs) { 243 TEST_F(MP4StreamParserTest, VideoSamplesStartWithAUDs) {
244 ParseMP4File("bear-1280x720-av_with-aud-nalus_frag.mp4", 512); 244 ParseMP4File("bear-1280x720-av_with-aud-nalus_frag.mp4", 512);
245 } 245 }
246 246
247 // TODO(strobe): Create and test media which uses CENC auxiliary info stored 247 // TODO(strobe): Create and test media which uses CENC auxiliary info stored
248 // inside a private box 248 // inside a private box
249 249
250 #if defined(ENABLE_AC3_EAC3_AUDIO_DEMUXING)
251 TEST_F(MP4StreamParserTest, DemuxingAC3) {
252 std::set<int> audio_object_types;
253 audio_object_types.insert(kAC3);
254 parser_.reset(new MP4StreamParser(audio_object_types, false));
255 ParseMP4File("bear-ac3-frag.mp4", 512);
256 }
257
258 TEST_F(MP4StreamParserTest, DemuxingEAC3) {
259 std::set<int> audio_object_types;
260 audio_object_types.insert(kEAC3);
261 parser_.reset(new MP4StreamParser(audio_object_types, false));
262 ParseMP4File("bear-eac3-frag.mp4", 512);
263 }
264 #endif
265
250 } // namespace mp4 266 } // namespace mp4
251 } // namespace media 267 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698