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
a1a587a8
Commit
a1a587a8
authored
Feb 06, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qedit/samplegrabber: Use BaseOutputPinImpl_AttemptConnection().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
44c91bcb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
21 deletions
+6
-21
samplegrabber.c
dlls/qedit/samplegrabber.c
+6
-21
No files found.
dlls/qedit/samplegrabber.c
View file @
a1a587a8
...
...
@@ -575,16 +575,12 @@ static HRESULT sample_grabber_source_get_media_type(struct strmbase_pin *iface,
return
VFW_S_NO_MORE_ITEMS
;
}
static
HRESULT
WINAPI
sample_grabber_source_
AttemptConnection
(
struct
strmbase_source
*
iface
,
I
Pin
*
peer
,
const
AM_MEDIA_TYPE
*
mt
)
static
HRESULT
WINAPI
sample_grabber_source_
DecideAllocator
(
struct
strmbase_source
*
iface
,
I
MemInputPin
*
peer
,
IMemAllocator
**
allocator
)
{
SG_Impl
*
filter
=
impl_from_source_pin
(
&
iface
->
pin
);
HRESULT
hr
;
const
AM_MEDIA_TYPE
*
mt
=
&
iface
->
pin
.
mt
;
if
(
filter
->
source
.
pin
.
peer
)
return
VFW_E_ALREADY_CONNECTED
;
if
(
filter
->
filter
.
state
!=
State_Stopped
)
return
VFW_E_NOT_STOPPED
;
if
(
!
IsEqualGUID
(
&
mt
->
majortype
,
&
filter
->
mtype
.
majortype
))
return
VFW_E_TYPE_NOT_ACCEPTED
;
if
(
!
IsEqualGUID
(
&
mt
->
subtype
,
&
filter
->
mtype
.
subtype
))
...
...
@@ -598,19 +594,7 @@ static HRESULT WINAPI sample_grabber_source_AttemptConnection(struct strmbase_so
&&
!
mt
->
pbFormat
)
return
VFW_E_TYPE_NOT_ACCEPTED
;
IPin_AddRef
(
filter
->
source
.
pin
.
peer
=
peer
);
CopyMediaType
(
&
filter
->
source
.
pin
.
mt
,
mt
);
if
(
SUCCEEDED
(
hr
=
IPin_ReceiveConnection
(
peer
,
&
filter
->
source
.
pin
.
IPin_iface
,
mt
)))
hr
=
IPin_QueryInterface
(
peer
,
&
IID_IMemInputPin
,
(
void
**
)
&
filter
->
source
.
pMemInputPin
);
if
(
FAILED
(
hr
))
{
IPin_Release
(
filter
->
source
.
pin
.
peer
);
filter
->
source
.
pin
.
peer
=
NULL
;
FreeMediaType
(
&
filter
->
source
.
pin
.
mt
);
}
return
hr
;
return
S_OK
;
}
static
const
struct
strmbase_source_ops
source_ops
=
...
...
@@ -618,7 +602,8 @@ static const struct strmbase_source_ops source_ops =
.
base
.
pin_query_interface
=
sample_grabber_source_query_interface
,
.
base
.
pin_query_accept
=
sample_grabber_source_query_accept
,
.
base
.
pin_get_media_type
=
sample_grabber_source_get_media_type
,
.
pfnAttemptConnection
=
sample_grabber_source_AttemptConnection
,
.
pfnAttemptConnection
=
BaseOutputPinImpl_AttemptConnection
,
.
pfnDecideAllocator
=
sample_grabber_source_DecideAllocator
,
};
HRESULT
SampleGrabber_create
(
IUnknown
*
outer
,
void
**
out
)
...
...
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