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
d4e91228
Commit
d4e91228
authored
Feb 20, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qasf/dmowrapper: Implement seeking via pass-through.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f4ae2e3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
dmowrapper.c
dlls/qasf/dmowrapper.c
+26
-0
dmowrapper.c
dlls/qasf/tests/dmowrapper.c
+2
-2
No files found.
dlls/qasf/dmowrapper.c
View file @
d4e91228
...
...
@@ -32,6 +32,7 @@ struct dmo_wrapper_source
{
struct
strmbase_source
pin
;
struct
buffer
buffer
;
IUnknown
*
seeking
;
};
struct
dmo_wrapper
...
...
@@ -400,6 +401,16 @@ static inline struct dmo_wrapper_source *impl_source_from_strmbase_pin(struct st
return
CONTAINING_RECORD
(
iface
,
struct
dmo_wrapper_source
,
pin
.
pin
);
}
static
HRESULT
dmo_wrapper_source_query_interface
(
struct
strmbase_pin
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
dmo_wrapper_source
*
pin
=
impl_source_from_strmbase_pin
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IMediaSeeking
)
||
IsEqualGUID
(
iid
,
&
IID_IMediaPosition
))
return
IUnknown_QueryInterface
(
pin
->
seeking
,
iid
,
out
);
return
E_NOINTERFACE
;
}
static
HRESULT
dmo_wrapper_source_query_accept
(
struct
strmbase_pin
*
iface
,
const
AM_MEDIA_TYPE
*
mt
)
{
struct
dmo_wrapper
*
filter
=
impl_from_strmbase_filter
(
iface
->
filter
);
...
...
@@ -476,6 +487,7 @@ static void dmo_wrapper_source_disconnect(struct strmbase_source *iface)
static
const
struct
strmbase_source_ops
source_ops
=
{
.
base
.
pin_query_interface
=
dmo_wrapper_source_query_interface
,
.
base
.
pin_query_accept
=
dmo_wrapper_source_query_accept
,
.
base
.
pin_get_media_type
=
dmo_wrapper_source_get_media_type
,
.
pfnAttemptConnection
=
BaseOutputPinImpl_AttemptConnection
,
...
...
@@ -556,9 +568,20 @@ static HRESULT WINAPI dmo_wrapper_filter_Init(IDMOWrapperFilter *iface, REFCLSID
for
(
i
=
0
;
i
<
output_count
;
++
i
)
{
ISeekingPassThru
*
passthrough
;
swprintf
(
id
,
ARRAY_SIZE
(
id
),
L"out%u"
,
i
);
strmbase_source_init
(
&
sources
[
i
].
pin
,
&
filter
->
filter
,
id
,
&
source_ops
);
sources
[
i
].
buffer
.
IMediaBuffer_iface
.
lpVtbl
=
&
buffer_vtbl
;
if
(
FAILED
(
hr
=
CoCreateInstance
(
&
CLSID_SeekingPassThru
,
(
IUnknown
*
)
&
sources
[
i
].
pin
.
pin
.
IPin_iface
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
sources
[
i
].
seeking
)))
ERR
(
"Failed to create SeekingPassThru object, hr %#x.
\n
"
,
hr
);
IUnknown_QueryInterface
(
sources
[
i
].
seeking
,
&
IID_ISeekingPassThru
,
(
void
**
)
&
passthrough
);
ISeekingPassThru_Init
(
passthrough
,
FALSE
,
&
sinks
[
0
].
pin
.
IPin_iface
);
ISeekingPassThru_Release
(
passthrough
);
}
EnterCriticalSection
(
&
filter
->
filter
.
csFilter
);
...
...
@@ -606,7 +629,10 @@ static void dmo_wrapper_destroy(struct strmbase_filter *iface)
for
(
i
=
0
;
i
<
filter
->
sink_count
;
++
i
)
strmbase_sink_cleanup
(
&
filter
->
sinks
[
i
]);
for
(
i
=
0
;
i
<
filter
->
source_count
;
++
i
)
{
IUnknown_Release
(
filter
->
sources
[
i
].
seeking
);
strmbase_source_cleanup
(
&
filter
->
sources
[
i
].
pin
);
}
free
(
filter
->
sinks
);
free
(
filter
->
sources
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
...
...
dlls/qasf/tests/dmowrapper.c
View file @
d4e91228
...
...
@@ -574,8 +574,8 @@ static void test_interfaces(void)
IBaseFilter_FindPin
(
filter
,
L"out0"
,
&
pin
);
todo_wine
check_interface
(
pin
,
&
IID_IMediaPosition
,
TRUE
);
todo_wine
check_interface
(
pin
,
&
IID_IMediaSeeking
,
TRUE
);
check_interface
(
pin
,
&
IID_IMediaPosition
,
TRUE
);
check_interface
(
pin
,
&
IID_IMediaSeeking
,
TRUE
);
check_interface
(
pin
,
&
IID_IPin
,
TRUE
);
todo_wine
check_interface
(
pin
,
&
IID_IQualityControl
,
TRUE
);
check_interface
(
pin
,
&
IID_IUnknown
,
TRUE
);
...
...
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