Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMediaElementAudioSourceNode #321
Conversation
|
I am not sure why this isn't currently working as expected. I am creating an appsink element and setting it as the playbin
@sdroege do you know what's wrong here? Thanks |
|
It looks like you're setting the audio sink when the player is already in ready or playing state |
|
looking good so far Ideally should use the MediaStream stuff for the audio sink. It internally uses a proxy sink which should clean up most of this code. One thing missing from the mediastream code is the ability to use a AudioChunk based interface when the proxy sink isn't available (the stream comes from a non-gstreamer source). But the original design of mediastream was so that it could be used for these things. |
I thought about it. But in this case we don't really need to connect two gstreamer pipelines (well, not directly). What we need is to extract the data from the player pipeline and take it into the webaudio render loop (which will end up in the webaudio gstreamer pipeline). And for that, appsink seemed to be the most appropriate element. |
Yes. That was the case. Thanks. I fixed it by reseting and recreating the player. |
Right, but eventually we'd also want to be able to hook up webrtc to webaudio. You'd still need an appsink, but you instead make it possible to attach an appsink to a mediastream, so that webaudio can connect to any mediastream and attach an appsink on its proxysrc |
|
This is currently playing sound coming from the player and through the webaudio pipeline, but the playback rate seems to be wrong, cause the audio is reproduced slower than it should. |
|
I am unable to figure out why the playback rate is slower than it should. Let's merge this as is for now. I'll file a follow-up to investigate the issue further. r? @Manishearth |
|
r=me then. I think we should still try and use MediaStream here so that we have a standard way of plugging mediastreams into webaudio. That can be a followup. @bors-servo r+ |
|
|
MediaElementAudioSourceNode
|
|
WebAudio MediaElementAudioSourceNode implementation - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #22370 - [X] There are tests for these changes Depends on servo/media#321 Tested with https://ferjm.github.io/webaudio-examples/media-source-buffer/ I am still investigating why it is playing back with a low rate.
WebAudio MediaElementAudioSourceNode implementation - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #22370 - [X] There are tests for these changes Depends on servo/media#321 Tested with https://ferjm.github.io/webaudio-examples/media-source-buffer/ I am still investigating why it is playing back with a low rate.
WebAudio MediaElementAudioSourceNode implementation - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #22370 - [X] There are tests for these changes Depends on servo/media#321 Tested with https://ferjm.github.io/webaudio-examples/media-source-buffer/ I am still investigating why it is playing back with a low rate.
WebAudio MediaElementAudioSourceNode implementation - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #22370 - [X] There are tests for these changes Depends on servo/media#321 Tested with https://ferjm.github.io/webaudio-examples/media-source-buffer/ I am still investigating why it is playing back with a low rate.
WebAudio MediaElementAudioSourceNode implementation - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #22370 - [X] There are tests for these changes Depends on servo/media#321 Tested with https://ferjm.github.io/webaudio-examples/media-source-buffer/ I am still investigating why it is playing back with a low rate.
ferjm commentedOct 31, 2019
No description provided.