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

Ensure that MP3, FLAC, and PCM are not supported for MediaSource. #1359

Merged
merged 3 commits into from
Nov 17, 2023

Conversation

antoniori-eng
Copy link
Contributor

This change makes the logic of CanPlayAdaptive more like CanPlayProgressive, wherein unsupported containers are immediately filtered out.

Bug: b/297060983

Test: Added unit tests. Also manually ran Cobalt and verified that MediaSource.isTypeSupported returns false for these MIME strings: 'audio/mpeg; codecs="mp3"'
'audio/mpeg'
'audio/ogg; codecs="flac"'
'audio/flac; codecs="flac"'
'audio/wav; codecs="1"'

@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (3fb452d) 57.77% compared to head (9cc6235) 57.78%.
Report is 59 commits behind head on main.

Files Patch % Lines
cobalt/media/media_module.cc 87.50% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1359   +/-   ##
=======================================
  Coverage   57.77%   57.78%           
=======================================
  Files        1915     1915           
  Lines       95118    95123    +5     
=======================================
+ Hits        54956    54963    +7     
+ Misses      40162    40160    -2     

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

This change makes the logic of CanPlayAdaptive more like
CanPlayProgressive, wherein unsupported containers are immediately
filtered out.

Bug: b/297060983

Test: Added unit tests. Also manually ran Cobalt and verified that
MediaSource.isTypeSupported returns false for these MIME strings:
'audio/mpeg; codecs="mp3"'
'audio/mpeg'
'audio/ogg; codecs="flac"'
'audio/flac; codecs="flac"'
'audio/wav; codecs="1"'
Bug: b/297060983
Bug: b/297060983
@antoniori-eng antoniori-eng merged commit 9fd3a9c into youtube:main Nov 17, 2023
12 checks passed
@antoniori-eng antoniori-eng deleted the isTypeSupported_fix branch November 17, 2023 17:04
jasonzhangxx added a commit that referenced this pull request Nov 21, 2023
jasonzhangxx added a commit that referenced this pull request Nov 22, 2023
Rongo-JL pushed a commit to Rongo-JL/cobalt that referenced this pull request Dec 19, 2023
…utube#1359)

This change makes the logic of CanPlayAdaptive more like
CanPlayProgressive, wherein unsupported containers are immediately
filtered out.

Bug: b/297060983

Test: Added unit tests. Also manually ran Cobalt and verified that
MediaSource.isTypeSupported returns false for these MIME strings:
'audio/mpeg; codecs="mp3"'
'audio/mpeg'
'audio/ogg; codecs="flac"'
'audio/flac; codecs="flac"'
'audio/wav; codecs="1"'
Rongo-JL pushed a commit to Rongo-JL/cobalt that referenced this pull request Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants