Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_RENDERER_MEDIA_CAST_RECEIVER_SESSION_DELEGATE_H_ | |
| 6 #define CHROME_RENDERER_MEDIA_CAST_RECEIVER_SESSION_DELEGATE_H_ | |
| 7 | |
| 8 #include "chrome/renderer/media/cast_receiver_audio_valve.h" | |
| 9 #include "chrome/renderer/media/cast_session_delegate.h" | |
| 10 #include "content/public/renderer/media_stream_video_sink.h" | |
| 11 #include "media/base/video_capture_types.h" | |
| 12 #include "media/cast/cast_receiver.h" | |
| 13 | |
| 14 class CastReceiverSessionDelegate : public CastSessionDelegateBase { | |
| 15 public: | |
| 16 CastReceiverSessionDelegate(); | |
| 17 ~CastReceiverSessionDelegate() override; | |
| 18 | |
| 19 void LogRawEvents( | |
| 20 const std::vector<media::cast::PacketEvent>& packet_events, | |
| 21 const std::vector<media::cast::FrameEvent>& frame_events) override; | |
| 22 | |
| 23 void Start(const media::cast::FrameReceiverConfig& audio_config, | |
| 24 const media::cast::FrameReceiverConfig& video_config, | |
| 25 const net::IPEndPoint& local_endpoint, | |
| 26 const net::IPEndPoint& remote_endpoint, | |
| 27 scoped_ptr<base::DictionaryValue> options, | |
| 28 const media::VideoCaptureFormat& format); | |
| 29 | |
| 30 void StartAudio(scoped_refptr<CastReceiverAudioValve> audio_valve); | |
|
miu
2015/02/11 02:52:50
indentation
hubbe
2015/02/11 22:38:17
Done.
| |
| 31 | |
| 32 void StartVideo(content::VideoCaptureDeliverFrameCB frame_callback); | |
| 33 // Stop Video callbacks (eventually). | |
| 34 void StopVideo(); | |
| 35 | |
| 36 private: | |
| 37 void OnDecodedAudioFrame(scoped_ptr<media::AudioBus> audio_bus, | |
| 38 const base::TimeTicks& playout_time, | |
| 39 bool is_continous); | |
| 40 | |
| 41 void OnDecodedVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame, | |
| 42 const base::TimeTicks& playout_time, | |
| 43 bool is_continous); | |
| 44 | |
| 45 scoped_refptr<CastReceiverAudioValve> audio_valve_; | |
| 46 content::VideoCaptureDeliverFrameCB frame_callback_; | |
| 47 media::cast::AudioFrameDecodedCallback on_audio_decoded_cb_; | |
| 48 media::cast::VideoFrameDecodedCallback on_video_decoded_cb_; | |
| 49 scoped_ptr<media::cast::CastReceiver> cast_receiver_; | |
| 50 media::VideoCaptureFormat format_; | |
| 51 base::WeakPtrFactory<CastReceiverSessionDelegate> weak_factory_; | |
| 52 DISALLOW_COPY_AND_ASSIGN(CastReceiverSessionDelegate); | |
| 53 }; | |
| 54 | |
| 55 #endif // CHROME_RENDERER_MEDIA_CAST_RECEIVER_SESSION_DELEGATE_H_ | |
| OLD | NEW |