diff options
author | kjellander <kjellander@webrtc.org> | 2015-11-16 13:52:24 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-16 21:52:31 +0000 |
commit | 6f8ce060a21fcdc1c951fbf06768eb0cc0083b2f (patch) | |
tree | e5047e156d1394f3e37b9e0e310691caa9c47048 | |
parent | 591cb1fea4059a6efd1d81ed066ef826fe10e9df (diff) | |
download | webrtc-6f8ce060a21fcdc1c951fbf06768eb0cc0083b2f.tar.gz |
common_video: rename interface -> include
To avoid breaking downstream, the "interface" directories were copied
into a new "common_video/include" dir. The old headers got pragma
warnings added about deprecation (a very short deprecation since I plan
to remove them as soon downstream is updated).
The header guards are also identical to avoid mixing them up in the transition.
BUG=webrtc:5095
TESTED=Passing compile-trybots with --clobber flag:
git cl try --clobber --bot=win_compile_rel --bot=linux_compile_rel --bot=android_compile_rel --bot=mac_compile_rel --bot=ios_rel --bot=linux_gn_rel --bot=win_x64_gn_rel --bot=mac_x64_gn_rel --bot=android_gn_rel -m tryserver.webrtc
Review URL: https://codereview.webrtc.org/1418913006
Cr-Commit-Position: refs/heads/master@{#10659}
36 files changed, 375 insertions, 48 deletions
diff --git a/talk/app/webrtc/androidvideocapturer.h b/talk/app/webrtc/androidvideocapturer.h index df783bdf6f..c665eabd91 100644 --- a/talk/app/webrtc/androidvideocapturer.h +++ b/talk/app/webrtc/androidvideocapturer.h @@ -32,7 +32,7 @@ #include "talk/media/base/videocapturer.h" #include "webrtc/base/thread_checker.h" -#include "webrtc/common_video/interface/video_frame_buffer.h" +#include "webrtc/common_video/include/video_frame_buffer.h" namespace webrtc { diff --git a/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc b/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc index 3bfad6885f..5d989d17d7 100644 --- a/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc +++ b/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc @@ -39,7 +39,7 @@ #include "webrtc/base/scoped_ref_ptr.h" #include "webrtc/base/thread.h" #include "webrtc/base/timeutils.h" -#include "webrtc/common_video/interface/i420_buffer_pool.h" +#include "webrtc/common_video/include/i420_buffer_pool.h" #include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h" #include "webrtc/system_wrappers/include/logcat_trace_context.h" #include "webrtc/system_wrappers/include/tick_util.h" diff --git a/talk/app/webrtc/java/jni/native_handle_impl.h b/talk/app/webrtc/java/jni/native_handle_impl.h index dd04bc20b1..aeb5631519 100644 --- a/talk/app/webrtc/java/jni/native_handle_impl.h +++ b/talk/app/webrtc/java/jni/native_handle_impl.h @@ -31,7 +31,7 @@ #include <jni.h> -#include "webrtc/common_video/interface/video_frame_buffer.h" +#include "webrtc/common_video/include/video_frame_buffer.h" namespace webrtc_jni { diff --git a/talk/app/webrtc/java/jni/surfacetexturehelper_jni.h b/talk/app/webrtc/java/jni/surfacetexturehelper_jni.h index dc9d2b853d..1c215f8da0 100644 --- a/talk/app/webrtc/java/jni/surfacetexturehelper_jni.h +++ b/talk/app/webrtc/java/jni/surfacetexturehelper_jni.h @@ -35,7 +35,7 @@ #include "talk/app/webrtc/java/jni/native_handle_impl.h" #include "webrtc/base/refcount.h" #include "webrtc/base/scoped_ref_ptr.h" -#include "webrtc/common_video/interface/video_frame_buffer.h" +#include "webrtc/common_video/include/video_frame_buffer.h" namespace webrtc_jni { diff --git a/talk/media/base/videoframe.h b/talk/media/base/videoframe.h index 217732fa18..f81c678d61 100644 --- a/talk/media/base/videoframe.h +++ b/talk/media/base/videoframe.h @@ -30,7 +30,7 @@ #include "webrtc/base/basictypes.h" #include "webrtc/base/stream.h" -#include "webrtc/common_video/interface/video_frame_buffer.h" +#include "webrtc/common_video/include/video_frame_buffer.h" #include "webrtc/common_video/rotation.h" namespace cricket { diff --git a/talk/media/webrtc/webrtcvideoframe.h b/talk/media/webrtc/webrtcvideoframe.h index 0928c59324..906e6e7053 100644 --- a/talk/media/webrtc/webrtcvideoframe.h +++ b/talk/media/webrtc/webrtcvideoframe.h @@ -33,7 +33,7 @@ #include "webrtc/base/refcount.h" #include "webrtc/base/scoped_ref_ptr.h" #include "webrtc/common_types.h" -#include "webrtc/common_video/interface/video_frame_buffer.h" +#include "webrtc/common_video/include/video_frame_buffer.h" namespace cricket { diff --git a/webrtc/common_video/BUILD.gn b/webrtc/common_video/BUILD.gn index 473c757a75..4ef968d60f 100644 --- a/webrtc/common_video/BUILD.gn +++ b/webrtc/common_video/BUILD.gn @@ -10,7 +10,7 @@ import("../build/webrtc.gni") config("common_video_config") { include_dirs = [ - "interface", + "include", "libyuv/include", ] } @@ -18,10 +18,10 @@ config("common_video_config") { source_set("common_video") { sources = [ "i420_buffer_pool.cc", + "include/i420_buffer_pool.h", + "include/incoming_video_stream.h", + "include/video_frame_buffer.h", "incoming_video_stream.cc", - "interface/i420_buffer_pool.h", - "interface/incoming_video_stream.h", - "interface/video_frame_buffer.h", "libyuv/include/scaler.h", "libyuv/include/webrtc_libyuv.h", "libyuv/scaler.cc", diff --git a/webrtc/common_video/common_video.gyp b/webrtc/common_video/common_video.gyp index 5c0ecb8208..fe14da1d2e 100644 --- a/webrtc/common_video/common_video.gyp +++ b/webrtc/common_video/common_video.gyp @@ -14,7 +14,7 @@ 'type': 'static_library', 'include_dirs': [ '<(webrtc_root)/modules/interface/', - 'interface', + 'include', 'libyuv/include', ], 'dependencies': [ @@ -23,7 +23,7 @@ ], 'direct_dependent_settings': { 'include_dirs': [ - 'interface', + 'include', 'libyuv/include', ], }, @@ -42,9 +42,9 @@ 'i420_buffer_pool.cc', 'video_frame.cc', 'incoming_video_stream.cc', - 'interface/i420_buffer_pool.h', - 'interface/incoming_video_stream.h', - 'interface/video_frame_buffer.h', + 'include/i420_buffer_pool.h', + 'include/incoming_video_stream.h', + 'include/video_frame_buffer.h', 'libyuv/include/scaler.h', 'libyuv/include/webrtc_libyuv.h', 'libyuv/scaler.cc', diff --git a/webrtc/common_video/i420_buffer_pool.cc b/webrtc/common_video/i420_buffer_pool.cc index c746666a16..98daec99f6 100644 --- a/webrtc/common_video/i420_buffer_pool.cc +++ b/webrtc/common_video/i420_buffer_pool.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "webrtc/common_video/interface/i420_buffer_pool.h" +#include "webrtc/common_video/include/i420_buffer_pool.h" #include "webrtc/base/checks.h" diff --git a/webrtc/common_video/i420_buffer_pool_unittest.cc b/webrtc/common_video/i420_buffer_pool_unittest.cc index a1596ebb09..b030ee774a 100644 --- a/webrtc/common_video/i420_buffer_pool_unittest.cc +++ b/webrtc/common_video/i420_buffer_pool_unittest.cc @@ -11,7 +11,7 @@ #include <string> #include "testing/gtest/include/gtest/gtest.h" -#include "webrtc/common_video/interface/i420_buffer_pool.h" +#include "webrtc/common_video/include/i420_buffer_pool.h" namespace webrtc { diff --git a/webrtc/common_video/include/i420_buffer_pool.h b/webrtc/common_video/include/i420_buffer_pool.h new file mode 100644 index 0000000000..5ab1510689 --- /dev/null +++ b/webrtc/common_video/include/i420_buffer_pool.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_I420_BUFFER_POOL_H_ +#define WEBRTC_COMMON_VIDEO_INCLUDE_I420_BUFFER_POOL_H_ + +#include <list> + +#include "webrtc/base/thread_checker.h" +#include "webrtc/common_video/include/video_frame_buffer.h" + +namespace webrtc { + +// Simple buffer pool to avoid unnecessary allocations of I420Buffer objects. +// The pool manages the memory of the I420Buffer returned from CreateBuffer. +// When the I420Buffer is destructed, the memory is returned to the pool for use +// by subsequent calls to CreateBuffer. If the resolution passed to CreateBuffer +// changes, old buffers will be purged from the pool. +class I420BufferPool { + public: + I420BufferPool(); + // Returns a buffer from the pool, or creates a new buffer if no suitable + // buffer exists in the pool. + rtc::scoped_refptr<VideoFrameBuffer> CreateBuffer(int width, int height); + // Clears buffers_ and detaches the thread checker so that it can be reused + // later from another thread. + void Release(); + + private: + rtc::ThreadChecker thread_checker_; + std::list<rtc::scoped_refptr<I420Buffer>> buffers_; +}; + +} // namespace webrtc + +#endif // WEBRTC_COMMON_VIDEO_INCLUDE_I420_BUFFER_POOL_H_ diff --git a/webrtc/common_video/include/incoming_video_stream.h b/webrtc/common_video/include/incoming_video_stream.h new file mode 100644 index 0000000000..cd0d65385e --- /dev/null +++ b/webrtc/common_video/include/incoming_video_stream.h @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_ +#define WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_ + +#include "webrtc/base/scoped_ptr.h" +#include "webrtc/base/thread_annotations.h" +#include "webrtc/common_video/video_render_frames.h" + +namespace webrtc { +class CriticalSectionWrapper; +class EventTimerWrapper; +class ThreadWrapper; + +class VideoRenderCallback { + public: + virtual int32_t RenderFrame(const uint32_t streamId, + const VideoFrame& videoFrame) = 0; + + protected: + virtual ~VideoRenderCallback() {} +}; + +class IncomingVideoStream : public VideoRenderCallback { + public: + explicit IncomingVideoStream(uint32_t stream_id); + ~IncomingVideoStream(); + + // Get callback to deliver frames to the module. + VideoRenderCallback* ModuleCallback(); + virtual int32_t RenderFrame(const uint32_t stream_id, + const VideoFrame& video_frame); + + // Set callback to the platform dependent code. + void SetRenderCallback(VideoRenderCallback* render_callback); + + // Callback for file recording, snapshot, ... + void SetExternalCallback(VideoRenderCallback* render_object); + + // Start/Stop. + int32_t Start(); + int32_t Stop(); + + // Clear all buffers. + int32_t Reset(); + + // Properties. + uint32_t StreamId() const; + uint32_t IncomingRate() const; + + int32_t SetStartImage(const VideoFrame& video_frame); + + int32_t SetTimeoutImage(const VideoFrame& video_frame, + const uint32_t timeout); + + int32_t SetExpectedRenderDelay(int32_t delay_ms); + + protected: + static bool IncomingVideoStreamThreadFun(void* obj); + bool IncomingVideoStreamProcess(); + + private: + enum { kEventStartupTimeMs = 10 }; + enum { kEventMaxWaitTimeMs = 100 }; + enum { kFrameRatePeriodMs = 1000 }; + + uint32_t const stream_id_; + // Critsects in allowed to enter order. + const rtc::scoped_ptr<CriticalSectionWrapper> stream_critsect_; + const rtc::scoped_ptr<CriticalSectionWrapper> thread_critsect_; + const rtc::scoped_ptr<CriticalSectionWrapper> buffer_critsect_; + rtc::scoped_ptr<ThreadWrapper> incoming_render_thread_ + GUARDED_BY(thread_critsect_); + rtc::scoped_ptr<EventTimerWrapper> deliver_buffer_event_; + + bool running_ GUARDED_BY(stream_critsect_); + VideoRenderCallback* external_callback_ GUARDED_BY(thread_critsect_); + VideoRenderCallback* render_callback_ GUARDED_BY(thread_critsect_); + const rtc::scoped_ptr<VideoRenderFrames> render_buffers_ + GUARDED_BY(buffer_critsect_); + + uint32_t incoming_rate_ GUARDED_BY(stream_critsect_); + int64_t last_rate_calculation_time_ms_ GUARDED_BY(stream_critsect_); + uint16_t num_frames_since_last_calculation_ GUARDED_BY(stream_critsect_); + int64_t last_render_time_ms_ GUARDED_BY(thread_critsect_); + VideoFrame temp_frame_ GUARDED_BY(thread_critsect_); + VideoFrame start_image_ GUARDED_BY(thread_critsect_); + VideoFrame timeout_image_ GUARDED_BY(thread_critsect_); + uint32_t timeout_time_ GUARDED_BY(thread_critsect_); +}; + +} // namespace webrtc + +#endif // WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_ diff --git a/webrtc/common_video/include/video_frame_buffer.h b/webrtc/common_video/include/video_frame_buffer.h new file mode 100644 index 0000000000..710d2862f0 --- /dev/null +++ b/webrtc/common_video/include/video_frame_buffer.h @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ +#define WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ + +#include "webrtc/base/callback.h" +#include "webrtc/base/refcount.h" +#include "webrtc/base/scoped_ptr.h" +#include "webrtc/base/scoped_ref_ptr.h" +#include "webrtc/system_wrappers/include/aligned_malloc.h" + +namespace webrtc { + +enum PlaneType { + kYPlane = 0, + kUPlane = 1, + kVPlane = 2, + kNumOfPlanes = 3, +}; + +// Interface of a simple frame buffer containing pixel data. This interface does +// not contain any frame metadata such as rotation, timestamp, pixel_width, etc. +class VideoFrameBuffer : public rtc::RefCountInterface { + public: + // Returns true if this buffer has a single exclusive owner. + virtual bool HasOneRef() const = 0; + + // The resolution of the frame in pixels. For formats where some planes are + // subsampled, this is the highest-resolution plane. + virtual int width() const = 0; + virtual int height() const = 0; + + // Returns pointer to the pixel data for a given plane. The memory is owned by + // the VideoFrameBuffer object and must not be freed by the caller. + virtual const uint8_t* data(PlaneType type) const = 0; + + // Non-const data access is disallowed by default. You need to make sure you + // have exclusive access and a writable buffer before calling this function. + virtual uint8_t* MutableData(PlaneType type); + + // Returns the number of bytes between successive rows for a given plane. + virtual int stride(PlaneType type) const = 0; + + // Return the handle of the underlying video frame. This is used when the + // frame is backed by a texture. + virtual void* native_handle() const = 0; + + // Returns a new memory-backed frame buffer converted from this buffer's + // native handle. + virtual rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() = 0; + + protected: + virtual ~VideoFrameBuffer(); +}; + +// Plain I420 buffer in standard memory. +class I420Buffer : public VideoFrameBuffer { + public: + I420Buffer(int width, int height); + I420Buffer(int width, int height, int stride_y, int stride_u, int stride_v); + + int width() const override; + int height() const override; + const uint8_t* data(PlaneType type) const override; + // Non-const data access is only allowed if HasOneRef() is true to protect + // against unexpected overwrites. + uint8_t* MutableData(PlaneType type) override; + int stride(PlaneType type) const override; + void* native_handle() const override; + rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() override; + + protected: + ~I420Buffer() override; + + private: + const int width_; + const int height_; + const int stride_y_; + const int stride_u_; + const int stride_v_; + const rtc::scoped_ptr<uint8_t, AlignedFreeDeleter> data_; +}; + +// Base class for native-handle buffer is a wrapper around a |native_handle|. +// This is used for convenience as most native-handle implementations can share +// many VideoFrame implementations, but need to implement a few others (such +// as their own destructors or conversion methods back to software I420). +class NativeHandleBuffer : public VideoFrameBuffer { + public: + NativeHandleBuffer(void* native_handle, int width, int height); + + int width() const override; + int height() const override; + const uint8_t* data(PlaneType type) const override; + int stride(PlaneType type) const override; + void* native_handle() const override; + + protected: + void* native_handle_; + const int width_; + const int height_; +}; + +class WrappedI420Buffer : public webrtc::VideoFrameBuffer { + public: + WrappedI420Buffer(int width, + int height, + const uint8_t* y_plane, + int y_stride, + const uint8_t* u_plane, + int u_stride, + const uint8_t* v_plane, + int v_stride, + const rtc::Callback0<void>& no_longer_used); + int width() const override; + int height() const override; + + const uint8_t* data(PlaneType type) const override; + + int stride(PlaneType type) const override; + void* native_handle() const override; + + rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() override; + + private: + friend class rtc::RefCountedObject<WrappedI420Buffer>; + ~WrappedI420Buffer() override; + + const int width_; + const int height_; + const uint8_t* const y_plane_; + const uint8_t* const u_plane_; + const uint8_t* const v_plane_; + const int y_stride_; + const int u_stride_; + const int v_stride_; + rtc::Callback0<void> no_longer_used_cb_; +}; + +// Helper function to crop |buffer| without making a deep copy. May only be used +// for non-native frames. +rtc::scoped_refptr<VideoFrameBuffer> ShallowCenterCrop( + const rtc::scoped_refptr<VideoFrameBuffer>& buffer, + int cropped_width, + int cropped_height); + +} // namespace webrtc + +#endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ diff --git a/webrtc/common_video/include/video_image.h b/webrtc/common_video/include/video_image.h new file mode 100644 index 0000000000..4a6e451c0f --- /dev/null +++ b/webrtc/common_video/include/video_image.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_IMAGE_H_ +#define WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_IMAGE_H_ + +// TODO(pbos): Remove this file and include webrtc/video_frame.h instead. +#include "webrtc/video_frame.h" + +#endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_IMAGE_H_ diff --git a/webrtc/common_video/incoming_video_stream.cc b/webrtc/common_video/incoming_video_stream.cc index 79bbb8a7b6..a4b25fcd2e 100644 --- a/webrtc/common_video/incoming_video_stream.cc +++ b/webrtc/common_video/incoming_video_stream.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "webrtc/common_video/interface/incoming_video_stream.h" +#include "webrtc/common_video/include/incoming_video_stream.h" #include <assert.h> diff --git a/webrtc/common_video/interface/i420_buffer_pool.h b/webrtc/common_video/interface/i420_buffer_pool.h index df862cdba5..37021d6383 100644 --- a/webrtc/common_video/interface/i420_buffer_pool.h +++ b/webrtc/common_video/interface/i420_buffer_pool.h @@ -8,13 +8,15 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_COMMON_VIDEO_INTERFACE_I420_BUFFER_POOL_H_ -#define WEBRTC_COMMON_VIDEO_INTERFACE_I420_BUFFER_POOL_H_ +#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_I420_BUFFER_POOL_H_ +#define WEBRTC_COMMON_VIDEO_INCLUDE_I420_BUFFER_POOL_H_ + +#pragma message("WARNING: common_video/include is DEPRECATED; use common_video/include") #include <list> #include "webrtc/base/thread_checker.h" -#include "webrtc/common_video/interface/video_frame_buffer.h" +#include "webrtc/common_video/include/video_frame_buffer.h" namespace webrtc { @@ -40,4 +42,4 @@ class I420BufferPool { } // namespace webrtc -#endif // WEBRTC_COMMON_VIDEO_INTERFACE_I420_BUFFER_POOL_H_ +#endif // WEBRTC_COMMON_VIDEO_INCLUDE_I420_BUFFER_POOL_H_ diff --git a/webrtc/common_video/interface/incoming_video_stream.h b/webrtc/common_video/interface/incoming_video_stream.h index 74ecc4e837..886dae58e6 100644 --- a/webrtc/common_video/interface/incoming_video_stream.h +++ b/webrtc/common_video/interface/incoming_video_stream.h @@ -8,8 +8,10 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_COMMON_VIDEO_INTERFACE_INCOMING_VIDEO_STREAM_H_ -#define WEBRTC_COMMON_VIDEO_INTERFACE_INCOMING_VIDEO_STREAM_H_ +#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_ +#define WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_ + +#pragma message("WARNING: common_video/include is DEPRECATED; use common_video/include") #include "webrtc/base/scoped_ptr.h" #include "webrtc/base/thread_annotations.h" @@ -99,4 +101,4 @@ class IncomingVideoStream : public VideoRenderCallback { } // namespace webrtc -#endif // WEBRTC_COMMON_VIDEO_INTERFACE_INCOMING_VIDEO_STREAM_H_ +#endif // WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_ diff --git a/webrtc/common_video/interface/video_frame_buffer.h b/webrtc/common_video/interface/video_frame_buffer.h index 1062165b81..0b1c3233fd 100644 --- a/webrtc/common_video/interface/video_frame_buffer.h +++ b/webrtc/common_video/interface/video_frame_buffer.h @@ -8,8 +8,10 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_VIDEO_FRAME_BUFFER_H_ -#define WEBRTC_VIDEO_FRAME_BUFFER_H_ +#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ +#define WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ + +#pragma message("WARNING: common_video/include is DEPRECATED; use common_video/include") #include "webrtc/base/callback.h" #include "webrtc/base/refcount.h" @@ -154,4 +156,4 @@ rtc::scoped_refptr<VideoFrameBuffer> ShallowCenterCrop( } // namespace webrtc -#endif // WEBRTC_VIDEO_FRAME_BUFFER_H_ +#endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ diff --git a/webrtc/common_video/interface/video_image.h b/webrtc/common_video/interface/video_image.h index 4cbf23f1a1..c0f3b2f054 100644 --- a/webrtc/common_video/interface/video_image.h +++ b/webrtc/common_video/interface/video_image.h @@ -8,10 +8,12 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H -#define COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H +#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_IMAGE_H_ +#define WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_IMAGE_H_ + +#pragma message("WARNING: common_video/include is DEPRECATED; use common_video/include") // TODO(pbos): Remove this file and include webrtc/video_frame.h instead. #include "webrtc/video_frame.h" -#endif // COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H +#endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_IMAGE_H_ diff --git a/webrtc/common_video/libyuv/include/scaler.h b/webrtc/common_video/libyuv/include/scaler.h index c04d01f33b..2b92f8148b 100644 --- a/webrtc/common_video/libyuv/include/scaler.h +++ b/webrtc/common_video/libyuv/include/scaler.h @@ -15,7 +15,7 @@ #ifndef WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_SCALER_H_ #define WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_SCALER_H_ -#include "webrtc/common_video/interface/i420_buffer_pool.h" +#include "webrtc/common_video/include/i420_buffer_pool.h" #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" #include "webrtc/typedefs.h" #include "webrtc/video_frame.h" diff --git a/webrtc/common_video/video_frame_buffer.cc b/webrtc/common_video/video_frame_buffer.cc index 36ee14a17f..fff90defbd 100644 --- a/webrtc/common_video/video_frame_buffer.cc +++ b/webrtc/common_video/video_frame_buffer.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "webrtc/common_video/interface/video_frame_buffer.h" +#include "webrtc/common_video/include/video_frame_buffer.h" #include "webrtc/base/bind.h" #include "webrtc/base/checks.h" diff --git a/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_decoder.cc b/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_decoder.cc index 61ef80bbf1..6d9a4c14c7 100644 --- a/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_decoder.cc +++ b/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_decoder.cc @@ -16,7 +16,7 @@ #include "libyuv/convert.h" #include "webrtc/base/checks.h" #include "webrtc/base/logging.h" -#include "webrtc/common_video/interface/video_frame_buffer.h" +#include "webrtc/common_video/include/video_frame_buffer.h" #include "webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_nalu.h" #include "webrtc/video_frame.h" diff --git a/webrtc/modules/video_coding/codecs/test/stats.h b/webrtc/modules/video_coding/codecs/test/stats.h index 83ba108bb7..9092631ca1 100644 --- a/webrtc/modules/video_coding/codecs/test/stats.h +++ b/webrtc/modules/video_coding/codecs/test/stats.h @@ -13,7 +13,7 @@ #include <vector> -#include "webrtc/common_video/interface/video_image.h" +#include "webrtc/common_video/include/video_image.h" namespace webrtc { namespace test { diff --git a/webrtc/modules/video_coding/codecs/vp8/temporal_layers.h b/webrtc/modules/video_coding/codecs/vp8/temporal_layers.h index 7607210d5c..7fe03a4da8 100644 --- a/webrtc/modules/video_coding/codecs/vp8/temporal_layers.h +++ b/webrtc/modules/video_coding/codecs/vp8/temporal_layers.h @@ -14,7 +14,7 @@ #include "vpx/vpx_encoder.h" -#include "webrtc/common_video/interface/video_image.h" +#include "webrtc/common_video/include/video_image.h" #include "webrtc/typedefs.h" namespace webrtc { diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.h b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.h index ba14ed5841..6c8043f5d8 100644 --- a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.h +++ b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.h @@ -22,7 +22,7 @@ #include "vpx/vp8cx.h" #include "vpx/vp8dx.h" -#include "webrtc/common_video/interface/i420_buffer_pool.h" +#include "webrtc/common_video/include/i420_buffer_pool.h" #include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h" #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" #include "webrtc/modules/video_coding/codecs/vp8/reference_picture_selection.h" diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc b/webrtc/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc index ea7db5a7f6..d2d317773a 100644 --- a/webrtc/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc +++ b/webrtc/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc @@ -11,7 +11,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "webrtc/base/checks.h" #include "webrtc/base/scoped_ptr.h" -#include "webrtc/common_video/interface/video_image.h" +#include "webrtc/common_video/include/video_image.h" #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" #include "webrtc/system_wrappers/include/tick_util.h" diff --git a/webrtc/modules/video_coding/main/source/encoded_frame.h b/webrtc/modules/video_coding/main/source/encoded_frame.h index dc6bbb8445..28c56433a2 100644 --- a/webrtc/modules/video_coding/main/source/encoded_frame.h +++ b/webrtc/modules/video_coding/main/source/encoded_frame.h @@ -14,7 +14,7 @@ #include <vector> #include "webrtc/common_types.h" -#include "webrtc/common_video/interface/video_image.h" +#include "webrtc/common_video/include/video_image.h" #include "webrtc/modules/include/module_common_types.h" #include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h" #include "webrtc/modules/video_coding/main/interface/video_coding_defines.h" diff --git a/webrtc/modules/video_render/video_render_defines.h b/webrtc/modules/video_render/video_render_defines.h index 108842d91e..999707cb6e 100644 --- a/webrtc/modules/video_render/video_render_defines.h +++ b/webrtc/modules/video_render/video_render_defines.h @@ -12,7 +12,7 @@ #define WEBRTC_MODULES_VIDEO_RENDER_VIDEO_RENDER_DEFINES_H_ #include "webrtc/common_types.h" -#include "webrtc/common_video/interface/incoming_video_stream.h" +#include "webrtc/common_video/include/incoming_video_stream.h" #include "webrtc/modules/include/module_common_types.h" namespace webrtc diff --git a/webrtc/modules/video_render/video_render_impl.cc b/webrtc/modules/video_render/video_render_impl.cc index 1a3ff0e75f..daa64bc0da 100644 --- a/webrtc/modules/video_render/video_render_impl.cc +++ b/webrtc/modules/video_render/video_render_impl.cc @@ -10,7 +10,7 @@ #include <assert.h> -#include "webrtc/common_video/interface/incoming_video_stream.h" +#include "webrtc/common_video/include/incoming_video_stream.h" #include "webrtc/engine_configurations.h" #include "webrtc/modules/video_render/external/video_render_external_impl.h" #include "webrtc/modules/video_render/i_video_render.h" diff --git a/webrtc/modules/video_render/video_render_internal_impl.cc b/webrtc/modules/video_render/video_render_internal_impl.cc index 59be0c28bc..b6c2441425 100644 --- a/webrtc/modules/video_render/video_render_internal_impl.cc +++ b/webrtc/modules/video_render/video_render_internal_impl.cc @@ -10,7 +10,7 @@ #include <assert.h> -#include "webrtc/common_video/interface/incoming_video_stream.h" +#include "webrtc/common_video/include/incoming_video_stream.h" #include "webrtc/engine_configurations.h" #include "webrtc/modules/video_render/i_video_render.h" #include "webrtc/modules/video_render/video_render_defines.h" diff --git a/webrtc/test/configurable_frame_size_encoder.cc b/webrtc/test/configurable_frame_size_encoder.cc index 2cd47504a5..671a2acb20 100644 --- a/webrtc/test/configurable_frame_size_encoder.cc +++ b/webrtc/test/configurable_frame_size_encoder.cc @@ -14,7 +14,7 @@ #include "testing/gtest/include/gtest/gtest.h" -#include "webrtc/common_video/interface/video_image.h" +#include "webrtc/common_video/include/video_image.h" #include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h" namespace webrtc { diff --git a/webrtc/test/fake_texture_frame.h b/webrtc/test/fake_texture_frame.h index dc6abaf745..bc911ccba4 100644 --- a/webrtc/test/fake_texture_frame.h +++ b/webrtc/test/fake_texture_frame.h @@ -11,7 +11,7 @@ #define WEBRTC_TEST_FAKE_TEXTURE_FRAME_H_ #include "webrtc/base/checks.h" -#include "webrtc/common_video/interface/video_frame_buffer.h" +#include "webrtc/common_video/include/video_frame_buffer.h" #include "webrtc/video_frame.h" namespace webrtc { diff --git a/webrtc/video/video_receive_stream.h b/webrtc/video/video_receive_stream.h index c178a1d443..56f31e59dd 100644 --- a/webrtc/video/video_receive_stream.h +++ b/webrtc/video/video_receive_stream.h @@ -16,7 +16,7 @@ #include "webrtc/base/scoped_ptr.h" #include "webrtc/call.h" #include "webrtc/call/transport_adapter.h" -#include "webrtc/common_video/interface/incoming_video_stream.h" +#include "webrtc/common_video/include/incoming_video_stream.h" #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" #include "webrtc/modules/video_render/video_render_defines.h" #include "webrtc/system_wrappers/include/clock.h" diff --git a/webrtc/video_engine/vie_channel.cc b/webrtc/video_engine/vie_channel.cc index 4d7357e60b..b495192d3f 100644 --- a/webrtc/video_engine/vie_channel.cc +++ b/webrtc/video_engine/vie_channel.cc @@ -16,7 +16,7 @@ #include "webrtc/base/checks.h" #include "webrtc/base/logging.h" #include "webrtc/common.h" -#include "webrtc/common_video/interface/incoming_video_stream.h" +#include "webrtc/common_video/include/incoming_video_stream.h" #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" #include "webrtc/frame_callback.h" #include "webrtc/modules/pacing/paced_sender.h" diff --git a/webrtc/video_engine/vie_encoder.cc b/webrtc/video_engine/vie_encoder.cc index 509ac09505..1b96c55e04 100644 --- a/webrtc/video_engine/vie_encoder.cc +++ b/webrtc/video_engine/vie_encoder.cc @@ -18,7 +18,7 @@ #include "webrtc/base/logging.h" #include "webrtc/base/trace_event.h" #include "webrtc/call/bitrate_allocator.h" -#include "webrtc/common_video/interface/video_image.h" +#include "webrtc/common_video/include/video_image.h" #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" #include "webrtc/frame_callback.h" #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" diff --git a/webrtc/video_frame.h b/webrtc/video_frame.h index fb7d7359af..7ad0c328db 100644 --- a/webrtc/video_frame.h +++ b/webrtc/video_frame.h @@ -13,7 +13,7 @@ #include "webrtc/base/scoped_ref_ptr.h" #include "webrtc/common_types.h" -#include "webrtc/common_video/interface/video_frame_buffer.h" +#include "webrtc/common_video/include/video_frame_buffer.h" #include "webrtc/common_video/rotation.h" #include "webrtc/typedefs.h" |