-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix AC-3 playback on Tizen 3.0 devices when transmuxing (#7972)
- Loading branch information
Showing
10 changed files
with
126 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/*! @license | ||
* Shaka Player | ||
* Copyright 2016 Google LLC | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
describe('ContentWorkarounds', () => { | ||
const Util = shaka.test.Util; | ||
|
||
/** @type {!jasmine.Spy} */ | ||
let onErrorSpy; | ||
|
||
/** @type {!HTMLVideoElement} */ | ||
let video; | ||
/** @type {shaka.Player} */ | ||
let player; | ||
/** @type {!shaka.util.EventManager} */ | ||
let eventManager; | ||
|
||
let compiledShaka; | ||
|
||
/** @type {!shaka.test.Waiter} */ | ||
let waiter; | ||
|
||
beforeAll(async () => { | ||
video = shaka.test.UiUtils.createVideoElement(); | ||
document.body.appendChild(video); | ||
compiledShaka = | ||
await shaka.test.Loader.loadShaka(getClientArg('uncompiled')); | ||
}); | ||
|
||
beforeEach(async () => { | ||
await shaka.test.TestScheme.createManifests(compiledShaka, '_compiled'); | ||
player = new compiledShaka.Player(); | ||
await player.attach(video); | ||
|
||
// Disable stall detection, which can interfere with playback tests. | ||
player.configure('streaming.stallEnabled', false); | ||
|
||
// Grab event manager from the uncompiled library: | ||
eventManager = new shaka.util.EventManager(); | ||
waiter = new shaka.test.Waiter(eventManager); | ||
waiter.setPlayer(player); | ||
|
||
onErrorSpy = jasmine.createSpy('onError'); | ||
onErrorSpy.and.callFake((event) => fail(event.detail)); | ||
eventManager.listen(player, 'error', Util.spyFunc(onErrorSpy)); | ||
}); | ||
|
||
afterEach(async () => { | ||
eventManager.release(); | ||
await player.destroy(); | ||
}); | ||
|
||
afterAll(() => { | ||
document.body.removeChild(video); | ||
}); | ||
|
||
// Check that fakeEC3 workaround is applied on the platforms where it is | ||
// needed. | ||
it('supports AC-3 if platform supports it', async () => { | ||
if (!await Util.isTypeSupported('audio/mp4; codecs="ac-3"')) { | ||
pending('Codec AC-3 is not supported by the platform.'); | ||
} | ||
await player.load('/base/test/test/assets/dash-audio-ac3/dash.mpd'); | ||
await video.play(); | ||
expect(player.isLive()).toBe(false); | ||
|
||
// Wait for the video to start playback. If it takes longer than 10 | ||
// seconds, fail the test. | ||
await waiter.waitForMovementOrFailOnTimeout(video, 10); | ||
|
||
// Play for 5 seconds, but stop early if the video ends. If it takes | ||
// longer than 30 seconds, fail the test. | ||
await waiter.waitUntilPlayheadReachesOrFailOnTimeout(video, 5, 30); | ||
|
||
await player.unload(); | ||
}); | ||
}); |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!--Generated with https://github.com/shaka-project/shaka-packager version v3.4.0-1f0a4d1-release--> | ||
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" profiles="urn:mpeg:dash:profile:isoff-live:2011" minBufferTime="PT2S" type="static" mediaPresentationDuration="PT4S"> | ||
<Period id="0"> | ||
<AdaptationSet id="0" contentType="audio" startWithSAP="1" segmentAlignment="true"> | ||
<Representation id="0" bandwidth="195101" codecs="ac-3" mimeType="audio/mp4" audioSamplingRate="44100"> | ||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/> | ||
<SegmentTemplate timescale="44100" initialization="audio_und_2c_192k_ac3_init.mp4" media="audio_und_2c_192k_ac3_$Number$.mp4" startNumber="1"> | ||
<SegmentTimeline> | ||
<S t="0" d="89088"/> | ||
<S t="89088" d="87312"/> | ||
</SegmentTimeline> | ||
</SegmentTemplate> | ||
</Representation> | ||
</AdaptationSet> | ||
</Period> | ||
</MPD> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters