Line data Source code
1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* Copyright (c) 2011, The WebRTC project authors. All rights reserved.
3 : * Copyright (c) 2014, Mozilla
4 : *
5 : * Redistribution and use in source and binary forms, with or without
6 : * modification, are permitted provided that the following conditions are
7 : * met:
8 : *
9 : ** Redistributions of source code must retain the above copyright
10 : * notice, this list of conditions and the following disclaimer.
11 : *
12 : ** Redistributions in binary form must reproduce the above copyright
13 : * notice, this list of conditions and the following disclaimer in
14 : * the documentation and/or other materials provided with the
15 : * distribution.
16 : *
17 : ** Neither the name of Google nor the names of its contributors may
18 : * be used to endorse or promote products derived from this software
19 : * without specific prior written permission.
20 : *
21 : * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 : * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 : * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 : * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 : * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 : * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 : * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 : * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 : * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 : * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 : * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 : */
33 :
34 : #ifndef GMP_VIDEO_HOST_h_
35 : #define GMP_VIDEO_HOST_h_
36 :
37 : #include "gmp-errors.h"
38 : #include "gmp-video-frame-i420.h"
39 : #include "gmp-video-frame-encoded.h"
40 : #include "gmp-video-codec.h"
41 :
42 : // This interface must be called on the main thread only.
43 0 : class GMPVideoHost
44 : {
45 : public:
46 : // Construct various video API objects. Host does not retain reference,
47 : // caller is owner and responsible for deleting.
48 : // MAIN THREAD ONLY
49 : virtual GMPErr CreateFrame(GMPVideoFrameFormat aFormat, GMPVideoFrame** aFrame) = 0;
50 : virtual GMPErr CreatePlane(GMPPlane** aPlane) = 0;
51 : };
52 :
53 : #endif // GMP_VIDEO_HOST_h_
|