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

Unified Diff: media/gpu/tegra_v4l2_device.h

Issue 2398883002: Add support for multiple V4L2 video devices of the same type. (Closed)
Patch Set: Address comments, reorganize V4L2Device::Type. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: media/gpu/tegra_v4l2_device.h
diff --git a/media/gpu/tegra_v4l2_device.h b/media/gpu/tegra_v4l2_device.h
index eac12947b852a1348310698ad62a9fb69a507404..10a2b67fbb689b8c50afbb80fb88ea9fad41ae17 100644
--- a/media/gpu/tegra_v4l2_device.h
+++ b/media/gpu/tegra_v4l2_device.h
@@ -22,8 +22,11 @@ namespace media {
// V4L2 specification via the library API instead of system calls.
class TegraV4L2Device : public V4L2Device {
public:
- explicit TegraV4L2Device(Type type);
+ TegraV4L2Device();
+ // V4L2Device implementation.
+ bool Initialize() override;
kcwu 2016/10/07 11:19:04 This method is not expected call by users. I guess
Pawel Osciak 2016/10/11 06:13:45 Done.
+ bool Open(Type type, uint32_t v4l2_pixfmt) override;
int Ioctl(int flags, void* arg) override;
bool Poll(bool poll_device, bool* event_pending) override;
bool SetDevicePollInterrupt() override;
@@ -34,11 +37,10 @@ class TegraV4L2Device : public V4L2Device {
int flags,
unsigned int offset) override;
void Munmap(void* addr, unsigned int len) override;
- bool Initialize() override;
std::vector<base::ScopedFD> GetDmabufsForV4L2Buffer(
int index,
size_t num_planes,
- enum v4l2_buf_type type) override;
+ enum v4l2_buf_type buf_type) override;
bool CanCreateEGLImageFrom(uint32_t v4l2_pixfmt) override;
EGLImageKHR CreateEGLImage(
EGLDisplay egl_display,
@@ -51,13 +53,29 @@ class TegraV4L2Device : public V4L2Device {
EGLBoolean DestroyEGLImage(EGLDisplay egl_display,
EGLImageKHR egl_image) override;
GLenum GetTextureTarget() override;
- uint32_t PreferredInputFormat() override;
+ uint32_t PreferredInputFormat(Type type) override;
+
+ std::vector<uint32_t> GetSupportedImageProcessorPixelformats(
+ v4l2_buf_type buf_type) override;
+
+ VideoDecodeAccelerator::SupportedProfiles GetSupportedDecodeProfiles(
+ const size_t num_formats,
+ const uint32_t pixelformats[]) override;
+
+ VideoEncodeAccelerator::SupportedProfiles GetSupportedEncodeProfiles()
+ override;
+
+ bool IsImageProcessingSupported() override;
+
+ bool IsJpegDecodingSupported() override;
private:
~TegraV4L2Device() override;
+ bool OpenInternal(Type type);
+
// The actual device fd.
- int device_fd_;
+ int device_fd_ = -1;
DISALLOW_COPY_AND_ASSIGN(TegraV4L2Device);
};

Powered by Google App Engine
This is Rietveld 408576698