[GStreamer][WebRTC] Override DeviceType() in RealtimeMediaSource implementations
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Jan 2019 15:22:43 +0000 (15:22 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Jan 2019 15:22:43 +0000 (15:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193397

This was necessary but wasn't done.

Patch by Thibault Saunier <tsaunier@igalia.com> on 2019-01-14
Reviewed by Philippe Normand.

No test required as this fixes a regression in all WebRTC tests when built in debug mode.

* platform/mediastream/gstreamer/GStreamerAudioCaptureSource.h:
* platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239925 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCaptureSource.h
Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h

index 55618c1..21988c2 100644 (file)
@@ -1,3 +1,17 @@
+2019-01-14  Thibault Saunier  <tsaunier@igalia.com>
+
+        [GStreamer][WebRTC] Override DeviceType() in RealtimeMediaSource implementations
+        https://bugs.webkit.org/show_bug.cgi?id=193397
+
+        This was necessary but wasn't done.
+
+        Reviewed by Philippe Normand.
+
+        No test required as this fixes a regression in all WebRTC tests when built in debug mode.
+
+        * platform/mediastream/gstreamer/GStreamerAudioCaptureSource.h:
+        * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
+
 2019-01-14  Zan Dobersek  <zdobersek@igalia.com>
 
         Unreviewed WPE debug build fix after r239921.
index 5229a25..36087c0 100644 (file)
@@ -22,6 +22,7 @@
 #pragma once
 
 #if ENABLE(MEDIA_STREAM) && USE(LIBWEBRTC) && USE(GSTREAMER)
+#include "CaptureDevice.h"
 #include "GStreamerAudioCapturer.h"
 #include "GStreamerCaptureDevice.h"
 #include "RealtimeMediaSource.h"
@@ -45,6 +46,7 @@ protected:
     virtual ~GStreamerAudioCaptureSource();
     void startProducingData() override;
     void stopProducingData() override;
+    CaptureDevice::DeviceType deviceType() const override { return CaptureDevice::DeviceType::Microphone; }
 
     mutable Optional<RealtimeMediaSourceCapabilities> m_capabilities;
     mutable Optional<RealtimeMediaSourceSettings> m_currentSettings;
index cb5e651..4681d11 100644 (file)
@@ -22,6 +22,7 @@
 #pragma once
 
 #if ENABLE(MEDIA_STREAM) && USE(LIBWEBRTC) && USE(GSTREAMER)
+#include "CaptureDevice.h"
 #include "GStreamerVideoCapturer.h"
 #include "RealtimeVideoSource.h"
 
@@ -52,6 +53,7 @@ protected:
 
     mutable Optional<RealtimeMediaSourceCapabilities> m_capabilities;
     mutable Optional<RealtimeMediaSourceSettings> m_currentSettings;
+    CaptureDevice::DeviceType deviceType() const override { return CaptureDevice::DeviceType::Camera; }
 
 private:
     static GstFlowReturn newSampleCallback(GstElement*, GStreamerVideoCaptureSource*);