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

create scuffle-bytes-util #241

Merged
merged 5 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 22 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ members = [
"crates/aac",
"crates/amf0",
"crates/av1",
"crates/bytesio",
"crates/exp_golomb",
"crates/flv",
"crates/h264",
Expand All @@ -35,7 +34,7 @@ members = [
"crates/transmuxer",
"dev-tools/xtask",
"crates/future-ext",
"crates/bitio",
"crates/bytes-util",
]

resolver = "2"
Expand All @@ -60,7 +59,7 @@ scuffle-h3-webtransport = { path = "crates/h3-webtransport", version = "0.0.2" }
scuffle-metrics-derive = { path = "crates/metrics/derive", version = "0.0.2" }
scuffle-ffmpeg-sys = { path = "crates/ffmpeg-sys", version = "7.1.0" }
scuffle-future-ext = { path = "crates/future-ext", version = "0.0.1" }
scuffle-bitio = { path = "crates/bitio", version = "0.0.1" }
scuffle-bytes-util = { path = "crates/bytes-util", version = "0.0.1" }

[profile.release-debug]
inherits = "release"
Expand Down
2 changes: 1 addition & 1 deletion crates/aac/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ byteorder = "1.5"
num-traits = "0.2"
num-derive = "0.4"
scuffle-workspace-hack.workspace = true
scuffle-bitio = { workspace = true }
scuffle-bytes-util.workspace = true
2 changes: 1 addition & 1 deletion crates/aac/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::io;

use num_derive::FromPrimitive;
use num_traits::FromPrimitive;
use scuffle_bitio::BitReader;
use scuffle_bytes_util::BitReader;

/// A Partial Audio Specific Config
/// ISO/IEC 14496-3:2019(E) - 1.6
Expand Down
3 changes: 1 addition & 2 deletions crates/amf0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ bytes = "1.5"
byteorder = "1.5"
num-traits = "0.2"
num-derive = "0.4"
bytesio = { path = "../bytesio" }
scuffle-bytes-util.workspace = true
scuffle-workspace-hack.workspace = true
scuffle-bitio = { workspace = true }
3 changes: 1 addition & 2 deletions crates/av1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ license = "MIT OR Apache-2.0"
[dependencies]
bytes = "1.5"
byteorder = "1.5"
bytesio = { path = "../bytesio" }
scuffle-bitio = { workspace = true }
scuffle-bytes-util.workspace = true
scuffle-workspace-hack.workspace = true
3 changes: 1 addition & 2 deletions crates/av1/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use std::io;

use bytes::Bytes;
use bytesio::bytes_reader::BytesCursor;
use scuffle_bitio::{BitReader, BitWriter};
use scuffle_bytes_util::{BitReader, BitWriter, BytesCursorExt};

#[derive(Debug, Clone, PartialEq)]
/// AV1 Codec Configuration Record
Expand Down
2 changes: 1 addition & 1 deletion crates/av1/src/obu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::io::{
};

use bytes::Bytes;
use scuffle_bitio::BitReader;
use scuffle_bytes_util::BitReader;

pub mod seq;

Expand Down
2 changes: 1 addition & 1 deletion crates/av1/src/obu/seq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::io;

use byteorder::{BigEndian, ReadBytesExt};
use bytes::Bytes;
use scuffle_bitio::BitReader;
use scuffle_bytes_util::BitReader;

use super::ObuHeader;
use crate::obu::read_uvlc;
Expand Down
2 changes: 1 addition & 1 deletion crates/av1/src/tests.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::io;

use scuffle_bitio::BitReader;
use scuffle_bytes_util::BitReader;

use crate::config::AV1CodecConfigurationRecord;
use crate::seq::{ColorConfig, OperatingPoint, SequenceHeaderObu};
Expand Down
7 changes: 0 additions & 7 deletions crates/bitio/src/lib.rs

This file was deleted.

3 changes: 2 additions & 1 deletion crates/bitio/Cargo.toml → crates/bytes-util/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "scuffle-bitio"
name = "scuffle-bytes-util"
lennartkloock marked this conversation as resolved.
Show resolved Hide resolved
version = "0.0.1"
edition = "2021"
license = "MIT OR Apache-2.0"
Expand All @@ -8,4 +8,5 @@ license = "MIT OR Apache-2.0"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }

[dependencies]
bytes = "1.5"
scuffle-workspace-hack.workspace = true
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions crates/bitio/README.md → crates/bytes-util/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# scuffle-bitio
# scuffle-bytes-util

> [!WARNING]
> This crate is under active development and may not be stable.

[![crates.io](https://img.shields.io/crates/v/scuffle-bitio.svg)](https://crates.io/crates/scuffle-bitio) [![docs.rs](https://img.shields.io/docsrs/scuffle-bitio)](https://docs.rs/scuffle-bitio)
[![crates.io](https://img.shields.io/crates/v/scuffle-bytes-util.svg)](https://crates.io/crates/scuffle-bytes-util) [![docs.rs](https://img.shields.io/docsrs/scuffle-bytes-util)](https://docs.rs/scuffle-bytes-util)

---

Adds a simple interface for writing and reading bits to and from a stream.
Adds some helpful utilities for working with bits and bytes.

## License

Expand Down
Loading