Title: [222785] trunk/Source/WebCore
Revision
222785
Author
[email protected]
Date
2017-10-03 09:26:14 -0700 (Tue, 03 Oct 2017)

Log Message

Clean-up RealtimeIncomingVideoSource
https://bugs.webkit.org/show_bug.cgi?id=177782

Patch by Youenn Fablet <[email protected]> on 2017-10-03
Reviewed by Alejandro G. Castro.

No change of behavior.
Removing code that is no longer needed.

* platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:
(WebCore::RealtimeIncomingVideoSource::create):
(WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource):
* platform/mediastream/mac/RealtimeIncomingVideoSource.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (222784 => 222785)


--- trunk/Source/WebCore/ChangeLog	2017-10-03 16:25:02 UTC (rev 222784)
+++ trunk/Source/WebCore/ChangeLog	2017-10-03 16:26:14 UTC (rev 222785)
@@ -1,3 +1,18 @@
+2017-10-03  Youenn Fablet  <[email protected]>
+
+        Clean-up RealtimeIncomingVideoSource
+        https://bugs.webkit.org/show_bug.cgi?id=177782
+
+        Reviewed by Alejandro G. Castro.
+
+        No change of behavior.
+        Removing code that is no longer needed.
+
+        * platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:
+        (WebCore::RealtimeIncomingVideoSource::create):
+        (WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource):
+        * platform/mediastream/mac/RealtimeIncomingVideoSource.h:
+
 2017-10-03  Brent Fulgham  <[email protected]>
 
         [Mac] Use safer decoding practices for NSKeyedUnarchiver

Modified: trunk/Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.cpp (222784 => 222785)


--- trunk/Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.cpp	2017-10-03 16:25:02 UTC (rev 222784)
+++ trunk/Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.cpp	2017-10-03 16:26:14 UTC (rev 222785)
@@ -28,21 +28,14 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// FIXME: Do clean-up in the includes
-
 #include "config.h"
 #include "RealtimeIncomingVideoSource.h"
 
 #if USE(LIBWEBRTC)
 
-#include "GraphicsContext.h"
-#include "ImageBuffer.h"
-#include "IntRect.h"
 #include "Logging.h"
 #include "MediaSampleAVFObjC.h"
-#include <webrtc/common_video/libyuv/include/webrtc_libyuv.h>
 #include <webrtc/sdk/objc/Framework/Classes/Video/corevideo_frame_buffer.h>
-#include <wtf/MainThread.h>
 
 #include "CoreMediaSoftLink.h"
 #include "CoreVideoSoftLink.h"
@@ -51,22 +44,14 @@
 
 Ref<RealtimeIncomingVideoSource> RealtimeIncomingVideoSource::create(rtc::scoped_refptr<webrtc::VideoTrackInterface>&& videoTrack, String&& trackId)
 {
-    const OSType imageFormat = kCVPixelFormatType_32BGRA;
-    RetainPtr<CFNumberRef> imageFormatNumber = adoptCF(CFNumberCreate(nullptr,  kCFNumberIntType,  &imageFormat));
-
-    RetainPtr<CFMutableDictionaryRef> conformerOptions = adoptCF(CFDictionaryCreateMutable(0, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
-    CFDictionarySetValue(conformerOptions.get(), kCVPixelBufferPixelFormatTypeKey, imageFormatNumber.get());
-    PixelBufferConformerCV conformer(conformerOptions.get());
-
-    auto source = adoptRef(*new RealtimeIncomingVideoSource(WTFMove(videoTrack), WTFMove(trackId), conformerOptions.get()));
+    auto source = adoptRef(*new RealtimeIncomingVideoSource(WTFMove(videoTrack), WTFMove(trackId)));
     source->start();
     return source;
 }
 
-RealtimeIncomingVideoSource::RealtimeIncomingVideoSource(rtc::scoped_refptr<webrtc::VideoTrackInterface>&& videoTrack, String&& videoTrackId, CFMutableDictionaryRef conformerOptions)
+RealtimeIncomingVideoSource::RealtimeIncomingVideoSource(rtc::scoped_refptr<webrtc::VideoTrackInterface>&& videoTrack, String&& videoTrackId)
     : RealtimeMediaSource(WTFMove(videoTrackId), RealtimeMediaSource::Type::Video, String())
     , m_videoTrack(WTFMove(videoTrack))
-    , m_conformer(conformerOptions)
 {
     m_currentSettings.setWidth(640);
     m_currentSettings.setHeight(480);

Modified: trunk/Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.h (222784 => 222785)


--- trunk/Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.h	2017-10-03 16:25:02 UTC (rev 222784)
+++ trunk/Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.h	2017-10-03 16:26:14 UTC (rev 222785)
@@ -33,12 +33,12 @@
 #if USE(LIBWEBRTC)
 
 #include "LibWebRTCMacros.h"
-#include "PixelBufferConformerCV.h"
 #include "RealtimeMediaSource.h"
 #include <webrtc/api/mediastreaminterface.h>
 #include <wtf/RetainPtr.h>
 
-typedef struct opaqueCMSampleBuffer *CMSampleBufferRef;
+using CMSampleBufferRef = struct opaqueCMSampleBuffer*;
+using CVPixelBufferRef = struct __CVBuffer*;
 
 namespace WebCore {
 
@@ -52,7 +52,7 @@
     void setSourceTrack(rtc::scoped_refptr<webrtc::VideoTrackInterface>&&);
 
 private:
-    RealtimeIncomingVideoSource(rtc::scoped_refptr<webrtc::VideoTrackInterface>&&, String&&, CFMutableDictionaryRef);
+    RealtimeIncomingVideoSource(rtc::scoped_refptr<webrtc::VideoTrackInterface>&&, String&&);
 
     // RealtimeMediaSource API
     void startProducingData() final;
@@ -70,11 +70,9 @@
 
     CVPixelBufferRef pixelBufferFromVideoFrame(const webrtc::VideoFrame&);
 
-    RefPtr<Image> m_currentImage;
     RealtimeMediaSourceSettings m_currentSettings;
     rtc::scoped_refptr<webrtc::VideoTrackInterface> m_videoTrack;
     RetainPtr<CMSampleBufferRef> m_buffer;
-    PixelBufferConformerCV m_conformer;
     RetainPtr<CVPixelBufferRef> m_blackFrame;
     int m_blackFrameWidth { 0 };
     int m_blackFrameHeight { 0 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to