Skip to content
Permalink
Browse files
[GStreamer] Simplify linking pads in AudioDestination and correct old…
… comment.

https://bugs.webkit.org/show_bug.cgi?id=148702

Patch by Hyemi Shin <hyemi.sin@samsung.com> on 2015-09-02
Reviewed by Philippe Normand.

Simplify linking src pad of webkitAudioSrc and sink pad of audioConvert
to one line because implementation changed not to use seperate function
to complete building rest of pipelines.
Correct old comment also there is no more wavparse element.

No new tests, no behavior change.

* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):

Canonical link: https://commits.webkit.org/166833@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Hyemi Shin authored and webkit-commit-queue committed Sep 2, 2015
1 parent 56e773d commit 7034dfc07aa3c808861b1a206fc982ae954a5174
Showing 2 changed files with 19 additions and 7 deletions.
@@ -1,3 +1,20 @@
2015-09-02 Hyemi Shin <hyemi.sin@samsung.com>

[GStreamer] Simplify linking pads in AudioDestination and correct old comment.
https://bugs.webkit.org/show_bug.cgi?id=148702

Reviewed by Philippe Normand.

Simplify linking src pad of webkitAudioSrc and sink pad of audioConvert
to one line because implementation changed not to use seperate function
to complete building rest of pipelines.
Correct old comment also there is no more wavparse element.

No new tests, no behavior change.

* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):

2015-09-02 Chris Dumez <cdumez@apple.com>

document.createProcessingInstruction() does not behave according to specification
@@ -87,8 +87,6 @@ AudioDestinationGStreamer::AudioDestinationGStreamer(AudioIOCallback& callback,
"provider", &m_callback,
"frames", framesToPull, NULL));

GRefPtr<GstPad> srcPad = adoptGRef(gst_element_get_static_pad(webkitAudioSrc, "src"));

GRefPtr<GstElement> audioSink = gst_element_factory_make("autoaudiosink", 0);
m_audioSinkAvailable = audioSink;
if (!audioSink) {
@@ -111,11 +109,8 @@ AudioDestinationGStreamer::AudioDestinationGStreamer(AudioIOCallback& callback,
GstElement* audioResample = gst_element_factory_make("audioresample", 0);
gst_bin_add_many(GST_BIN(m_pipeline), webkitAudioSrc, audioConvert, audioResample, audioSink.get(), NULL);

// Link wavparse's src pad to audioconvert sink pad.
GRefPtr<GstPad> sinkPad = adoptGRef(gst_element_get_static_pad(audioConvert, "sink"));
gst_pad_link_full(srcPad.get(), sinkPad.get(), GST_PAD_LINK_CHECK_NOTHING);

// Link audioconvert to audiosink and roll states.
// Link src pads from webkitAudioSrc to audioConvert ! audioResample ! autoaudiosink.
gst_element_link_pads_full(webkitAudioSrc, "src", audioConvert, "sink", GST_PAD_LINK_CHECK_NOTHING);
gst_element_link_pads_full(audioConvert, "src", audioResample, "sink", GST_PAD_LINK_CHECK_NOTHING);
gst_element_link_pads_full(audioResample, "src", audioSink.get(), "sink", GST_PAD_LINK_CHECK_NOTHING);
}

0 comments on commit 7034dfc

Please sign in to comment.