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
0f1f42ea
Commit
0f1f42ea
authored
Apr 01, 2002
by
Hidenori Takeshima
Committed by
Alexandre Julliard
Apr 01, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some bugs.
Implemented some methods of CLSID_ACMWrapper.
parent
3a007359
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
189 additions
and
48 deletions
+189
-48
README
dlls/quartz/README
+0
-2
acmwrap.c
dlls/quartz/acmwrap.c
+0
-0
basefilt.c
dlls/quartz/basefilt.c
+15
-0
fmap.c
dlls/quartz/fmap.c
+58
-20
main.c
dlls/quartz/main.c
+1
-0
mpgparse.c
dlls/quartz/mpgparse.c
+40
-10
parser.c
dlls/quartz/parser.c
+34
-16
xform.h
dlls/quartz/xform.h
+1
-0
winedefault.reg
winedefault.reg
+40
-0
No files found.
dlls/quartz/README
View file @
0f1f42ea
...
...
@@ -7,14 +7,12 @@ TODO
- merge some C sources
- implement filters
- restruct color-space converter
- add FilterData to winedefault.reg for Connect() and Render()
- sort active filters in filter graph
- sort regfilters in Merit order
- fix deadlocks in Receive/EndOfStream
- handle plug-in distributor
- handle seeking
- implement some interfaces as plug-ins(???)
- implement ACM drivers (g711)
- implement ACM wrapper (improve xform)
- implement mciqtz(mci driver for quartz)
- implement renderer
...
...
dlls/quartz/acmwrap.c
View file @
0f1f42ea
This diff is collapsed.
Click to expand it.
dlls/quartz/basefilt.c
View file @
0f1f42ea
...
...
@@ -99,6 +99,11 @@ CBaseFilterImpl_fnStop(IBaseFilter* iface)
hr
=
NOERROR
;
EnterCriticalSection
(
&
This
->
csFilter
);
if
(
This
->
bIntermediateState
)
{
LeaveCriticalSection
(
&
This
->
csFilter
);
return
VFW_S_STATE_INTERMEDIATE
;
/* FIXME? */
}
TRACE
(
"(%p) state = %d
\n
"
,
This
,
This
->
fstate
);
if
(
This
->
fstate
==
State_Running
)
...
...
@@ -132,6 +137,11 @@ CBaseFilterImpl_fnPause(IBaseFilter* iface)
hr
=
NOERROR
;
EnterCriticalSection
(
&
This
->
csFilter
);
if
(
This
->
bIntermediateState
)
{
LeaveCriticalSection
(
&
This
->
csFilter
);
return
VFW_E_WRONG_STATE
;
/* FIXME? */
}
TRACE
(
"(%p) state = %d
\n
"
,
This
,
This
->
fstate
);
if
(
This
->
fstate
!=
State_Paused
)
...
...
@@ -159,6 +169,11 @@ CBaseFilterImpl_fnRun(IBaseFilter* iface,REFERENCE_TIME rtStart)
hr
=
NOERROR
;
EnterCriticalSection
(
&
This
->
csFilter
);
if
(
This
->
bIntermediateState
)
{
LeaveCriticalSection
(
&
This
->
csFilter
);
return
VFW_E_WRONG_STATE
;
/* FIXME? */
}
TRACE
(
"(%p) state = %d
\n
"
,
This
,
This
->
fstate
);
This
->
rtStart
=
rtStart
;
...
...
dlls/quartz/fmap.c
View file @
0f1f42ea
/*
* Implementation of CLSID_FilterMapper and CLSID_FilterMapper2.
*
* FIXME - s
tub.
* FIXME - s
ome stubs
*
* Copyright (C) Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
*
...
...
@@ -22,6 +22,7 @@
#include "config.h"
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
...
...
@@ -840,6 +841,19 @@ err:
return
hr
;
}
struct
MATCHED_ITEM
{
IMoniker
*
pMonFilter
;
DWORD
dwMerit
;
};
static
int
sort_comp_merit
(
const
void
*
p1
,
const
void
*
p2
)
{
const
struct
MATCHED_ITEM
*
pItem1
=
(
const
struct
MATCHED_ITEM
*
)
p1
;
const
struct
MATCHED_ITEM
*
pItem2
=
(
const
struct
MATCHED_ITEM
*
)
p2
;
return
(
int
)
pItem2
->
dwMerit
-
(
int
)
pItem1
->
dwMerit
;
}
static
HRESULT
WINAPI
IFilterMapper2_fnEnumMatchingFilters
(
IFilterMapper2
*
iface
,
...
...
@@ -859,7 +873,10 @@ IFilterMapper2_fnEnumMatchingFilters(IFilterMapper2* iface,
BYTE
*
pbFilterData
=
NULL
;
DWORD
cbFilterData
=
0
;
REGFILTER2
*
prf2
=
NULL
;
QUARTZ_CompList
*
pList
=
NULL
;
QUARTZ_CompList
*
pListFilters
=
NULL
;
struct
MATCHED_ITEM
*
pItems
=
NULL
;
struct
MATCHED_ITEM
*
pItemsTmp
;
int
cItems
=
0
;
const
REGFILTERPINS2
*
pRegFilterPin
;
DWORD
n
;
BOOL
bMatch
;
...
...
@@ -995,32 +1012,44 @@ IFilterMapper2_fnEnumMatchingFilters(IFilterMapper2* iface,
}
/* matched - add pFilter to the list. */
if
(
pList
==
NULL
)
pItemsTmp
=
QUARTZ_ReallocMem
(
pItems
,
sizeof
(
struct
MATCHED_ITEM
)
*
(
cItems
+
1
)
);
if
(
pItemsTmp
==
NULL
)
{
pList
=
QUARTZ_CompList_Alloc
();
if
(
pList
==
NULL
)
{
hr
=
E_OUTOFMEMORY
;
goto
err
;
}
}
TRACE
(
"matched
\n
"
);
hr
=
QUARTZ_CompList_AddComp
(
pList
,
(
IUnknown
*
)
pFilter
,
NULL
,
0
);
if
(
FAILED
(
hr
)
)
hr
=
E_OUTOFMEMORY
;
goto
err
;
}
pItems
=
pItemsTmp
;
pItemsTmp
=
pItems
+
cItems
;
cItems
++
;
pItemsTmp
->
pMonFilter
=
pFilter
;
pFilter
=
NULL
;
pItemsTmp
->
dwMerit
=
prf2
->
dwMerit
;
}
}
if
(
p
List
==
NULL
)
if
(
p
Items
==
NULL
||
cItems
==
0
)
{
hr
=
S_FALSE
;
goto
err
;
}
FIXME
(
"create IEnumMoniker - not sorted
\n
"
);
/* FIXME - should be sorted?(in Merit order) */
hr
=
QUARTZ_CreateEnumUnknown
(
&
IID_IEnumMoniker
,
(
void
**
)
ppEnumMoniker
,
pList
);
/* FIXME - sort in Merit order */
TRACE
(
"sort in Merit order
\n
"
);
qsort
(
pItems
,
cItems
,
sizeof
(
struct
MATCHED_ITEM
),
sort_comp_merit
);
pListFilters
=
QUARTZ_CompList_Alloc
();
if
(
pListFilters
==
NULL
)
{
hr
=
E_OUTOFMEMORY
;
goto
err
;
}
for
(
n
=
0
;
n
<
cItems
;
n
++
)
{
TRACE
(
"merit %08lx
\n
"
,
pItems
[
n
].
dwMerit
);
hr
=
QUARTZ_CompList_AddComp
(
pListFilters
,
(
IUnknown
*
)
pItems
[
n
].
pMonFilter
,
NULL
,
0
);
if
(
FAILED
(
hr
)
)
goto
err
;
}
hr
=
QUARTZ_CreateEnumUnknown
(
&
IID_IEnumMoniker
,
(
void
**
)
ppEnumMoniker
,
pListFilters
);
if
(
FAILED
(
hr
)
)
goto
err
;
...
...
@@ -1040,8 +1069,17 @@ err:
QUARTZ_FreeMem
(
pbFilterData
);
if
(
prf2
!=
NULL
)
QUARTZ_FreeMem
(
prf2
);
if
(
pList
!=
NULL
)
QUARTZ_CompList_Free
(
pList
);
if
(
pItems
!=
NULL
&&
cItems
>
0
)
{
for
(
n
=
0
;
n
<
cItems
;
n
++
)
{
if
(
pItems
[
n
].
pMonFilter
!=
NULL
)
IMoniker_Release
(
pItems
[
n
].
pMonFilter
);
}
QUARTZ_FreeMem
(
pItems
);
}
if
(
pListFilters
!=
NULL
)
QUARTZ_CompList_Free
(
pListFilters
);
TRACE
(
"returns %08lx
\n
"
,
hr
);
...
...
dlls/quartz/main.c
View file @
0f1f42ea
...
...
@@ -108,6 +108,7 @@ static const QUARTZ_CLASSENTRY QUARTZ_ClassList[] =
{
&
CLSID_URLReader
,
&
QUARTZ_CreateURLReader
},
{
&
CLSID_AVIDec
,
&
QUARTZ_CreateAVIDec
},
{
&
CLSID_Colour
,
&
QUARTZ_CreateColour
},
{
&
CLSID_ACMWrapper
,
&
QUARTZ_CreateACMWrapper
},
{
&
CLSID_FileWriter
,
&
QUARTZ_CreateFileWriter
},
{
NULL
,
NULL
},
};
...
...
dlls/quartz/mpgparse.c
View file @
0f1f42ea
...
...
@@ -389,9 +389,18 @@ static HRESULT CMPGParseImpl_GetStreamType( CParserImpl* pImpl, ULONG nStreamInd
pmpg1wav
=
(
MPEG1WAVEFORMAT
*
)
pmt
->
pbFormat
;
switch
(
hdrbuf
[
1
]
&
0x6
)
{
case
0x6
:
pmpg1wav
->
fwHeadLayer
=
ACM_MPEG_LAYER1
;
case
0x4
:
pmpg1wav
->
fwHeadLayer
=
ACM_MPEG_LAYER2
;
case
0x2
:
pmpg1wav
->
fwHeadLayer
=
ACM_MPEG_LAYER3
;
case
0x6
:
TRACE
(
"layer 1
\n
"
);
pmpg1wav
->
fwHeadLayer
=
ACM_MPEG_LAYER1
;
break
;
case
0x4
:
TRACE
(
"layer 2
\n
"
);
pmpg1wav
->
fwHeadLayer
=
ACM_MPEG_LAYER2
;
break
;
case
0x2
:
TRACE
(
"layer 3
\n
"
);
pmpg1wav
->
fwHeadLayer
=
ACM_MPEG_LAYER3
;
break
;
default:
return
E_FAIL
;
}
...
...
@@ -412,10 +421,22 @@ static HRESULT CMPGParseImpl_GetStreamType( CParserImpl* pImpl, ULONG nStreamInd
switch
(
hdrbuf
[
3
]
&
0xc0
)
{
case
0x00
:
pmpg1wav
->
fwHeadMode
=
ACM_MPEG_STEREO
;
case
0x40
:
pmpg1wav
->
fwHeadMode
=
ACM_MPEG_JOINTSTEREO
;
case
0x80
:
pmpg1wav
->
fwHeadMode
=
ACM_MPEG_DUALCHANNEL
;
case
0xc0
:
pmpg1wav
->
fwHeadMode
=
ACM_MPEG_SINGLECHANNEL
;
case
0x00
:
TRACE
(
"STEREO
\n
"
);
pmpg1wav
->
fwHeadMode
=
ACM_MPEG_STEREO
;
break
;
case
0x40
:
TRACE
(
"JOINTSTEREO
\n
"
);
pmpg1wav
->
fwHeadMode
=
ACM_MPEG_JOINTSTEREO
;
break
;
case
0x80
:
TRACE
(
"DUALCHANNEL
\n
"
);
pmpg1wav
->
fwHeadMode
=
ACM_MPEG_DUALCHANNEL
;
break
;
case
0xc0
:
TRACE
(
"SINGLECHANNEL
\n
"
);
pmpg1wav
->
fwHeadMode
=
ACM_MPEG_SINGLECHANNEL
;
break
;
}
pmpg1wav
->
fwHeadModeExt
=
(
hdrbuf
[
3
]
&
0x30
)
>>
4
;
/* FIXME?? */
...
...
@@ -436,9 +457,18 @@ static HRESULT CMPGParseImpl_GetStreamType( CParserImpl* pImpl, ULONG nStreamInd
pmpg1wav
->
wfx
.
nChannels
=
(
pmpg1wav
->
fwHeadMode
!=
ACM_MPEG_SINGLECHANNEL
)
?
2
:
1
;
switch
(
hdrbuf
[
2
]
&
0x0c
)
{
case
0x00
:
pmpg1wav
->
wfx
.
nSamplesPerSec
=
44100
;
case
0x01
:
pmpg1wav
->
wfx
.
nSamplesPerSec
=
48000
;
case
0x02
:
pmpg1wav
->
wfx
.
nSamplesPerSec
=
32000
;
case
0x00
:
TRACE
(
"44100Hz
\n
"
);
pmpg1wav
->
wfx
.
nSamplesPerSec
=
44100
;
break
;
case
0x01
:
TRACE
(
"48000Hz
\n
"
);
pmpg1wav
->
wfx
.
nSamplesPerSec
=
48000
;
break
;
case
0x02
:
TRACE
(
"32000Hz
\n
"
);
pmpg1wav
->
wfx
.
nSamplesPerSec
=
32000
;
break
;
default:
return
E_FAIL
;
}
pmpg1wav
->
wfx
.
nAvgBytesPerSec
=
pmpg1wav
->
dwHeadBitrate
>>
3
;
...
...
dlls/quartz/parser.c
View file @
0f1f42ea
...
...
@@ -465,6 +465,10 @@ DWORD WINAPI CParserImplThread_Entry( LPVOID pv )
}
}
This
->
m_dwThreadId
=
0
;
This
->
basefilter
.
bIntermediateState
=
FALSE
;
SetEvent
(
This
->
m_hEventInit
);
return
0
;
}
...
...
@@ -579,12 +583,21 @@ HRESULT CParserImpl_BeginThread( CParserImpl* This )
(
LPVOID
)
This
,
0
,
&
This
->
m_dwThreadId
);
if
(
This
->
m_hThread
==
(
HANDLE
)
NULL
)
{
CloseHandle
(
This
->
m_hEventInit
);
This
->
m_hEventInit
=
(
HANDLE
)
NULL
;
return
E_FAIL
;
}
hEvents
[
0
]
=
This
->
m_hEventInit
;
hEvents
[
1
]
=
This
->
m_hThread
;
dwRes
=
WaitForMultipleObjects
(
2
,
hEvents
,
FALSE
,
INFINITE
);
ResetEvent
(
This
->
m_hEventInit
);
CloseHandle
(
This
->
m_hThread
);
This
->
m_hThread
=
(
HANDLE
)
NULL
;
if
(
dwRes
!=
WAIT_OBJECT_0
)
return
E_FAIL
;
...
...
@@ -592,25 +605,26 @@ HRESULT CParserImpl_BeginThread( CParserImpl* This )
}
static
void
CParserImpl_EndThread
(
CParserImpl
*
This
)
BOOL
CParserImpl_EndThread
(
CParserImpl
*
This
,
BOOL
bAsync
)
{
DWORD
dwThreadId
;
TRACE
(
"(%p)
\n
"
,
This
);
if
(
This
->
m_hThread
!=
(
HANDLE
)
NULL
)
{
if
(
PostThreadMessageA
(
This
->
m_dwThreadId
,
QUARTZ_MSG_EXITTHREAD
,
0
,
0
)
)
{
WaitForSingleObject
(
This
->
m_hThread
,
INFINITE
);
}
CloseHandle
(
This
->
m_hThread
);
This
->
m_hThread
=
(
HANDLE
)
NULL
;
This
->
m_dwThreadId
=
0
;
}
dwThreadId
=
This
->
m_dwThreadId
;
if
(
This
->
m_hEventInit
!=
(
HANDLE
)
NULL
)
{
if
(
dwThreadId
!=
0
)
/* FIXME? */
PostThreadMessageA
(
dwThreadId
,
QUARTZ_MSG_EXITTHREAD
,
0
,
0
);
if
(
bAsync
)
return
FALSE
;
WaitForSingleObject
(
This
->
m_hEventInit
,
INFINITE
);
CloseHandle
(
This
->
m_hEventInit
);
This
->
m_hEventInit
=
(
HANDLE
)
NULL
;
}
return
TRUE
;
}
static
...
...
@@ -713,7 +727,7 @@ static HRESULT CParserImpl_OnInactive( CBaseFilterImpl* pImpl )
hr
=
CParserImpl_BeginThread
(
This
);
if
(
FAILED
(
hr
)
)
{
CParserImpl_EndThread
(
This
);
CParserImpl_EndThread
(
This
,
FALSE
);
return
hr
;
}
...
...
@@ -726,8 +740,11 @@ static HRESULT CParserImpl_OnStop( CBaseFilterImpl* pImpl )
FIXME
(
"(%p)
\n
"
,
This
);
CParserImpl_EndThread
(
This
);
This
->
basefilter
.
bIntermediateState
=
TRUE
;
if
(
!
CParserImpl_EndThread
(
This
,
TRUE
)
)
return
VFW_S_STATE_INTERMEDIATE
;
This
->
basefilter
.
bIntermediateState
=
FALSE
;
return
NOERROR
;
}
...
...
@@ -857,8 +874,9 @@ static HRESULT CParserInPinImpl_OnDisconnect( CPinBaseImpl* pImpl )
{
CParserInPinImpl_THIS
(
pImpl
,
pin
);
CParserImpl_OnInactive
(
&
This
->
pParser
->
basefilter
);
CParserImpl_OnStop
(
&
This
->
pParser
->
basefilter
);
/* assume the graph is already stopped */
/*CParserImpl_OnInactive(&This->pParser->basefilter);*/
/*CParserImpl_OnStop(&This->pParser->basefilter);*/
if
(
This
->
pParser
->
m_pHandler
->
pUninitParser
!=
NULL
)
This
->
pParser
->
m_pHandler
->
pUninitParser
(
This
->
pParser
);
CParserImpl_SetAsyncReader
(
This
->
pParser
,
NULL
);
...
...
dlls/quartz/xform.h
View file @
0f1f42ea
...
...
@@ -121,5 +121,6 @@ HRESULT QUARTZ_CreateTransformBaseOutPin(
HRESULT
QUARTZ_CreateAVIDec
(
IUnknown
*
punkOuter
,
void
**
ppobj
);
HRESULT
QUARTZ_CreateColour
(
IUnknown
*
punkOuter
,
void
**
ppobj
);
HRESULT
QUARTZ_CreateACMWrapper
(
IUnknown
*
punkOuter
,
void
**
ppobj
);
#endif
/* WINE_DSHOW_XFORM_H */
winedefault.reg
View file @
0f1f42ea
...
...
@@ -527,6 +527,46 @@
30,74,79,33,00,00,00,00,60,00,00,00,60,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
# CLSID_MPEG1Splitter
[HKEY_CLASSES_ROOT\CLSID\{336475D0-942A-11CE-A870-00AA002FEAB5}]
@="MPEG1 Splitter"
[HKEY_CLASSES_ROOT\CLSID\{336475D0-942A-11CE-A870-00AA002FEAB5}\InprocServer32]
@="quartz.dll"
"ThreadingModel"="Both"
[HKEY_CLASSES_ROOT\CLSID\{083863F1-70DE-11D0-BD40-00A0C911CE86}\Instance\{336475D0-942A-11CE-A870-00AA002FEAB5}]
"CLSID"="{336475D0-942A-11CE-A870-00AA002FEAB5}"
"FriendlyName"="MPEG1 Splitter"
# FilterData of generic transform filter.
"FilterData"=hex:02,00,00,00,00,00,60,00,02,00,00,00,00,00,00,00,\
30,70,69,33,00,00,00,00,00,00,00,00,\
01,00,00,00,00,00,00,00,00,00,00,00,\
30,74,79,33,00,00,00,00,60,00,00,00,60,00,00,00,\
31,70,69,33,08,00,00,00,00,00,00,00,\
01,00,00,00,00,00,00,00,00,00,00,00,\
30,74,79,33,00,00,00,00,60,00,00,00,60,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
# CLSID_ACMWrapper
[HKEY_CLASSES_ROOT\CLSID\{6A08CF80-0E18-11CF-A24D-0020AFD79767}]
@="ACM Wrapper"
[HKEY_CLASSES_ROOT\CLSID\{6A08CF80-0E18-11CF-A24D-0020AFD79767}\InprocServer32]
@="quartz.dll"
"ThreadingModel"="Both"
[HKEY_CLASSES_ROOT\CLSID\{083863F1-70DE-11D0-BD40-00A0C911CE86}\Instance\{6A08CF80-0E18-11CF-A24D-0020AFD79767}]
"CLSID"="{6A08CF80-0E18-11CF-A24D-0020AFD79767}"
"FriendlyName"="ACM Wrapper"
# FilterData of generic transform filter.
"FilterData"=hex:02,00,00,00,00,00,60,00,02,00,00,00,00,00,00,00,\
30,70,69,33,00,00,00,00,00,00,00,00,\
01,00,00,00,00,00,00,00,00,00,00,00,\
30,74,79,33,00,00,00,00,60,00,00,00,60,00,00,00,\
31,70,69,33,08,00,00,00,00,00,00,00,\
01,00,00,00,00,00,00,00,00,00,00,00,\
30,74,79,33,00,00,00,00,60,00,00,00,60,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
#
...
...
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