Skip to content

Commit

Permalink
Add CI and cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Dec 22, 2023
1 parent 040b8e3 commit 7262f09
Show file tree
Hide file tree
Showing 6 changed files with 195 additions and 846 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/h264-profile-level-id.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: h264-profile-level-id

on: [push, pull_request]

concurrency:
# Cancel a currently running workflow from the same PR, branch or tag when a
# new workflow is triggered.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
ci:
strategy:
matrix:
ci:
- os: ubuntu-20.04
node: 16
- os: macos-12
node: 18
- os: windows-2022
node: 20

runs-on: ${{ matrix.ci.os }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.ci.node }}

- name: Configure cache
uses: actions/cache@v3
with:
path: |
~/.npm
key: ${{ matrix.ci.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ matrix.ci.os }}-node-
- name: npm ci
run: npm ci --foreground-scripts

- name: npm run lint
run: npm run lint

- name: npm run test
run: npm run test
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,32 @@ enum Profile
```ts
enum Level
{
Level1_b = 0,
Level1 = 10,
Level1_1 = 11,
Level1_2 = 12,
Level1_3 = 13,
Level2 = 20,
Level2_1 = 21,
Level2_2 = 22,
Level3 = 30,
Level3_1 = 31,
Level3_2 = 32,
Level4 = 40,
Level4_1 = 41,
Level4_2 = 42,
Level5 = 50,
Level5_1 = 51,
Level5_2 = 52
L1_b = 0,
L1 = 10,
L1_1 = 11,
L1_2 = 12,
L1_3 = 13,
L2 = 20,
L2_1 = 21,
L2_2 = 22,
L3 = 30,
L3_1 = 31,
L3_2 = 32,
L4 = 40,
L4_1 = 41,
L4_2 = 42,
L5 = 50,
L5_1 = 51,
L5_2 = 52
}
```

### class ProfileLevelId

Class containing both H264 Profile and Level.
Class containing both H264 profile and level.

```js
const profile_level_id = new ProfileLevelId(Profile.Main, Level.Level3_1);
const profile_level_id = new ProfileLevelId(Profile.Main, Level.L3_1);

console.log('profile:%d, level:%d', profile_level_id.profile, profile_level_id.level);
// => profile:3, level:31
Expand Down
Loading

0 comments on commit 7262f09

Please sign in to comment.