| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_MEDIA_STREAM_ADAPTER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_MEDIA_STREAM_ADAPTER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_MEDIA_STREAM_ADAPTER_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_MEDIA_STREAM_ADAPTER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // Instances of this class is owned by the RTCPeerConnectionHandler object that | 27 // Instances of this class is owned by the RTCPeerConnectionHandler object that |
| 28 // created it. | 28 // created it. |
| 29 class CONTENT_EXPORT WebRtcMediaStreamAdapter | 29 class CONTENT_EXPORT WebRtcMediaStreamAdapter |
| 30 : NON_EXPORTED_BASE(public MediaStreamObserver) { | 30 : NON_EXPORTED_BASE(public MediaStreamObserver) { |
| 31 public: | 31 public: |
| 32 WebRtcMediaStreamAdapter(const blink::WebMediaStream& web_stream, | 32 WebRtcMediaStreamAdapter(const blink::WebMediaStream& web_stream, |
| 33 PeerConnectionDependencyFactory* factory); | 33 PeerConnectionDependencyFactory* factory); |
| 34 ~WebRtcMediaStreamAdapter() override; | 34 ~WebRtcMediaStreamAdapter() override; |
| 35 | 35 |
| 36 bool IsEqual(const blink::WebMediaStream& web_stream) { | 36 bool IsEqual(const blink::WebMediaStream& web_stream) { |
| 37 return web_stream_.extraData() == web_stream.extraData(); | 37 return web_stream_.getExtraData() == web_stream.getExtraData(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 webrtc::MediaStreamInterface* webrtc_media_stream() { | 40 webrtc::MediaStreamInterface* webrtc_media_stream() { |
| 41 return webrtc_media_stream_.get(); | 41 return webrtc_media_stream_.get(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 protected: | 44 protected: |
| 45 // MediaStreamObserver implementation. | 45 // MediaStreamObserver implementation. |
| 46 void TrackAdded(const blink::WebMediaStreamTrack& track) override; | 46 void TrackAdded(const blink::WebMediaStreamTrack& track) override; |
| 47 void TrackRemoved(const blink::WebMediaStreamTrack& track) override; | 47 void TrackRemoved(const blink::WebMediaStreamTrack& track) override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 58 | 58 |
| 59 scoped_refptr<webrtc::MediaStreamInterface> webrtc_media_stream_; | 59 scoped_refptr<webrtc::MediaStreamInterface> webrtc_media_stream_; |
| 60 ScopedVector<MediaStreamVideoWebRtcSink> video_adapters_; | 60 ScopedVector<MediaStreamVideoWebRtcSink> video_adapters_; |
| 61 | 61 |
| 62 DISALLOW_COPY_AND_ASSIGN (WebRtcMediaStreamAdapter); | 62 DISALLOW_COPY_AND_ASSIGN (WebRtcMediaStreamAdapter); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } // namespace content | 65 } // namespace content |
| 66 | 66 |
| 67 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_MEDIA_STREAM_ADAPTER_H_ | 67 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_MEDIA_STREAM_ADAPTER_H_ |
| OLD | NEW |