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

common: rename utils-xiph crate to common #318

Merged
merged 1 commit into from
Oct 10, 2024
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ members = [
"symphonia-codec-pcm",
"symphonia-codec-vorbis",
"symphonia-codec-wavpack",
"symphonia-common",
"symphonia-core",
"symphonia-format-isomp4",
"symphonia-format-mkv",
"symphonia-format-ogg",
"symphonia-format-riff",
"symphonia-metadata",
"symphonia-play",
"symphonia-utils-xiph",
"symphonia-check",
]
2 changes: 1 addition & 1 deletion symphonia-bundle-flac/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rust-version = "1.56"
log = "0.4"
symphonia-core = { version = "0.5.4", path = "../symphonia-core" }
symphonia-metadata = { version = "0.5.4", path = "../symphonia-metadata" }
symphonia-utils-xiph = { version = "0.5.4", path = "../symphonia-utils-xiph" }
symphonia-common = { version = "0.5.4", path = "../symphonia-common" }

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
2 changes: 1 addition & 1 deletion symphonia-bundle-flac/src/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use std::cmp;
use std::convert::TryInto;
use std::num::Wrapping;

use symphonia_common::xiph::audio::flac::metadata::StreamInfo;
use symphonia_core::audio::{
AsGenericAudioBufferRef, AudioBuffer, AudioMut, AudioSpec, GenericAudioBufferRef,
};
Expand All @@ -22,7 +23,6 @@ use symphonia_core::formats::Packet;
use symphonia_core::io::{BitReaderLtr, BufReader, ReadBitsLtr};
use symphonia_core::support_audio_codec;
use symphonia_core::util::bits::sign_extend_leq32_to_i32;
use symphonia_utils_xiph::flac::metadata::StreamInfo;

use log::{debug, log_enabled, warn};

Expand Down
3 changes: 1 addition & 2 deletions symphonia-bundle-flac/src/demuxer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use std::io::{Seek, SeekFrom};

use symphonia_core::support_format;

use symphonia_common::xiph::audio::flac::metadata::*;
use symphonia_core::codecs::audio::{
well_known::CODEC_ID_FLAC, AudioCodecParameters, VerificationCheck,
};
Expand All @@ -23,8 +24,6 @@ use symphonia_core::formats::well_known::FORMAT_ID_FLAC;
use symphonia_core::io::*;
use symphonia_core::meta::{Metadata, MetadataBuilder, MetadataLog};

use symphonia_utils_xiph::flac::metadata::*;

use log::{debug, info};

use super::parser::PacketParser;
Expand Down
2 changes: 1 addition & 1 deletion symphonia-bundle-flac/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use symphonia_common::xiph::audio::flac::metadata::StreamInfo;
use symphonia_core::checksum::Crc16Ansi;
use symphonia_core::errors::{Error, Result};
use symphonia_core::formats::Packet;
use symphonia_core::io::{BufReader, Monitor, ReadBytes, SeekBuffered};
use symphonia_core::util::bits;
use symphonia_utils_xiph::flac::metadata::StreamInfo;

use log::warn;

Expand Down
2 changes: 1 addition & 1 deletion symphonia-codec-vorbis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ rust-version = "1.56"
[dependencies]
log = "0.4"
symphonia-core = { version = "0.5.4", path = "../symphonia-core" }
symphonia-utils-xiph = { version = "0.5.4", path = "../symphonia-utils-xiph" }
symphonia-common = { version = "0.5.4", path = "../symphonia-common" }
2 changes: 1 addition & 1 deletion symphonia-codec-vorbis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use symphonia_core::formats::Packet;
use symphonia_core::io::{BitReaderRtl, BufReader, FiniteBitStream, ReadBitsRtl, ReadBytes};
use symphonia_core::support_audio_codec;

use symphonia_utils_xiph::vorbis::*;
use symphonia_common::xiph::audio::vorbis::*;

use log::{debug, warn};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "symphonia-utils-xiph"
name = "symphonia-common"
version = "0.5.4"
description = "Project Symphonia utilities for Xiph codecs and formats."
description = "Project Symphonia utilities for codecs and formats."
homepage = "https://github.com/pdeljanov/Symphonia"
repository = "https://github.com/pdeljanov/Symphonia"
authors = ["Philip Deljanov <philip.deljanov@gmail.com>"]
Expand Down
6 changes: 3 additions & 3 deletions symphonia-utils-xiph/README.md → symphonia-common/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Symphonia Xiph Utilities
# Symphonia Common Utilities

