1 /*
2  * portvideo.h, port class for video
3  *
4  * Copyright (c) 2009-2010 Wind River Systems, Inc.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #ifndef __PORTVIDEO_H
20 #define __PORTVIDEO_H
21 
22 #include <OMX_Core.h>
23 #include <OMX_Component.h>
24 #include <OMX_IntelVideoExt.h>
25 #include <portbase.h>
26 
27 class PortVideo : public PortBase
28 {
29 public:
30     PortVideo();
31     //~PortVideo();
32 
33     OMX_ERRORTYPE SetPortVideoParam(
34         const OMX_VIDEO_PARAM_PORTFORMATTYPE *videoparam, bool internal);
35     const OMX_VIDEO_PARAM_PORTFORMATTYPE *GetPortVideoParam(void);
36 
37     OMX_ERRORTYPE SetPortBitrateParam(
38         const OMX_VIDEO_PARAM_BITRATETYPE *bitrateparam, bool internal);
39     const OMX_VIDEO_PARAM_BITRATETYPE *GetPortBitrateParam(void);
40 
41     OMX_ERRORTYPE SetPortPrivateInfoParam(
42          const struct OMX_VIDEO_CONFIG_PRI_INFOTYPE *privateinfoparam, bool internal);
43     const struct OMX_VIDEO_CONFIG_PRI_INFOTYPE *GetPortPrivateInfoParam(void);
44 
45     OMX_ERRORTYPE SetPortBufferSharingInfo(OMX_BOOL isbufsharing);
46     const OMX_BOOL *GetPortBufferSharingInfo(void);
47 
48 
49 private:
50     OMX_VIDEO_PARAM_PORTFORMATTYPE videoparam;
51 
52     OMX_VIDEO_PARAM_BITRATETYPE bitrateparam;
53 
54     struct OMX_VIDEO_CONFIG_PRI_INFOTYPE  privateinfoparam;
55 
56     OMX_BOOL mbufsharing;
57 };
58 /* end of PortVideo */
59 #if 0
60 class PortAvc : public PortVideo
61 {
62 public:
63     PortAvc();
64 
65     OMX_ERRORTYPE SetPortAvcParam(const OMX_VIDEO_PARAM_AVCTYPE *p,
66                                   bool overwrite_readonly);
67     const OMX_VIDEO_PARAM_AVCTYPE *GetPortAvcParam(void);
68 
69 private:
70     OMX_VIDEO_PARAM_AVCTYPE avcparam;
71 };
72 
73 /* end of PortAvc */
74 #endif
75 #endif /* __PORTVIDEO_H */
76