1 /* This file is part of the KDE project 2 Copyright (C) 2007 Shane King 3 4 This program is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Library General Public 6 License as published by the Free Software Foundation; either 7 version 2 of the License, or (at your option) any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Library General Public License for more details. 13 14 You should have received a copy of the GNU Library General Public License 15 along with this program; see the file COPYING. If not, write to 16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 Boston, MA 02110-1301, USA. 18 */ 19 20 import "unknwn.idl"; 21 import "strmif.idl"; 22 23 typedef DWORD MP_TIMEDATA; 24 typedef DWORD MP_CAPS; 25 typedef DWORD MP_FLAGS; 26 typedef float MP_DATA; 27 28 typedef enum _MP_Type { 29 MPT_INT, 30 MPT_FLOAT, 31 MPT_BOOL, 32 MPT_ENUM, 33 MPT_MAX, 34 } MP_TYPE; 35 36 typedef enum _MP_CURVE_TYPE { 37 MP_CURVE_JUMP = 0x0001, 38 MP_CURVE_LINEAR = 0x0002, 39 MP_CURVE_SQUARE = 0x0004, 40 MP_CURVE_INVSQUARE = 0x0008, 41 MP_CURVE_SINE = 0x0010, 42 } MP_CURVE_TYPE; 43 44 typedef struct _MP_PARAMINFO { 45 MP_TYPE mpType; 46 MP_CAPS mopCaps; 47 MP_DATA mpdMinValue; 48 MP_DATA mpdMaxValue; 49 MP_DATA mpdNeutralValue; 50 WCHAR szUnitText[32]; 51 WCHAR szLabel[32]; 52 } MP_PARAMINFO; 53 54 typedef struct _MP_ENVELOPE_SEGMENT { 55 REFERENCE_TIME rtStart; 56 REFERENCE_TIME rtEnd; 57 MP_DATA valStart; 58 MP_DATA valEnd; 59 MP_CURVE_TYPE iCurve; 60 MP_FLAGS flags; 61 } MP_ENVELOPE_SEGMENT; 62 63 const MP_CAPS MP_CAPS_CURVE_JUMP = MP_CURVE_JUMP; 64 const MP_CAPS MP_CAPS_CURVE_LINEAR = MP_CURVE_LINEAR; 65 const MP_CAPS MP_CAPS_CURVE_SQUARE = MP_CURVE_SQUARE; 66 const MP_CAPS MP_CAPS_CURVE_INVSQUARE = MP_CURVE_INVSQUARE; 67 const MP_CAPS MP_CAPS_CURVE_SINE = MP_CURVE_SINE; 68 69 [ 70 object, 71 uuid(6d6cbb61-a223-44aa-842f-a2f06750be6e) 72 ] 73 interface IMediaParams : IUnknown 74 { 75 HRESULT AddEnvelope( 76 DWORD dwParamIndex, 77 DWORD cPoints, 78 MP_ENVELOPE_SEGMENT *pEnvelope 79 ); 80 81 HRESULT FlushEnvelope( 82 DWORD dwParamIndex, 83 REFERENCE_TIME refTimeStart, 84 REFERENCE_TIME refTimeEnd 85 ); 86 87 HRESULT GetParam( 88 DWORD dwParamIndex, 89 MP_DATA *pValue 90 ); 91 92 HRESULT SetParam( 93 DWORD dwParamIndex, 94 MP_DATA value 95 ); 96 97 HRESULT SetTimeFormat( 98 GUID guidTimeFormat, 99 MP_TIMEDATA mpTimeData 100 ); 101 } 102 103 [ 104 object, 105 uuid(6d6cbb60-a223-44aa-842f-a2f06750be6d) 106 ] 107 interface IMediaParamInfo : IUnknown 108 { 109 HRESULT GetParamCount( 110 DWORD *pdwParams 111 ); 112 113 HRESULT GetParamInfo( 114 DWORD dwParamIndex, 115 MP_PARAMINFO *pInfo 116 ); 117 118 HRESULT GetParamText( 119 DWORD dwParamIndex, 120 WCHAR **ppwchText 121 ); 122 123 HRESULT GetNumTimeFormats( 124 DWORD *pdwNumTimeFormats 125 ); 126 127 HRESULT GetSupportedTimeFormat( 128 DWORD dwFormatIndex, 129 GUID *pguidTimeFormat 130 ); 131 132 HRESULT GetCurrentTimeFormat( 133 GUID *pguidTimeFormat, 134 MP_TIMEDATA *pTimeData 135 ); 136 } 137