mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Upgrade to latest servo-media
This commit is contained in:
parent
66a9677538
commit
4b48cfa3ec
5 changed files with 26 additions and 15 deletions
18
Cargo.lock
generated
18
Cargo.lock
generated
|
@ -3197,7 +3197,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "servo-media"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/media#7a5c334698aa1e8a9cf95c5bd761e4a31489b6db"
|
||||
source = "git+https://github.com/servo/media#a3d25355acac0fe6f7f8b7af18e6fe1f910431ab"
|
||||
dependencies = [
|
||||
"servo-media-audio 0.1.0 (git+https://github.com/servo/media)",
|
||||
"servo-media-gstreamer 0.1.0 (git+https://github.com/servo/media)",
|
||||
|
@ -3207,9 +3207,10 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "servo-media-audio"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/media#7a5c334698aa1e8a9cf95c5bd761e4a31489b6db"
|
||||
source = "git+https://github.com/servo/media#a3d25355acac0fe6f7f8b7af18e6fe1f910431ab"
|
||||
dependencies = [
|
||||
"byte-slice-cast 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"petgraph 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_media_derive 0.1.0 (git+https://github.com/servo/media)",
|
||||
|
@ -3219,7 +3220,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "servo-media-gstreamer"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/media#7a5c334698aa1e8a9cf95c5bd761e4a31489b6db"
|
||||
source = "git+https://github.com/servo/media#a3d25355acac0fe6f7f8b7af18e6fe1f910431ab"
|
||||
dependencies = [
|
||||
"byte-slice-cast 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glib 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3227,7 +3228,7 @@ dependencies = [
|
|||
"gstreamer-app 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gstreamer-audio 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gstreamer-player 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-media-audio 0.1.0 (git+https://github.com/servo/media)",
|
||||
"servo-media-player 0.1.0 (git+https://github.com/servo/media)",
|
||||
|
@ -3237,7 +3238,12 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "servo-media-player"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/media#7a5c334698aa1e8a9cf95c5bd761e4a31489b6db"
|
||||
source = "git+https://github.com/servo/media#a3d25355acac0fe6f7f8b7af18e6fe1f910431ab"
|
||||
dependencies = [
|
||||
"ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "servo-skia"
|
||||
|
@ -3318,7 +3324,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "servo_media_derive"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/media#7a5c334698aa1e8a9cf95c5bd761e4a31489b6db"
|
||||
source = "git+https://github.com/servo/media#a3d25355acac0fe6f7f8b7af18e6fe1f910431ab"
|
||||
dependencies = [
|
||||
"quote 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -10,7 +10,6 @@ use dom::bindings::reflector::reflect_dom_object;
|
|||
use dom::bindings::root::DomRoot;
|
||||
use dom::globalscope::GlobalScope;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_media::audio::node::AudioNodeInit;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct AudioDestinationNode {
|
||||
|
@ -23,9 +22,8 @@ impl AudioDestinationNode {
|
|||
options: &AudioNodeOptions,
|
||||
) -> AudioDestinationNode {
|
||||
AudioDestinationNode {
|
||||
node: AudioNode::new_inherited(
|
||||
AudioNodeInit::DestinationNode,
|
||||
Some(context.destination_node()),
|
||||
node: AudioNode::new_inherited_for_id(
|
||||
context.destination_node(),
|
||||
context,
|
||||
options,
|
||||
1,
|
||||
|
|
|
@ -36,17 +36,26 @@ pub struct AudioNode {
|
|||
channel_interpretation: Cell<ChannelInterpretation>,
|
||||
}
|
||||
|
||||
|
||||
impl AudioNode {
|
||||
pub fn new_inherited(
|
||||
node_type: AudioNodeInit,
|
||||
node_id: Option<NodeId>,
|
||||
context: &BaseAudioContext,
|
||||
options: &AudioNodeOptions,
|
||||
number_of_inputs: u32,
|
||||
number_of_outputs: u32,
|
||||
) -> AudioNode {
|
||||
let node_id =
|
||||
node_id.unwrap_or_else(|| context.audio_context_impl().create_node(node_type));
|
||||
let node_id = context.audio_context_impl().create_node(node_type);
|
||||
AudioNode::new_inherited_for_id(node_id, context, options, number_of_inputs, number_of_outputs)
|
||||
}
|
||||
|
||||
pub fn new_inherited_for_id(
|
||||
node_id: NodeId,
|
||||
context: &BaseAudioContext,
|
||||
options: &AudioNodeOptions,
|
||||
number_of_inputs: u32,
|
||||
number_of_outputs: u32,
|
||||
) -> AudioNode {
|
||||
AudioNode {
|
||||
eventtarget: EventTarget::new_inherited(),
|
||||
node_id,
|
||||
|
|
|
@ -34,7 +34,6 @@ impl AudioScheduledSourceNode {
|
|||
AudioScheduledSourceNode {
|
||||
node: AudioNode::new_inherited(
|
||||
node_type,
|
||||
None, /* node_id */
|
||||
context,
|
||||
options,
|
||||
number_of_inputs,
|
||||
|
|
|
@ -38,7 +38,6 @@ impl GainNode {
|
|||
node_options.channelInterpretation = Some(ChannelInterpretation::Speakers);
|
||||
let node = AudioNode::new_inherited(
|
||||
AudioNodeInit::GainNode(gain_options.into()),
|
||||
None,
|
||||
context,
|
||||
&node_options,
|
||||
1, // inputs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue