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
1dd11e63
Commit
1dd11e63
authored
Sep 16, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Aggregate a IWMSyncReader in the async reader.
Instead of an internal struct wm_reader.
parent
131ada05
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
16 deletions
+57
-16
gst_private.h
dlls/winegstreamer/gst_private.h
+3
-0
winegstreamer.spec
dlls/winegstreamer/winegstreamer.spec
+1
-1
wm_asyncreader.c
dlls/winegstreamer/wm_asyncreader.c
+0
-0
wm_syncreader.c
dlls/winegstreamer/wm_syncreader.c
+50
-12
wmvcore_main.c
dlls/wmvcore/wmvcore_main.c
+3
-3
No files found.
dlls/winegstreamer/gst_private.h
View file @
1dd11e63
...
...
@@ -183,6 +183,9 @@ struct wm_reader
WORD
stream_count
;
};
HRESULT
WINAPI
winegstreamer_create_wm_sync_reader
(
IUnknown
*
outer
,
void
**
out
);
struct
wm_reader
*
wm_reader_from_sync_reader_inner
(
IUnknown
*
inner
);
void
wm_reader_cleanup
(
struct
wm_reader
*
reader
);
HRESULT
wm_reader_close
(
struct
wm_reader
*
reader
);
HRESULT
wm_reader_get_max_stream_size
(
struct
wm_reader
*
reader
,
WORD
stream_number
,
DWORD
*
size
);
...
...
dlls/winegstreamer/winegstreamer.spec
View file @
1dd11e63
...
...
@@ -3,4 +3,4 @@
@ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer()
@ stdcall winegstreamer_create_wm_async_reader(ptr)
@ stdcall winegstreamer_create_wm_sync_reader(ptr)
@ stdcall winegstreamer_create_wm_sync_reader(ptr
ptr
)
dlls/winegstreamer/wm_asyncreader.c
View file @
1dd11e63
This diff is collapsed.
Click to expand it.
dlls/winegstreamer/wm_syncreader.c
View file @
1dd11e63
...
...
@@ -22,19 +22,20 @@ WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
struct
sync_reader
{
IUnknown
IUnknown_inner
;
IWMSyncReader2
IWMSyncReader2_iface
;
struct
wm_reader
reader
;
LONG
refcount
;
};
static
struct
sync_reader
*
impl_from_I
WMSyncReader2
(
IWMSyncReader2
*
iface
)
static
struct
sync_reader
*
impl_from_I
Unknown
(
IUnknown
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
sync_reader
,
I
WMSyncReader2_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
sync_reader
,
I
Unknown_inner
);
}
static
HRESULT
WINAPI
WMSyncReader_QueryInterface
(
IWMSyncReader2
*
iface
,
REFIID
iid
,
void
**
out
)
static
HRESULT
WINAPI
unknown_inner_QueryInterface
(
IUnknown
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
sync_reader
*
reader
=
impl_from_I
WMSyncReader2
(
iface
);
struct
sync_reader
*
reader
=
impl_from_I
Unknown
(
iface
);
TRACE
(
"reader %p, iid %s, out %p.
\n
"
,
reader
,
debugstr_guid
(
iid
),
out
);
...
...
@@ -69,17 +70,17 @@ static HRESULT WINAPI WMSyncReader_QueryInterface(IWMSyncReader2 *iface, REFIID
return
S_OK
;
}
static
ULONG
WINAPI
WMSyncReader_AddRef
(
IWMSyncReader2
*
iface
)
static
ULONG
WINAPI
unknown_inner_AddRef
(
IUnknown
*
iface
)
{
struct
sync_reader
*
reader
=
impl_from_I
WMSyncReader2
(
iface
);
struct
sync_reader
*
reader
=
impl_from_I
Unknown
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
reader
->
refcount
);
TRACE
(
"%p increasing refcount to %lu.
\n
"
,
reader
,
refcount
);
return
refcount
;
}
static
ULONG
WINAPI
WMSyncReader_Release
(
IWMSyncReader2
*
iface
)
static
ULONG
WINAPI
unknown_inner_Release
(
IUnknown
*
iface
)
{
struct
sync_reader
*
reader
=
impl_from_I
WMSyncReader2
(
iface
);
struct
sync_reader
*
reader
=
impl_from_I
Unknown
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
reader
->
refcount
);
TRACE
(
"%p decreasing refcount to %lu.
\n
"
,
reader
,
refcount
);
...
...
@@ -94,6 +95,36 @@ static ULONG WINAPI WMSyncReader_Release(IWMSyncReader2 *iface)
return
refcount
;
}
static
const
IUnknownVtbl
unknown_inner_vtbl
=
{
unknown_inner_QueryInterface
,
unknown_inner_AddRef
,
unknown_inner_Release
,
};
static
struct
sync_reader
*
impl_from_IWMSyncReader2
(
IWMSyncReader2
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
sync_reader
,
IWMSyncReader2_iface
);
}
static
HRESULT
WINAPI
WMSyncReader_QueryInterface
(
IWMSyncReader2
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
sync_reader
*
reader
=
impl_from_IWMSyncReader2
(
iface
);
return
IUnknown_QueryInterface
(
reader
->
reader
.
outer
,
iid
,
out
);
}
static
ULONG
WINAPI
WMSyncReader_AddRef
(
IWMSyncReader2
*
iface
)
{
struct
sync_reader
*
reader
=
impl_from_IWMSyncReader2
(
iface
);
return
IUnknown_AddRef
(
reader
->
reader
.
outer
);
}
static
ULONG
WINAPI
WMSyncReader_Release
(
IWMSyncReader2
*
iface
)
{
struct
sync_reader
*
reader
=
impl_from_IWMSyncReader2
(
iface
);
return
IUnknown_Release
(
reader
->
reader
.
outer
);
}
static
HRESULT
WINAPI
WMSyncReader_Close
(
IWMSyncReader2
*
iface
)
{
struct
sync_reader
*
reader
=
impl_from_IWMSyncReader2
(
iface
);
...
...
@@ -404,20 +435,27 @@ static const IWMSyncReader2Vtbl WMSyncReader2Vtbl = {
WMSyncReader2_GetAllocateForStream
};
HRESULT
WINAPI
winegstreamer_create_wm_sync_reader
(
IWMSyncReader
**
reader
)
struct
wm_reader
*
wm_reader_from_sync_reader_inner
(
IUnknown
*
iface
)
{
struct
sync_reader
*
reader
=
impl_from_IUnknown
(
iface
);
return
&
reader
->
reader
;
}
HRESULT
WINAPI
winegstreamer_create_wm_sync_reader
(
IUnknown
*
outer
,
void
**
out
)
{
struct
sync_reader
*
object
;
TRACE
(
"
reader %p.
\n
"
,
reader
);
TRACE
(
"
out %p.
\n
"
,
out
);
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
object
->
IUnknown_inner
.
lpVtbl
=
&
unknown_inner_vtbl
;
object
->
IWMSyncReader2_iface
.
lpVtbl
=
&
WMSyncReader2Vtbl
;
wm_reader_init
(
(
IUnknown
*
)
&
object
->
IWMSyncReader2_iface
,
&
object
->
reader
);
wm_reader_init
(
outer
?
outer
:
&
object
->
IUnknown_inner
,
&
object
->
reader
);
object
->
refcount
=
1
;
TRACE
(
"Created sync reader %p.
\n
"
,
object
);
*
reader
=
(
IWMSyncReader
*
)
&
object
->
IWMSyncReader2_iface
;
*
out
=
outer
?
(
void
*
)
&
object
->
IUnknown_inner
:
(
void
*
)
&
object
->
IWMSyncReader2_iface
;
return
S_OK
;
}
dlls/wmvcore/wmvcore_main.c
View file @
1dd11e63
...
...
@@ -26,7 +26,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
wmvcore
);
HRESULT
WINAPI
winegstreamer_create_wm_async_reader
(
IWMReader
**
reader
);
HRESULT
WINAPI
winegstreamer_create_wm_sync_reader
(
I
WMSyncReader
**
reader
);
HRESULT
WINAPI
winegstreamer_create_wm_sync_reader
(
I
Unknown
*
outer
,
void
**
out
);
HRESULT
WINAPI
WMCreateReader
(
IUnknown
*
reserved
,
DWORD
rights
,
IWMReader
**
reader
)
{
...
...
@@ -46,14 +46,14 @@ HRESULT WINAPI WMCreateSyncReader(IUnknown *reserved, DWORD rights, IWMSyncReade
{
TRACE
(
"reserved %p, rights %#lx, reader %p.
\n
"
,
reserved
,
rights
,
reader
);
return
winegstreamer_create_wm_sync_reader
(
reader
);
return
winegstreamer_create_wm_sync_reader
(
NULL
,
(
void
**
)
reader
);
}
HRESULT
WINAPI
WMCreateSyncReaderPriv
(
IWMSyncReader
**
reader
)
{
TRACE
(
"reader %p.
\n
"
,
reader
);
return
winegstreamer_create_wm_sync_reader
(
reader
);
return
winegstreamer_create_wm_sync_reader
(
NULL
,
(
void
**
)
reader
);
}
HRESULT
WINAPI
WMCheckURLExtension
(
const
WCHAR
*
url
)
...
...
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