Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into video-prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
kixelated committed Nov 23, 2024
2 parents 4dca4ea + d2fe5d8 commit c59369a
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 3 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: pr

on:
pull_request:
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

# Install Rust with clippy/rustfmt
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: wasm32-unknown-unknown
components: clippy, rustfmt

# Set RUSTFLAGS
- run: echo "RUSTFLAGS=--cfg=web_sys_unstable_apis" >> $GITHUB_ENV

# Make sure u guys don't write bad code
- run: cargo check
- run: cargo clippy --no-deps
- run: cargo fmt --check

# Check for unused dependencies
- uses: bnjbvr/cargo-machete@main
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: release

permissions:
pull-requests: write
contents: write

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

# Instal Rust
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

# Run release-plz to create PRs and releases
- name: Run release-plz
uses: MarcoIeni/[email protected]
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
1 change: 1 addition & 0 deletions src/audio/decoder.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions src/audio/encoder.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

12 changes: 9 additions & 3 deletions src/video/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ pub struct VideoColorSpaceConfig {
inner: web_sys::VideoColorSpaceInit,
}

impl Default for VideoColorSpaceConfig {
fn default() -> Self {
Self::new()
}
}

impl VideoColorSpaceConfig {
pub fn new() -> Self {
Self {
Expand All @@ -15,17 +21,17 @@ impl VideoColorSpaceConfig {
}

pub fn matrix(self, matrix: VideoMatrixCoefficients) -> Self {
self.inner.set_matrix(matrix.into());
self.inner.set_matrix(matrix);
self
}

pub fn primaries(self, primaries: VideoColorPrimaries) -> Self {
self.inner.set_primaries(primaries.into());
self.inner.set_primaries(primaries);
self
}

pub fn transfer(self, transfer: VideoTransferCharacteristics) -> Self {
self.inner.set_transfer(transfer.into());
self.inner.set_transfer(transfer);
self
}
}
Expand Down

0 comments on commit c59369a

Please sign in to comment.