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

Side by Side Diff: media/gpu/vt_video_encode_accelerator_mac.h

Issue 2790063003: Merge 58: Enforce MaxFrameDelayCount in VTVideoEncodeAccelerator and cleanups (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | media/gpu/vt_video_encode_accelerator_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_GPU_VT_VIDEO_ENCODE_ACCELERATOR_MAC_H_ 5 #ifndef MEDIA_GPU_VT_VIDEO_ENCODE_ACCELERATOR_MAC_H_
6 #define MEDIA_GPU_VT_VIDEO_ENCODE_ACCELERATOR_MAC_H_ 6 #define MEDIA_GPU_VT_VIDEO_ENCODE_ACCELERATOR_MAC_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Copy CMSampleBuffer into a BitstreamBuffer and return it to the |client_|. 80 // Copy CMSampleBuffer into a BitstreamBuffer and return it to the |client_|.
81 void ReturnBitstreamBuffer( 81 void ReturnBitstreamBuffer(
82 std::unique_ptr<EncodeOutput> encode_output, 82 std::unique_ptr<EncodeOutput> encode_output,
83 std::unique_ptr<VTVideoEncodeAccelerator::BitstreamBufferRef> buffer_ref); 83 std::unique_ptr<VTVideoEncodeAccelerator::BitstreamBufferRef> buffer_ref);
84 84
85 // Reset the encoder's compression session by destroying the existing one 85 // Reset the encoder's compression session by destroying the existing one
86 // using DestroyCompressionSession() and creating a new one. The new session 86 // using DestroyCompressionSession() and creating a new one. The new session
87 // is configured using ConfigureCompressionSession(). 87 // is configured using ConfigureCompressionSession().
88 bool ResetCompressionSession(); 88 bool ResetCompressionSession();
89 89
90 // Create a compression session, with HW encoder enforced if 90 // Create a compression session.
91 // |require_hw_encoding| is set. 91 bool CreateCompressionSession(const gfx::Size& input_size);
92 bool CreateCompressionSession(
93 base::ScopedCFTypeRef<CFDictionaryRef> attributes,
94 const gfx::Size& input_size,
95 bool require_hw_encoding);
96 92
97 // Configure the current compression session using current encoder settings. 93 // Configure the current compression session using current encoder settings.
98 bool ConfigureCompressionSession(); 94 bool ConfigureCompressionSession();
99 95
100 // Destroy the current compression session if any. Blocks until all pending 96 // Destroy the current compression session if any. Blocks until all pending
101 // frames have been flushed out (similar to EmitFrames without doing any 97 // frames have been flushed out (similar to EmitFrames without doing any
102 // encoding work). 98 // encoding work).
103 void DestroyCompressionSession(); 99 void DestroyCompressionSession();
104 100
105 base::ScopedCFTypeRef<VTCompressionSessionRef> compression_session_; 101 base::ScopedCFTypeRef<VTCompressionSessionRef> compression_session_;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // other destructors run. 138 // other destructors run.
143 base::WeakPtr<VTVideoEncodeAccelerator> encoder_weak_ptr_; 139 base::WeakPtr<VTVideoEncodeAccelerator> encoder_weak_ptr_;
144 base::WeakPtrFactory<VTVideoEncodeAccelerator> encoder_task_weak_factory_; 140 base::WeakPtrFactory<VTVideoEncodeAccelerator> encoder_task_weak_factory_;
145 141
146 DISALLOW_COPY_AND_ASSIGN(VTVideoEncodeAccelerator); 142 DISALLOW_COPY_AND_ASSIGN(VTVideoEncodeAccelerator);
147 }; 143 };
148 144
149 } // namespace media 145 } // namespace media
150 146
151 #endif // MEDIA_GPU_VT_VIDEO_ENCODE_ACCELERATOR_MAC_H_ 147 #endif // MEDIA_GPU_VT_VIDEO_ENCODE_ACCELERATOR_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | media/gpu/vt_video_encode_accelerator_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698