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
70efc785
Commit
70efc785
authored
Jun 28, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Return a IMFMediaSource from media_source_constructor.
parent
cdecf17d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
24 deletions
+7
-24
media_source.c
dlls/winegstreamer/media_source.c
+7
-24
No files found.
dlls/winegstreamer/media_source.c
View file @
70efc785
...
...
@@ -1520,7 +1520,7 @@ static void media_source_init_descriptors(struct media_source *source)
}
}
static
HRESULT
media_source_c
onstructor
(
IMFByteStream
*
bytestream
,
struct
media_source
**
out_media_source
)
static
HRESULT
media_source_c
reate
(
IMFByteStream
*
bytestream
,
IMFMediaSource
**
out
)
{
unsigned
int
stream_count
=
UINT_MAX
;
struct
media_source
*
object
;
...
...
@@ -1622,10 +1622,11 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
media_source_init_descriptors
(
object
);
object
->
state
=
SOURCE_STOPPED
;
*
out_media_source
=
object
;
*
out
=
&
object
->
IMFMediaSource_iface
;
TRACE
(
"Created IMFMediaSource %p
\n
"
,
*
out
);
return
S_OK
;
fail:
fail:
WARN
(
"Failed to construct MFMediaSource, hr %#lx.
\n
"
,
hr
);
while
(
object
->
streams
&&
object
->
stream_count
--
)
...
...
@@ -1979,28 +1980,10 @@ static HRESULT WINAPI stream_handler_callback_GetParameters(IMFAsyncCallback *if
return
E_NOTIMPL
;
}
static
HRESULT
stream_handler_create_object
(
struct
stream_handler
*
handler
,
WCHAR
*
url
,
IMFByteStream
*
stream
,
IUnknown
**
out_object
)
{
HRESULT
hr
;
struct
media_source
*
new_source
;
TRACE
(
"%p, %s, %p, %p.
\n
"
,
handler
,
debugstr_w
(
url
),
stream
,
out_object
);
if
(
FAILED
(
hr
=
media_source_constructor
(
stream
,
&
new_source
)))
return
hr
;
TRACE
(
"->(%p)
\n
"
,
new_source
);
*
out_object
=
(
IUnknown
*
)
&
new_source
->
IMFMediaSource_iface
;
return
S_OK
;
}
static
HRESULT
WINAPI
stream_handler_callback_Invoke
(
IMFAsyncCallback
*
iface
,
IMFAsyncResult
*
result
)
{
struct
stream_handler
*
handler
=
impl_from_IMFAsyncCallback
(
iface
);
IUnknown
*
object
=
NULL
,
*
context_object
;
IUnknown
*
object
,
*
context_object
;
struct
create_object_context
*
context
;
struct
result_entry
*
entry
;
IMFAsyncResult
*
caller
;
...
...
@@ -2016,8 +1999,8 @@ static HRESULT WINAPI stream_handler_callback_Invoke(IMFAsyncCallback *iface, IM
context
=
impl_from_IUnknown
(
context_object
);
if
(
FAILED
(
hr
=
stream_handler_create_object
(
handler
,
context
->
url
,
context
->
stream
,
&
object
)))
WARN
(
"Failed to create
object
, hr %#lx
\n
"
,
hr
);
if
(
FAILED
(
hr
=
media_source_create
(
context
->
stream
,
(
IMFMediaSource
**
)
&
object
)))
WARN
(
"Failed to create
media source
, hr %#lx
\n
"
,
hr
);
else
{
if
(
FAILED
(
hr
=
result_entry_create
(
caller
,
MF_OBJECT_MEDIASOURCE
,
object
,
&
entry
)))
...
...
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