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

Unified Diff: media/gpu/v4l2_video_decode_accelerator.h

Issue 1939683002: Test X11 header pollution (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/gpu/v4l2_stub_header.fragment ('k') | media/gpu/v4l2_video_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/v4l2_video_decode_accelerator.h
diff --git a/content/common/gpu/media/v4l2_video_decode_accelerator.h b/media/gpu/v4l2_video_decode_accelerator.h
similarity index 93%
rename from content/common/gpu/media/v4l2_video_decode_accelerator.h
rename to media/gpu/v4l2_video_decode_accelerator.h
index 6c37a71414620683dc09d1962346d769254e4bb9..2ef9a9ba115e1f2d4b3e71107fec261ac355d1e5 100644
--- a/content/common/gpu/media/v4l2_video_decode_accelerator.h
+++ b/media/gpu/v4l2_video_decode_accelerator.h
@@ -6,8 +6,8 @@
// that utilizes hardware video decoders, which expose Video4Linux 2 API
// (http://linuxtv.org/downloads/v4l-dvb-apis/).
-#ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_
-#define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_
+#ifndef MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_
+#define MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_
#include <stddef.h>
#include <stdint.h>
@@ -22,22 +22,21 @@
#include "base/memory/ref_counted.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread.h"
-#include "content/common/content_export.h"
-#include "content/common/gpu/media/gpu_video_decode_accelerator_helpers.h"
-#include "content/common/gpu/media/v4l2_device.h"
-#include "content/common/gpu/media/v4l2_image_processor.h"
#include "media/base/limits.h"
#include "media/base/video_decoder_config.h"
+#include "media/gpu/gpu_video_decode_accelerator_helpers.h"
+#include "media/gpu/media_gpu_export.h"
+#include "media/gpu/v4l2_device.h"
+#include "media/gpu/v4l2_image_processor.h"
#include "media/video/picture.h"
#include "media/video/video_decode_accelerator.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gl/gl_bindings.h"
namespace media {
+
class H264Parser;
-} // namespace media
-namespace content {
// This class handles video accelerators directly through a V4L2 device exported
// by the hardware blocks.
//
@@ -85,7 +84,7 @@ namespace content {
// Resolution change: V4L2VDA destroy image processor when destroying output
// buffrers. We cannot drop any frame during resolution change. So V4L2VDA
// should destroy output buffers after image processor returns all the frames.
-class CONTENT_EXPORT V4L2VideoDecodeAccelerator
+class MEDIA_GPU_EXPORT V4L2VideoDecodeAccelerator
: public media::VideoDecodeAccelerator {
public:
V4L2VideoDecodeAccelerator(
@@ -112,7 +111,7 @@ class CONTENT_EXPORT V4L2VideoDecodeAccelerator
media::VideoPixelFormat GetOutputFormat() const override;
static media::VideoDecodeAccelerator::SupportedProfiles
- GetSupportedProfiles();
+ GetSupportedProfiles();
private:
// These are rather subjectively tuned.
@@ -133,14 +132,14 @@ class CONTENT_EXPORT V4L2VideoDecodeAccelerator
// Internal state of the decoder.
enum State {
- kUninitialized, // Initialize() not yet called.
- kInitialized, // Initialize() returned true; ready to start decoding.
- kDecoding, // DecodeBufferInitial() successful; decoding frames.
- kResetting, // Presently resetting.
- kAfterReset, // After Reset(), ready to start decoding again.
- kChangingResolution, // Performing resolution change, all remaining
- // pre-change frames decoded and processed.
- kError, // Error in kDecoding state.
+ kUninitialized, // Initialize() not yet called.
+ kInitialized, // Initialize() returned true; ready to start decoding.
+ kDecoding, // DecodeBufferInitial() successful; decoding frames.
+ kResetting, // Presently resetting.
+ kAfterReset, // After Reset(), ready to start decoding again.
+ kChangingResolution, // Performing resolution change, all remaining
+ // pre-change frames decoded and processed.
+ kError, // Error in kDecoding state.
};
enum OutputRecordState {
@@ -168,11 +167,11 @@ class CONTENT_EXPORT V4L2VideoDecodeAccelerator
struct InputRecord {
InputRecord();
~InputRecord();
- bool at_device; // held by device.
- void* address; // mmap() address.
- size_t length; // mmap() length.
- off_t bytes_used; // bytes filled in the mmap() segment.
- int32_t input_id; // triggering input_id as given to Decode().
+ bool at_device; // held by device.
+ void* address; // mmap() address.
+ size_t length; // mmap() length.
+ off_t bytes_used; // bytes filled in the mmap() segment.
+ int32_t input_id; // triggering input_id as given to Decode().
};
// Record for output buffers.
@@ -402,7 +401,7 @@ class CONTENT_EXPORT V4L2VideoDecodeAccelerator
// Got a reset request while we were performing resolution change.
bool resolution_change_reset_pending_;
// Input queue for decoder_thread_: BitstreamBuffers in.
- std::queue<linked_ptr<BitstreamBufferRef> > decoder_input_queue_;
+ std::queue<linked_ptr<BitstreamBufferRef>> decoder_input_queue_;
// For H264 decode, hardware requires that we send it frame-sized chunks.
// We'll need to parse the stream.
std::unique_ptr<media::H264Parser> decoder_h264_parser_;
@@ -513,6 +512,6 @@ class CONTENT_EXPORT V4L2VideoDecodeAccelerator
DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator);
};
-} // namespace content
+} // namespace media
-#endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_
+#endif // MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_
« no previous file with comments | « media/gpu/v4l2_stub_header.fragment ('k') | media/gpu/v4l2_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698