Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / media / cast / cast_receiver.h
index 986363b..ec4f0d3 100644 (file)
@@ -32,17 +32,16 @@ typedef base::Callback<void(scoped_ptr<PcmAudioFrame>, const base::TimeTicks&)>
 
 // Callback in which the encoded audio frame and play-out time will be returned.
 typedef base::Callback<void(scoped_ptr<transport::EncodedAudioFrame>,
-    const base::TimeTicks&)> AudioFrameEncodedCallback;
+                            const base::TimeTicks&)> AudioFrameEncodedCallback;
 
 // Callback in which the raw frame and render time will be returned once
 // decoding is complete.
 typedef base::Callback<void(const scoped_refptr<media::VideoFrame>& video_frame,
-                            const base::TimeTicks&)>
-    VideoFrameDecodedCallback;
+                            const base::TimeTicks&)> VideoFrameDecodedCallback;
 
 // Callback in which the encoded video frame and render time will be returned.
 typedef base::Callback<void(scoped_ptr<transport::EncodedVideoFrame>,
-    const base::TimeTicks&)> VideoFrameEncodedCallback;
+                            const base::TimeTicks&)> VideoFrameEncodedCallback;
 
 // This Class is thread safe.
 class FrameReceiver : public base::RefCountedThreadSafe<FrameReceiver> {
@@ -57,7 +56,7 @@ class FrameReceiver : public base::RefCountedThreadSafe<FrameReceiver> {
   virtual void GetRawVideoFrame(const VideoFrameDecodedCallback& callback) = 0;
 
   virtual void GetEncodedVideoFrame(
-    const VideoFrameEncodedCallback& callback) = 0;
+      const VideoFrameEncodedCallback& callback) = 0;
 
  protected:
   virtual ~FrameReceiver() {}
@@ -75,9 +74,11 @@ class CastReceiver {
       const VideoReceiverConfig& video_config,
       transport::PacketSender* const packet_sender);
 
-  // All received RTP and RTCP packets for the call should be inserted to this
-  // PacketReceiver.
-  virtual scoped_refptr<transport::PacketReceiver> packet_receiver() = 0;
+  // All received RTP and RTCP packets for the call should be sent to this
+  // PacketReceiver. Can be called from any function.
+  // TODO(hubbe): Replace with:
+  //   virtual void ReceivePacket(scoped_ptr<Packet> packet) = 0;
+  virtual transport::PacketReceiverCallback packet_receiver() = 0;
 
   // Polling interface to get audio and video frames from the CastReceiver.
   virtual scoped_refptr<FrameReceiver> frame_receiver() = 0;