Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
58adb553
Commit
58adb553
authored
Jun 05, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Added IMFMediaSession stub.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
99db4c69
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
267 additions
and
1 deletion
+267
-1
Makefile.in
dlls/mf/Makefile.in
+1
-0
mf.spec
dlls/mf/mf.spec
+1
-1
session.c
dlls/mf/session.c
+264
-0
mfidl.idl
include/mfidl.idl
+1
-0
No files found.
dlls/mf/Makefile.in
View file @
58adb553
...
...
@@ -3,4 +3,5 @@ IMPORTLIB = mf
C_SRCS
=
\
main.c
\
session.c
\
topology.c
dlls/mf/mf.spec
View file @
58adb553
...
...
@@ -39,7 +39,7 @@
@ stub MFCreateMP3MediaSink
@ stub MFCreateMPEG4MediaSink
@ stub MFCreateMediaProcessor
@ st
ub MFCreateMediaSession
@ st
dcall MFCreateMediaSession(ptr ptr)
@ stub MFCreateNSCByteStreamPlugin
@ stub MFCreateNetSchemePlugin
@ stub MFCreatePMPHost
...
...
dlls/mf/session.c
0 → 100644
View file @
58adb553
/*
* Copyright 2017 Nikolay Sivov
*
* 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
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "mfidl.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mfplat
);
typedef
struct
mfsession
{
IMFMediaSession
IMFMediaSession_iface
;
LONG
ref
;
}
mfsession
;
static
inline
mfsession
*
impl_from_IMFMediaSession
(
IMFMediaSession
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
mfsession
,
IMFMediaSession_iface
);
}
static
HRESULT
WINAPI
mfsession_QueryInterface
(
IMFMediaSession
*
iface
,
REFIID
riid
,
void
**
out
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
out
);
if
(
IsEqualIID
(
riid
,
&
IID_IMFMediaSession
)
||
IsEqualIID
(
riid
,
&
IID_IMFMediaEventGenerator
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
out
=
&
This
->
IMFMediaSession_iface
;
}
else
{
FIXME
(
"(%s, %p)
\n
"
,
debugstr_guid
(
riid
),
out
);
*
out
=
NULL
;
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
out
);
return
S_OK
;
}
static
ULONG
WINAPI
mfsession_AddRef
(
IMFMediaSession
*
iface
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%u
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
mfsession_Release
(
IMFMediaSession
*
iface
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%u
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
mfsession_GetEvent
(
IMFMediaSession
*
iface
,
DWORD
flags
,
IMFMediaEvent
**
event
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
FIXME
(
"(%p)->(%#x, %p)
\n
"
,
This
,
flags
,
event
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsession_BeginGetEvent
(
IMFMediaSession
*
iface
,
IMFAsyncCallback
*
callback
,
IUnknown
*
state
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
FIXME
(
"(%p)->(%p, %p)
\n
"
,
This
,
callback
,
state
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsession_EndGetEvent
(
IMFMediaSession
*
iface
,
IMFAsyncResult
*
result
,
IMFMediaEvent
**
event
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
FIXME
(
"(%p)->(%p, %p)
\n
"
,
This
,
result
,
event
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsession_QueueEvent
(
IMFMediaSession
*
iface
,
MediaEventType
event_type
,
REFGUID
ext_type
,
HRESULT
hr
,
const
PROPVARIANT
*
value
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
FIXME
(
"(%p)->(%d, %s, %#x, %p)
\n
"
,
This
,
event_type
,
debugstr_guid
(
ext_type
),
hr
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsession_SetTopology
(
IMFMediaSession
*
iface
,
DWORD
flags
,
IMFTopology
*
topology
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
FIXME
(
"(%p)->(%#x, %p)
\n
"
,
This
,
flags
,
topology
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsession_ClearTopologies
(
IMFMediaSession
*
iface
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsession_Start
(
IMFMediaSession
*
iface
,
const
GUID
*
format
,
const
PROPVARIANT
*
start
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
FIXME
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
format
),
start
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsession_Pause
(
IMFMediaSession
*
iface
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsession_Stop
(
IMFMediaSession
*
iface
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsession_Close
(
IMFMediaSession
*
iface
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsession_Shutdown
(
IMFMediaSession
*
iface
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsession_GetClock
(
IMFMediaSession
*
iface
,
IMFClock
**
clock
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
clock
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsession_GetSessionCapabilities
(
IMFMediaSession
*
iface
,
DWORD
*
caps
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
caps
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsession_GetFullTopology
(
IMFMediaSession
*
iface
,
DWORD
flags
,
TOPOID
id
,
IMFTopology
**
topology
)
{
mfsession
*
This
=
impl_from_IMFMediaSession
(
iface
);
FIXME
(
"(%p)->(%#x, %s, %p)
\n
"
,
This
,
flags
,
wine_dbgstr_longlong
(
id
),
topology
);
return
E_NOTIMPL
;
}
static
const
IMFMediaSessionVtbl
mfmediasessionvtbl
=
{
mfsession_QueryInterface
,
mfsession_AddRef
,
mfsession_Release
,
mfsession_GetEvent
,
mfsession_BeginGetEvent
,
mfsession_EndGetEvent
,
mfsession_QueueEvent
,
mfsession_SetTopology
,
mfsession_ClearTopologies
,
mfsession_Start
,
mfsession_Pause
,
mfsession_Stop
,
mfsession_Close
,
mfsession_Shutdown
,
mfsession_GetClock
,
mfsession_GetSessionCapabilities
,
mfsession_GetFullTopology
,
};
/***********************************************************************
* MFCreateTopology (mf.@)
*/
HRESULT
WINAPI
MFCreateMediaSession
(
IMFAttributes
*
config
,
IMFMediaSession
**
session
)
{
mfsession
*
object
;
TRACE
(
"(%p, %p)
\n
"
,
config
,
session
);
if
(
!
session
)
return
E_POINTER
;
if
(
config
)
FIXME
(
"session configuration ignored
\n
"
);
object
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
object
));
if
(
!
object
)
return
E_OUTOFMEMORY
;
object
->
IMFMediaSession_iface
.
lpVtbl
=
&
mfmediasessionvtbl
;
object
->
ref
=
1
;
*
session
=
&
object
->
IMFMediaSession_iface
;
return
S_OK
;
}
include/mfidl.idl
View file @
58adb553
...
...
@@ -163,5 +163,6 @@ interface IMFSourceResolver : IUnknown
[
local
]
HRESULT
CanceObjectCreation
(
[
in
]
IUnknown
*
cancel_cookie
)
;
}
cpp_quote
(
"HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **session);"
)
cpp_quote
(
"HRESULT WINAPI MFCreateSourceResolver(IMFSourceResolver **resolver);"
)
cpp_quote
(
"HRESULT WINAPI MFCreateTopology(IMFTopology **topology);"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment