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

Side by Side Diff: remoting/client/plugin/media_source_video_renderer.h

Issue 329663002: Fix MediaSource renderer to limit memory consumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_CLIENT_PLUGIN_MEDIA_SOURCE_VIDEO_RENDERER_H_ 5 #ifndef REMOTING_CLIENT_PLUGIN_MEDIA_SOURCE_VIDEO_RENDERER_H_
6 #define REMOTING_CLIENT_PLUGIN_MEDIA_SOURCE_VIDEO_RENDERER_H_ 6 #define REMOTING_CLIENT_PLUGIN_MEDIA_SOURCE_VIDEO_RENDERER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 20 matching lines...) Expand all
31 const webrtc::DesktopVector& dpi) = 0; 31 const webrtc::DesktopVector& dpi) = 0;
32 32
33 // Called when desktop shape changes. 33 // Called when desktop shape changes.
34 virtual void OnMediaSourceShape(const webrtc::DesktopRegion& shape) = 0; 34 virtual void OnMediaSourceShape(const webrtc::DesktopRegion& shape) = 0;
35 35
36 // Called when the MediaSource needs to be reset (e.g. because screen size 36 // Called when the MediaSource needs to be reset (e.g. because screen size
37 // has changed). 37 // has changed).
38 virtual void OnMediaSourceReset(const std::string& format) = 0; 38 virtual void OnMediaSourceReset(const std::string& format) = 0;
39 39
40 // Called when new data becomes available. 40 // Called when new data becomes available.
41 virtual void OnMediaSourceData(uint8_t* buffer, size_t buffer_size) = 0; 41 virtual void OnMediaSourceData(uint8_t* buffer, size_t buffer_size,
42 bool keyframe) = 0;
42 }; 43 };
43 44
44 explicit MediaSourceVideoRenderer(Delegate* data_forwarder); 45 explicit MediaSourceVideoRenderer(Delegate* data_forwarder);
45 virtual ~MediaSourceVideoRenderer(); 46 virtual ~MediaSourceVideoRenderer();
46 47
47 // VideoRenderer interface. 48 // VideoRenderer interface.
48 virtual void Initialize(const protocol::SessionConfig& config) OVERRIDE; 49 virtual void Initialize(const protocol::SessionConfig& config) OVERRIDE;
49 virtual ChromotingStats* GetStats() OVERRIDE; 50 virtual ChromotingStats* GetStats() OVERRIDE;
50 virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, 51 virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet,
51 const base::Closure& done) OVERRIDE; 52 const base::Closure& done) OVERRIDE;
52 53
53 private: 54 private:
54 // Helper class used to generate WebM stream. 55 // Helper class used to generate WebM stream.
55 class VideoWriter; 56 class VideoWriter;
56 57
57 Delegate* delegate_; 58 Delegate* delegate_;
58 scoped_ptr<VideoWriter> writer_; 59 scoped_ptr<VideoWriter> writer_;
59 webrtc::DesktopVector frame_dpi_; 60 webrtc::DesktopVector frame_dpi_;
60 webrtc::DesktopRegion desktop_shape_; 61 webrtc::DesktopRegion desktop_shape_;
61 62
62 ChromotingStats stats_; 63 ChromotingStats stats_;
63 int64 latest_sequence_number_; 64 int64 latest_sequence_number_;
64 65
65 DISALLOW_COPY_AND_ASSIGN(MediaSourceVideoRenderer); 66 DISALLOW_COPY_AND_ASSIGN(MediaSourceVideoRenderer);
66 }; 67 };
67 68
68 } // namespace remoting 69 } // namespace remoting
69 70
70 #endif // REMOTING_CLIENT_PLUGIN_MEDIA_SOURCE_VIDEO_RENDERER_H_ 71 #endif // REMOTING_CLIENT_PLUGIN_MEDIA_SOURCE_VIDEO_RENDERER_H_
OLDNEW
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/client/plugin/media_source_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698