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
bf0cad09
Commit
bf0cad09
authored
Jul 06, 2017
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jul 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfreadwrite: Implement MFCreateSourceReaderFromByteStream.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
34b9b100
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
175 additions
and
1 deletion
+175
-1
main.c
dlls/mfreadwrite/main.c
+172
-0
mfreadwrite.spec
dlls/mfreadwrite/mfreadwrite.spec
+1
-1
mfreadwrite.idl
include/mfreadwrite.idl
+2
-0
No files found.
dlls/mfreadwrite/main.c
View file @
bf0cad09
...
@@ -20,8 +20,11 @@
...
@@ -20,8 +20,11 @@
#include <stdarg.h>
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "initguid.h"
#include "mfreadwrite.h"
#include "mfreadwrite.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -50,3 +53,172 @@ HRESULT WINAPI MFCreateSourceReaderFromMediaSource(IMFMediaSource *source, IMFAt
...
@@ -50,3 +53,172 @@ HRESULT WINAPI MFCreateSourceReaderFromMediaSource(IMFMediaSource *source, IMFAt
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
typedef
struct
_srcreader
{
IMFSourceReader
IMFSourceReader_iface
;
LONG
ref
;
}
srcreader
;
static
inline
srcreader
*
impl_from_IMFSourceReader
(
IMFSourceReader
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
srcreader
,
IMFSourceReader_iface
);
}
static
HRESULT
WINAPI
src_reader_QueryInterface
(
IMFSourceReader
*
iface
,
REFIID
riid
,
void
**
out
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
out
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IMFSourceReader
))
{
*
out
=
&
This
->
IMFSourceReader_iface
;
}
else
{
FIXME
(
"(%s, %p)
\n
"
,
debugstr_guid
(
riid
),
out
);
*
out
=
NULL
;
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
out
);
return
S_OK
;
}
static
ULONG
WINAPI
src_reader_AddRef
(
IMFSourceReader
*
iface
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%u
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
src_reader_Release
(
IMFSourceReader
*
iface
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%u
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
src_reader_GetStreamSelection
(
IMFSourceReader
*
iface
,
DWORD
index
,
BOOL
*
selected
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
FIXME
(
"%p, 0x%08x, %p
\n
"
,
This
,
index
,
selected
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
src_reader_SetStreamSelection
(
IMFSourceReader
*
iface
,
DWORD
index
,
BOOL
selected
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
FIXME
(
"%p, 0x%08x, %d
\n
"
,
This
,
index
,
selected
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
src_reader_GetNativeMediaType
(
IMFSourceReader
*
iface
,
DWORD
index
,
DWORD
typeindex
,
IMFMediaType
**
type
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
FIXME
(
"%p, 0x%08x, %d, %p
\n
"
,
This
,
index
,
typeindex
,
type
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
src_reader_GetCurrentMediaType
(
IMFSourceReader
*
iface
,
DWORD
index
,
IMFMediaType
**
type
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
FIXME
(
"%p, 0x%08x, %p
\n
"
,
This
,
index
,
type
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
src_reader_SetCurrentMediaType
(
IMFSourceReader
*
iface
,
DWORD
index
,
DWORD
*
reserved
,
IMFMediaType
*
type
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
FIXME
(
"%p, 0x%08x, %p, %p
\n
"
,
This
,
index
,
reserved
,
type
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
src_reader_SetCurrentPosition
(
IMFSourceReader
*
iface
,
REFGUID
format
,
REFPROPVARIANT
position
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
FIXME
(
"%p, %s, %p
\n
"
,
This
,
debugstr_guid
(
format
),
position
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
src_reader_ReadSample
(
IMFSourceReader
*
iface
,
DWORD
index
,
DWORD
flags
,
DWORD
*
actualindex
,
DWORD
*
sampleflags
,
LONGLONG
*
timestamp
,
IMFSample
**
sample
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
FIXME
(
"%p, 0x%08x, 0x%08x, %p, %p, %p, %p
\n
"
,
This
,
index
,
flags
,
actualindex
,
sampleflags
,
timestamp
,
sample
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
src_reader_Flush
(
IMFSourceReader
*
iface
,
DWORD
index
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
FIXME
(
"%p, 0x%08x
\n
"
,
This
,
index
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
src_reader_GetServiceForStream
(
IMFSourceReader
*
iface
,
DWORD
index
,
REFGUID
service
,
REFIID
riid
,
void
**
object
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
FIXME
(
"%p, 0x%08x, %s, %s, %p
\n
"
,
This
,
index
,
debugstr_guid
(
service
),
debugstr_guid
(
riid
),
object
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
src_reader_GetPresentationAttribute
(
IMFSourceReader
*
iface
,
DWORD
index
,
REFGUID
guid
,
PROPVARIANT
*
attr
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
FIXME
(
"%p, 0x%08x, %s, %p
\n
"
,
This
,
index
,
debugstr_guid
(
guid
),
attr
);
return
E_NOTIMPL
;
}
struct
IMFSourceReaderVtbl
srcreader_vtbl
=
{
src_reader_QueryInterface
,
src_reader_AddRef
,
src_reader_Release
,
src_reader_GetStreamSelection
,
src_reader_SetStreamSelection
,
src_reader_GetNativeMediaType
,
src_reader_GetCurrentMediaType
,
src_reader_SetCurrentMediaType
,
src_reader_SetCurrentPosition
,
src_reader_ReadSample
,
src_reader_Flush
,
src_reader_GetServiceForStream
,
src_reader_GetPresentationAttribute
};
HRESULT
WINAPI
MFCreateSourceReaderFromByteStream
(
IMFByteStream
*
stream
,
IMFAttributes
*
attributes
,
IMFSourceReader
**
reader
)
{
srcreader
*
object
;
TRACE
(
"%p, %p, %p
\n
"
,
stream
,
attributes
,
reader
);
object
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
object
)
);
if
(
!
object
)
return
E_OUTOFMEMORY
;
object
->
ref
=
1
;
object
->
IMFSourceReader_iface
.
lpVtbl
=
&
srcreader_vtbl
;
*
reader
=
&
object
->
IMFSourceReader_iface
;
return
S_OK
;
}
dlls/mfreadwrite/mfreadwrite.spec
View file @
bf0cad09
...
@@ -2,6 +2,6 @@
...
@@ -2,6 +2,6 @@
@ stub DllGetClassObject
@ stub DllGetClassObject
@ stub MFCreateSinkWriterFromMediaSink
@ stub MFCreateSinkWriterFromMediaSink
@ stub MFCreateSinkWriterFromURL
@ stub MFCreateSinkWriterFromURL
@ st
ub MFCreateSourceReaderFromByteStream
@ st
dcall MFCreateSourceReaderFromByteStream(ptr ptr ptr)
@ stdcall MFCreateSourceReaderFromMediaSource(ptr ptr ptr)
@ stdcall MFCreateSourceReaderFromMediaSource(ptr ptr ptr)
@ stub MFCreateSourceReaderFromURL
@ stub MFCreateSourceReaderFromURL
include/mfreadwrite.idl
View file @
bf0cad09
...
@@ -93,5 +93,7 @@ interface IMFSinkWriter : IUnknown
...
@@ -93,5 +93,7 @@ interface IMFSinkWriter : IUnknown
HRESULT
GetStatistics
(
[
in
]
DWORD
index
,
[
out
]
MF_SINK_WRITER_STATISTICS
*
stats
)
;
HRESULT
GetStatistics
(
[
in
]
DWORD
index
,
[
out
]
MF_SINK_WRITER_STATISTICS
*
stats
)
;
}
;
}
;
cpp_quote
(
"HRESULT WINAPI MFCreateSourceReaderFromByteStream(IMFByteStream *stream, IMFAttributes *attributes,"
)
cpp_quote
(
" IMFSourceReader **reader);"
)
cpp_quote
(
"HRESULT WINAPI MFCreateSourceReaderFromMediaSource(IMFMediaSource *source, IMFAttributes *attributes,"
)
cpp_quote
(
"HRESULT WINAPI MFCreateSourceReaderFromMediaSource(IMFMediaSource *source, IMFAttributes *attributes,"
)
cpp_quote
(
" IMFSourceReader **reader);"
)
cpp_quote
(
" IMFSourceReader **reader);"
)
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