1 /* |
|
2 * Copyright (c) 2010 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: QT Bindings for TMS |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef QTMS_FORMAT_H |
|
19 #define QTMS_FORMAT_H |
|
20 |
|
21 #include <qtms.h> |
|
22 #include "qtmswrapperexport.h" |
|
23 |
|
24 namespace TMS |
|
25 { |
|
26 class TMSFormat; |
|
27 } |
|
28 |
|
29 namespace QTMS |
|
30 { |
|
31 |
|
32 /** |
|
33 * QTMSFormat class |
|
34 * |
|
35 * This is base class for codec format classes. Provides access methods to |
|
36 * configure and query common codec format settings. |
|
37 * |
|
38 * This format class can be used for both the encoder and decoder. |
|
39 * |
|
40 * Usage: |
|
41 * <code> |
|
42 * QTMSFactory* iFactory; |
|
43 * QTMSFormat* iFormat |
|
44 * gint err; |
|
45 * err = QTMSFactory::CreateFactory(iFactory); |
|
46 * err = iFactory->Create(QTMS_FORMAT_XXX,iFormat); |
|
47 * ... |
|
48 * </code> |
|
49 * |
|
50 * @lib QTMSapi.lib |
|
51 * |
|
52 */ |
|
53 class QTMS_WRAPPER_DLL_EXPORT QTMSFormat |
|
54 { |
|
55 public: |
|
56 /** |
|
57 * Destructor |
|
58 */ |
|
59 virtual ~QTMSFormat(); |
|
60 |
|
61 /** |
|
62 * Get supported bitrates. Returns list of supported bitrates for the |
|
63 * selected encoder |
|
64 * |
|
65 * This method is allowable at all times, while actively encoding or not. |
|
66 * |
|
67 * @param bitrates |
|
68 * The typedef std::vector<guint> BitRateVector; list of codecs. |
|
69 * |
|
70 * @return |
|
71 * QTMS_RESULT_SUCCESS if the operation was successful. |
|
72 * QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented |
|
73 * by the adaptation. |
|
74 * |
|
75 */ |
|
76 gint GetSupportedBitRates(BitRateVector& bitrates); |
|
77 |
|
78 /** |
|
79 * Set bitrate. |
|
80 * |
|
81 * This method is allowable at all times, while actively encoding or not. |
|
82 * |
|
83 * @param bitrate |
|
84 * Bitrate to be set for the encoder. |
|
85 * |
|
86 * @return |
|
87 * QTMS_RESULT_SUCCESS if the operation was successful. |
|
88 * QTMS_RESULT_INVALID_ARGUMENT if requested bitrate is invalid. |
|
89 * QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented |
|
90 * by the adaptation. |
|
91 * |
|
92 */ |
|
93 gint SetBitRate(const guint bitrate); |
|
94 |
|
95 /** |
|
96 * Get current encoder's bitrate. |
|
97 * |
|
98 * This method is allowable at all times, while actively encoding or not. |
|
99 * |
|
100 * @param bitrate |
|
101 * Current bitrate. |
|
102 * |
|
103 * @return |
|
104 * QTMS_RESULT_SUCCESS if the operation was successful. |
|
105 * QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented |
|
106 * by the adaptation. |
|
107 * |
|
108 */ |
|
109 gint GetBitRate(guint& bitrate); |
|
110 |
|
111 /** |
|
112 * Return format type. |
|
113 * |
|
114 * @param fmttype |
|
115 * Type of the format object. |
|
116 * |
|
117 * @return |
|
118 * QTMS_RESULT_SUCCESS if the operation was successful. |
|
119 * |
|
120 */ |
|
121 virtual gint GetType(QTMSFormatType& fmttype); |
|
122 |
|
123 protected: |
|
124 /** |
|
125 * Constructor |
|
126 */ |
|
127 QTMSFormat(); |
|
128 |
|
129 protected: |
|
130 TMS::TMSFormat* iFormat; |
|
131 }; |
|
132 |
|
133 } //namespace QTMS |
|
134 |
|
135 #endif //QTMS_FORMAT_H |
|