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

Unified Diff: media/cast/video_sender/video_encoder.h

Issue 74133002: Cast: Removed unnecessary ref counters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge TOT Created 7 years, 1 month 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 | « media/cast/audio_receiver/audio_receiver.cc ('k') | media/cast/video_sender/video_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/video_sender/video_encoder.h
diff --git a/media/cast/video_sender/video_encoder.h b/media/cast/video_sender/video_encoder.h
index c15473654c6bbfe6d693566ac0e32f754b7cbb88..4140bfc79f6eb78eeb0a07384f49b2979ed30c14 100644
--- a/media/cast/video_sender/video_encoder.h
+++ b/media/cast/video_sender/video_encoder.h
@@ -5,8 +5,8 @@
#ifndef MEDIA_CAST_VIDEO_SENDER_VIDEO_ENCODER_H_
#define MEDIA_CAST_VIDEO_SENDER_VIDEO_ENCODER_H_
-#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
#include "media/cast/cast_config.h"
#include "media/cast/cast_environment.h"
@@ -21,8 +21,7 @@ namespace cast {
// This object is called external from the main cast thread and internally from
// the video encoder thread.
-class VideoEncoder : public VideoEncoderController,
- public base::RefCountedThreadSafe<VideoEncoder> {
+class VideoEncoder : public VideoEncoderController {
public:
typedef base::Callback<void(scoped_ptr<EncodedVideoFrame>,
const base::TimeTicks&)> FrameEncodedCallback;
@@ -31,6 +30,8 @@ class VideoEncoder : public VideoEncoderController,
const VideoSenderConfig& video_config,
uint8 max_unacked_frames);
+ virtual ~VideoEncoder();
+
// Called from the main cast thread. This function post the encode task to the
// video encoder thread;
// The video_frame must be valid until the closure callback is called.
@@ -44,8 +45,6 @@ class VideoEncoder : public VideoEncoderController,
const base::Closure frame_release_callback);
protected:
- virtual ~VideoEncoder();
-
struct CodecDynamicConfig {
bool key_frame_requested;
uint32 latest_frame_id_to_reference;
@@ -68,8 +67,6 @@ class VideoEncoder : public VideoEncoderController,
virtual int NumberOfSkippedFrames() const OVERRIDE;
private:
- friend class base::RefCountedThreadSafe<VideoEncoder>;
-
const VideoSenderConfig video_config_;
scoped_refptr<CastEnvironment> cast_environment_;
scoped_ptr<Vp8Encoder> vp8_encoder_;
« no previous file with comments | « media/cast/audio_receiver/audio_receiver.cc ('k') | media/cast/video_sender/video_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698