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 92% |
rename from content/common/gpu/media/v4l2_video_decode_accelerator.h |
rename to media/gpu/v4l2_video_decode_accelerator.h |
index a16af17c0cb0f90dc7235ded5307c3056e4395e8..dd83d6a8f92e35736fa6b5e5c45972a9600b93b0 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,11 +22,11 @@ |
#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 "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/video/picture.h" |
#include "media/video/video_decode_accelerator.h" |
#include "ui/gfx/geometry/size.h" |
@@ -36,7 +36,7 @@ namespace media { |
class H264Parser; |
} // namespace media |
-namespace content { |
+namespace media { |
// This class handles video accelerators directly through a V4L2 device exported |
// by the hardware blocks. |
// |
@@ -74,7 +74,7 @@ namespace content { |
// inoperable state for the duration of the wait for Pictures. So to prevent |
// subtle races (esp. if we get Reset() in the meantime), we block the decoder |
// thread while we wait for AssignPictureBuffers from the client. |
-class CONTENT_EXPORT V4L2VideoDecodeAccelerator |
+class MEDIA_GPU_EXPORT V4L2VideoDecodeAccelerator |
: public media::VideoDecodeAccelerator { |
public: |
V4L2VideoDecodeAccelerator( |
@@ -100,7 +100,7 @@ class CONTENT_EXPORT V4L2VideoDecodeAccelerator |
override; |
static media::VideoDecodeAccelerator::SupportedProfiles |
- GetSupportedProfiles(); |
+ GetSupportedProfiles(); |
private: |
// These are rather subjectively tuned. |
@@ -121,14 +121,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 BufferId { |
@@ -149,11 +149,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. |
@@ -370,7 +370,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_; |
@@ -462,6 +462,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_ |