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
9829385c
Commit
9829385c
authored
Mar 28, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qedit/samplegrabber: Use the strmbase_passthrough object directly.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f55b78df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
samplegrabber.c
dlls/qedit/samplegrabber.c
+12
-16
No files found.
dlls/qedit/samplegrabber.c
View file @
9829385c
...
@@ -39,8 +39,7 @@ typedef struct _SG_Impl {
...
@@ -39,8 +39,7 @@ typedef struct _SG_Impl {
ISampleGrabber
ISampleGrabber_iface
;
ISampleGrabber
ISampleGrabber_iface
;
struct
strmbase_source
source
;
struct
strmbase_source
source
;
/* IMediaSeeking and IMediaPosition are implemented by ISeekingPassThru */
struct
strmbase_passthrough
passthrough
;
IUnknown
*
seekthru_unk
;
struct
strmbase_sink
sink
;
struct
strmbase_sink
sink
;
AM_MEDIA_TYPE
filter_mt
;
AM_MEDIA_TYPE
filter_mt
;
...
@@ -86,8 +85,6 @@ static void SampleGrabber_cleanup(SG_Impl *This)
...
@@ -86,8 +85,6 @@ static void SampleGrabber_cleanup(SG_Impl *This)
ISampleGrabberCB_Release
(
This
->
grabberIface
);
ISampleGrabberCB_Release
(
This
->
grabberIface
);
FreeMediaType
(
&
This
->
filter_mt
);
FreeMediaType
(
&
This
->
filter_mt
);
CoTaskMemFree
(
This
->
bufferData
);
CoTaskMemFree
(
This
->
bufferData
);
if
(
This
->
seekthru_unk
)
IUnknown_Release
(
This
->
seekthru_unk
);
}
}
static
struct
strmbase_pin
*
sample_grabber_get_pin
(
struct
strmbase_filter
*
iface
,
unsigned
int
index
)
static
struct
strmbase_pin
*
sample_grabber_get_pin
(
struct
strmbase_filter
*
iface
,
unsigned
int
index
)
...
@@ -108,6 +105,7 @@ static void sample_grabber_destroy(struct strmbase_filter *iface)
...
@@ -108,6 +105,7 @@ static void sample_grabber_destroy(struct strmbase_filter *iface)
SampleGrabber_cleanup
(
filter
);
SampleGrabber_cleanup
(
filter
);
strmbase_sink_cleanup
(
&
filter
->
sink
);
strmbase_sink_cleanup
(
&
filter
->
sink
);
strmbase_source_cleanup
(
&
filter
->
source
);
strmbase_source_cleanup
(
&
filter
->
source
);
strmbase_passthrough_cleanup
(
&
filter
->
passthrough
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
CoTaskMemFree
(
filter
);
CoTaskMemFree
(
filter
);
}
}
...
@@ -550,10 +548,15 @@ static HRESULT sample_grabber_source_query_interface(struct strmbase_pin *iface,
...
@@ -550,10 +548,15 @@ static HRESULT sample_grabber_source_query_interface(struct strmbase_pin *iface,
{
{
SG_Impl
*
filter
=
impl_from_source_pin
(
iface
);
SG_Impl
*
filter
=
impl_from_source_pin
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IMediaPosition
)
||
IsEqualGUID
(
iid
,
&
IID_IMediaSeeking
))
if
(
IsEqualGUID
(
iid
,
&
IID_IMediaPosition
))
return
IUnknown_QueryInterface
(
filter
->
seekthru_unk
,
iid
,
out
);
*
out
=
&
filter
->
passthrough
.
IMediaPosition_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IMediaSeeking
))
*
out
=
&
filter
->
passthrough
.
IMediaSeeking_iface
;
else
else
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
IUnknown_AddRef
((
IUnknown
*
)
*
out
);
return
S_OK
;
}
}
static
HRESULT
sample_grabber_source_query_accept
(
struct
strmbase_pin
*
iface
,
const
AM_MEDIA_TYPE
*
mt
)
static
HRESULT
sample_grabber_source_query_accept
(
struct
strmbase_pin
*
iface
,
const
AM_MEDIA_TYPE
*
mt
)
...
@@ -637,8 +640,6 @@ static const struct strmbase_source_ops source_ops =
...
@@ -637,8 +640,6 @@ static const struct strmbase_source_ops source_ops =
HRESULT
sample_grabber_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
HRESULT
sample_grabber_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
{
{
SG_Impl
*
obj
=
NULL
;
SG_Impl
*
obj
=
NULL
;
ISeekingPassThru
*
passthru
;
HRESULT
hr
;
obj
=
CoTaskMemAlloc
(
sizeof
(
SG_Impl
));
obj
=
CoTaskMemAlloc
(
sizeof
(
SG_Impl
));
if
(
NULL
==
obj
)
{
if
(
NULL
==
obj
)
{
...
@@ -652,7 +653,10 @@ HRESULT sample_grabber_create(IUnknown *outer, IUnknown **out)
...
@@ -652,7 +653,10 @@ HRESULT sample_grabber_create(IUnknown *outer, IUnknown **out)
obj
->
IMemInputPin_iface
.
lpVtbl
=
&
IMemInputPin_VTable
;
obj
->
IMemInputPin_iface
.
lpVtbl
=
&
IMemInputPin_VTable
;
strmbase_sink_init
(
&
obj
->
sink
,
&
obj
->
filter
,
L"In"
,
&
sink_ops
,
NULL
);
strmbase_sink_init
(
&
obj
->
sink
,
&
obj
->
filter
,
L"In"
,
&
sink_ops
,
NULL
);
strmbase_source_init
(
&
obj
->
source
,
&
obj
->
filter
,
L"Out"
,
&
source_ops
);
strmbase_source_init
(
&
obj
->
source
,
&
obj
->
filter
,
L"Out"
,
&
source_ops
);
strmbase_passthrough_init
(
&
obj
->
passthrough
,
(
IUnknown
*
)
&
obj
->
source
.
pin
.
IPin_iface
);
ISeekingPassThru_Init
(
&
obj
->
passthrough
.
ISeekingPassThru_iface
,
FALSE
,
&
obj
->
sink
.
pin
.
IPin_iface
);
obj
->
allocator
=
NULL
;
obj
->
allocator
=
NULL
;
obj
->
grabberIface
=
NULL
;
obj
->
grabberIface
=
NULL
;
...
@@ -661,14 +665,6 @@ HRESULT sample_grabber_create(IUnknown *outer, IUnknown **out)
...
@@ -661,14 +665,6 @@ HRESULT sample_grabber_create(IUnknown *outer, IUnknown **out)
obj
->
bufferLen
=
-
1
;
obj
->
bufferLen
=
-
1
;
obj
->
bufferData
=
NULL
;
obj
->
bufferData
=
NULL
;
hr
=
CoCreateInstance
(
&
CLSID_SeekingPassThru
,
&
obj
->
filter
.
IUnknown_inner
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
obj
->
seekthru_unk
);
if
(
hr
)
return
hr
;
IUnknown_QueryInterface
(
obj
->
seekthru_unk
,
&
IID_ISeekingPassThru
,
(
void
**
)
&
passthru
);
ISeekingPassThru_Init
(
passthru
,
FALSE
,
&
obj
->
sink
.
pin
.
IPin_iface
);
ISeekingPassThru_Release
(
passthru
);
*
out
=
&
obj
->
filter
.
IUnknown_inner
;
*
out
=
&
obj
->
filter
.
IUnknown_inner
;
return
S_OK
;
return
S_OK
;
}
}
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