Skip to content

Commit

Permalink
Fix AudioSourceProviderGStreamer build with !ENABLE(MEDIA_STREAM)
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=264119

This an another unreviewed stable branch commit, including the latest
changes that I've proposed in:

#19920
  • Loading branch information
mcatanzaro committed Nov 3, 2023
1 parent c52c35e commit 1a44c46
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,21 @@ typedef struct _GstAppSink GstAppSink;

namespace WebCore {

#if ENABLE(MEDIA_STREAM)
class AudioSourceProviderGStreamer final : public WebAudioSourceProvider {
public:
static Ref<AudioSourceProviderGStreamer> create()
{
return adoptRef(*new AudioSourceProviderGStreamer());
}

#if ENABLE(MEDIA_STREAM)
static Ref<AudioSourceProviderGStreamer> create(MediaStreamTrackPrivate& source)
{
return adoptRef(*new AudioSourceProviderGStreamer(source));
}
AudioSourceProviderGStreamer(MediaStreamTrackPrivate&);
#else
class AudioSourceProviderGStreamer : public AudioSourceProvider {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_NONCOPYABLE(AudioSourceProviderGStreamer);
public:
#endif

AudioSourceProviderGStreamer();
~AudioSourceProviderGStreamer();

void configureAudioBin(GstElement* audioBin, GstElement* audioSink);

void provideInput(AudioBus*, size_t framesToProcess) override;
Expand All @@ -76,6 +69,9 @@ class AudioSourceProviderGStreamer : public AudioSourceProvider {
void clearAdapters();

private:
AudioSourceProviderGStreamer();
~AudioSourceProviderGStreamer();

#if ENABLE(MEDIA_STREAM)
WeakPtr<MediaStreamTrackPrivate> m_captureSource;
RefPtr<MediaStreamPrivate> m_streamPrivate;
Expand Down

0 comments on commit 1a44c46

Please sign in to comment.