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

Side by Side Diff: third_party/WebKit/WebCore/platform/graphics/chromium/VideoFrameChromium.h

Issue 3058055: Implemented way to share video frames between WebKit and Chromium (Closed)
Patch Set: Adding WebKit side for easy reading (will delete in final patch) Created 10 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/WebCore/platform/graphics/chromium/VideoFrameProvider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
13 * distribution.
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef VideoFrameChromium_h
32 #define VideoFrameChromium_h
33
34 namespace WebCore {
35
36 class VideoFrameChromium {
37
38 public:
39 // These consts/enums must be kept in sync with media::VideoFormat and
40 // WebKit::WebVideoFrame.
41 static const size_t kMaxPlanes = 3;
42
43 static const size_t kNumRGBPlanes = 1;
44 static const size_t kRGBPlane = 0;
45
46 static const size_t kNumYUVPlanes = 3;
47 static const size_t kYPlane = 0;
48 static const size_t kUPlane = 1;
49 static const size_t kVPlane = 2;
50
51 enum Format {
52 INVALID,
53 RGB555,
54 RGB565,
55 RGB24,
56 RGB32,
57 RGBA,
58 YV12,
59 YV16,
60 NV12,
61 EMPTY,
62 ASCII,
63 };
64
65 enum SurfaceType {
66 TYPE_SYSTEM_MEMORY,
67 TYPE_OMXBUFFERHEAD,
68 TYPE_EGL_IMAGE,
69 TYPE_MFBUFFER,
70 TYPE_DIRECT3DSURFACE
71 };
72
73 public:
74 virtual SurfaceType type() const = 0;
75 virtual Format format() const = 0;
76 virtual size_t width() const = 0;
77 virtual size_t height() const = 0;
78 virtual size_t planes() const = 0;
79 virtual int stride(size_t plane) const = 0;
80 virtual void* data(size_t plane) const = 0;
81 };
82
83 } // namespace WebCore
84
85 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/WebCore/platform/graphics/chromium/VideoFrameProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698