[![Docs](https://docs.rs/symphonia-utils-xiph/badge.svg)](https://docs.rs/symphonia-utils-xiph)
[![Docs](https://docs.rs/symphonia-common/badge.svg)](https://docs.rs/symphonia-common)

Common utilities for Xiph formats and codecs for Project Symphonia.
Common utilities for codecs and formats for Project Symphonia.

**Note:** This crate is part of Symphonia. Please use the [`symphonia`](https://crates.io/crates/symphonia) crate instead of this one directly.

Expand Down
15 changes: 15 additions & 0 deletions symphonia-common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Symphonia
// Copyright (c) 2019-2022 The Project Symphonia Developers.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

// The following lints are allowed in all Symphonia crates. Please see clippy.toml for their
// justification.
#![allow(clippy::comparison_chain)]
#![allow(clippy::excessive_precision)]
#![allow(clippy::identity_op)]
#![allow(clippy::manual_range_contains)]

pub mod xiph;
File renamed without changes.
15 changes: 15 additions & 0 deletions symphonia-common/src/xiph/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Symphonia
// Copyright (c) 2019-2022 The Project Symphonia Developers.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

// The following lints are allowed in all Symphonia crates. Please see clippy.toml for their
// justification.
#![allow(clippy::comparison_chain)]
#![allow(clippy::excessive_precision)]
#![allow(clippy::identity_op)]
#![allow(clippy::manual_range_contains)]

pub mod audio;
2 changes: 1 addition & 1 deletion symphonia-format-isomp4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ encoding_rs = "0.8.17"
log = "0.4"
symphonia-core = { version = "0.5.4", path = "../symphonia-core" }
symphonia-metadata = { version = "0.5.4", path = "../symphonia-metadata" }
symphonia-utils-xiph = { version = "0.5.4", path = "../symphonia-utils-xiph" }
symphonia-common = { version = "0.5.4", path = "../symphonia-common" }
4 changes: 3 additions & 1 deletion symphonia-format-isomp4/src/atoms/flac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ use symphonia_core::codecs::audio::{AudioCodecParameters, VerificationCheck};
use symphonia_core::errors::{decode_error, unsupported_error, Result};
use symphonia_core::io::{BufReader, ReadBytes};

use symphonia_utils_xiph::flac::metadata::{MetadataBlockHeader, MetadataBlockType, StreamInfo};
use symphonia_common::xiph::audio::flac::metadata::{
MetadataBlockHeader, MetadataBlockType, StreamInfo,
};

use crate::atoms::{Atom, AtomHeader};

Expand Down
2 changes: 1 addition & 1 deletion symphonia-format-mkv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ log = "0.4"
lazy_static = "1.4.0"
symphonia-core = { version = "0.5.4", path = "../symphonia-core" }
symphonia-metadata = { version = "0.5.4", path = "../symphonia-metadata" }
symphonia-utils-xiph = { version = "0.5.4", path = "../symphonia-utils-xiph" }
symphonia-common = { version = "0.5.4", path = "../symphonia-common" }
2 changes: 1 addition & 1 deletion symphonia-format-mkv/src/codecs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use symphonia_core::codecs::video::{well_known::*, VideoCodecId, VideoCodecParam
use symphonia_core::codecs::{CodecId, CodecParameters, CodecProfile};
use symphonia_core::errors::{decode_error, Error, Result};

use symphonia_common::xiph::audio::flac::metadata::{MetadataBlockHeader, MetadataBlockType};
use symphonia_core::io::{BitReaderLtr, BufReader, ReadBitsLtr, ReadBytes};
use symphonia_utils_xiph::flac::metadata::{MetadataBlockHeader, MetadataBlockType};

use crate::lacing::read_xiph_sizes;
use crate::segment::TrackElement;
Expand Down
2 changes: 1 addition & 1 deletion symphonia-format-ogg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rust-version = "1.56"
log = "0.4"
symphonia-core = { version = "0.5.4", path = "../symphonia-core" }
symphonia-metadata = { version = "0.5.4", path = "../symphonia-metadata" }
symphonia-utils-xiph = { version = "0.5.4", path = "../symphonia-utils-xiph" }
symphonia-common = { version = "0.5.4", path = "../symphonia-common" }

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
6 changes: 4 additions & 2 deletions symphonia-format-ogg/src/mappings/flac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ use symphonia_core::formats::Track;
use symphonia_core::io::{BufReader, MonitorStream, ReadBytes};
use symphonia_core::meta::MetadataBuilder;

use symphonia_utils_xiph::flac::metadata::{read_comment_block, read_picture_block};
use symphonia_utils_xiph::flac::metadata::{MetadataBlockHeader, MetadataBlockType, StreamInfo};
use symphonia_common::xiph::audio::flac::metadata::{read_comment_block, read_picture_block};
use symphonia_common::xiph::audio::flac::metadata::{
MetadataBlockHeader, MetadataBlockType, StreamInfo,
};

use log::warn;

Expand Down
2 changes: 1 addition & 1 deletion symphonia-format-ogg/src/mappings/vorbis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use symphonia_core::formats::Track;
use symphonia_core::io::{BitReaderRtl, BufReader, ReadBitsRtl, ReadBytes};
use symphonia_core::meta::MetadataBuilder;

use symphonia_common::xiph::audio::vorbis::*;
use symphonia_metadata::vorbis::*;
use symphonia_utils_xiph::vorbis::*;

use log::warn;

Expand Down
Loading