mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-03 09:49:24 +02:00
fix: fix review comments
This commit is contained in:
parent
956693c1f6
commit
72bf025804
4 changed files with 54 additions and 121 deletions
|
@ -1,118 +0,0 @@
|
||||||
# Change Log - @yume-chan/event
|
|
||||||
|
|
||||||
## 2.0.0
|
|
||||||
|
|
||||||
### Minor Changes
|
|
||||||
|
|
||||||
- 05c01ad: Make `DeviceObserver#onListChange` sticky
|
|
||||||
|
|
||||||
## 1.0.1
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- 53688d3: Use PNPM workspace and Changesets to manage the monorepo.
|
|
||||||
|
|
||||||
Because Changesets doesn't support alpha versions (`0.x.x`), this version is `1.0.0`. Future versions will follow SemVer rules, for example, breaking API changes will introduce a new major version.
|
|
||||||
|
|
||||||
This log was last generated on Tue, 18 Jun 2024 02:49:43 GMT and should not be manually modified.
|
|
||||||
|
|
||||||
## 0.0.24
|
|
||||||
|
|
||||||
Tue, 18 Jun 2024 02:49:43 GMT
|
|
||||||
|
|
||||||
_Version update only_
|
|
||||||
|
|
||||||
## 0.0.23
|
|
||||||
|
|
||||||
Thu, 21 Mar 2024 03:15:10 GMT
|
|
||||||
|
|
||||||
_Version update only_
|
|
||||||
|
|
||||||
## 0.0.22
|
|
||||||
|
|
||||||
Wed, 13 Dec 2023 05:57:27 GMT
|
|
||||||
|
|
||||||
_Version update only_
|
|
||||||
|
|
||||||
## 0.0.21
|
|
||||||
|
|
||||||
Fri, 25 Aug 2023 14:05:18 GMT
|
|
||||||
|
|
||||||
_Version update only_
|
|
||||||
|
|
||||||
## 0.0.20
|
|
||||||
|
|
||||||
Mon, 05 Jun 2023 02:51:41 GMT
|
|
||||||
|
|
||||||
_Version update only_
|
|
||||||
|
|
||||||
## 0.0.19
|
|
||||||
|
|
||||||
Sun, 09 Apr 2023 05:55:33 GMT
|
|
||||||
|
|
||||||
_Version update only_
|
|
||||||
|
|
||||||
## 0.0.18
|
|
||||||
|
|
||||||
Wed, 25 Jan 2023 21:33:49 GMT
|
|
||||||
|
|
||||||
_Version update only_
|
|
||||||
|
|
||||||
## 0.0.17
|
|
||||||
|
|
||||||
Tue, 18 Oct 2022 09:32:30 GMT
|
|
||||||
|
|
||||||
_Version update only_
|
|
||||||
|
|
||||||
## 0.0.16
|
|
||||||
|
|
||||||
Sat, 28 May 2022 03:56:37 GMT
|
|
||||||
|
|
||||||
### Updates
|
|
||||||
|
|
||||||
- Upgrade TypeScript to 4.7.2 to enable Node.js ESM
|
|
||||||
|
|
||||||
## 0.0.15
|
|
||||||
|
|
||||||
Mon, 02 May 2022 04:18:01 GMT
|
|
||||||
|
|
||||||
_Version update only_
|
|
||||||
|
|
||||||
## 0.0.14
|
|
||||||
|
|
||||||
Sat, 30 Apr 2022 14:05:48 GMT
|
|
||||||
|
|
||||||
_Version update only_
|
|
||||||
|
|
||||||
## 0.0.13
|
|
||||||
|
|
||||||
Thu, 28 Apr 2022 01:23:53 GMT
|
|
||||||
|
|
||||||
_Version update only_
|
|
||||||
|
|
||||||
## 0.0.12
|
|
||||||
|
|
||||||
Sun, 03 Apr 2022 11:18:47 GMT
|
|
||||||
|
|
||||||
_Version update only_
|
|
||||||
|
|
||||||
## 0.0.11
|
|
||||||
|
|
||||||
Sun, 03 Apr 2022 11:18:11 GMT
|
|
||||||
|
|
||||||
### Updates
|
|
||||||
|
|
||||||
- Improve compatibility with Node.js 12 ESM format
|
|
||||||
- Update license year
|
|
||||||
|
|
||||||
## 0.0.10
|
|
||||||
|
|
||||||
Sun, 09 Jan 2022 15:52:20 GMT
|
|
||||||
|
|
||||||
_Version update only_
|
|
||||||
|
|
||||||
## 0.0.9
|
|
||||||
|
|
||||||
Sun, 09 Jan 2022 15:50:20 GMT
|
|
||||||
|
|
||||||
_Initial release_
|
|
|
@ -200,6 +200,13 @@ export class Av1 extends BitReader {
|
||||||
static TransferCharacteristics = TransferCharacteristics;
|
static TransferCharacteristics = TransferCharacteristics;
|
||||||
static MatrixCoefficients = MatrixCoefficients;
|
static MatrixCoefficients = MatrixCoefficients;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate a codec string from an AV1 sequence header
|
||||||
|
* per Section 5 of AV1 Codec ISO Media File Format Binding
|
||||||
|
* https://aomediacodec.github.io/av1-isobmff/#codecsparam
|
||||||
|
* @param sequenceHeader The parsed AV1 sequence header
|
||||||
|
* @returns A codec string
|
||||||
|
*/
|
||||||
static toCodecString(sequenceHeader: Av1.SequenceHeaderObu) {
|
static toCodecString(sequenceHeader: Av1.SequenceHeaderObu) {
|
||||||
const {
|
const {
|
||||||
seq_profile: seqProfile,
|
seq_profile: seqProfile,
|
||||||
|
|
|
@ -1,11 +1,53 @@
|
||||||
export function hexDigits(value: number) {
|
export function hexDigits(value: number) {
|
||||||
|
if (value % 1 !== 0) {
|
||||||
|
// This also checks NaN and Infinity
|
||||||
|
throw new Error("Value must be an integer");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value < 0) {
|
||||||
|
throw new Error("Value must be positive");
|
||||||
|
}
|
||||||
|
|
||||||
return value.toString(16).toUpperCase();
|
return value.toString(16).toUpperCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function hexTwoDigits(value: number) {
|
export function hexTwoDigits(value: number) {
|
||||||
return value.toString(16).toUpperCase().padStart(2, "0");
|
if (value % 1 !== 0) {
|
||||||
|
// This also checks NaN and Infinity
|
||||||
|
throw new Error("Value must be an integer");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value < 0) {
|
||||||
|
throw new Error("Value must be positive");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value >= 256) {
|
||||||
|
throw new Error("Value must be less than 256");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Small optimization
|
||||||
|
if (value < 16) {
|
||||||
|
return "0" + value.toString(16).toUpperCase();
|
||||||
|
}
|
||||||
|
return value.toString(16).toUpperCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function decimalTwoDigits(value: number) {
|
export function decimalTwoDigits(value: number) {
|
||||||
return value.toString(10).padStart(2, "0");
|
if (value % 1 !== 0) {
|
||||||
|
// This also checks NaN and Infinity
|
||||||
|
throw new Error("Value must be an integer");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value < 0) {
|
||||||
|
throw new Error("Value must be positive");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value >= 100) {
|
||||||
|
throw new Error("Value must be less than 256");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value < 10) {
|
||||||
|
return "0" + value.toString(10);
|
||||||
|
}
|
||||||
|
return value.toString(10);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,9 @@ export class H265Decoder extends H26xDecoder {
|
||||||
|
|
||||||
this.#decoder.configure({
|
this.#decoder.configure({
|
||||||
codec: H265.toCodecString(configuration),
|
codec: H265.toCodecString(configuration),
|
||||||
// Microsoft Edge requires explicit size to work
|
// Microsoft Edge on Windows requires explicit size,
|
||||||
|
// otherwise it returns frames in incorrect size.
|
||||||
|
// And it needs cropped size, as opposed to the option name.
|
||||||
codedWidth: configuration.croppedWidth,
|
codedWidth: configuration.croppedWidth,
|
||||||
codedHeight: configuration.croppedHeight,
|
codedHeight: configuration.croppedHeight,
|
||||||
optimizeForLatency: true,
|
optimizeForLatency: true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue