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
80c233b9
Commit
80c233b9
authored
Jan 18, 2012
by
Aric Stewart
Committed by
Alexandre Julliard
Jan 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Have the MediaStream Filter use strmbase.
parent
58aa5471
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
47 deletions
+36
-47
Makefile.in
dlls/amstream/Makefile.in
+1
-1
mediastreamfilter.c
dlls/amstream/mediastreamfilter.c
+35
-46
No files found.
dlls/amstream/Makefile.in
View file @
80c233b9
MODULE
=
amstream.dll
IMPORTS
=
strmiids uuid ole32 advapi32
IMPORTS
=
strmiids
strmbase
uuid ole32 advapi32
C_SRCS
=
\
amstream.c
\
...
...
dlls/amstream/mediastreamfilter.c
View file @
80c233b9
...
...
@@ -24,6 +24,9 @@
#include "winbase.h"
#include "wingdi.h"
#include "dshow.h"
#include "wine/strmbase.h"
#include "amstream_private.h"
#include "amstream.h"
...
...
@@ -33,18 +36,13 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
amstream
);
typedef
struct
{
IMediaStreamFilter
IMediaStreamFilter_iface
;
LONG
ref
;
CRITICAL_SECTION
csFilter
;
FILTER_STATE
state
;
REFERENCE_TIME
rtStreamStart
;
IReferenceClock
*
pClock
;
FILTER_INFO
filterInfo
;
BaseFilter
filter
;
}
IMediaStreamFilterImpl
;
static
inline
IMediaStreamFilterImpl
*
impl_from_IMediaStreamFilter
(
IMediaStreamFilter
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IMediaStreamFilterImpl
,
IMediaStreamFilter_iface
);
return
CONTAINING_RECORD
(
iface
,
IMediaStreamFilterImpl
,
filter
);
}
/*** IUnknown methods ***/
...
...
@@ -80,18 +78,13 @@ static HRESULT WINAPI MediaStreamFilterImpl_QueryInterface(IMediaStreamFilter *i
static
ULONG
WINAPI
MediaStreamFilterImpl_AddRef
(
IMediaStreamFilter
*
iface
)
{
IMediaStreamFilterImpl
*
This
=
impl_from_IMediaStreamFilter
(
iface
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->() AddRef from %d
\n
"
,
iface
,
refCount
-
1
);
return
refCount
;
return
BaseFilterImpl_AddRef
((
IBaseFilter
*
)
iface
);
}
static
ULONG
WINAPI
MediaStreamFilterImpl_Release
(
IMediaStreamFilter
*
iface
)
{
IMediaStreamFilterImpl
*
This
=
impl_from_IMediaStreamFilter
(
iface
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
ULONG
refCount
=
BaseFilterImpl_Release
((
IBaseFilter
*
)
iface
);
TRACE
(
"(%p)->() Release from %d
\n
"
,
iface
,
refCount
+
1
);
...
...
@@ -105,14 +98,10 @@ static ULONG WINAPI MediaStreamFilterImpl_Release(IMediaStreamFilter *iface)
static
HRESULT
WINAPI
MediaStreamFilterImpl_GetClassID
(
IMediaStreamFilter
*
iface
,
CLSID
*
pClsid
)
{
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
pClsid
);
*
pClsid
=
CLSID_MediaStreamFilter
;
return
S_OK
;
return
BaseFilterImpl_GetClassID
((
IBaseFilter
*
)
iface
,
pClsid
);
}
/*** I
Media
Filter methods ***/
/*** I
Base
Filter methods ***/
static
HRESULT
WINAPI
MediaStreamFilterImpl_Stop
(
IMediaStreamFilter
*
iface
)
{
...
...
@@ -137,32 +126,22 @@ static HRESULT WINAPI MediaStreamFilterImpl_Run(IMediaStreamFilter * iface, REFE
static
HRESULT
WINAPI
MediaStreamFilterImpl_GetState
(
IMediaStreamFilter
*
iface
,
DWORD
dwMilliSecsTimeout
,
FILTER_STATE
*
pState
)
{
FIXME
(
"(%p)->(%d,%p): Stub!
\n
"
,
iface
,
dwMilliSecsTimeout
,
pState
);
return
E_NOTIMPL
;
return
BaseFilterImpl_GetState
((
IBaseFilter
*
)
iface
,
dwMilliSecsTimeout
,
pState
);
}
static
HRESULT
WINAPI
MediaStreamFilterImpl_SetSyncSource
(
IMediaStreamFilter
*
iface
,
IReferenceClock
*
pClock
)
{
TRACE
(
"(%p)->(%p): Stub!
\n
"
,
iface
,
pClock
);
return
E_NOTIMPL
;
return
BaseFilterImpl_SetSyncSource
((
IBaseFilter
*
)
iface
,
pClock
);
}
static
HRESULT
WINAPI
MediaStreamFilterImpl_GetSyncSource
(
IMediaStreamFilter
*
iface
,
IReferenceClock
**
ppClock
)
{
FIXME
(
"(%p)->(%p): Stub!
\n
"
,
iface
,
ppClock
);
return
E_NOTIMPL
;
return
BaseFilterImpl_GetSyncSource
((
IBaseFilter
*
)
iface
,
ppClock
);
}
/*** IBaseFilter methods ***/
static
HRESULT
WINAPI
MediaStreamFilterImpl_EnumPins
(
IMediaStreamFilter
*
iface
,
IEnumPins
**
ppEnum
)
{
FIXME
(
"(%p)->(%p): Stub!
\n
"
,
iface
,
ppEnum
);
return
E_NOTIMPL
;
return
BaseFilterImpl_EnumPins
((
IBaseFilter
*
)
iface
,
ppEnum
);
}
static
HRESULT
WINAPI
MediaStreamFilterImpl_FindPin
(
IMediaStreamFilter
*
iface
,
LPCWSTR
Id
,
IPin
**
ppPin
)
...
...
@@ -174,23 +153,17 @@ static HRESULT WINAPI MediaStreamFilterImpl_FindPin(IMediaStreamFilter * iface,
static
HRESULT
WINAPI
MediaStreamFilterImpl_QueryFilterInfo
(
IMediaStreamFilter
*
iface
,
FILTER_INFO
*
pInfo
)
{
FIXME
(
"(%p)->(%p): Stub!
\n
"
,
iface
,
pInfo
);
return
E_NOTIMPL
;
return
BaseFilterImpl_QueryFilterInfo
((
IBaseFilter
*
)
iface
,
pInfo
);
}
static
HRESULT
WINAPI
MediaStreamFilterImpl_JoinFilterGraph
(
IMediaStreamFilter
*
iface
,
IFilterGraph
*
pGraph
,
LPCWSTR
pName
)
{
FIXME
(
"(%p)->(%p, %s): Stub!
\n
"
,
iface
,
pGraph
,
debugstr_w
(
pName
));
return
E_NOTIMPL
;
return
BaseFilterImpl_JoinFilterGraph
((
IBaseFilter
*
)
iface
,
pGraph
,
pName
);
}
static
HRESULT
WINAPI
MediaStreamFilterImpl_QueryVendorInfo
(
IMediaStreamFilter
*
iface
,
LPWSTR
*
pVendorInfo
)
{
FIXME
(
"(%p)->(%p): Stub!
\n
"
,
iface
,
pVendorInfo
);
return
E_NOTIMPL
;
return
BaseFilterImpl_QueryVendorInfo
((
IBaseFilter
*
)
iface
,
pVendorInfo
);
}
/*** IMediaStreamFilter methods ***/
...
...
@@ -286,6 +259,23 @@ static const IMediaStreamFilterVtbl MediaStreamFilter_Vtbl =
MediaStreamFilterImpl_EndOfStream
};
static
IPin
*
WINAPI
MediaStreamFilterImpl_GetPin
(
BaseFilter
*
iface
,
int
pos
)
{
/* No pins */
return
NULL
;
}
static
LONG
WINAPI
MediaStreamFilterImpl_GetPinCount
(
BaseFilter
*
iface
)
{
/* No pins */
return
0
;
}
static
const
BaseFilterFuncTable
BaseFuncTable
=
{
MediaStreamFilterImpl_GetPin
,
MediaStreamFilterImpl_GetPinCount
};
HRESULT
MediaStreamFilter_create
(
IUnknown
*
pUnkOuter
,
void
**
ppObj
)
{
IMediaStreamFilterImpl
*
object
;
...
...
@@ -302,8 +292,7 @@ HRESULT MediaStreamFilter_create(IUnknown *pUnkOuter, void **ppObj)
return
E_OUTOFMEMORY
;
}
object
->
IMediaStreamFilter_iface
.
lpVtbl
=
&
MediaStreamFilter_Vtbl
;
object
->
ref
=
1
;
BaseFilter_Init
(
&
object
->
filter
,
(
IBaseFilterVtbl
*
)
&
MediaStreamFilter_Vtbl
,
&
CLSID_MediaStreamFilter
,
(
DWORD_PTR
)(
__FILE__
": MediaStreamFilterImpl.csFilter"
),
&
BaseFuncTable
);
*
ppObj
=
object
;
...
...
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