1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef XASTATICCAPSADAPTATION_H |
|
19 #define XASTATICCAPSADAPTATION_H |
|
20 |
|
21 #include "XAGlobals.h" |
|
22 #include "XADebug.h" |
|
23 |
|
24 /* Adaptation device IDs */ |
|
25 //#define XA_ADAPTID_ALSASRC 0xAD7E5001 //Krishna commented |
|
26 #define XA_ADAPTID_DEVSOUNDSRC 0xAD7E5001 |
|
27 //#define XA_ADAPTID_ALSASINK 0xAD7E5002 |
|
28 #define XA_ADAPTID_DEVSOUNDSINK 0xAD7E5002 |
|
29 #define XA_ADAPTID_AUTOAUDIOSINK 0xAD7E5003 |
|
30 #define XA_ADAPTID_AUDIOTESTSRC 0xAD7E5004 |
|
31 #define XA_ADAPTID_AUTOVIDEOSINK 0xAD7E5005 |
|
32 #define XA_ADAPTID_VIDEOTESTSRC 0xAD7E5006 |
|
33 #define XA_ADAPTID_V4L2SRC 0xAD7E5007 |
|
34 #define XA_ADAPTID_JACKSINK 0xAD7E5008 |
|
35 #define XA_ADAPTID_MOTIONJPEG 0xAD7E5009 |
|
36 #define XA_ADAPTID_THEORA 0xAD7E500A |
|
37 #define XA_ADAPTID_VORBIS 0xAD7E500B |
|
38 |
|
39 #define XA_ADAPTID_VIBRA 0xAD7E500C |
|
40 #define XA_ADAPTID_LEDARRAY 0xAD7E500D |
|
41 |
|
42 #define XA_ADAPTID_RAWVIDEO 0xAD7E500E |
|
43 |
|
44 //#define XA_ADAPT_DEFAULTAUDIOOUTPUT XA_ADAPTID_ALSASINK |
|
45 #define XA_ADAPT_DEFAULTAUDIOOUTPUT XA_ADAPTID_DEVSOUNDSINK |
|
46 |
|
47 #ifdef XA_USE_TEST_PLUGINS |
|
48 #define XA_ADAPT_DEFAULTAUDIOINPUT XA_ADAPTID_AUDIOTESTSRC |
|
49 #else |
|
50 //#define XA_ADAPT_DEFAULTAUDIOINPUT XA_ADAPTID_ALSASRC //Krishna commented |
|
51 #define XA_ADAPT_DEFAULTAUDIOINPUT XA_ADAPTID_DEVSOUNDSRC |
|
52 #endif |
|
53 |
|
54 |
|
55 #define XA_ADAPT_OGGPROFILE_UNKNOWN 0x1 |
|
56 |
|
57 #define XA_ADAPT_PCMSAMPLEFORMAT_SUPPORTED_8 0x1 |
|
58 #define XA_ADAPT_PCMSAMPLEFORMAT_SUPPORTED_16 0x2 |
|
59 #define XA_ADAPT_PCMSAMPLEFORMAT_SUPPORTED_20 0x4 |
|
60 #define XA_ADAPT_PCMSAMPLEFORMAT_SUPPORTED_24 0x8 |
|
61 #define XA_ADAPT_PCMSAMPLEFORMAT_SUPPORTED_28 0x10 |
|
62 #define XA_ADAPT_PCMSAMPLEFORMAT_SUPPORTED_32 0x20 |
|
63 |
|
64 #define XA_ADAPT_MAX_BITRATE_COUNT 10 |
|
65 |
|
66 typedef enum |
|
67 { |
|
68 XACAP_DECODER = 0x1, |
|
69 XACAP_ENCODER = 0x2, |
|
70 XACAP_DEVSNK = 0x4, |
|
71 XACAP_DEVSRC = 0x8, |
|
72 |
|
73 XACAP_AUDIO = 0x10, |
|
74 XACAP_VIDEO = 0x20, |
|
75 XACAP_IMAGE = 0x40 |
|
76 }XACapsType; |
|
77 |
|
78 /* Structure to hold commonly used capabilities of codec/device. |
|
79 */ |
|
80 typedef struct XAStaticCapsData_ |
|
81 { |
|
82 XAuint32 captype; |
|
83 XAuint32 xaid; /* OpenMAX id (e.g. XA_VIDEOCODEC macro) */ |
|
84 XAchar* adaptId; /* e.g. plugin name */ |
|
85 XAuint32 maxCh; /* channels */ |
|
86 XAuint32 minBPS; /* bits per sample */ |
|
87 XAuint32 maxBPS; |
|
88 XAuint32 minSR; /* samplerate */ |
|
89 XAuint32 maxSR; |
|
90 XAuint32 minBR; /* bitrate */ |
|
91 XAuint32 maxBR; |
|
92 XAuint32 maxFR; /* framerate */ |
|
93 XAuint32 maxW; /* width */ |
|
94 XAuint32 maxH; /* height */ |
|
95 XAuint32 pcmProfilesSupported; |
|
96 XAuint32 numBitrates; |
|
97 XAuint32 bitratesSupported[XA_ADAPT_MAX_BITRATE_COUNT]; |
|
98 |
|
99 XAuint32 extra; /* some type-specific extra info */ |
|
100 /*add if/when needed*/ |
|
101 } XAStaticCapsData; |
|
102 |
|
103 |
|
104 XAresult XAStaticCapsAdapt_GetCapsCount(XACapsType filter, XAuint32 *count); |
|
105 |
|
106 XAresult XAStaticCapsAdapt_GetCapsById(XACapsType filter, XAuint32 maxId, XAStaticCapsData* data); |
|
107 |
|
108 XAresult XAStaticCapsAdapt_GetCapsByIdx(XACapsType filter, XAuint32 idx, XAStaticCapsData* data); |
|
109 XAresult XAStaticCapsAdapt_InitCaps(); |
|
110 XAresult XAStaticCapsAdapt_QueryColorFormats(XAuint32* pIndex, XAuint32* pColorFormats); |
|
111 #endif /* XASTATICCAPSADAPTATION_H */ |
|