-
Notifications
You must be signed in to change notification settings - Fork 137
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
Define static async isConfigSupported() #120
Conversation
Earlier drafts wrongly assumed that support could be determined synchronously.This remedies that by introducing a new async API to check support prior to calling configure(). Fixes #98. See additional discussion there.
API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963
API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963
API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963
API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612684 Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Reviewed-by: Thomas Guilbert <tguilbert@chromium.org> Cr-Commit-Position: refs/heads/master@{#841376}
API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612684 Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Reviewed-by: Thomas Guilbert <tguilbert@chromium.org> Cr-Commit-Position: refs/heads/master@{#841376}
…(), a=testonly Automatic update from web-platform-tests Implement VideoDecoder.isConfigSupported() API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612684 Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Reviewed-by: Thomas Guilbert <tguilbert@chromium.org> Cr-Commit-Position: refs/heads/master@{#841376} -- wpt-commits: e265ce28838b485f20b11aee723486a035715216 wpt-pr: 27055
…(), a=testonly Automatic update from web-platform-tests Implement VideoDecoder.isConfigSupported() API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612684 Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Reviewed-by: Thomas Guilbert <tguilbert@chromium.org> Cr-Commit-Position: refs/heads/master@{#841376} -- wpt-commits: e265ce28838b485f20b11aee723486a035715216 wpt-pr: 27055
API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd
API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421 Reviewed-by: Thomas Guilbert <tguilbert@chromium.org> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#842153}
API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421 Reviewed-by: Thomas Guilbert <tguilbert@chromium.org> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#842153}
…(), a=testonly Automatic update from web-platform-tests Implement VideoDecoder.isConfigSupported() API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612684 Commit-Queue: Chrome Cunningham <chcunninghamchromium.org> Reviewed-by: Thomas Guilbert <tguilbertchromium.org> Cr-Commit-Position: refs/heads/master{#841376} -- wpt-commits: e265ce28838b485f20b11aee723486a035715216 wpt-pr: 27055 UltraBlame original commit: 4df452a17a2f953d1ab68743d1fd7c03e3c30a7e
API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421 Reviewed-by: Thomas Guilbert <tguilbert@chromium.org> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#842153}
Similar to MediaCapabilities and EME specs, the isConfigSupported() promise will now include the configuration who's support is described. This helps feature detect when parts of the input configuration dictionary are ignored (when the UA implementation lags behind the specification).
…(), a=testonly Automatic update from web-platform-tests Implement AudioDecoder.isConfigSupported() API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421 Reviewed-by: Thomas Guilbert <tguilbert@chromium.org> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#842153} -- wpt-commits: 87bcad098015a7b983d29b13d2e64f33b93fbc85 wpt-pr: 27135
…(), a=testonly Automatic update from web-platform-tests Implement AudioDecoder.isConfigSupported() API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421 Reviewed-by: Thomas Guilbert <tguilbertchromium.org> Commit-Queue: Chrome Cunningham <chcunninghamchromium.org> Cr-Commit-Position: refs/heads/master{#842153} -- wpt-commits: 87bcad098015a7b983d29b13d2e64f33b93fbc85 wpt-pr: 27135 UltraBlame original commit: e37260abb59bac6743b881820b45f60857c6bab7
…(), a=testonly Automatic update from web-platform-tests Implement AudioDecoder.isConfigSupported() API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421 Reviewed-by: Thomas Guilbert <tguilbert@chromium.org> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#842153} -- wpt-commits: 87bcad098015a7b983d29b13d2e64f33b93fbc85 wpt-pr: 27135
…(), a=testonly Automatic update from web-platform-tests Implement AudioDecoder.isConfigSupported() API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421 Reviewed-by: Thomas Guilbert <tguilbertchromium.org> Commit-Queue: Chrome Cunningham <chcunninghamchromium.org> Cr-Commit-Position: refs/heads/master{#842153} -- wpt-commits: 87bcad098015a7b983d29b13d2e64f33b93fbc85 wpt-pr: 27135 UltraBlame original commit: 90e13b80191eac0e913da8f1b39931f37c74b11c
Corresponding the spec change here: w3c/webcodecs#120 The new return type contains a copy of the parsed configuration passed to isConfigSupported(). This copy will contain only the keys recognized by the UA, and is therefore useful as a means of feature detection / forward compatibility. Bug: 1141707 Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9 R=sandersd
Corresponding the spec change here: w3c/webcodecs#120 The new return type contains a copy of the parsed configuration passed to isConfigSupported(). This copy will contain only the keys recognized by the UA, and is therefore useful as a means of feature detection / forward compatibility. R=sandersd Bug: 1141707 Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258 Reviewed-by: Dan Sanders <sandersd@chromium.org> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#847850}
Corresponding the spec change here: w3c/webcodecs#120 The new return type contains a copy of the parsed configuration passed to isConfigSupported(). This copy will contain only the keys recognized by the UA, and is therefore useful as a means of feature detection / forward compatibility. R=sandersd Bug: 1141707 Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258 Reviewed-by: Dan Sanders <sandersd@chromium.org> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#847850}
…upported, a=testonly Automatic update from web-platform-tests Update return type of *Decoder.isConfigSupported Corresponding the spec change here: w3c/webcodecs#120 The new return type contains a copy of the parsed configuration passed to isConfigSupported(). This copy will contain only the keys recognized by the UA, and is therefore useful as a means of feature detection / forward compatibility. R=sandersd Bug: 1141707 Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258 Reviewed-by: Dan Sanders <sandersd@chromium.org> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#847850} -- wpt-commits: 172e406cdc521c5257ba7d16497be9f5610effba wpt-pr: 27315
…upported, a=testonly Automatic update from web-platform-tests Update return type of *Decoder.isConfigSupported Corresponding the spec change here: w3c/webcodecs#120 The new return type contains a copy of the parsed configuration passed to isConfigSupported(). This copy will contain only the keys recognized by the UA, and is therefore useful as a means of feature detection / forward compatibility. R=sandersd Bug: 1141707 Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258 Reviewed-by: Dan Sanders <sandersdchromium.org> Commit-Queue: Chrome Cunningham <chcunninghamchromium.org> Cr-Commit-Position: refs/heads/master{#847850} -- wpt-commits: 172e406cdc521c5257ba7d16497be9f5610effba wpt-pr: 27315 UltraBlame original commit: f76febf314e9fb86e0854d85eff5833b82e4ed70
…upported, a=testonly Automatic update from web-platform-tests Update return type of *Decoder.isConfigSupported Corresponding the spec change here: w3c/webcodecs#120 The new return type contains a copy of the parsed configuration passed to isConfigSupported(). This copy will contain only the keys recognized by the UA, and is therefore useful as a means of feature detection / forward compatibility. R=sandersd Bug: 1141707 Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258 Reviewed-by: Dan Sanders <sandersdchromium.org> Commit-Queue: Chrome Cunningham <chcunninghamchromium.org> Cr-Commit-Position: refs/heads/master{#847850} -- wpt-commits: 172e406cdc521c5257ba7d16497be9f5610effba wpt-pr: 27315 UltraBlame original commit: f76febf314e9fb86e0854d85eff5833b82e4ed70
…upported, a=testonly Automatic update from web-platform-tests Update return type of *Decoder.isConfigSupported Corresponding the spec change here: w3c/webcodecs#120 The new return type contains a copy of the parsed configuration passed to isConfigSupported(). This copy will contain only the keys recognized by the UA, and is therefore useful as a means of feature detection / forward compatibility. R=sandersd Bug: 1141707 Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258 Reviewed-by: Dan Sanders <sandersdchromium.org> Commit-Queue: Chrome Cunningham <chcunninghamchromium.org> Cr-Commit-Position: refs/heads/master{#847850} -- wpt-commits: 172e406cdc521c5257ba7d16497be9f5610effba wpt-pr: 27315 UltraBlame original commit: f76febf314e9fb86e0854d85eff5833b82e4ed70
…upported, a=testonly Automatic update from web-platform-tests Update return type of *Decoder.isConfigSupported Corresponding the spec change here: w3c/webcodecs#120 The new return type contains a copy of the parsed configuration passed to isConfigSupported(). This copy will contain only the keys recognized by the UA, and is therefore useful as a means of feature detection / forward compatibility. R=sandersd Bug: 1141707 Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258 Reviewed-by: Dan Sanders <sandersd@chromium.org> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#847850} -- wpt-commits: 172e406cdc521c5257ba7d16497be9f5610effba wpt-pr: 27315
@@ -209,20 +211,27 @@ | |||
<a>Enqueues a control message</a> to configure the audio decoder for | |||
decoding chunks as described by |config|. | |||
|
|||
NOTE: Authors should first check support by calling | |||
{{AudioDecoder/isConfigSupported()}} with |config| to avoid error paths | |||
in the steps below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted in the issue, there is a race here. I see two paths forward:
- Turn "configure" into a request to get access to a codec, make it truely async with a promise. realtime users can decide to not wait for the promise and continue enqueuing packets when they change parameters dynamically
- Acknowledge this race and say
isConfigSupported
is a "best effort" call, that doesn't guarantee that remaining calls will succeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Paul
@@ -209,20 +211,27 @@ | |||
<a>Enqueues a control message</a> to configure the audio decoder for | |||
decoding chunks as described by |config|. | |||
|
|||
NOTE: Authors should first check support by calling | |||
{{AudioDecoder/isConfigSupported()}} with |config| to avoid error paths | |||
in the steps below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@padenot I'll go ahead with this merge and address any follow up feedback when you return. |
Corresponding the spec change here: w3c/webcodecs#120 The new return type contains a copy of the parsed configuration passed to isConfigSupported(). This copy will contain only the keys recognized by the UA, and is therefore useful as a means of feature detection / forward compatibility. R=sandersd (cherry picked from commit 16b3edb) Bug: 1141707 Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258 Reviewed-by: Dan Sanders <sandersd@chromium.org> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#847850} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2665211 Auto-Submit: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/branch-heads/4389@{#560} Cr-Branched-From: 9251c5d-refs/heads/master@{#843830}
API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3e53da5961119b4b36ec76666ad1a67cca19b963 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612684 Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Reviewed-by: Thomas Guilbert <tguilbert@chromium.org> Cr-Commit-Position: refs/heads/master@{#841376} GitOrigin-RevId: 6e5606f800fbefcc6ed776788846e82ae13e3888
API and motivations described here: w3c/webcodecs#98 Spec PR here: w3c/webcodecs#120 Bug: 1141707 Test: new layout tests Change-Id: I3a0f3cbc2bb64a86dcefdc454d6b03e72d3f36bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622421 Reviewed-by: Thomas Guilbert <tguilbert@chromium.org> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#842153} GitOrigin-RevId: 456bdd17f1d32e10406636109071aec9bf1f1f6e
Corresponding the spec change here: w3c/webcodecs#120 The new return type contains a copy of the parsed configuration passed to isConfigSupported(). This copy will contain only the keys recognized by the UA, and is therefore useful as a means of feature detection / forward compatibility. R=sandersd Bug: 1141707 Change-Id: I4c17423fbffbd6ef904d086f635cf426b0cec4f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645258 Reviewed-by: Dan Sanders <sandersd@chromium.org> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#847850} GitOrigin-RevId: 16b3edb7ee7f446d1b9dd340d916bc33c7e5c4d4
Earlier drafts wrongly assumed that support could be determined
synchronously.This remedies that by introducing a new async API
to check support prior to calling configure().
Fixes #98. See additional discussion there.
Preview | Diff