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

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

Issue 2615513003: Add optional max supported resolution on MediaFoundationVideoEncodeAccelerator (Closed)
Patch Set: Created 3 years, 11 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/media_foundation_video_encode_accelerator_win.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_MEDIA_FOUNDATION_VIDEO_ENCODE_ACCELERATOR_WIN_H_ 5 #ifndef MEDIA_GPU_MEDIA_FOUNDATION_VIDEO_ENCODE_ACCELERATOR_WIN_H_
6 #define MEDIA_GPU_MEDIA_FOUNDATION_VIDEO_ENCODE_ACCELERATOR_WIN_H_ 6 #define MEDIA_GPU_MEDIA_FOUNDATION_VIDEO_ENCODE_ACCELERATOR_WIN_H_
7 7
8 #include <mfapi.h> 8 #include <mfapi.h>
9 #include <mfidl.h> 9 #include <mfidl.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 // Creates an hardware encoder backed IMFTransform instance on |encoder_|. 70 // Creates an hardware encoder backed IMFTransform instance on |encoder_|.
71 bool CreateHardwareEncoderMFT(); 71 bool CreateHardwareEncoderMFT();
72 72
73 // Initializes and allocates memory for input and output samples. 73 // Initializes and allocates memory for input and output samples.
74 bool InitializeInputOutputSamples(); 74 bool InitializeInputOutputSamples();
75 75
76 // Initializes encoder parameters for real-time use. 76 // Initializes encoder parameters for real-time use.
77 bool SetEncoderModes(); 77 bool SetEncoderModes();
78 78
79 // Returns true if we can initialize input and output samples with the given
80 // frame size, otherwise false.
81 bool IsResolutionSupported(const gfx::Size& size);
82
79 // Helper function to notify the client of an error on 83 // Helper function to notify the client of an error on
80 // |main_client_task_runner_|. 84 // |main_client_task_runner_|.
81 void NotifyError(VideoEncodeAccelerator::Error error); 85 void NotifyError(VideoEncodeAccelerator::Error error);
82 86
83 // Encoding tasks to be run on |encoder_thread_|. 87 // Encoding tasks to be run on |encoder_thread_|.
84 void EncodeTask(scoped_refptr<VideoFrame> frame, bool force_keyframe); 88 void EncodeTask(scoped_refptr<VideoFrame> frame, bool force_keyframe);
85 89
86 // Checks for and copies encoded output on |encoder_thread_|. 90 // Checks for and copies encoded output on |encoder_thread_|.
87 void ProcessOutput(); 91 void ProcessOutput();
88 92
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // other destructors run. 158 // other destructors run.
155 base::WeakPtrFactory<MediaFoundationVideoEncodeAccelerator> 159 base::WeakPtrFactory<MediaFoundationVideoEncodeAccelerator>
156 encoder_task_weak_factory_; 160 encoder_task_weak_factory_;
157 161
158 DISALLOW_COPY_AND_ASSIGN(MediaFoundationVideoEncodeAccelerator); 162 DISALLOW_COPY_AND_ASSIGN(MediaFoundationVideoEncodeAccelerator);
159 }; 163 };
160 164
161 } // namespace media 165 } // namespace media
162 166
163 #endif // MEDIA_GPU_MEDIA_FOUNDATION_VIDEO_ENCODE_ACCELERATOR_WIN_H_ 167 #endif // MEDIA_GPU_MEDIA_FOUNDATION_VIDEO_ENCODE_ACCELERATOR_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | media/gpu/media_foundation_video_encode_accelerator_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698