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

Side by Side Diff: media/test/pipeline_integration_test.cc

Issue 2320043005: Read directly from 'senc' box when 'senc' box is present (Closed)
Patch Set: git cl format Created 4 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
« no previous file with comments | « media/test/data/bear-640x360-v_frag-cenc-senc-no-saiz-saio.mp4 ('k') | no next file » | 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after
1945 1945
1946 source.EndOfStream(); 1946 source.EndOfStream();
1947 1947
1948 Play(); 1948 Play();
1949 1949
1950 ASSERT_TRUE(WaitUntilOnEnded()); 1950 ASSERT_TRUE(WaitUntilOnEnded());
1951 source.Shutdown(); 1951 source.Shutdown();
1952 Stop(); 1952 Stop();
1953 } 1953 }
1954 1954
1955 // 'SAIZ' and 'SAIO' boxes contain redundant information which is already
1956 // available in 'SENC' box. Although 'SAIZ' and 'SAIO' boxes are required per
1957 // CENC spec for backward compatibility reasons, but we do not use the two
1958 // boxes if 'SENC' box is present, so the code should work even if the two
1959 // boxes are not present.
1960 TEST_F(PipelineIntegrationTest,
1961 MAYBE_EME(EncryptedPlayback_MP4_CENC_SENC_NO_SAIZ_SAIO_Video)) {
1962 MockMediaSource source("bear-640x360-v_frag-cenc-senc-no-saiz-saio.mp4",
1963 kMP4Video, kAppendWholeFile);
1964 FakeEncryptedMedia encrypted_media(new KeyProvidingApp());
1965 EXPECT_EQ(PIPELINE_OK,
1966 StartPipelineWithEncryptedMedia(&source, &encrypted_media));
1967
1968 source.EndOfStream();
1969
1970 Play();
1971
1972 ASSERT_TRUE(WaitUntilOnEnded());
1973 source.Shutdown();
1974 Stop();
1975 }
1976
1955 TEST_F(PipelineIntegrationTest, 1977 TEST_F(PipelineIntegrationTest,
1956 MAYBE_EME(EncryptedPlayback_MP4_CENC_KeyRotation_Video)) { 1978 MAYBE_EME(EncryptedPlayback_MP4_CENC_KeyRotation_Video)) {
1957 MockMediaSource source("bear-1280x720-v_frag-cenc-key_rotation.mp4", 1979 MockMediaSource source("bear-1280x720-v_frag-cenc-key_rotation.mp4",
1958 kMP4Video, kAppendWholeFile); 1980 kMP4Video, kAppendWholeFile);
1959 FakeEncryptedMedia encrypted_media(new RotatingKeyProvidingApp()); 1981 FakeEncryptedMedia encrypted_media(new RotatingKeyProvidingApp());
1960 EXPECT_EQ(PIPELINE_OK, 1982 EXPECT_EQ(PIPELINE_OK,
1961 StartPipelineWithEncryptedMedia(&source, &encrypted_media)); 1983 StartPipelineWithEncryptedMedia(&source, &encrypted_media));
1962 1984
1963 source.EndOfStream(); 1985 source.EndOfStream();
1964 1986
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
2377 2399
2378 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { 2400 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) {
2379 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); 2401 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm"));
2380 Play(); 2402 Play();
2381 ASSERT_TRUE(WaitUntilOnEnded()); 2403 ASSERT_TRUE(WaitUntilOnEnded());
2382 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), 2404 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000),
2383 demuxer_->GetStartTime()); 2405 demuxer_->GetStartTime());
2384 } 2406 }
2385 2407
2386 } // namespace media 2408 } // namespace media
OLDNEW
« no previous file with comments | « media/test/data/bear-640x360-v_frag-cenc-senc-no-saiz-saio.mp4 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698