Index: media/base/video_frame.cc |
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc |
index ea11b54a5fcf289204b552b6efc90b019fdcca4c..630b8bc69fcdd6fce3a5f1d84dd7cbd326acfb39 100644 |
--- a/media/base/video_frame.cc |
+++ b/media/base/video_frame.cc |
@@ -54,7 +54,7 @@ static std::string StorageTypeToString( |
case VideoFrame::STORAGE_SHMEM: |
return "SHMEM"; |
#if defined(OS_LINUX) |
- case VideoFrame::STORAGE_DMABUFS: |
+ case VideoFrame::STORAGE_NATIVE: |
return "DMABUFS"; |
#endif |
case VideoFrame::STORAGE_MOJO_SHARED_BUFFER: |
@@ -72,7 +72,7 @@ static bool IsStorageTypeMappable(VideoFrame::StorageType storage_type) { |
#if defined(OS_LINUX) |
// This is not strictly needed but makes explicit that, at VideoFrame |
// level, DmaBufs are not mappable from userspace. |
- storage_type != VideoFrame::STORAGE_DMABUFS && |
+ storage_type != VideoFrame::STORAGE_NATIVE && |
#endif |
(storage_type == VideoFrame::STORAGE_UNOWNED_MEMORY || |
storage_type == VideoFrame::STORAGE_OWNED_MEMORY || |
@@ -333,7 +333,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalDmabufs( |
const gfx::Size& natural_size, |
const std::vector<int>& dmabuf_fds, |
base::TimeDelta timestamp) { |
- const StorageType storage = STORAGE_DMABUFS; |
+ const StorageType storage = STORAGE_NATIVE; |
if (!IsValidConfig(format, storage, coded_size, visible_rect, natural_size)) { |
LOG(DFATAL) << __func__ << " Invalid config." |
<< ConfigToString(format, storage, coded_size, visible_rect, |
@@ -438,10 +438,10 @@ scoped_refptr<VideoFrame> VideoFrame::WrapVideoFrame( |
#if defined(OS_LINUX) |
// If there are any |dmabuf_fds_| plugged in, we should duplicate them. |
- if (frame->storage_type() == STORAGE_DMABUFS) { |
+ if (frame->storage_type() == STORAGE_NATIVE) { |
std::vector<int> original_fds; |
for (size_t i = 0; i < kMaxPlanes; ++i) |
- original_fds.push_back(frame->dmabuf_fd(i)); |
+ original_fds.push_back(frame->DmabufFd(i)); |
if (!wrapping_frame->DuplicateFileDescriptors(original_fds)) { |
LOG(DFATAL) << __func__ << " Couldn't duplicate fds."; |
return nullptr; |
@@ -723,8 +723,8 @@ size_t VideoFrame::shared_memory_offset() const { |
} |
#if defined(OS_LINUX) |
-int VideoFrame::dmabuf_fd(size_t plane) const { |
- DCHECK_EQ(storage_type_, STORAGE_DMABUFS); |
+int VideoFrame::DmabufFd(size_t plane) const { |
+ DCHECK_EQ(storage_type_, STORAGE_NATIVE); |
DCHECK(IsValidPlane(plane, format_)); |
return dmabuf_fds_[plane].get(); |
} |
@@ -732,7 +732,7 @@ int VideoFrame::dmabuf_fd(size_t plane) const { |
bool VideoFrame::DuplicateFileDescriptors(const std::vector<int>& in_fds) { |
// TODO(mcasas): Support offsets for e.g. multiplanar inside a single |in_fd|. |
- storage_type_ = STORAGE_DMABUFS; |
+ storage_type_ = STORAGE_NATIVE; |
// TODO(posciak): This is not exactly correct, it's possible for one |
// buffer to contain more than one plane. |
if (in_fds.size() != NumPlanes(format_)) { |
@@ -763,7 +763,7 @@ void VideoFrame::AddSharedMemoryHandle(base::SharedMemoryHandle handle) { |
} |
#if defined(OS_MACOSX) |
-CVPixelBufferRef VideoFrame::cv_pixel_buffer() const { |
+CVPixelBufferRef VideoFrame::CvPixelBuffer() const { |
return cv_pixel_buffer_.get(); |
} |
#endif |