diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-04 02:04:16 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-04 02:04:16 +0000 |
commit | 35496ce00c46c40baac183e083057b4f2a6da76f (patch) | |
tree | 957246f518c26dd6f7bb435209491479557670d7 /media | |
parent | f2521bc0273d047f2b4c27167dacf9752640c045 (diff) | |
download | chromium_src-35496ce00c46c40baac183e083057b4f2a6da76f.zip chromium_src-35496ce00c46c40baac183e083057b4f2a6da76f.tar.gz chromium_src-35496ce00c46c40baac183e083057b4f2a6da76f.tar.bz2 |
Set svn:eol-style LF for .h, .cc and .scons files.
Set svn:eol-style native for .vcproj files.
Set svn:eol-style CRLF for .sln files.
Review URL: http://codereview.chromium.org/12931
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6346 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/base/buffers.h | 300 | ||||
-rw-r--r-- | media/build/media.vcproj | 278 | ||||
-rw-r--r-- | media/build/media_unittests.vcproj | 310 |
3 files changed, 444 insertions, 444 deletions
diff --git a/media/base/buffers.h b/media/base/buffers.h index 68ed66f..4e08437 100644 --- a/media/base/buffers.h +++ b/media/base/buffers.h @@ -1,152 +1,152 @@ // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file.
-
-#ifndef MEDIA_BASE_BUFFERS_H_
-#define MEDIA_BASE_BUFFERS_H_
-
-#include "base/basictypes.h"
-#include "base/ref_counted.h"
-
-namespace media {
-
-// NOTE: this isn't a true interface since RefCountedThreadSafe has non-virtual
-// members, therefore implementors should NOT subclass RefCountedThreadSafe.
-//
-// If you do, AddRef/Release will have different outcomes depending on the
-// current type of the pointer (StreamSampleInterface vs. SomeImplementation).
-class StreamSampleInterface :
- public base::RefCountedThreadSafe<StreamSampleInterface> {
- public:
- virtual ~StreamSampleInterface() {}
-
- virtual int64 GetTimestamp() = 0;
- virtual int64 GetDuration() = 0;
- virtual void SetTimestamp(int64 timestamp) = 0;
- virtual void SetDuration(int64 duration) = 0;
-};
-
-
-class BufferInterface : public StreamSampleInterface {
- public:
- virtual ~BufferInterface() {}
-
- // Returns a read only pointer to the buffer data.
- virtual const char* GetData() = 0;
-
- // Returns the size of valid data in bytes.
- virtual size_t GetDataSize() = 0;
-};
-
-
-class WritableBufferInterface : public BufferInterface {
- public:
- virtual ~WritableBufferInterface() {}
-
- // Returns a read-write pointer to the buffer data.
- virtual char* GetWritableData() = 0;
-
- // Updates the size of valid data in bytes, which must be less than or equal
- // to GetBufferSize.
- virtual void SetDataSize(size_t data_size) = 0;
-
- // Returns the maximum allocated size for this buffer.
- virtual size_t GetBufferSize() = 0;
-};
-
-
-struct VideoSurface {
- static const size_t kMaxPlanes = 3;
-
- // Surface formats roughly based on FOURCC labels, see:
- // http://www.fourcc.org/rgb.php
- // http://www.fourcc.org/yuv.php
- enum Format {
- RGB555, // 16bpp RGB packed 5:5:5
- RGB565, // 16bpp RGB packed 5:6:5
- RGB24, // 24bpp RGB packed 8:8:8
- RGB32, // 32bpp RGB packed with extra byte 8:8:8
- RGBA, // 32bpp RGBA packed 8:8:8:8
- YV12, // 12bpp YVU planar 1x1 Y, 2x2 VU samples
- YV16, // 16bpp YVU planar 1x1 Y, 2x1 VU samples
- };
-
- // Surface format.
- Format format;
-
- // Width and height of surface.
- size_t width;
- size_t height;
-
- // Number of planes, typically 1 for packed RGB formats and 3 for planar
- // YUV formats.
- size_t planes;
-
- // Array of strides for each plane, typically greater or equal to the width
- // of the surface divided by the horizontal sampling period.
- size_t strides[kMaxPlanes];
-
- // Array of data pointers to each plane.
- char* data[kMaxPlanes];
-};
-
-
-class VideoFrameInterface : public StreamSampleInterface {
- public:
- virtual ~VideoFrameInterface() {}
-
- // Locks the underlying surface and fills out the given VideoSurface and
- // returns true if successful, false otherwise.
- virtual bool Lock(VideoSurface* surface) = 0;
-
- // Unlocks the underlying surface, any previous VideoSurfaces are no longer
- // guaranteed to be valid.
- virtual void Unlock() = 0;
-};
-
-
-template <class BufferType>
-class AssignableInterface {
- public:
- virtual ~AssignableInterface() {}
-
- // Assigns a buffer to the owner.
- virtual void SetBuffer(BufferType* buffer) = 0;
-
- // Notifies the owner that an assignment has been completed.
- virtual void OnAssignment() = 0;
-};
-
-
-// Template for easily creating AssignableInterface buffers. Pass in the
-// pointer of the object to receive the OnAssignment callback.
-template <class OwnerType, class BufferType>
-class AssignableBuffer : public AssignableInterface<BufferType>,
- public base::RefCountedThreadSafe<AssignableBuffer<OwnerType, BufferType> > {
- public:
- explicit AssignableBuffer(OwnerType* owner)
- : owner_(owner),
- buffer_(NULL) {
- DCHECK(owner_);
- }
- virtual ~AssignableBuffer() {}
-
- // AssignableBufferInterface<BufferType>
- virtual void SetBuffer(BufferType* buffer) {
- buffer_ = buffer;
- }
-
- virtual void OnAssignment() {
- owner_->OnAssignment(buffer_.get());
- }
-
- private:
- OwnerType* owner_;
- scoped_refptr<BufferType> buffer_;
-
- DISALLOW_COPY_AND_ASSIGN(AssignableBuffer);
-};
-
-} // namespace media
-
-#endif // MEDIA_BASE_BUFFERS_H_
+// found in the LICENSE file. + +#ifndef MEDIA_BASE_BUFFERS_H_ +#define MEDIA_BASE_BUFFERS_H_ + +#include "base/basictypes.h" +#include "base/ref_counted.h" + +namespace media { + +// NOTE: this isn't a true interface since RefCountedThreadSafe has non-virtual +// members, therefore implementors should NOT subclass RefCountedThreadSafe. +// +// If you do, AddRef/Release will have different outcomes depending on the +// current type of the pointer (StreamSampleInterface vs. SomeImplementation). +class StreamSampleInterface : + public base::RefCountedThreadSafe<StreamSampleInterface> { + public: + virtual ~StreamSampleInterface() {} + + virtual int64 GetTimestamp() = 0; + virtual int64 GetDuration() = 0; + virtual void SetTimestamp(int64 timestamp) = 0; + virtual void SetDuration(int64 duration) = 0; +}; + + +class BufferInterface : public StreamSampleInterface { + public: + virtual ~BufferInterface() {} + + // Returns a read only pointer to the buffer data. + virtual const char* GetData() = 0; + + // Returns the size of valid data in bytes. + virtual size_t GetDataSize() = 0; +}; + + +class WritableBufferInterface : public BufferInterface { + public: + virtual ~WritableBufferInterface() {} + + // Returns a read-write pointer to the buffer data. + virtual char* GetWritableData() = 0; + + // Updates the size of valid data in bytes, which must be less than or equal + // to GetBufferSize. + virtual void SetDataSize(size_t data_size) = 0; + + // Returns the maximum allocated size for this buffer. + virtual size_t GetBufferSize() = 0; +}; + + +struct VideoSurface { + static const size_t kMaxPlanes = 3; + + // Surface formats roughly based on FOURCC labels, see: + // http://www.fourcc.org/rgb.php + // http://www.fourcc.org/yuv.php + enum Format { + RGB555, // 16bpp RGB packed 5:5:5 + RGB565, // 16bpp RGB packed 5:6:5 + RGB24, // 24bpp RGB packed 8:8:8 + RGB32, // 32bpp RGB packed with extra byte 8:8:8 + RGBA, // 32bpp RGBA packed 8:8:8:8 + YV12, // 12bpp YVU planar 1x1 Y, 2x2 VU samples + YV16, // 16bpp YVU planar 1x1 Y, 2x1 VU samples + }; + + // Surface format. + Format format; + + // Width and height of surface. + size_t width; + size_t height; + + // Number of planes, typically 1 for packed RGB formats and 3 for planar + // YUV formats. + size_t planes; + + // Array of strides for each plane, typically greater or equal to the width + // of the surface divided by the horizontal sampling period. + size_t strides[kMaxPlanes]; + + // Array of data pointers to each plane. + char* data[kMaxPlanes]; +}; + + +class VideoFrameInterface : public StreamSampleInterface { + public: + virtual ~VideoFrameInterface() {} + + // Locks the underlying surface and fills out the given VideoSurface and + // returns true if successful, false otherwise. + virtual bool Lock(VideoSurface* surface) = 0; + + // Unlocks the underlying surface, any previous VideoSurfaces are no longer + // guaranteed to be valid. + virtual void Unlock() = 0; +}; + + +template <class BufferType> +class AssignableInterface { + public: + virtual ~AssignableInterface() {} + + // Assigns a buffer to the owner. + virtual void SetBuffer(BufferType* buffer) = 0; + + // Notifies the owner that an assignment has been completed. + virtual void OnAssignment() = 0; +}; + + +// Template for easily creating AssignableInterface buffers. Pass in the +// pointer of the object to receive the OnAssignment callback. +template <class OwnerType, class BufferType> +class AssignableBuffer : public AssignableInterface<BufferType>, + public base::RefCountedThreadSafe<AssignableBuffer<OwnerType, BufferType> > { + public: + explicit AssignableBuffer(OwnerType* owner) + : owner_(owner), + buffer_(NULL) { + DCHECK(owner_); + } + virtual ~AssignableBuffer() {} + + // AssignableBufferInterface<BufferType> + virtual void SetBuffer(BufferType* buffer) { + buffer_ = buffer; + } + + virtual void OnAssignment() { + owner_->OnAssignment(buffer_.get()); + } + + private: + OwnerType* owner_; + scoped_refptr<BufferType> buffer_; + + DISALLOW_COPY_AND_ASSIGN(AssignableBuffer); +}; + +} // namespace media + +#endif // MEDIA_BASE_BUFFERS_H_ diff --git a/media/build/media.vcproj b/media/build/media.vcproj index 111523c..053a7cf 100644 --- a/media/build/media.vcproj +++ b/media/build/media.vcproj @@ -1,139 +1,139 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="media"
- ProjectGUID="{6AE76406-B03B-11DD-94B1-80B556D89593}"
- RootNamespace="media"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="4"
- InheritedPropertySheets="$(SolutionDir)..\build\debug.vsprops"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="4"
- InheritedPropertySheets="$(SolutionDir)..\build\release.vsprops"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="base"
- >
- <File
- RelativePath="..\base\buffers.h"
- >
- </File>
- <File
- RelativePath="..\base\media.cc"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="media" + ProjectGUID="{6AE76406-B03B-11DD-94B1-80B556D89593}" + RootNamespace="media" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + ConfigurationType="4" + InheritedPropertySheets="$(SolutionDir)..\build\debug.vsprops" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + ConfigurationType="4" + InheritedPropertySheets="$(SolutionDir)..\build\release.vsprops" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="base" + > + <File + RelativePath="..\base\buffers.h" + > + </File> + <File + RelativePath="..\base\media.cc" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/media/build/media_unittests.vcproj b/media/build/media_unittests.vcproj index d28d410..f814142 100644 --- a/media/build/media_unittests.vcproj +++ b/media/build/media_unittests.vcproj @@ -1,155 +1,155 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="media_unittests"
- ProjectGUID="{C8C6183C-B03C-11DD-B471-DFD256D89593}"
- RootNamespace="media_unittests"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="1"
- InheritedPropertySheets="$(SolutionDir)..\build\debug.vsprops;$(SolutionDir)..\testing\using_gtest.vsprops"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="UNIT_TEST"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="1"
- InheritedPropertySheets="$(SolutionDir)..\build\release.vsprops;$(SolutionDir)..\testing\using_gtest.vsprops"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="UNIT_TEST"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="support"
- >
- <File
- RelativePath="..\base\run_all_unittests.cc"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="media_unittests" + ProjectGUID="{C8C6183C-B03C-11DD-B471-DFD256D89593}" + RootNamespace="media_unittests" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + ConfigurationType="1" + InheritedPropertySheets="$(SolutionDir)..\build\debug.vsprops;$(SolutionDir)..\testing\using_gtest.vsprops" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="UNIT_TEST" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + ConfigurationType="1" + InheritedPropertySheets="$(SolutionDir)..\build\release.vsprops;$(SolutionDir)..\testing\using_gtest.vsprops" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="UNIT_TEST" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="support" + > + <File + RelativePath="..\base\run_all_unittests.cc" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> |