medparam.idl 3.3 KB

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