portbase.h revision cf05610bceb8d988f80ec9696104a8afceb1edfd
1/*
2 * Copyright (C) 2009 Wind River Systems.
3 */
4
5#ifndef __PORTBASE_H
6#define __PORTBASE_H
7
8#include <OMX_Core.h>
9#include <OMX_Component.h>
10
11class PortBase
12{
13public:
14    /*
15     * constructor & destructor
16     */
17    PortBase();
18    PortBase(const OMX_PARAM_PORTDEFINITIONTYPE *param);
19    virtual ~PortBase();
20
21    /* end of constructor & destructor */
22
23    /*
24     * component methods & helpers
25     */
26    /* Get/SetParameter */
27    void SetPortParam(
28        const OMX_PARAM_PORTDEFINITIONTYPE *pComponentParameterStructure);
29    OMX_PARAM_PORTDEFINITIONTYPE *GetPortParam(void);
30    /* audio parameter */
31    void SetAudioPortParam(
32        const OMX_AUDIO_PARAM_PORTFORMATTYPE *pComponentParameterStructure);
33    OMX_AUDIO_PARAM_PORTFORMATTYPE *GetAudioPortParam(void);
34
35    /* end of component methods & helpers */
36
37private:
38    /* common routines for constructor */
39    void __PortBase(void);
40
41    /* parameter */
42    OMX_PARAM_PORTDEFINITIONTYPE portparam;
43    OMX_AUDIO_PARAM_PORTFORMATTYPE audioparam;
44};
45
46#endif /* __PORTBASE_H */
47