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

Side by Side Diff: media/video/video_encode_accelerator.h

Issue 170843004: Pass Client pointer in Initialize() for VDA/VEA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: b0ec4672 Build fixes. Created 6 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ 5 #ifndef MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_
6 #define MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ 6 #define MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // Clients are not owned by VEA instances and should not be deleted through 90 // Clients are not owned by VEA instances and should not be deleted through
91 // these pointers. 91 // these pointers.
92 virtual ~Client() {} 92 virtual ~Client() {}
93 }; 93 };
94 94
95 // Video encoder functions. 95 // Video encoder functions.
96 96
97 // Initialize the video encoder with a specific configuration. Called once 97 // Initialize the video encoder with a specific configuration. Called once
98 // per encoder construction. 98 // per encoder construction.
99 // Parameters: 99 // Parameters:
100 // |client| is the client of this video encoder. The provided pointer must
101 // be valid for the rest of the lifetime of this encoder, until Destroy()
Ami GONE FROM CHROMIUM 2014/02/24 23:12:40 ditto drop "for the rest of the lifetime of this e
sheu 2014/02/24 23:48:20 Done.
102 // is called.
100 // |input_format| is the frame format of the input stream (as would be 103 // |input_format| is the frame format of the input stream (as would be
101 // reported by VideoFrame::format() for frames passed to Encode()). 104 // reported by VideoFrame::format() for frames passed to Encode()).
102 // |input_visible_size| is the resolution of the input stream (as would be 105 // |input_visible_size| is the resolution of the input stream (as would be
103 // reported by VideoFrame::visible_rect().size() for frames passed to 106 // reported by VideoFrame::visible_rect().size() for frames passed to
104 // Encode()). 107 // Encode()).
105 // |output_profile| is the codec profile of the encoded output stream. 108 // |output_profile| is the codec profile of the encoded output stream.
106 // |initial_bitrate| is the initial bitrate of the encoded output stream, 109 // |initial_bitrate| is the initial bitrate of the encoded output stream,
107 // in bits per second. 110 // in bits per second.
108 // TODO(sheu): handle resolution changes. http://crbug.com/249944 111 // TODO(sheu): handle resolution changes. http://crbug.com/249944
109 virtual void Initialize(media::VideoFrame::Format input_format, 112 virtual void Initialize(Client* client,
113 media::VideoFrame::Format input_format,
scherkus (not reviewing) 2014/02/20 18:52:09 nit: remove media:: ?
sheu 2014/02/24 23:48:20 Done.
110 const gfx::Size& input_visible_size, 114 const gfx::Size& input_visible_size,
111 VideoCodecProfile output_profile, 115 VideoCodecProfile output_profile,
112 uint32 initial_bitrate) = 0; 116 uint32 initial_bitrate) = 0;
113 117
114 // Encodes the given frame. 118 // Encodes the given frame.
115 // Parameters: 119 // Parameters:
116 // |frame| is the VideoFrame that is to be encoded. 120 // |frame| is the VideoFrame that is to be encoded.
117 // |force_keyframe| forces the encoding of a keyframe for this frame. 121 // |force_keyframe| forces the encoding of a keyframe for this frame.
118 virtual void Encode(const scoped_refptr<VideoFrame>& frame, 122 virtual void Encode(const scoped_refptr<VideoFrame>& frame,
119 bool force_keyframe) = 0; 123 bool force_keyframe) = 0;
(...skipping 17 matching lines...) Expand all
137 // immediately and the component is freed. This call may asynchronously free 141 // immediately and the component is freed. This call may asynchronously free
138 // system resources, but its client-visible effects are synchronous. After 142 // system resources, but its client-visible effects are synchronous. After
139 // this method returns no more callbacks will be made on the client. Deletes 143 // this method returns no more callbacks will be made on the client. Deletes
140 // |this| unconditionally, so make sure to drop all pointers to it! 144 // |this| unconditionally, so make sure to drop all pointers to it!
141 virtual void Destroy() = 0; 145 virtual void Destroy() = 0;
142 }; 146 };
143 147
144 } // namespace media 148 } // namespace media
145 149
146 #endif // MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ 150 #endif // MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_
OLDNEW
« media/video/video_decode_accelerator.h ('K') | « media/video/video_decode_accelerator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698