Changeset 214043 in webkit


Ignore:
Timestamp:
Mar 16, 2017 8:23:00 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

LibWebRTC outgoing source should be thread safe refcounted
https://bugs.webkit.org/show_bug.cgi?id=169726

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-16
Reviewed by Alex Christensen.

Preventive fix.
Also fixing the size of the buffer for the audio source as its reserved size is byte count.

  • platform/mediastream/mac/RealtimeOutgoingAudioSource.h:
  • platform/mediastream/mac/RealtimeOutgoingVideoSource.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r214042 r214043  
     12017-03-16  Youenn Fablet  <youenn@apple.com>
     2
     3        LibWebRTC outgoing source should be thread safe refcounted
     4        https://bugs.webkit.org/show_bug.cgi?id=169726
     5
     6        Reviewed by Alex Christensen.
     7
     8        Preventive fix.
     9        Also fixing the size of the buffer for the audio source as its reserved size is byte count.
     10
     11        * platform/mediastream/mac/RealtimeOutgoingAudioSource.h:
     12        * platform/mediastream/mac/RealtimeOutgoingVideoSource.h:
     13
    1142017-03-16  Youenn Fablet  <youenn@apple.com>
    215
  • trunk/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSource.h

    r213080 r214043  
    3535#include "RealtimeMediaSource.h"
    3636#include <webrtc/api/mediastreaminterface.h>
     37#include <wtf/ThreadSafeRefCounted.h>
    3738
    3839namespace webrtc {
     
    4344namespace WebCore {
    4445
    45 class RealtimeOutgoingAudioSource final : public RefCounted<RealtimeOutgoingAudioSource>, public webrtc::AudioSourceInterface, private RealtimeMediaSource::Observer {
     46class RealtimeOutgoingAudioSource final : public ThreadSafeRefCounted<RealtimeOutgoingAudioSource>, public webrtc::AudioSourceInterface, private RealtimeMediaSource::Observer {
    4647public:
    4748    static Ref<RealtimeOutgoingAudioSource> create(Ref<RealtimeMediaSource>&& audioSource) { return adoptRef(*new RealtimeOutgoingAudioSource(WTFMove(audioSource))); }
     
    7778    CAAudioStreamDescription m_outputStreamDescription;
    7879
    79     Vector<uint16_t> m_audioBuffer;
     80    Vector<uint8_t> m_audioBuffer;
    8081    uint64_t m_startFrame { 0 };
    8182    bool m_muted { false };
  • trunk/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSource.h

    r213066 r214043  
    3737#include <webrtc/common_video/include/i420_buffer_pool.h>
    3838#include <webrtc/media/base/videosinkinterface.h>
     39#include <wtf/ThreadSafeRefCounted.h>
    3940
    4041namespace WebCore {
    4142
    42 class RealtimeOutgoingVideoSource final : public RefCounted<RealtimeOutgoingVideoSource>, public webrtc::VideoTrackSourceInterface, private RealtimeMediaSource::Observer {
     43class RealtimeOutgoingVideoSource final : public ThreadSafeRefCounted<RealtimeOutgoingVideoSource>, public webrtc::VideoTrackSourceInterface, private RealtimeMediaSource::Observer {
    4344public:
    4445    static Ref<RealtimeOutgoingVideoSource> create(Ref<RealtimeMediaSource>&& videoSource) { return adoptRef(*new RealtimeOutgoingVideoSource(WTFMove(videoSource))); }
Note: See TracChangeset for help on using the changeset viewer.