Skip to content

Commit

Permalink
Bug 1852209 - Update cubeb-core to 0.10.4. r=media-playback-reviewers…
Browse files Browse the repository at this point in the history
…,supply-chain-reviewers,kinetik

Differential Revision: https://phabricator.services.mozilla.com/D189313
  • Loading branch information
glandium committed Sep 27, 2023
1 parent 8e41e91 commit 67ebaa8
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

5 changes: 5 additions & 0 deletions supply-chain/audits.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,11 @@ notes = """
Mozilla-developed package.
"""

[[audits.cubeb-core]]
who = "Mike Hommey <[email protected]>"
criteria = "safe-to-deploy"
delta = "0.10.3 -> 0.10.4"

[[audits.cubeb-sys]]
who = "Matthew Gregan <[email protected]>"
criteria = "safe-to-deploy"
Expand Down
2 changes: 1 addition & 1 deletion third_party/rust/cubeb-core/.cargo-checksum.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"files":{"Cargo.toml":"d839b4f63507b93786807223af9badee4eb8f015cbe9f442f82460b463e535d6","LICENSE":"8c044baa5d883274736eeece0b955249076c2697b826e576fce59496235b2cf5","src/builders.rs":"87adbbdd63fde848eeaae4a79a04859ed02ca982fb644f6b8b5fe7c158a8944c","src/call.rs":"cf8949c2cf53f5418d8e5222f570b9301a98a476a18c734fc2ebbc8b53ac0165","src/channel.rs":"676d0cfa733c09ef039ed16138cb78ae6bd10b58d0eb93292e6d8accc69086ff","src/context.rs":"9d7fd770511910e8c416ff47354863f547915ff94fb19ef2dd6796a70c2658cd","src/device.rs":"5fa27f2ba7f108e4ae32ad776b1639b0e8c8ad4c401ce171c512c8126ea5a517","src/device_collection.rs":"f86535ffeee73b889bdbac1c5a3432b01cca86df819a7cc26eaa0c983d30cbbe","src/error.rs":"3693bf575e9504b9b1ab114de3e2ce7132039acf27ec68967dae66c2ce1581aa","src/ffi_types.rs":"71948d0949675df876e18c4340f4e693fc6a14c4de9d63a3885450c95577596b","src/format.rs":"7162c1550be53f5fe94b0bba4c71fea2f0304462108657c62a20ea47207ca413","src/lib.rs":"57ecf793ab1cc052c021ccbf9ad011ea52d1303e2dbc54adea90a95b5d7a36cf","src/log.rs":"4bef74d7a7fd9ffdf249be5ef95781969f00a7ecff2d3a190d5b1536d1635a73","src/stream.rs":"d34a66ee11fc3818a9685923c7211b96544cd2bb6b72f5fa4b2727c57d84d929","src/util.rs":"308cfbaacd615ff600e74415c52daeef007fff34a4a0648a73c0042f6067f84f"},"package":"6203cd567a2ae4382077cc2160738517462c93cf77f3910fa18b2a74549abc84"}
{"files":{"Cargo.toml":"f6321d684bcfdfda2368335a3fd794bcc92ef8eab26db0decac66257c32a2742","LICENSE":"8c044baa5d883274736eeece0b955249076c2697b826e576fce59496235b2cf5","src/builders.rs":"87adbbdd63fde848eeaae4a79a04859ed02ca982fb644f6b8b5fe7c158a8944c","src/call.rs":"cf8949c2cf53f5418d8e5222f570b9301a98a476a18c734fc2ebbc8b53ac0165","src/channel.rs":"c88b8846e53bbec6b125a4fa6a3787c48312be958bd08cc5ee773b218d93d683","src/context.rs":"9d7fd770511910e8c416ff47354863f547915ff94fb19ef2dd6796a70c2658cd","src/device.rs":"86fd507bf1cd97b13b8cf3e92519b3be11904be68d4997658b276d5054162cd7","src/device_collection.rs":"f86535ffeee73b889bdbac1c5a3432b01cca86df819a7cc26eaa0c983d30cbbe","src/error.rs":"3693bf575e9504b9b1ab114de3e2ce7132039acf27ec68967dae66c2ce1581aa","src/ffi_types.rs":"71948d0949675df876e18c4340f4e693fc6a14c4de9d63a3885450c95577596b","src/format.rs":"7162c1550be53f5fe94b0bba4c71fea2f0304462108657c62a20ea47207ca413","src/lib.rs":"57ecf793ab1cc052c021ccbf9ad011ea52d1303e2dbc54adea90a95b5d7a36cf","src/log.rs":"4bef74d7a7fd9ffdf249be5ef95781969f00a7ecff2d3a190d5b1536d1635a73","src/stream.rs":"8ac3c8ae4620dd040c479db13e34f953281c8a24187cab7cc7865dfce3e4231e","src/util.rs":"308cfbaacd615ff600e74415c52daeef007fff34a4a0648a73c0042f6067f84f"},"package":"4727331fcc9ab77948fe80166f99657290d09589ca0a6e0a948f63c790f09584"}
2 changes: 1 addition & 1 deletion third_party/rust/cubeb-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

