Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NPLB tests for cast codecs. #2104

Merged
merged 12 commits into from
Mar 26, 2024
Merged

Conversation

antoniori-eng
Copy link
Contributor

@antoniori-eng antoniori-eng commented Dec 15, 2023

This PR adds .dmp files that cover the additional codecs that cast uses.

Bug: b/270621457

Test:
To run all the SbPlayer NPLB tests related to writing samples, I ran out/linux-x64x11_cast_devel/nplb_loader --gtest_filter=SbPlayerWriteSampleTests*

Test-On-Device: true

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Attention: Patch coverage is 81.81818% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 59.02%. Comparing base (999de53) to head (85a752d).
Report is 5 commits behind head on main.

Files Patch % Lines
...rboard/shared/starboard/player/video_dmp_reader.cc 81.81% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2104      +/-   ##
==========================================
+ Coverage   58.88%   59.02%   +0.14%     
==========================================
  Files        1811     1813       +2     
  Lines       87503    87791     +288     
==========================================
+ Hits        51523    51818     +295     
+ Misses      35980    35973       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

starboard/nplb/BUILD.gn Outdated Show resolved Hide resolved
Copy link
Member

@kaidokert kaidokert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like tests are passing - was this blocked on anything else ?

Copy link
Contributor

@jasonzhangxx jasonzhangxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The pr would change multiple tests. Let's make sure it won't break any test before merge.

@antoniori-eng
Copy link
Contributor Author

Thanks for the reviews! I'll sync to HEAD and re-run the tests before submitting.

Note: this does not add a check for a MIME type corresponding to HEVC,
since that codec isn't included in the list of supported MIME types in
the default starboard impl. A test can be added in a follow-up CL, if
HEVC is added to the supported MIME types in
//starboard/shared/starboard/media/codec_util.cc.

Bug: b/270621457

Test:
To run all the SbPlayer NPLB tests related to writing samples, I ran
out/linux-x64x11_cast_devel/nplb_loader --gtest_filter=SbPlayerWriteSampleTests*
This way, existing tests shouldn't be affected by this change.

Bug: b/270621457
Change-Id: If0f1a0a23dff85e6669d50e99df3868f228f2021
Bug: b/270621457
Change-Id: Ie5e95903e7a00d2a752b751588cb928353a14f64
Bug: b/270621457
Change-Id: I5633f2a045a6b06429984ecec14ddf46b9d6c9d9
In starboard/nplb/player_test_util.cc there are already calls to
SbMediaCanPlayMimeAndKeySystem to verify that the given codec can be
played, so we don't need special handling for the cast-specific
codecs.

This commit also removes the changes in
media_can_play_mime_and_key_system_test.cc. Those tests will be added
into the cast contrib directory in a separate PR.

Bug: b/270621457
Change-Id: Ia6d0e367e845f3468dca910c2b1e550e7072e9ed
Bug: b/270621457
Change-Id: Ice0ee8c5c4fd359335a4554569b5843b8dc2a652
Bug: b/270621457
Change-Id: I5d54c5a5b2679eff6fc53dd4c1f0e6c2e3860597
These files have been uploaded to GCS, and are downloaded by the script
that sets up the NPLB test data.

Bug: b/270621457
Change-Id: I54e6fe0cddba0c8212eb155ea3cc5771bf7c957a
Bug: b/27062145
Change-Id: I45a55b58b7fb50f5741c75b9fe88b16e33ac2c5b
MP3, FLAC, and PCM audio codecs were added in SB version 14. We
shouldn't read dmp files with these codecs in earlier versions of
Starboard.

Bug: b/270621457
Change-Id: I38407058764ebf97817bc2fcac94b44de1ce9f1e
These no longer seem necessary; SbPlayerWriteSampleTests* tests pass
without the changes to ConvertDurationToAudioBufferCount.

Change-Id: I468755257d5c1cb2ff38fbb300f3724de4617697
@antoniori-eng antoniori-eng merged commit 6c7a8d7 into youtube:main Mar 26, 2024
393 of 394 checks passed
@antoniori-eng antoniori-eng deleted the nplb branch March 26, 2024 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants