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
0f8553b5
Commit
0f8553b5
authored
Apr 03, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Apr 04, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Add CLSID_AMAudioData implementation.
parent
e4ad164f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
169 additions
and
1 deletion
+169
-1
Makefile.in
dlls/amstream/Makefile.in
+1
-0
amstream_classes.idl
dlls/amstream/amstream_classes.idl
+7
-0
amstream_private.h
dlls/amstream/amstream_private.h
+2
-0
audiodata.c
dlls/amstream/audiodata.c
+157
-0
main.c
dlls/amstream/main.c
+1
-0
amstream.c
dlls/amstream/tests/amstream.c
+1
-1
No files found.
dlls/amstream/Makefile.in
View file @
0f8553b5
...
...
@@ -3,6 +3,7 @@ IMPORTS = strmiids strmbase uuid ole32 advapi32
C_SRCS
=
\
amstream.c
\
audiodata.c
\
main.c
\
mediastream.c
\
mediastreamfilter.c
...
...
dlls/amstream/amstream_classes.idl
View file @
0f8553b5
...
...
@@ -38,3 +38,10 @@ coclass AMDirectDrawStream { interface IAMMultiMediaStream; }
uuid
(
49
c47ce5
-
9b
a4
-
11
d0
-
8212
-
00
c04fc32c45
)
]
coclass
AMMultiMediaStream
{
interface
IAMMultiMediaStream
; }
[
helpstring
(
"AuStream Class"
),
threading
(
both
),
uuid
(
f2468580
-
af8a
-
11
d0
-
8212
-
00
c04fc32c45
)
]
coclass
AMAudioData
{
interface
IAudioData
; }
dlls/amstream/amstream_private.h
View file @
0f8553b5
...
...
@@ -30,8 +30,10 @@
#include "winuser.h"
#include "dshow.h"
#include "mmstream.h"
#include "austream.h"
HRESULT
AM_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
DECLSPEC_HIDDEN
;
HRESULT
AMAudioData_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
DECLSPEC_HIDDEN
;
HRESULT
MediaStreamFilter_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
DECLSPEC_HIDDEN
;
HRESULT
mediastream_create
(
IMultiMediaStream
*
Parent
,
const
MSPID
*
pPurposeId
,
STREAM_TYPE
StreamType
,
IMediaStream
**
ppMediaStream
)
DECLSPEC_HIDDEN
;
...
...
dlls/amstream/audiodata.c
0 → 100644
View file @
0f8553b5
/*
* Implementation of IAudioData Interface
*
* Copyright 2012 Christian Costa
*
* 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
*/
#include "wine/debug.h"
#define COBJMACROS
#include "winbase.h"
#include "amstream_private.h"
#include "amstream.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
amstream
);
typedef
struct
{
IAudioData
IAudioData_iface
;
LONG
ref
;
}
AMAudioDataImpl
;
static
inline
AMAudioDataImpl
*
impl_from_IAudioData
(
IAudioData
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
AMAudioDataImpl
,
IAudioData_iface
);
}
/*** IUnknown methods ***/
static
HRESULT
WINAPI
IAudioDataImpl_QueryInterface
(
IAudioData
*
iface
,
REFIID
riid
,
void
**
ret_iface
)
{
TRACE
(
"(%p)->(%s,%p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ret_iface
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IMemoryData
)
||
IsEqualGUID
(
riid
,
&
IID_IAudioData
))
{
IUnknown_AddRef
(
iface
);
*
ret_iface
=
iface
;
return
S_OK
;
}
ERR
(
"(%p)->(%s,%p),not found
\n
"
,
iface
,
debugstr_guid
(
riid
),
ret_iface
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IAudioDataImpl_AddRef
(
IAudioData
*
iface
)
{
AMAudioDataImpl
*
This
=
impl_from_IAudioData
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(): new ref = %u
\n
"
,
iface
,
This
->
ref
);
return
ref
;
}
static
ULONG
WINAPI
IAudioDataImpl_Release
(
IAudioData
*
iface
)
{
AMAudioDataImpl
*
This
=
impl_from_IAudioData
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(): new ref = %u
\n
"
,
iface
,
This
->
ref
);
if
(
!
ref
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
ref
;
}
/*** IMemoryData methods ***/
static
HRESULT
WINAPI
IAudioDataImpl_SetBuffer
(
IAudioData
*
iface
,
DWORD
size
,
BYTE
*
data
,
DWORD
flags
)
{
FIXME
(
"(%p)->(%u,%p,%x): stub
\n
"
,
iface
,
size
,
data
,
flags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IAudioDataImpl_GetInfo
(
IAudioData
*
iface
,
DWORD
*
length
,
BYTE
**
data
,
DWORD
*
actual_data
)
{
FIXME
(
"(%p)->(%p,%p,%p): stub
\n
"
,
iface
,
length
,
data
,
actual_data
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IAudioDataImpl_SetActual
(
IAudioData
*
iface
,
DWORD
data_valid
)
{
FIXME
(
"(%p)->(%u): stub
\n
"
,
iface
,
data_valid
);
return
E_NOTIMPL
;
}
/*** IAudioData methods ***/
static
HRESULT
WINAPI
IAudioDataImpl_GetFormat
(
IAudioData
*
iface
,
WAVEFORMATEX
*
wave_format_current
)
{
FIXME
(
"(%p)->(%p): stub
\n
"
,
iface
,
wave_format_current
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IAudioDataImpl_SetFormat
(
IAudioData
*
iface
,
const
WAVEFORMATEX
*
wave_format
)
{
FIXME
(
"(%p)->(%p): stub
\n
"
,
iface
,
wave_format
);
return
E_NOTIMPL
;
}
static
const
struct
IAudioDataVtbl
AudioData_Vtbl
=
{
/*** IUnknown methods ***/
IAudioDataImpl_QueryInterface
,
IAudioDataImpl_AddRef
,
IAudioDataImpl_Release
,
/*** IMemoryData methods ***/
IAudioDataImpl_SetBuffer
,
IAudioDataImpl_GetInfo
,
IAudioDataImpl_SetActual
,
/*** IAudioData methods ***/
IAudioDataImpl_GetFormat
,
IAudioDataImpl_SetFormat
};
HRESULT
AMAudioData_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
{
AMAudioDataImpl
*
object
;
TRACE
(
"(%p,%p)
\n
"
,
pUnkOuter
,
ppObj
);
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
AMAudioDataImpl
));
if
(
!
object
)
{
ERR
(
"Out of memory
\n
"
);
return
E_OUTOFMEMORY
;
}
object
->
IAudioData_iface
.
lpVtbl
=
&
AudioData_Vtbl
;
object
->
ref
=
1
;
*
ppObj
=
&
object
->
IAudioData_iface
;
return
S_OK
;
}
dlls/amstream/main.c
View file @
0f8553b5
...
...
@@ -75,6 +75,7 @@ static const struct object_creation_info object_creation[] =
{
{
&
CLSID_AMMultiMediaStream
,
AM_create
},
{
&
CLSID_AMDirectDrawStream
,
AM_create
},
{
&
CLSID_AMAudioData
,
AMAudioData_create
},
{
&
CLSID_MediaStreamFilter
,
MediaStreamFilter_create
}
};
...
...
dlls/amstream/tests/amstream.c
View file @
0f8553b5
...
...
@@ -334,7 +334,7 @@ static void test_media_streams(void)
{
IAudioData
*
audio_data
=
NULL
;
hr
=
CoCreateInstance
(
&
CLSID_AMAudioData
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IAudioData
,
(
void
**
)
&
audio_data
);
todo_wine
ok
(
hr
==
S_OK
,
"CoCreateInstance returned: %x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"CoCreateInstance returned: %x
\n
"
,
hr
);
hr
=
IAudioMediaStream_CreateSample
(
audio_media_stream
,
NULL
,
0
,
&
audio_sample
);
todo_wine
ok
(
hr
==
E_POINTER
,
"IAudioMediaStream_CreateSample returned: %x
\n
"
,
hr
);
...
...
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