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
039c15a6
Commit
039c15a6
authored
Dec 14, 2008
by
Christian Costa
Committed by
Alexandre Julliard
Dec 15, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Implement IDirectDrawMediaStream.
parent
53562c7a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
130 additions
and
2 deletions
+130
-2
amstream.c
dlls/amstream/amstream.c
+5
-1
amstream_private.h
dlls/amstream/amstream_private.h
+1
-0
mediastream.c
dlls/amstream/mediastream.c
+124
-1
No files found.
dlls/amstream/amstream.c
View file @
039c15a6
...
...
@@ -257,7 +257,11 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream
FIXME
(
"(%p/%p)->(%p,%p,%x,%p) partial stub!
\n
"
,
This
,
iface
,
pStreamObject
,
PurposeId
,
dwFlags
,
ppNewStream
);
hr
=
MediaStream_create
((
IMultiMediaStream
*
)
iface
,
PurposeId
,
This
->
StreamType
,
&
pStream
);
if
(
IsEqualGUID
(
PurposeId
,
&
MSPID_PrimaryVideo
))
hr
=
DirectDrawMediaStream_create
((
IMultiMediaStream
*
)
iface
,
PurposeId
,
This
->
StreamType
,
&
pStream
);
else
hr
=
MediaStream_create
((
IMultiMediaStream
*
)
iface
,
PurposeId
,
This
->
StreamType
,
&
pStream
);
if
(
SUCCEEDED
(
hr
))
{
pNewStreams
=
CoTaskMemAlloc
((
This
->
nbStreams
+
1
)
*
sizeof
(
IMediaStream
*
));
...
...
dlls/amstream/amstream_private.h
View file @
039c15a6
...
...
@@ -36,5 +36,6 @@
HRESULT
AM_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
);
HRESULT
MediaStream_create
(
IMultiMediaStream
*
Parent
,
const
MSPID
*
pPurposeId
,
STREAM_TYPE
StreamType
,
IMediaStream
**
ppMediaStream
);
HRESULT
DirectDrawMediaStream_create
(
IMultiMediaStream
*
Parent
,
const
MSPID
*
pPurposeId
,
STREAM_TYPE
StreamType
,
IMediaStream
**
ppMediaStream
);
#endif
/* __AMSTREAM_PRIVATE_INCLUDED__ */
dlls/amstream/mediastream.c
View file @
039c15a6
/*
* Implementation of IMediaStream Interface
*
* Copyright 2005 Christian Costa
* Copyright 2005
, 2008
Christian Costa
*
* This file contains the (internal) driver registration functions,
* driver enumeration APIs and DirectDraw creation functions.
...
...
@@ -31,6 +31,8 @@
#include "amstream_private.h"
#include "amstream.h"
#include "ddstream.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
amstream
);
typedef
struct
{
...
...
@@ -41,7 +43,16 @@ typedef struct {
STREAM_TYPE
StreamType
;
}
IMediaStreamImpl
;
typedef
struct
{
IDirectDrawMediaStream
lpVtbl
;
LONG
ref
;
IMultiMediaStream
*
Parent
;
MSPID
PurposeId
;
STREAM_TYPE
StreamType
;
}
IDirectDrawMediaStreamImpl
;
static
const
struct
IMediaStreamVtbl
MediaStream_Vtbl
;
static
const
struct
IDirectDrawMediaStreamVtbl
DirectDrawMediaStream_Vtbl
;
HRESULT
MediaStream_create
(
IMultiMediaStream
*
Parent
,
const
MSPID
*
pPurposeId
,
STREAM_TYPE
StreamType
,
IMediaStream
**
ppMediaStream
)
{
...
...
@@ -177,3 +188,115 @@ static const struct IMediaStreamVtbl MediaStream_Vtbl =
IMediaStreamImpl_CreateSharedSample
,
IMediaStreamImpl_SendEndOfStream
};
HRESULT
DirectDrawMediaStream_create
(
IMultiMediaStream
*
Parent
,
const
MSPID
*
pPurposeId
,
STREAM_TYPE
StreamType
,
IMediaStream
**
ppMediaStream
)
{
IDirectDrawMediaStreamImpl
*
object
;
TRACE
(
"(%p,%p,%p)
\n
"
,
Parent
,
pPurposeId
,
ppMediaStream
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IMediaStreamImpl
));
object
->
lpVtbl
.
lpVtbl
=
&
DirectDrawMediaStream_Vtbl
;
object
->
ref
=
1
;
object
->
Parent
=
Parent
;
object
->
PurposeId
=
*
pPurposeId
;
object
->
StreamType
=
StreamType
;
*
ppMediaStream
=
(
IMediaStream
*
)
object
;
return
S_OK
;
}
static
HRESULT
WINAPI
IDirectDrawMediaStreamImpl_QueryInterface
(
IDirectDrawMediaStream
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
IMediaStreamImpl
*
This
=
(
IMediaStreamImpl
*
)
iface
;
TRACE
(
"(%p/%p)->(%s,%p)
\n
"
,
iface
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IMediaStream
)
||
IsEqualGUID
(
riid
,
&
IID_IDirectDrawMediaStream
))
{
IClassFactory_AddRef
(
iface
);
*
ppvObject
=
This
;
return
S_OK
;
}
ERR
(
"(%p)->(%s,%p),not found
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
return
E_NOINTERFACE
;
}
static
HRESULT
WINAPI
IDirectDrawMediaStreamImpl_GetFormat
(
IDirectDrawMediaStream
*
iface
,
DDSURFACEDESC
*
pDDSDCurrent
,
IDirectDrawPalette
**
ppDirectDrawPalette
,
DDSURFACEDESC
*
pDDSDDesired
,
DWORD
*
pdwFlags
)
{
FIXME
(
"(%p)->(%p,%p,%p,%p) stub!
\n
"
,
iface
,
pDDSDCurrent
,
ppDirectDrawPalette
,
pDDSDDesired
,
pdwFlags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IDirectDrawMediaStreamImpl_SetFormat
(
IDirectDrawMediaStream
*
iface
,
const
DDSURFACEDESC
*
pDDSurfaceDesc
,
IDirectDrawPalette
*
pDirectDrawPalette
)
{
FIXME
(
"(%p)->(%p,%p) stub!
\n
"
,
iface
,
pDDSurfaceDesc
,
pDirectDrawPalette
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IDirectDrawMediaStreamImpl_GetDirectDraw
(
IDirectDrawMediaStream
*
iface
,
IDirectDraw
**
ppDirectDraw
)
{
FIXME
(
"(%p)->(%p) stub!
\n
"
,
iface
,
ppDirectDraw
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IDirectDrawMediaStreamImpl_SetDirectDraw
(
IDirectDrawMediaStream
*
iface
,
IDirectDraw
*
pDirectDraw
)
{
FIXME
(
"(%p)->(%p) stub!
\n
"
,
iface
,
pDirectDraw
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IDirectDrawMediaStreamImpl_CreateSample
(
IDirectDrawMediaStream
*
iface
,
IDirectDrawSurface
*
pSurface
,
const
RECT
*
pRect
,
DWORD
dwFlags
,
IDirectDrawStreamSample
**
ppSample
)
{
FIXME
(
"(%p)->(%p,%p,%x,%p) stub!
\n
"
,
iface
,
pSurface
,
pRect
,
dwFlags
,
ppSample
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IDirectDrawMediaStreamImpl_GetTimePerFrame
(
IDirectDrawMediaStream
*
iface
,
STREAM_TIME
*
pFrameTime
)
{
FIXME
(
"(%p)->(%p) stub!
\n
"
,
iface
,
pFrameTime
);
return
E_NOTIMPL
;
}
/* Note: Hack so we can reuse the old functions without compiler warnings */
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
# define XCAST(fun) (typeof(DirectDrawMediaStream_Vtbl.fun))
#else
# define XCAST(fun) (void*)
#endif
static
const
struct
IDirectDrawMediaStreamVtbl
DirectDrawMediaStream_Vtbl
=
{
IDirectDrawMediaStreamImpl_QueryInterface
,
XCAST
(
AddRef
)
IMediaStreamImpl_AddRef
,
XCAST
(
Release
)
IMediaStreamImpl_Release
,
XCAST
(
GetMultiMediaStream
)
IMediaStreamImpl_GetMultiMediaStream
,
XCAST
(
GetInformation
)
IMediaStreamImpl_GetInformation
,
XCAST
(
SetSameFormat
)
IMediaStreamImpl_SetSameFormat
,
XCAST
(
AllocateSample
)
IMediaStreamImpl_AllocateSample
,
XCAST
(
CreateSharedSample
)
IMediaStreamImpl_CreateSharedSample
,
XCAST
(
SendEndOfStream
)
IMediaStreamImpl_SendEndOfStream
,
IDirectDrawMediaStreamImpl_GetFormat
,
IDirectDrawMediaStreamImpl_SetFormat
,
IDirectDrawMediaStreamImpl_GetDirectDraw
,
IDirectDrawMediaStreamImpl_SetDirectDraw
,
IDirectDrawMediaStreamImpl_CreateSample
,
IDirectDrawMediaStreamImpl_GetTimePerFrame
};
#undef XCAST
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