[package]
name = "cubeb-core"
version = "0.10.3"
version = "0.10.4"
authors = ["Dan Glastonbury <[email protected]>"]
description = """
Common types and definitions for cubeb rust and C bindings. Not intended for direct use.
Expand Down
5 changes: 2 additions & 3 deletions third_party/rust/cubeb-core/src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ bitflags! {

macro_rules! bits {
($($x:ident => $y:ident),*) => {
$(pub const $x: ChannelLayout = ChannelLayout { bits: ffi::$y };)*
$(pub const $x: ChannelLayout = ChannelLayout::from_bits_truncate(ffi::$y);)*
}
}

Expand Down Expand Up @@ -75,8 +75,7 @@ impl From<ChannelLayout> for ffi::cubeb_channel {

impl ChannelLayout {
pub fn num_channels(&self) -> u32 {
let layout = *self;
unsafe { ffi::cubeb_channel_layout_nb_channels(layout.into()) }
unsafe { ffi::cubeb_channel_layout_nb_channels(self.bits()) }
}
}

Expand Down
10 changes: 8 additions & 2 deletions third_party/rust/cubeb-core/src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,30 @@ bitflags! {
/// used, this can control inter-stream interruption, ducking, and volume
/// control.
pub struct DevicePref: ffi::cubeb_device_pref {
const NONE = ffi::CUBEB_DEVICE_PREF_NONE;
const MULTIMEDIA = ffi::CUBEB_DEVICE_PREF_MULTIMEDIA;
const VOICE = ffi::CUBEB_DEVICE_PREF_VOICE;
const NOTIFICATION = ffi::CUBEB_DEVICE_PREF_NOTIFICATION;
const ALL = ffi::CUBEB_DEVICE_PREF_ALL;
}
}

impl DevicePref {
pub const NONE: Self = Self::empty();
}

bitflags! {
/// Whether a particular device is an input device (e.g. a microphone), or an
/// output device (e.g. headphones).
pub struct DeviceType: ffi::cubeb_device_type {
const UNKNOWN = ffi::CUBEB_DEVICE_TYPE_UNKNOWN as _;
const INPUT = ffi::CUBEB_DEVICE_TYPE_INPUT as _;
const OUTPUT = ffi::CUBEB_DEVICE_TYPE_OUTPUT as _;
}
}

impl DeviceType {
pub const UNKNOWN: Self = Self::empty();
}

/// An opaque handle used to refer to a particular input or output device
/// across calls.
pub type DeviceId = ffi::cubeb_devid;
Expand Down
5 changes: 4 additions & 1 deletion third_party/rust/cubeb-core/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,16 @@ impl From<State> for ffi::cubeb_state {
bitflags! {
/// Miscellaneous stream preferences.
pub struct StreamPrefs: ffi::cubeb_stream_prefs {
const NONE = ffi::CUBEB_STREAM_PREF_NONE;
const LOOPBACK = ffi::CUBEB_STREAM_PREF_LOOPBACK;
const DISABLE_DEVICE_SWITCHING = ffi::CUBEB_STREAM_PREF_DISABLE_DEVICE_SWITCHING;
const VOICE = ffi::CUBEB_STREAM_PREF_VOICE;
}
}

impl StreamPrefs {
pub const NONE: Self = Self::empty();
}

ffi_type_stack! {
/// Stream format initialization parameters.
type CType = ffi::cubeb_stream_params;
Expand Down

0 comments on commit 67ebaa8

Please sign in to comment.