Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
893fc773
Commit
893fc773
authored
16 years ago
by
Christian Costa
Committed by
Alexandre Julliard
15 years ago
Browse files
Options
Downloads
Patches
Plain Diff
mciqtz32: Add basic play capability.
parent
e0574936
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/mciqtz32/Makefile.in
+1
-1
1 addition, 1 deletion
dlls/mciqtz32/Makefile.in
dlls/mciqtz32/mciqtz.c
+169
-1
169 additions, 1 deletion
dlls/mciqtz32/mciqtz.c
dlls/mciqtz32/mciqtz_private.h
+8
-1
8 additions, 1 deletion
dlls/mciqtz32/mciqtz_private.h
with
178 additions
and
3 deletions
dlls/mciqtz32/Makefile.in
+
1
−
1
View file @
893fc773
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
mciqtz32.dll
IMPORTS
=
winmm user32 kernel32
IMPORTS
=
strmiids oleaut32 ole32
winmm user32 kernel32
C_SRCS
=
\
mciqtz.c
...
...
This diff is collapsed.
Click to expand it.
dlls/mciqtz32/mciqtz.c
+
169
−
1
View file @
893fc773
...
...
@@ -25,6 +25,7 @@
#include
"mmddk.h"
#include
"wine/debug.h"
#include
"mciqtz_private.h"
#include
"digitalv.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mciqtz
);
...
...
@@ -131,6 +132,73 @@ static WINE_MCIQTZ* MCIQTZ_mciGetOpenDev(UINT wDevID)
return
wma
;
}
/***************************************************************************
* MCIQTZ_mciOpen [internal]
*/
static
DWORD
MCIQTZ_mciOpen
(
UINT
wDevID
,
DWORD
dwFlags
,
LPMCI_DGV_OPEN_PARMSW
lpOpenParms
)
{
WINE_MCIQTZ
*
wma
;
HRESULT
hr
;
TRACE
(
"(%04x, %08X, %p)
\n
"
,
wDevID
,
dwFlags
,
lpOpenParms
);
MCIQTZ_mciStop
(
wDevID
,
MCI_WAIT
,
NULL
);
if
(
!
lpOpenParms
)
return
MCIERR_NULL_PARAMETER_BLOCK
;
wma
=
(
WINE_MCIQTZ
*
)
mciGetDriverData
(
wDevID
);
if
(
!
wma
)
return
MCIERR_INVALID_DEVICE_ID
;
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
hr
=
CoCreateInstance
(
&
CLSID_FilterGraph
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IGraphBuilder
,
(
LPVOID
*
)
&
wma
->
pgraph
);
if
(
FAILED
(
hr
))
{
TRACE
(
"Cannot create filtergraph (hr = %x)
\n
"
,
hr
);
goto
err
;
}
hr
=
IGraphBuilder_QueryInterface
(
wma
->
pgraph
,
&
IID_IMediaControl
,
(
LPVOID
*
)
&
wma
->
pmctrl
);
if
(
FAILED
(
hr
))
{
TRACE
(
"Cannot get IMediaControl interface (hr = %x)
\n
"
,
hr
);
goto
err
;
}
if
(
!
((
dwFlags
&
MCI_OPEN_ELEMENT
)
&&
(
dwFlags
&
MCI_OPEN_ELEMENT
)))
{
TRACE
(
"Wrong dwFlags %x
\n
"
,
dwFlags
);
goto
err
;
}
if
(
!
lpOpenParms
->
lpstrElementName
&&
!
lstrlenW
(
lpOpenParms
->
lpstrElementName
))
{
TRACE
(
"Invalid filename specified
\n
"
);
goto
err
;
}
TRACE
(
"Open file %s
\n
"
,
debugstr_w
(
lpOpenParms
->
lpstrElementName
));
hr
=
IGraphBuilder_RenderFile
(
wma
->
pgraph
,
lpOpenParms
->
lpstrElementName
,
NULL
);
if
(
FAILED
(
hr
))
{
TRACE
(
"Cannot render file (hr = %x)
\n
"
,
hr
);
goto
err
;
}
return
0
;
err:
if
(
wma
->
pgraph
)
IGraphBuilder_Release
(
wma
->
pgraph
);
wma
->
pgraph
=
NULL
;
if
(
wma
->
pmctrl
)
IMediaControl_Release
(
wma
->
pmctrl
);
wma
->
pmctrl
=
NULL
;
CoUninitialize
();
return
MCIERR_INTERNAL
;
}
/***************************************************************************
* MCIQTZ_mciClose [internal]
*/
...
...
@@ -146,6 +214,41 @@ static DWORD MCIQTZ_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP
if
(
!
wma
)
return
MCIERR_INVALID_DEVICE_ID
;
if
(
wma
->
pgraph
)
IGraphBuilder_Release
(
wma
->
pgraph
);
wma
->
pgraph
=
NULL
;
if
(
wma
->
pmctrl
)
IMediaControl_Release
(
wma
->
pmctrl
);
wma
->
pmctrl
=
NULL
;
CoUninitialize
();
return
0
;
}
/***************************************************************************
* MCIQTZ_mciPlay [internal]
*/
static
DWORD
MCIQTZ_mciPlay
(
UINT
wDevID
,
DWORD
dwFlags
,
LPMCI_PLAY_PARMS
lpParms
)
{
WINE_MCIQTZ
*
wma
;
HRESULT
hr
;
TRACE
(
"(%04x, %08X, %p)
\n
"
,
wDevID
,
dwFlags
,
lpParms
);
if
(
!
lpParms
)
return
MCIERR_NULL_PARAMETER_BLOCK
;
wma
=
MCIQTZ_mciGetOpenDev
(
wDevID
);
hr
=
IMediaControl_Run
(
wma
->
pmctrl
);
if
(
FAILED
(
hr
))
{
TRACE
(
"Cannot run filtergraph (hr = %x)
\n
"
,
hr
);
return
MCIERR_INTERNAL
;
}
wma
->
started
=
TRUE
;
return
0
;
}
...
...
@@ -155,6 +258,7 @@ static DWORD MCIQTZ_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP
static
DWORD
MCIQTZ_mciStop
(
UINT
wDevID
,
DWORD
dwFlags
,
LPMCI_GENERIC_PARMS
lpParms
)
{
WINE_MCIQTZ
*
wma
;
HRESULT
hr
;
TRACE
(
"(%04x, %08X, %p)
\n
"
,
wDevID
,
dwFlags
,
lpParms
);
...
...
@@ -162,6 +266,17 @@ static DWORD MCIQTZ_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa
if
(
!
wma
)
return
MCIERR_INVALID_DEVICE_ID
;
if
(
!
wma
->
started
)
return
0
;
hr
=
IMediaControl_Stop
(
wma
->
pmctrl
);
if
(
FAILED
(
hr
))
{
TRACE
(
"Cannot stop filtergraph (hr = %x)
\n
"
,
hr
);
return
MCIERR_INTERNAL
;
}
wma
->
started
=
FALSE
;
return
0
;
}
...
...
@@ -195,7 +310,60 @@ LRESULT CALLBACK MCIQTZ_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
if
(
dwDevID
==
0xFFFFFFFF
)
return
1
;
FIXME
(
"Unsupported command [%u]
\n
"
,
wMsg
);
switch
(
wMsg
)
{
case
MCI_OPEN_DRIVER
:
return
MCIQTZ_mciOpen
(
dwDevID
,
dwParam1
,
(
LPMCI_DGV_OPEN_PARMSW
)
dwParam2
);
case
MCI_CLOSE_DRIVER
:
return
MCIQTZ_mciClose
(
dwDevID
,
dwParam1
,
(
LPMCI_GENERIC_PARMS
)
dwParam2
);
case
MCI_PLAY
:
return
MCIQTZ_mciPlay
(
dwDevID
,
dwParam1
,
(
LPMCI_PLAY_PARMS
)
dwParam2
);
case
MCI_RECORD
:
case
MCI_STOP
:
case
MCI_SET
:
case
MCI_PAUSE
:
case
MCI_RESUME
:
case
MCI_STATUS
:
case
MCI_GETDEVCAPS
:
case
MCI_INFO
:
case
MCI_SEEK
:
case
MCI_PUT
:
case
MCI_WINDOW
:
case
MCI_LOAD
:
case
MCI_SAVE
:
case
MCI_FREEZE
:
case
MCI_REALIZE
:
case
MCI_UNFREEZE
:
case
MCI_UPDATE
:
case
MCI_WHERE
:
case
MCI_STEP
:
case
MCI_COPY
:
case
MCI_CUT
:
case
MCI_DELETE
:
case
MCI_PASTE
:
case
MCI_CUE
:
/* Digital Video specific */
case
MCI_CAPTURE
:
case
MCI_MONITOR
:
case
MCI_RESERVE
:
case
MCI_SETAUDIO
:
case
MCI_SIGNAL
:
case
MCI_SETVIDEO
:
case
MCI_QUALITY
:
case
MCI_LIST
:
case
MCI_UNDO
:
case
MCI_CONFIGURE
:
case
MCI_RESTORE
:
FIXME
(
"Unimplemented command [%u]
\n
"
,
wMsg
);
break
;
case
MCI_SPIN
:
case
MCI_ESCAPE
:
WARN
(
"Unsupported command [%u]
\n
"
,
wMsg
);
break
;
case
MCI_OPEN
:
case
MCI_CLOSE
:
FIXME
(
"Shouldn't receive a MCI_OPEN or CLOSE message
\n
"
);
break
;
default:
TRACE
(
"Sending msg [%u] to default driver proc
\n
"
,
wMsg
);
return
DefDriverProc
(
dwDevID
,
hDriv
,
wMsg
,
dwParam1
,
dwParam2
);
}
return
MCIERR_UNRECOGNIZED_COMMAND
;
}
This diff is collapsed.
Click to expand it.
dlls/mciqtz32/mciqtz_private.h
+
8
−
1
View file @
893fc773
...
...
@@ -21,8 +21,15 @@
#ifndef __WINE_PRIVATE_MCIQTZ_H
#define __WINE_PRIVATE_MCIQTZ_H
#define COBJMACROS
#include
"dshow.h"
typedef
struct
{
MCIDEVICEID
wDevID
;
MCIDEVICEID
wDevID
;
IGraphBuilder
*
pgraph
;
IMediaControl
*
pmctrl
;
BOOL
started
;
}
WINE_MCIQTZ
;
#endif
/* __WINE_PRIVATE_MCIQTZ_H */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment