Index: media/cast/cast_receiver.h |
diff --git a/media/cast/cast_receiver.h b/media/cast/cast_receiver.h |
index 2d83dd263fd28200268f3eb6f37198a64a31c8f6..c4f836678f00f73646f771108654913e28cc77dd 100644 |
--- a/media/cast/cast_receiver.h |
+++ b/media/cast/cast_receiver.h |
@@ -47,25 +47,6 @@ typedef base::Callback<void(const scoped_refptr<media::VideoFrame>& video_frame, |
typedef base::Callback<void(scoped_ptr<transport::EncodedFrame>)> |
FrameEncodedCallback; |
-// This Class is thread safe. |
-class FrameReceiver : public base::RefCountedThreadSafe<FrameReceiver> { |
- public: |
- virtual void GetRawAudioFrame(const AudioFrameDecodedCallback& callback) = 0; |
- |
- virtual void GetCodedAudioFrame(const FrameEncodedCallback& callback) = 0; |
- |
- virtual void GetRawVideoFrame(const VideoFrameDecodedCallback& callback) = 0; |
- |
- virtual void GetEncodedVideoFrame(const FrameEncodedCallback& callback) = 0; |
- |
- protected: |
- virtual ~FrameReceiver() {} |
- |
- private: |
- friend class base::RefCountedThreadSafe<FrameReceiver>; |
-}; |
- |
-// This Class is thread safe. |
class CastReceiver { |
public: |
static scoped_ptr<CastReceiver> Create( |
@@ -75,13 +56,28 @@ class CastReceiver { |
transport::PacketSender* const packet_sender); |
// All received RTP and RTCP packets for the call should be sent to this |
- // PacketReceiver. Can be called from any function. |
+ // PacketReceiver. Can be called from any thread. |
// 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; |
+ // Polling interface to get audio and video frames from the CastReceiver. The |
+ // the RequestDecodedXXXXXFrame() methods utilize internal software-based |
+ // decoding, while the RequestEncodedXXXXXFrame() methods provides |
+ // still-encoded frames for use with external/hardware decoders. |
+ // |
+ // In all cases, the given |callback| is guaranteed to be run at some point in |
+ // the future, except for those requests still enqueued at destruction time. |
+ // |
+ // These methods should all be called on the CastEnvironment's MAIN thread. |
+ virtual void RequestDecodedAudioFrame( |
+ const AudioFrameDecodedCallback& callback) = 0; |
+ virtual void RequestEncodedAudioFrame( |
+ const FrameEncodedCallback& callback) = 0; |
+ virtual void RequestDecodedVideoFrame( |
+ const VideoFrameDecodedCallback& callback) = 0; |
+ virtual void RequestEncodedVideoFrame( |
+ const FrameEncodedCallback& callback) = 0; |
virtual ~CastReceiver() {} |
}; |