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
78789038
Commit
78789038
authored
Sep 26, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Keep input / output stream info in struct video_processor.
And calculate the sizes when media type is successfully changed.
parent
e06284fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
32 deletions
+15
-32
video_processor.c
dlls/winegstreamer/video_processor.c
+15
-32
No files found.
dlls/winegstreamer/video_processor.c
View file @
78789038
...
...
@@ -73,11 +73,14 @@ struct video_processor
IMFTransform
IMFTransform_iface
;
LONG
refcount
;
IMFMediaType
*
input_type
;
IMFMediaType
*
output_type
;
IMFAttributes
*
attributes
;
IMFAttributes
*
output_attributes
;
IMFMediaType
*
input_type
;
MFT_INPUT_STREAM_INFO
input_info
;
IMFMediaType
*
output_type
;
MFT_OUTPUT_STREAM_INFO
output_info
;
struct
wg_transform
*
wg_transform
;
struct
wg_sample_queue
*
wg_sample_queue
;
};
...
...
@@ -192,54 +195,26 @@ static HRESULT WINAPI video_processor_GetStreamIDs(IMFTransform *iface, DWORD in
static
HRESULT
WINAPI
video_processor_GetInputStreamInfo
(
IMFTransform
*
iface
,
DWORD
id
,
MFT_INPUT_STREAM_INFO
*
info
)
{
struct
video_processor
*
impl
=
impl_from_IMFTransform
(
iface
);
UINT32
sample_size
;
UINT64
framesize
;
GUID
subtype
;
HRESULT
hr
;
TRACE
(
"iface %p, id %#lx, info %p.
\n
"
,
iface
,
id
,
info
);
if
(
id
)
return
MF_E_INVALIDSTREAMNUMBER
;
if
(
impl
->
input_type
&&
SUCCEEDED
(
hr
=
IMFMediaType_GetGUID
(
impl
->
input_type
,
&
MF_MT_SUBTYPE
,
&
subtype
))
&&
SUCCEEDED
(
hr
=
IMFMediaType_GetUINT64
(
impl
->
input_type
,
&
MF_MT_FRAME_SIZE
,
&
framesize
)))
MFCalculateImageSize
(
&
subtype
,
framesize
>>
32
,
(
UINT32
)
framesize
,
&
sample_size
);
else
sample_size
=
0
;
info
->
dwFlags
=
0
;
info
->
cbSize
=
sample_size
;
info
->
cbAlignment
=
0
;
info
->
hnsMaxLatency
=
0
;
info
->
cbMaxLookahead
=
0
;
*
info
=
impl
->
input_info
;
return
S_OK
;
}
static
HRESULT
WINAPI
video_processor_GetOutputStreamInfo
(
IMFTransform
*
iface
,
DWORD
id
,
MFT_OUTPUT_STREAM_INFO
*
info
)
{
struct
video_processor
*
impl
=
impl_from_IMFTransform
(
iface
);
UINT32
sample_size
;
UINT64
framesize
;
GUID
subtype
;
HRESULT
hr
;
TRACE
(
"iface %p, id %#lx, info %p.
\n
"
,
iface
,
id
,
info
);
if
(
id
)
return
MF_E_INVALIDSTREAMNUMBER
;
if
(
impl
->
output_type
&&
SUCCEEDED
(
hr
=
IMFMediaType_GetGUID
(
impl
->
output_type
,
&
MF_MT_SUBTYPE
,
&
subtype
))
&&
SUCCEEDED
(
hr
=
IMFMediaType_GetUINT64
(
impl
->
output_type
,
&
MF_MT_FRAME_SIZE
,
&
framesize
)))
MFCalculateImageSize
(
&
subtype
,
framesize
>>
32
,
(
UINT32
)
framesize
,
&
sample_size
);
else
sample_size
=
0
;
info
->
dwFlags
=
0
;
info
->
cbSize
=
sample_size
;
info
->
cbAlignment
=
0
;
*
info
=
impl
->
output_info
;
return
S_OK
;
}
...
...
@@ -397,6 +372,10 @@ static HRESULT WINAPI video_processor_SetInputType(IMFTransform *iface, DWORD id
impl
->
input_type
=
NULL
;
}
if
(
FAILED
(
hr
)
||
FAILED
(
MFCalculateImageSize
(
&
subtype
,
frame_size
>>
32
,
(
UINT32
)
frame_size
,
(
UINT32
*
)
&
impl
->
input_info
.
cbSize
)))
impl
->
input_info
.
cbSize
=
0
;
return
hr
;
}
...
...
@@ -436,6 +415,10 @@ static HRESULT WINAPI video_processor_SetOutputType(IMFTransform *iface, DWORD i
impl
->
output_type
=
NULL
;
}
if
(
FAILED
(
hr
)
||
FAILED
(
MFCalculateImageSize
(
&
subtype
,
frame_size
>>
32
,
(
UINT32
)
frame_size
,
(
UINT32
*
)
&
impl
->
output_info
.
cbSize
)))
impl
->
output_info
.
cbSize
=
0
;
return
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