From 87a8c55811732fbd5d4742f6c354ddb048ceff2b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michael=20M=C3=BCller?= Date: Sat, 22 Apr 2017 10:47:45 +0000 Subject: [PATCH] include/mfidl.idl: Add IMFMediaSession interface and dependencies. Signed-off-by: Alistair Leslie-Hughes Signed-off-by: Alexandre Julliard --- include/Makefile.in | 1 + include/mfidl.idl | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 include/mfidl.idl diff --git a/include/Makefile.in b/include/Makefile.in index f9cb7b49dc4..6f5372815c3 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -88,6 +88,7 @@ IDL_SRCS = \ inspectable.idl \ mediaobj.idl \ metahost.idl \ + mfidl.idl \ mfobjects.idl \ mfreadwrite.idl \ mimeinfo.idl \ diff --git a/include/mfidl.idl b/include/mfidl.idl new file mode 100644 index 00000000000..3431260cf01 --- /dev/null +++ b/include/mfidl.idl @@ -0,0 +1,126 @@ +/* + * Copyright 2016 Michael Müller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "mfobjects.idl"; + +typedef unsigned __int64 TOPOID; +typedef LONGLONG MFTIME; + +typedef enum MF_TOPOLOGY_TYPE +{ + MF_TOPOLOGY_OUTPUT_NODE, + MF_TOPOLOGY_SOURCESTREAM_NODE, + MF_TOPOLOGY_TRANSFORM_NODE, + MF_TOPOLOGY_TEE_NODE, + MF_TOPOLOGY_MAX = 0xffffffff +} MF_TOPOLOGY_TYPE; + +typedef enum _MFCLOCK_STATE +{ + MFCLOCK_STATE_INVALID, + MFCLOCK_STATE_RUNNING, + MFCLOCK_STATE_STOPPED, + MFCLOCK_STATE_PAUSED +} MFCLOCK_STATE; + +typedef struct _MFCLOCK_PROPERTIES +{ + unsigned __int64 qwCorrelationRate; + GUID guidClockId; + DWORD dwClockFlags; + unsigned __int64 qwClockFrequency; + DWORD dwClockTolerance; + DWORD dwClockJitter; +} MFCLOCK_PROPERTIES; + +[ + object, + uuid(2eb1e945-18b8-4139-9b1a-d5d584818530), +] +interface IMFClock : IUnknown +{ + HRESULT GetClockCharacteristics([out] DWORD *characteristics); + HRESULT GetCorrelatedTime([in] DWORD reserved, [out] LONGLONG *clock_time, [out] MFTIME *system_time); + HRESULT GetContinuityKey([out] DWORD *key); + HRESULT GetState([in] DWORD reserved, [out] MFCLOCK_STATE *state); + HRESULT GetProperties([out] MFCLOCK_PROPERTIES *props); +} + +[ + object, + uuid(83cf873a-f6da-4bc8-823f-bacfd55dc430), +] +interface IMFTopologyNode : IMFAttributes +{ + HRESULT SetObject([in] IUnknown *object); + HRESULT GetObject([out] IUnknown **object); + HRESULT GetNodeType([out] MF_TOPOLOGY_TYPE *type); + HRESULT GetTopoNodeID([out] TOPOID *id); + HRESULT SetTopoNodeID([in] TOPOID id); + HRESULT GetInputCount([out] DWORD *count); + HRESULT GetOutputCount([out] DWORD *count); + [local] HRESULT ConnectOutput([in] DWORD output_index, [in] IMFTopologyNode *node, [in] DWORD input_index); + [local] HRESULT DisconnectOutput([in] DWORD index); + HRESULT GetInput([in] DWORD input_index, [out] IMFTopologyNode **node, [out] DWORD *output_index); + HRESULT GetOutput([in] DWORD output_index, [out] IMFTopologyNode **node, [out] DWORD *input_index); + [local] HRESULT SetOutputPrefType([in] DWORD index, [in] IMFMediaType *type); + [local] HRESULT GetOutputPrefType([in] DWORD output_index, [out] IMFMediaType **type); + [call_as(GetOutputPrefType)] HRESULT RemoteGetOutputPrefType([in] DWORD index, [out] DWORD *length, + [out, size_is(, *length)] BYTE **data); + [local] HRESULT SetInputPrefType([in] DWORD index, [in] IMFMediaType *type); + [local] HRESULT GetInputPrefType([in] DWORD index, [out] IMFMediaType **type); + [call_as(GetInputPrefType)] HRESULT RemoteGetInputPrefType([in] DWORD index, [out] DWORD *length, + [out, size_is(, *length)] BYTE **data); + HRESULT CloneFrom([in] IMFTopologyNode *node); +} + +[ + object, + uuid(83cf873a-f6da-4bc8-823f-bacfd55dc433), +] +interface IMFTopology : IMFAttributes +{ + HRESULT GetTopologyID([out] TOPOID *id); + [local] HRESULT AddNode([in] IMFTopologyNode *node); + [local] HRESULT RemoveNode([in] IMFTopologyNode *node); + HRESULT GetNodeCount([out] WORD *nodes); + HRESULT GetNode([in] WORD index, [out] IMFTopologyNode **node); + [local] HRESULT Clear(); + HRESULT CloneFrom([in] IMFTopology *topology); + HRESULT GetNodeByID([in] TOPOID id, [out] IMFTopologyNode **node); + HRESULT GetSourceNodeCollection([out] IMFCollection **collection); + HRESULT GetOutputNodeCollection([out] IMFCollection **collection); +} + +[ + object, + uuid(90377834-21d0-4dee-8214-ba2e3e6c1127), +] +interface IMFMediaSession : IMFMediaEventGenerator +{ + HRESULT SetTopology([in] DWORD flags, [in] IMFTopology *topology); + HRESULT ClearTopologies(); + HRESULT Start([in, unique] const GUID *format, [in, unique] const PROPVARIANT *start); + HRESULT Pause(); + HRESULT Stop(); + HRESULT Close(); + HRESULT Shutdown(); + HRESULT GetClock([out] IMFClock **clock); + HRESULT GetSessionCapabilities([out] DWORD *caps); + HRESULT GetFullTopology([in] DWORD flags, [in] TOPOID id, [out] IMFTopology **topology); +} -- 2.11.4.GIT