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

Side by Side Diff: content/common/gpu/media/vaapi_wrapper.h

Issue 27498002: Add vaapi_h264_decoder_test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix destruct order Created 7 years, 2 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
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 // This file contains an implementation of VaapiWrapper, used by 5 // This file contains an implementation of VaapiWrapper, used by
6 // VaapiVideoDecodeAccelerator and VaapiH264Decoder to interface 6 // VaapiVideoDecodeAccelerator and VaapiH264Decoder to interface
7 // with libva (VA-API library for hardware video decode). 7 // with libva (VA-API library for hardware video decode).
8 8
9 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_ 9 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_
10 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_ 10 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Execute decode in hardware into |va_surface_id} and destroy pending 71 // Execute decode in hardware into |va_surface_id} and destroy pending
72 // buffers. Return false if SubmitDecode() fails. 72 // buffers. Return false if SubmitDecode() fails.
73 bool DecodeAndDestroyPendingBuffers(VASurfaceID va_surface_id); 73 bool DecodeAndDestroyPendingBuffers(VASurfaceID va_surface_id);
74 74
75 // Put data from |va_surface_id| into |x_pixmap| of size |size|, 75 // Put data from |va_surface_id| into |x_pixmap| of size |size|,
76 // converting/scaling to it. 76 // converting/scaling to it.
77 bool PutSurfaceIntoPixmap(VASurfaceID va_surface_id, 77 bool PutSurfaceIntoPixmap(VASurfaceID va_surface_id,
78 Pixmap x_pixmap, 78 Pixmap x_pixmap,
79 gfx::Size dest_size); 79 gfx::Size dest_size);
80 80
81 // Get the surface data and return it in |buffer|, which has size |size|.
82 // The returned buffer contains data in I420 format and needs to be
83 // released by calling free(). The function returns true if successful.
Pawel Osciak 2013/10/20 23:53:11 Can you instead use VideoFrame class for this?
chihchung 2013/10/21 09:33:05 Done.
84 // Currently it only handles VASurface with NV12 format.
85 bool GetI420FromSurface(VASurfaceID va_surface_id,
86 void** buffer,
87 size_t* size);
88
81 // Do any necessary initialization before the sandbox is enabled. 89 // Do any necessary initialization before the sandbox is enabled.
82 static void PreSandboxInitialization(); 90 static void PreSandboxInitialization();
83 91
84 private: 92 private:
85 VaapiWrapper(); 93 VaapiWrapper();
86 94
87 bool Initialize(media::VideoCodecProfile profile, 95 bool Initialize(media::VideoCodecProfile profile,
88 Display* x_display, 96 Display* x_display,
89 const base::Closure& report_error__to_uma_cb); 97 const base::Closure& report_error__to_uma_cb);
90 void Deinitialize(); 98 void Deinitialize();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 132
125 // Has static initialization of pre-sandbox components completed successfully? 133 // Has static initialization of pre-sandbox components completed successfully?
126 static bool pre_sandbox_init_done_; 134 static bool pre_sandbox_init_done_;
127 135
128 DISALLOW_COPY_AND_ASSIGN(VaapiWrapper); 136 DISALLOW_COPY_AND_ASSIGN(VaapiWrapper);
129 }; 137 };
130 138
131 } // namespace content 139 } // namespace content
132 140
133 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_ 141 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698