| Index: media/cast/cast_receiver.h
|
| diff --git a/media/cast/cast_receiver.h b/media/cast/cast_receiver.h
|
| index 581a27171db64bec2b144a77b74de8e0c8f2982c..b88827cb7ab235ea6fd7fb9cfb5734fdf8f86b1c 100644
|
| --- a/media/cast/cast_receiver.h
|
| +++ b/media/cast/cast_receiver.h
|
| @@ -13,6 +13,7 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/time/time.h"
|
| +#include "media/base/audio_bus.h"
|
| #include "media/cast/cast_config.h"
|
| #include "media/cast/cast_environment.h"
|
|
|
| @@ -25,12 +26,21 @@ namespace transport {
|
| class PacketSender;
|
| }
|
|
|
| -// Callback in which the raw audio frame and play-out time will be returned
|
| -// once decoding is complete.
|
| -typedef base::Callback<void(scoped_ptr<PcmAudioFrame>, const base::TimeTicks&)>
|
| - AudioFrameDecodedCallback;
|
| -
|
| -// Callback in which the encoded audio frame and play-out time will be returned.
|
| +// Callback in which the raw audio frame, play-out time, and a continuity flag
|
| +// will be returned. |is_continuous| will be false to indicate the loss of
|
| +// audio data due to a loss of frames (or decoding errors). This allows the
|
| +// client to take steps to smooth discontinuities for playback. Note: A NULL
|
| +// AudioBus can be returned when data is not available (e.g., bad packet or when
|
| +// flushing callbacks during shutdown).
|
| +typedef base::Callback<void(scoped_ptr<AudioBus> audio_bus,
|
| + const base::TimeTicks& playout_time,
|
| + bool is_continuous)> AudioFrameDecodedCallback;
|
| +
|
| +// Callback in which the encoded audio frame and play-out time will be
|
| +// returned. The client should examine the EncodedAudioFrame::frame_id field to
|
| +// determine whether any frames have been dropped (i.e., frame_id should be
|
| +// incrementing by one each time). Note: A NULL EncodedAudioFrame can be
|
| +// returned on error/shutdown.
|
| typedef base::Callback<void(scoped_ptr<transport::EncodedAudioFrame>,
|
| const base::TimeTicks&)> AudioFrameEncodedCallback;
|
|
|
| @@ -46,9 +56,7 @@ typedef base::Callback<void(scoped_ptr<transport::EncodedVideoFrame>,
|
| // This Class is thread safe.
|
| class FrameReceiver : public base::RefCountedThreadSafe<FrameReceiver> {
|
| public:
|
| - virtual void GetRawAudioFrame(int number_of_10ms_blocks,
|
| - int desired_frequency,
|
| - const AudioFrameDecodedCallback& callback) = 0;
|
| + virtual void GetRawAudioFrame(const AudioFrameDecodedCallback& callback) = 0;
|
|
|
| virtual void GetCodedAudioFrame(
|
| const AudioFrameEncodedCallback& callback) = 0;
|
|
|