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
cd120fa8
Commit
cd120fa8
authored
Apr 27, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Query the wg_parser stream in media_stream_create.
parent
a6361204
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
media_source.c
dlls/winegstreamer/media_source.c
+11
-9
No files found.
dlls/winegstreamer/media_source.c
View file @
cd120fa8
...
@@ -821,13 +821,16 @@ static const IMFMediaStreamVtbl media_stream_vtbl =
...
@@ -821,13 +821,16 @@ static const IMFMediaStreamVtbl media_stream_vtbl =
media_stream_RequestSample
media_stream_RequestSample
};
};
static
HRESULT
new_media_stream
(
struct
media_source
*
source
,
static
HRESULT
media_stream_create
(
struct
media_source
*
source
,
DWORD
id
,
struct
wg_parser_stream
*
wg_stream
,
DWORD
stream_id
,
struct
media_stream
**
out_stream
)
struct
media_stream
**
out
)
{
{
struct
media_stream
*
object
=
calloc
(
1
,
sizeof
(
*
object
))
;
struct
media_stream
*
object
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"source %p, wg_stream %p, stream_id %lu.
\n
"
,
source
,
wg_stream
,
stream_id
);
TRACE
(
"source %p, id %lu.
\n
"
,
source
,
id
);
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
object
->
IMFMediaStream_iface
.
lpVtbl
=
&
media_stream_vtbl
;
object
->
IMFMediaStream_iface
.
lpVtbl
=
&
media_stream_vtbl
;
object
->
ref
=
1
;
object
->
ref
=
1
;
...
@@ -840,16 +843,15 @@ static HRESULT new_media_stream(struct media_source *source,
...
@@ -840,16 +843,15 @@ static HRESULT new_media_stream(struct media_source *source,
IMFMediaSource_AddRef
(
&
source
->
IMFMediaSource_iface
);
IMFMediaSource_AddRef
(
&
source
->
IMFMediaSource_iface
);
object
->
parent_source
=
source
;
object
->
parent_source
=
source
;
object
->
stream_id
=
stream_
id
;
object
->
stream_id
=
id
;
object
->
state
=
STREAM_INACTIVE
;
object
->
state
=
STREAM_INACTIVE
;
object
->
eos
=
FALSE
;
object
->
eos
=
FALSE
;
object
->
wg_stream
=
wg_
stream
;
object
->
wg_stream
=
wg_
parser_get_stream
(
source
->
wg_parser
,
id
)
;
TRACE
(
"Created stream object %p.
\n
"
,
object
);
TRACE
(
"Created stream object %p.
\n
"
,
object
);
*
out_stream
=
object
;
*
out
=
object
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -1473,7 +1475,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
...
@@ -1473,7 +1475,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
for
(
i
=
0
;
i
<
stream_count
;
++
i
)
for
(
i
=
0
;
i
<
stream_count
;
++
i
)
{
{
if
(
FAILED
(
hr
=
new_media_stream
(
object
,
wg_parser_get_stream
(
parser
,
i
)
,
i
,
&
object
->
streams
[
i
])))
if
(
FAILED
(
hr
=
media_stream_create
(
object
,
i
,
&
object
->
streams
[
i
])))
goto
fail
;
goto
fail
;
if
(
FAILED
(
hr
=
media_stream_init_desc
(
object
->
streams
[
i
])))
if
(
FAILED
(
hr
=
media_stream_init_desc
(
object
->
streams
[
i
])))
...
...
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