Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
bc9c1061
Commit
bc9c1061
authored
Aug 09, 2023
by
Ziqing Hui
Committed by
Alexandre Julliard
Aug 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Add IMFMediaTypeHandler stubs to stream sink.
parent
f8ecc081
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
95 additions
and
0 deletions
+95
-0
media_sink.c
dlls/winegstreamer/media_sink.c
+95
-0
No files found.
dlls/winegstreamer/media_sink.c
View file @
bc9c1061
...
...
@@ -29,6 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
struct
stream_sink
{
IMFStreamSink
IMFStreamSink_iface
;
IMFMediaTypeHandler
IMFMediaTypeHandler_iface
;
LONG
refcount
;
DWORD
id
;
...
...
@@ -56,6 +57,11 @@ static struct stream_sink *impl_from_IMFStreamSink(IMFStreamSink *iface)
return
CONTAINING_RECORD
(
iface
,
struct
stream_sink
,
IMFStreamSink_iface
);
}
static
struct
stream_sink
*
impl_from_IMFMediaTypeHandler
(
IMFMediaTypeHandler
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
stream_sink
,
IMFMediaTypeHandler_iface
);
}
static
struct
media_sink
*
impl_from_IMFFinalizableMediaSink
(
IMFFinalizableMediaSink
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
media_sink
,
IMFFinalizableMediaSink_iface
);
...
...
@@ -73,6 +79,10 @@ static HRESULT WINAPI stream_sink_QueryInterface(IMFStreamSink *iface, REFIID ri
{
*
obj
=
&
stream_sink
->
IMFStreamSink_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IMFMediaTypeHandler
))
{
*
obj
=
&
stream_sink
->
IMFMediaTypeHandler_iface
;
}
else
{
WARN
(
"Unsupported interface %s.
\n
"
,
debugstr_guid
(
riid
));
...
...
@@ -221,6 +231,90 @@ static const IMFStreamSinkVtbl stream_sink_vtbl =
stream_sink_Flush
,
};
static
HRESULT
WINAPI
stream_sink_type_handler_QueryInterface
(
IMFMediaTypeHandler
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
stream_sink
*
stream_sink
=
impl_from_IMFMediaTypeHandler
(
iface
);
return
IMFStreamSink_QueryInterface
(
&
stream_sink
->
IMFStreamSink_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
stream_sink_type_handler_AddRef
(
IMFMediaTypeHandler
*
iface
)
{
struct
stream_sink
*
stream_sink
=
impl_from_IMFMediaTypeHandler
(
iface
);
return
IMFStreamSink_AddRef
(
&
stream_sink
->
IMFStreamSink_iface
);
}
static
ULONG
WINAPI
stream_sink_type_handler_Release
(
IMFMediaTypeHandler
*
iface
)
{
struct
stream_sink
*
stream_sink
=
impl_from_IMFMediaTypeHandler
(
iface
);
return
IMFStreamSink_Release
(
&
stream_sink
->
IMFStreamSink_iface
);
}
static
HRESULT
WINAPI
stream_sink_type_handler_IsMediaTypeSupported
(
IMFMediaTypeHandler
*
iface
,
IMFMediaType
*
in_type
,
IMFMediaType
**
out_type
)
{
FIXME
(
"iface %p, in_type %p, out_type %p.
\n
"
,
iface
,
in_type
,
out_type
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
stream_sink_type_handler_GetMediaTypeCount
(
IMFMediaTypeHandler
*
iface
,
DWORD
*
count
)
{
FIXME
(
"iface %p, count %p.
\n
"
,
iface
,
count
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
stream_sink_type_handler_GetMediaTypeByIndex
(
IMFMediaTypeHandler
*
iface
,
DWORD
index
,
IMFMediaType
**
type
)
{
FIXME
(
"iface %p, index %lu, type %p.
\n
"
,
iface
,
index
,
type
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
stream_sink_type_handler_SetCurrentMediaType
(
IMFMediaTypeHandler
*
iface
,
IMFMediaType
*
type
)
{
FIXME
(
"iface %p, type %p.
\n
"
,
iface
,
type
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
stream_sink_type_handler_GetCurrentMediaType
(
IMFMediaTypeHandler
*
iface
,
IMFMediaType
**
type
)
{
struct
stream_sink
*
stream_sink
=
impl_from_IMFMediaTypeHandler
(
iface
);
TRACE
(
"iface %p, type %p.
\n
"
,
iface
,
type
);
if
(
!
type
)
return
E_POINTER
;
if
(
!
stream_sink
->
type
)
return
MF_E_NOT_INITIALIZED
;
IMFMediaType_AddRef
((
*
type
=
stream_sink
->
type
));
return
S_OK
;
}
static
HRESULT
WINAPI
stream_sink_type_handler_GetMajorType
(
IMFMediaTypeHandler
*
iface
,
GUID
*
type
)
{
FIXME
(
"iface %p, type %p.
\n
"
,
iface
,
type
);
return
E_NOTIMPL
;
}
static
const
IMFMediaTypeHandlerVtbl
stream_sink_type_handler_vtbl
=
{
stream_sink_type_handler_QueryInterface
,
stream_sink_type_handler_AddRef
,
stream_sink_type_handler_Release
,
stream_sink_type_handler_IsMediaTypeSupported
,
stream_sink_type_handler_GetMediaTypeCount
,
stream_sink_type_handler_GetMediaTypeByIndex
,
stream_sink_type_handler_SetCurrentMediaType
,
stream_sink_type_handler_GetCurrentMediaType
,
stream_sink_type_handler_GetMajorType
,
};
static
HRESULT
stream_sink_create
(
DWORD
stream_sink_id
,
IMFMediaType
*
media_type
,
struct
media_sink
*
media_sink
,
struct
stream_sink
**
out
)
{
...
...
@@ -240,6 +334,7 @@ static HRESULT stream_sink_create(DWORD stream_sink_id, IMFMediaType *media_type
}
stream_sink
->
IMFStreamSink_iface
.
lpVtbl
=
&
stream_sink_vtbl
;
stream_sink
->
IMFMediaTypeHandler_iface
.
lpVtbl
=
&
stream_sink_type_handler_vtbl
;
stream_sink
->
refcount
=
1
;
stream_sink
->
id
=
stream_sink_id
;
if
(
media_type
)
...
...
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