| Index: webrtc/api/androidvideotracksource.h
|
| diff --git a/webrtc/api/androidvideotracksource.h b/webrtc/api/androidvideotracksource.h
|
| index 1b2c4b2ce83529dc2208fd257e4bb4151a9ba010..4dc921aee30989125a21f3baea1479c4d6c56a1a 100644
|
| --- a/webrtc/api/androidvideotracksource.h
|
| +++ b/webrtc/api/androidvideotracksource.h
|
| @@ -13,21 +13,17 @@
|
|
|
| #include "webrtc/api/android/jni/native_handle_impl.h"
|
| #include "webrtc/api/android/jni/surfacetexturehelper_jni.h"
|
| -#include "webrtc/api/mediastreaminterface.h"
|
| -#include "webrtc/api/notifier.h"
|
| #include "webrtc/base/asyncinvoker.h"
|
| #include "webrtc/base/checks.h"
|
| #include "webrtc/base/thread_checker.h"
|
| #include "webrtc/base/timestampaligner.h"
|
| #include "webrtc/common_video/include/i420_buffer_pool.h"
|
| #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
|
| -#include "webrtc/media/base/videoadapter.h"
|
| -#include "webrtc/media/base/videobroadcaster.h"
|
| -#include "webrtc/media/base/videosinkinterface.h"
|
| +#include "webrtc/media/base/adaptedvideotracksource.h"
|
|
|
| namespace webrtc {
|
|
|
| -class AndroidVideoTrackSource : public Notifier<VideoTrackSourceInterface> {
|
| +class AndroidVideoTrackSource : public rtc::AdaptedVideoTrackSource {
|
| public:
|
| AndroidVideoTrackSource(rtc::Thread* signaling_thread,
|
| JNIEnv* jni,
|
| @@ -43,11 +39,6 @@ class AndroidVideoTrackSource : public Notifier<VideoTrackSourceInterface> {
|
| return rtc::Optional<bool>(false);
|
| }
|
|
|
| - // Returns false if no stats are available, e.g, for a remote
|
| - // source, or a source which has not seen its first frame yet.
|
| - // Should avoid blocking.
|
| - bool GetStats(Stats* stats) override;
|
| -
|
| // Called by the native capture observer
|
| void SetState(SourceState state);
|
|
|
| @@ -55,10 +46,6 @@ class AndroidVideoTrackSource : public Notifier<VideoTrackSourceInterface> {
|
|
|
| bool remote() const override { return false; }
|
|
|
| - void AddOrUpdateSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink,
|
| - const rtc::VideoSinkWants& wants) override;
|
| - void RemoveSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink) override;
|
| -
|
| void OnByteBufferFrameCaptured(const void* frame_data,
|
| int length,
|
| int width,
|
| @@ -82,35 +69,14 @@ class AndroidVideoTrackSource : public Notifier<VideoTrackSourceInterface> {
|
| private:
|
| rtc::Thread* signaling_thread_;
|
| rtc::AsyncInvoker invoker_;
|
| - rtc::ThreadChecker worker_thread_checker_;
|
| rtc::ThreadChecker camera_thread_checker_;
|
| - rtc::CriticalSection stats_crit_;
|
| - rtc::Optional<Stats> stats_ GUARDED_BY(stats_crit_);
|
| SourceState state_;
|
| rtc::VideoBroadcaster broadcaster_;
|
| rtc::TimestampAligner timestamp_aligner_;
|
| - cricket::VideoAdapter video_adapter_;
|
| - rtc::CriticalSection apply_rotation_crit_;
|
| - bool apply_rotation_ GUARDED_BY(apply_rotation_crit_);
|
| webrtc::NV12ToI420Scaler nv12toi420_scaler_;
|
| webrtc::I420BufferPool buffer_pool_;
|
| rtc::scoped_refptr<webrtc_jni::SurfaceTextureHelper> surface_texture_helper_;
|
| const bool is_screencast_;
|
| -
|
| - void OnFrame(const cricket::VideoFrame& frame, int width, int height);
|
| -
|
| - void OnSinkWantsChanged(const rtc::VideoSinkWants& wants);
|
| -
|
| - bool AdaptFrame(int width,
|
| - int height,
|
| - int64_t camera_time_us,
|
| - int* out_width,
|
| - int* out_height,
|
| - int* crop_width,
|
| - int* crop_height,
|
| - int* crop_x,
|
| - int* crop_y,
|
| - int64_t* translated_camera_time_us);
|
| };
|
|
|
| } // namespace webrtc
|
|
|