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
026037ab
Commit
026037ab
authored
Mar 14, 2012
by
Aric Stewart
Committed by
Alexandre Julliard
Mar 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Move the MediaSeekingPassThru functions from quartz into strmbase.
parent
945c5bba
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
57 additions
and
63 deletions
+57
-63
Makefile.in
dlls/quartz/Makefile.in
+0
-1
avisplit.c
dlls/quartz/avisplit.c
+0
-1
control_private.h
dlls/quartz/control_private.h
+0
-28
dsoundrender.c
dlls/quartz/dsoundrender.c
+3
-6
main.c
dlls/quartz/main.c
+5
-0
mpegsplit.c
dlls/quartz/mpegsplit.c
+0
-1
nullrenderer.c
dlls/quartz/nullrenderer.c
+1
-6
quartz_private.h
dlls/quartz/quartz_private.h
+0
-1
videorenderer.c
dlls/quartz/videorenderer.c
+2
-6
waveparser.c
dlls/quartz/waveparser.c
+0
-1
Makefile.in
dlls/strmbase/Makefile.in
+1
-0
pospass.c
dlls/strmbase/pospass.c
+37
-12
strmbase.h
include/wine/strmbase.h
+8
-0
No files found.
dlls/quartz/Makefile.in
View file @
026037ab
...
...
@@ -7,7 +7,6 @@ C_SRCS = \
acmwrapper.c
\
avidec.c
\
avisplit.c
\
control.c
\
dsoundrender.c
\
enumfilters.c
\
enummedia.c
\
...
...
dlls/quartz/avisplit.c
View file @
026037ab
...
...
@@ -30,7 +30,6 @@
*/
#include "quartz_private.h"
#include "control_private.h"
#include "pin.h"
#include "uuids.h"
...
...
dlls/quartz/control_private.h
deleted
100644 → 0
View file @
945c5bba
/*
* Filter Seeking and Control Interfaces
*
* Copyright 2003 Robert Shearman
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef QUARTZ_CONTROL_H
#define QUARTZ_CONTROL_H
void
MediaSeekingPassThru_RegisterMediaTime
(
IUnknown
*
iface
,
REFERENCE_TIME
start
);
void
MediaSeekingPassThru_ResetMediaTime
(
IUnknown
*
iface
);
void
MediaSeekingPassThru_EOS
(
IUnknown
*
iface
);
#endif
/*QUARTZ_CONTROL_H*/
dlls/quartz/dsoundrender.c
View file @
026037ab
...
...
@@ -21,7 +21,6 @@
#include "config.h"
#include "quartz_private.h"
#include "control_private.h"
#include "pin.h"
#include "uuids.h"
...
...
@@ -538,19 +537,17 @@ HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv)
if
(
SUCCEEDED
(
hr
))
{
ISeekingPassThru
*
passthru
;
pDSoundRender
->
state_change
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
pDSoundRender
->
blocked
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
hr
=
CoCreateInstance
(
&
CLSID_SeekingPassThru
,
(
IUnknown
*
)
pDSoundRender
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
pDSoundRender
->
seekthru_unk
);
hr
=
CreatePosPassThru
((
IUnknown
*
)
pDSoundRender
,
TRUE
,
(
IPin
*
)
pDSoundRender
->
pInputPin
,
&
pDSoundRender
->
seekthru_unk
);
if
(
!
pDSoundRender
->
state_change
||
!
pDSoundRender
->
blocked
||
FAILED
(
hr
))
{
IUnknown_Release
((
IUnknown
*
)
pDSoundRender
);
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
IUnknown_QueryInterface
(
pDSoundRender
->
seekthru_unk
,
&
IID_ISeekingPassThru
,
(
void
**
)
&
passthru
);
ISeekingPassThru_Init
(
passthru
,
TRUE
,
(
IPin
*
)
pDSoundRender
->
pInputPin
);
ISeekingPassThru_Release
(
passthru
);
QualityControlImpl_init
(
&
pDSoundRender
->
qcimpl
,
(
IPin
*
)
pDSoundRender
->
pInputPin
,
(
IBaseFilter
*
)
pDSoundRender
);
pDSoundRender
->
qcimpl
.
lpVtbl
=
&
DSoundRender_QualityControl_Vtbl
;
*
ppv
=
pDSoundRender
;
...
...
dlls/quartz/main.c
View file @
026037ab
...
...
@@ -39,6 +39,11 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
return
QUARTZ_DllMain
(
hInstDLL
,
fdwReason
,
lpv
);
}
HRESULT
SeekingPassThru_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
{
return
PosPassThru_Construct
(
pUnkOuter
,
ppObj
);
/* from strmbase */
}
/******************************************************************************
* DirectShow ClassFactory
*/
...
...
dlls/quartz/mpegsplit.c
View file @
026037ab
...
...
@@ -25,7 +25,6 @@
#include <math.h>
#include "quartz_private.h"
#include "control_private.h"
#include "pin.h"
#include "uuids.h"
...
...
dlls/quartz/nullrenderer.c
View file @
026037ab
...
...
@@ -24,7 +24,6 @@
#define NONAMELESSSTRUCT
#define NONAMELESSUNION
#include "quartz_private.h"
#include "control_private.h"
#include "pin.h"
#include "uuids.h"
...
...
@@ -148,15 +147,11 @@ HRESULT NullRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
if
(
SUCCEEDED
(
hr
))
{
ISeekingPassThru
*
passthru
;
hr
=
CoCreateInstance
(
&
CLSID_SeekingPassThru
,
pUnkOuter
?
pUnkOuter
:
(
IUnknown
*
)
&
pNullRenderer
->
IInner_vtbl
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
pNullRenderer
->
seekthru_unk
);
hr
=
CreatePosPassThru
(
pUnkOuter
?
pUnkOuter
:
(
IUnknown
*
)
&
pNullRenderer
->
IInner_vtbl
,
TRUE
,
(
IPin
*
)
pNullRenderer
->
pInputPin
,
&
pNullRenderer
->
seekthru_unk
);
if
(
FAILED
(
hr
))
{
IUnknown_Release
((
IUnknown
*
)
pNullRenderer
);
return
hr
;
}
IUnknown_QueryInterface
(
pNullRenderer
->
seekthru_unk
,
&
IID_ISeekingPassThru
,
(
void
**
)
&
passthru
);
ISeekingPassThru_Init
(
passthru
,
TRUE
,
(
IPin
*
)
pNullRenderer
->
pInputPin
);
ISeekingPassThru_Release
(
passthru
);
*
ppv
=
pNullRenderer
;
}
else
...
...
dlls/quartz/quartz_private.h
View file @
026037ab
...
...
@@ -56,7 +56,6 @@ HRESULT VideoRendererDefault_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC
HRESULT
QUARTZ_CreateSystemClock
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
HRESULT
ACMWrapper_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
HRESULT
WAVEParser_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
HRESULT
SeekingPassThru_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
DECLSPEC_HIDDEN
;
HRESULT
EnumMonikerImpl_Create
(
IMoniker
**
ppMoniker
,
ULONG
nMonikerCount
,
IEnumMoniker
**
ppEnum
)
DECLSPEC_HIDDEN
;
...
...
dlls/quartz/videorenderer.c
View file @
026037ab
...
...
@@ -23,7 +23,6 @@
#define NONAMELESSSTRUCT
#define NONAMELESSUNION
#include "quartz_private.h"
#include "control_private.h"
#include "pin.h"
#include "uuids.h"
...
...
@@ -545,7 +544,6 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
HRESULT
hr
;
PIN_INFO
piInput
;
VideoRendererImpl
*
pVideoRenderer
;
ISeekingPassThru
*
passthru
;
TRACE
(
"(%p, %p)
\n
"
,
pUnkOuter
,
ppv
);
...
...
@@ -580,14 +578,12 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
if
(
SUCCEEDED
(
hr
))
{
hr
=
CoCreateInstance
(
&
CLSID_SeekingPassThru
,
pUnkOuter
?
pUnkOuter
:
(
IUnknown
*
)
&
pVideoRenderer
->
IInner_vtbl
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
pVideoRenderer
->
seekthru_unk
);
hr
=
CreatePosPassThru
(
pUnkOuter
?
pUnkOuter
:
(
IUnknown
*
)
&
pVideoRenderer
->
IInner_vtbl
,
TRUE
,
(
IPin
*
)
pVideoRenderer
->
pInputPin
,
&
pVideoRenderer
->
seekthru_unk
);
if
(
FAILED
(
hr
))
{
IPin_Release
((
IPin
*
)
pVideoRenderer
->
pInputPin
);
goto
fail
;
}
IUnknown_QueryInterface
(
pVideoRenderer
->
seekthru_unk
,
&
IID_ISeekingPassThru
,
(
void
**
)
&
passthru
);
ISeekingPassThru_Init
(
passthru
,
TRUE
,
(
IPin
*
)
pVideoRenderer
->
pInputPin
);
ISeekingPassThru_Release
(
passthru
);
pVideoRenderer
->
sample_held
=
NULL
;
*
ppv
=
pVideoRenderer
;
}
...
...
dlls/quartz/waveparser.c
View file @
026037ab
...
...
@@ -19,7 +19,6 @@
*/
#include "quartz_private.h"
#include "control_private.h"
#include "pin.h"
#include "uuids.h"
...
...
dlls/strmbase/Makefile.in
View file @
026037ab
...
...
@@ -7,6 +7,7 @@ C_SRCS = \
mediatype.c
\
outputqueue.c
\
pin.c
\
pospass.c
\
qualitycontrol.c
\
seeking.c
\
transform.c
...
...
dlls/
quartz/control
.c
→
dlls/
strmbase/pospass
.c
View file @
026037ab
...
...
@@ -2,6 +2,7 @@
* Filter Seeking and Control Interfaces
*
* Copyright 2003 Robert Shearman
* Copyright 2012 Aric Stewart, CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -19,15 +20,19 @@
*/
/* FIXME: critical sections */
#include "quartz_private.h"
#include "control_private.h"
#define COBJMACROS
#include "dshow.h"
#include "uuids.h"
#include "wine/debug.h"
#include "wine/strmbase.h"
#include <assert.h>
WINE_DEFAULT_DEBUG_CHANNEL
(
quartz
);
WINE_DEFAULT_DEBUG_CHANNEL
(
strmbase
);
#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
static
const
IMediaSeekingVtbl
IMediaSeekingPassThru_Vtbl
;
...
...
@@ -200,13 +205,27 @@ static const ISeekingPassThruVtbl ISeekingPassThru_Vtbl =
SeekingPassThru_Init
};
HRESULT
SeekingPassThru_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
HRESULT
WINAPI
CreatePosPassThru
(
IUnknown
*
pUnkOuter
,
BOOL
bRenderer
,
IPin
*
pPin
,
IUnknown
**
ppPassThru
)
{
HRESULT
hr
;
ISeekingPassThru
*
passthru
;
hr
=
CoCreateInstance
(
&
CLSID_SeekingPassThru
,
pUnkOuter
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
ppPassThru
);
IUnknown_QueryInterface
(
*
ppPassThru
,
&
IID_ISeekingPassThru
,
(
void
**
)
&
passthru
);
hr
=
ISeekingPassThru_Init
(
passthru
,
bRenderer
,
pPin
);
ISeekingPassThru_Release
(
passthru
);
return
hr
;
}
HRESULT
WINAPI
PosPassThru_Construct
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppPassThru
)
{
PassThruImpl
*
fimpl
;
TRACE
(
"(%p,%p)
\n
"
,
pUnkOuter
,
pp
Obj
);
TRACE
(
"(%p,%p)
\n
"
,
pUnkOuter
,
pp
PassThru
);
*
pp
Obj
=
fimpl
=
CoTaskMemAlloc
(
sizeof
(
*
fimpl
));
*
pp
PassThru
=
fimpl
=
CoTaskMemAlloc
(
sizeof
(
*
fimpl
));
if
(
!
fimpl
)
return
E_OUTOFMEMORY
;
...
...
@@ -302,7 +321,7 @@ static HRESULT WINAPI MediaSeekingPassThru_IsFormatSupported(IMediaSeeking * ifa
ICOM_THIS_MULTI
(
PassThruImpl
,
IMediaSeeking_vtbl
,
iface
);
IMediaSeeking
*
seek
;
HRESULT
hr
;
TRACE
(
"(%p/%p)->(%s)
\n
"
,
iface
,
This
,
qz
debugstr_guid
(
pFormat
));
TRACE
(
"(%p/%p)->(%s)
\n
"
,
iface
,
This
,
debugstr_guid
(
pFormat
));
hr
=
get_connected
(
This
,
&
seek
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IMediaSeeking_IsFormatSupported
(
seek
,
pFormat
);
...
...
@@ -350,7 +369,7 @@ static HRESULT WINAPI MediaSeekingPassThru_IsUsingTimeFormat(IMediaSeeking * ifa
ICOM_THIS_MULTI
(
PassThruImpl
,
IMediaSeeking_vtbl
,
iface
);
IMediaSeeking
*
seek
;
HRESULT
hr
;
TRACE
(
"(%p/%p)->(%s)
\n
"
,
iface
,
This
,
qz
debugstr_guid
(
pFormat
));
TRACE
(
"(%p/%p)->(%s)
\n
"
,
iface
,
This
,
debugstr_guid
(
pFormat
));
hr
=
get_connected
(
This
,
&
seek
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IMediaSeeking_IsUsingTimeFormat
(
seek
,
pFormat
);
...
...
@@ -366,7 +385,7 @@ static HRESULT WINAPI MediaSeekingPassThru_SetTimeFormat(IMediaSeeking * iface,
ICOM_THIS_MULTI
(
PassThruImpl
,
IMediaSeeking_vtbl
,
iface
);
IMediaSeeking
*
seek
;
HRESULT
hr
;
TRACE
(
"(%p/%p)->(%s)
\n
"
,
iface
,
This
,
qz
debugstr_guid
(
pFormat
));
TRACE
(
"(%p/%p)->(%s)
\n
"
,
iface
,
This
,
debugstr_guid
(
pFormat
));
hr
=
get_connected
(
This
,
&
seek
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IMediaSeeking_SetTimeFormat
(
seek
,
pFormat
);
...
...
@@ -548,22 +567,27 @@ static HRESULT WINAPI MediaSeekingPassThru_GetPreroll(IMediaSeeking * iface, LON
return
hr
;
}
void
MediaSeekingPassThru_RegisterMediaTime
(
IUnknown
*
iface
,
REFERENCE_TIME
start
)
{
HRESULT
WINAPI
MediaSeekingPassThru_RegisterMediaTime
(
IUnknown
*
iface
,
REFERENCE_TIME
start
)
{
ICOM_THIS_MULTI
(
PassThruImpl
,
IInner_vtbl
,
iface
);
EnterCriticalSection
(
&
This
->
time_cs
);
This
->
time_earliest
=
start
;
This
->
timevalid
=
1
;
LeaveCriticalSection
(
&
This
->
time_cs
);
return
S_OK
;
}
void
MediaSeekingPassThru_ResetMediaTime
(
IUnknown
*
iface
)
{
HRESULT
WINAPI
MediaSeekingPassThru_ResetMediaTime
(
IUnknown
*
iface
)
{
ICOM_THIS_MULTI
(
PassThruImpl
,
IInner_vtbl
,
iface
);
EnterCriticalSection
(
&
This
->
time_cs
);
This
->
timevalid
=
0
;
LeaveCriticalSection
(
&
This
->
time_cs
);
return
S_OK
;
}
void
MediaSeekingPassThru_EOS
(
IUnknown
*
iface
)
{
HRESULT
WINAPI
MediaSeekingPassThru_EOS
(
IUnknown
*
iface
)
{
ICOM_THIS_MULTI
(
PassThruImpl
,
IInner_vtbl
,
iface
);
REFERENCE_TIME
time
;
HRESULT
hr
;
...
...
@@ -575,6 +599,7 @@ void MediaSeekingPassThru_EOS(IUnknown *iface) {
}
else
This
->
timevalid
=
0
;
LeaveCriticalSection
(
&
This
->
time_cs
);
return
hr
;
}
static
const
IMediaSeekingVtbl
IMediaSeekingPassThru_Vtbl
=
...
...
include/wine/strmbase.h
View file @
026037ab
...
...
@@ -320,6 +320,14 @@ HRESULT WINAPI SourceSeekingImpl_SetRate(IMediaSeeking * iface, double dRate);
HRESULT
WINAPI
SourceSeekingImpl_GetRate
(
IMediaSeeking
*
iface
,
double
*
dRate
);
HRESULT
WINAPI
SourceSeekingImpl_GetPreroll
(
IMediaSeeking
*
iface
,
LONGLONG
*
pPreroll
);
/* PosPassThru */
HRESULT
WINAPI
MediaSeekingPassThru_RegisterMediaTime
(
IUnknown
*
iface
,
REFERENCE_TIME
start
);
HRESULT
WINAPI
MediaSeekingPassThru_ResetMediaTime
(
IUnknown
*
iface
);
HRESULT
WINAPI
MediaSeekingPassThru_EOS
(
IUnknown
*
iface
);
HRESULT
WINAPI
CreatePosPassThru
(
IUnknown
*
pUnkOuter
,
BOOL
bRenderer
,
IPin
*
pPin
,
IUnknown
**
ppPassThru
);
HRESULT
WINAPI
PosPassThru_Construct
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppPassThru
);
/* Filter Registration */
typedef
REGPINTYPES
AMOVIESETUP_MEDIATYPE
;
...
...
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