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
ae771fee
Commit
ae771fee
authored
Feb 26, 2013
by
Alessandro Pignotti
Committed by
Alexandre Julliard
Mar 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qedit: Implement IMediaSeeking and IMediaPosition in sample grabber.
parent
f53fa4f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
samplegrabber.c
dlls/qedit/samplegrabber.c
+20
-3
No files found.
dlls/qedit/samplegrabber.c
View file @
ae771fee
...
...
@@ -369,7 +369,9 @@ typedef struct _SG_Impl {
IBaseFilter
IBaseFilter_iface
;
ISampleGrabber
ISampleGrabber_iface
;
IMemInputPin
IMemInputPin_iface
;
/* TODO: IMediaPosition, IMediaSeeking, IQualityControl */
/* IMediaSeeking and IMediaPosition are implemented by ISeekingPassThru */
IUnknown
*
seekthru_unk
;
/* TODO: IQualityControl */
IUnknown
*
outer_unk
;
LONG
ref
;
CRITICAL_SECTION
critSect
;
...
...
@@ -433,6 +435,8 @@ static void SampleGrabber_cleanup(SG_Impl *This)
CoTaskMemFree
(
This
->
mtype
.
pbFormat
);
if
(
This
->
bufferData
)
CoTaskMemFree
(
This
->
bufferData
);
if
(
This
->
seekthru_unk
)
IUnknown_Release
(
This
->
seekthru_unk
);
This
->
critSect
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
critSect
);
}
...
...
@@ -455,9 +459,9 @@ static HRESULT WINAPI SampleGrabber_QueryInterface(IUnknown *iface, REFIID riid,
else
if
(
IsEqualIID
(
riid
,
&
IID_IMemInputPin
))
*
ppv
=
&
This
->
IMemInputPin_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMediaPosition
))
FIXME
(
"IMediaPosition not implemented
\n
"
);
return
IUnknown_QueryInterface
(
This
->
seekthru_unk
,
riid
,
ppv
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IMediaSeeking
))
FIXME
(
"IMediaSeeking not implemented
\n
"
);
return
IUnknown_QueryInterface
(
This
->
seekthru_unk
,
riid
,
ppv
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IQualityControl
))
FIXME
(
"IQualityControl not implemented
\n
"
);
else
...
...
@@ -1048,6 +1052,10 @@ SampleGrabber_IPin_QueryInterface(IPin *iface, REFIID riid, void **ppv)
*
ppv
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMemInputPin
))
*
ppv
=
&
This
->
sg
->
IMemInputPin_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMediaSeeking
))
return
IUnknown_QueryInterface
(
&
This
->
sg
->
IUnknown_inner
,
riid
,
ppv
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IMediaPosition
))
return
IUnknown_QueryInterface
(
&
This
->
sg
->
IUnknown_inner
,
riid
,
ppv
);
else
{
WARN
(
"(%p, %s,%p): not found
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
...
...
@@ -1467,6 +1475,8 @@ static const IPinVtbl IPin_Out_VTable =
HRESULT
SampleGrabber_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppv
)
{
SG_Impl
*
obj
=
NULL
;
ISeekingPassThru
*
passthru
;
HRESULT
hr
;
TRACE
(
"(%p,%p)
\n
"
,
ppv
,
pUnkOuter
);
...
...
@@ -1514,6 +1524,13 @@ HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppv)
else
obj
->
outer_unk
=
&
obj
->
IUnknown_inner
;
hr
=
CoCreateInstance
(
&
CLSID_SeekingPassThru
,
(
IUnknown
*
)
obj
,
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
->
pin_in
.
IPin_iface
);
ISeekingPassThru_Release
(
passthru
);
*
ppv
=
&
obj
->
IUnknown_inner
;
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