Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(635)

Unified Diff: webrtc/media/engine/simulcast_encoder_adapter.h

Issue 2964953002: Remove webrtc::VideoEncoderFactory (Closed)
Patch Set: Add dep to base:sequenced_task_checker Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/BUILD.gn ('k') | webrtc/media/engine/simulcast_encoder_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/simulcast_encoder_adapter.h
diff --git a/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h b/webrtc/media/engine/simulcast_encoder_adapter.h
similarity index 83%
rename from webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h
rename to webrtc/media/engine/simulcast_encoder_adapter.h
index 784c274acff61322bb51bc1382ed1b8216c5406d..68af74a5a347bcc60114cf2ea43c94fb3ede791e 100644
--- a/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h
+++ b/webrtc/media/engine/simulcast_encoder_adapter.h
@@ -9,8 +9,8 @@
*
*/
-#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_ENCODER_ADAPTER_H_
-#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_ENCODER_ADAPTER_H_
+#ifndef WEBRTC_MEDIA_ENGINE_SIMULCAST_ENCODER_ADAPTER_H_
+#define WEBRTC_MEDIA_ENGINE_SIMULCAST_ENCODER_ADAPTER_H_
#include <memory>
#include <stack>
@@ -18,6 +18,7 @@
#include <utility>
#include <vector>
+#include "webrtc/media/engine/webrtcvideoencoderfactory.h"
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
#include "webrtc/rtc_base/atomicops.h"
#include "webrtc/rtc_base/sequenced_task_checker.h"
@@ -26,24 +27,13 @@ namespace webrtc {
class SimulcastRateAllocator;
-// TODO(brandtr): Remove this class and replace its use with a
-// WebRtcVideoEncoderFactory.
-class VideoEncoderFactory {
- public:
- virtual VideoEncoder* Create() = 0;
- virtual void Destroy(VideoEncoder* encoder) = 0;
- virtual ~VideoEncoderFactory() {}
-};
-
// SimulcastEncoderAdapter implements simulcast support by creating multiple
// webrtc::VideoEncoder instances with the given VideoEncoderFactory.
// The object is created and destroyed on the worker thread, but all public
// interfaces should be called from the encoder task queue.
class SimulcastEncoderAdapter : public VP8Encoder {
public:
- // TODO(brandtr): Make it clear that the ownership of |factory| is transferred
- // by only accepting a std::unique_ptr<VideoEncoderFactory> here.
- explicit SimulcastEncoderAdapter(VideoEncoderFactory* factory);
+ explicit SimulcastEncoderAdapter(cricket::WebRtcVideoEncoderFactory* factory);
virtual ~SimulcastEncoderAdapter();
// Implements VideoEncoder.
@@ -107,7 +97,7 @@ class SimulcastEncoderAdapter : public VP8Encoder {
void DestroyStoredEncoders();
volatile int inited_; // Accessed atomically.
- const std::unique_ptr<VideoEncoderFactory> factory_;
+ cricket::WebRtcVideoEncoderFactory* const factory_;
VideoCodec codec_;
std::vector<StreamInfo> streaminfos_;
EncodedImageCallback* encoded_complete_callback_;
@@ -123,4 +113,4 @@ class SimulcastEncoderAdapter : public VP8Encoder {
} // namespace webrtc
-#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_ENCODER_ADAPTER_H_
+#endif // WEBRTC_MEDIA_ENGINE_SIMULCAST_ENCODER_ADAPTER_H_
« no previous file with comments | « webrtc/media/BUILD.gn ('k') | webrtc/media/engine/simulcast_encoder_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698