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

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

Issue 2964953002: Remove webrtc::VideoEncoderFactory (Closed)
Patch Set: 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
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 744c66a69e718c025b6187e5aa32afdbebc8cb3c..61ffe51ec7f57af05e07a4e5272714f96c26bd79 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>
@@ -20,30 +20,20 @@
#include "webrtc/base/atomicops.h"
#include "webrtc/base/sequenced_task_checker.h"
+#include "webrtc/media/engine/webrtcvideoencoderfactory.h"
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
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_

Powered by Google App Engine
This is Rietveld 408576698