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
5bf6af0c
Commit
5bf6af0c
authored
Jan 23, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Remove unnecessary create_output_media_type checks.
parent
71f5bce7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
73 deletions
+45
-73
h264_decoder.c
dlls/winegstreamer/h264_decoder.c
+45
-73
No files found.
dlls/winegstreamer/h264_decoder.c
View file @
5bf6af0c
...
@@ -129,82 +129,54 @@ static HRESULT create_output_media_type(struct h264_decoder *decoder, const GUID
...
@@ -129,82 +129,54 @@ static HRESULT create_output_media_type(struct h264_decoder *decoder, const GUID
if
(
FAILED
(
hr
=
MFCreateVideoMediaTypeFromSubtype
(
subtype
,
&
video_type
)))
if
(
FAILED
(
hr
=
MFCreateVideoMediaTypeFromSubtype
(
subtype
,
&
video_type
)))
return
hr
;
return
hr
;
if
(
FAILED
(
IMFVideoMediaType_GetUINT64
(
video_type
,
&
MF_MT_FRAME_SIZE
,
&
ratio
)))
if
(
FAILED
(
IMFMediaType_GetUINT64
(
decoder
->
stream_type
,
&
MF_MT_FRAME_SIZE
,
&
ratio
)))
{
ratio
=
(
UINT64
)
1920
<<
32
|
1080
;
if
(
FAILED
(
IMFMediaType_GetUINT64
(
decoder
->
stream_type
,
&
MF_MT_FRAME_SIZE
,
&
ratio
)))
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT64
(
video_type
,
&
MF_MT_FRAME_SIZE
,
ratio
)))
ratio
=
(
UINT64
)
1920
<<
32
|
1080
;
goto
done
;
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT64
(
video_type
,
&
MF_MT_FRAME_SIZE
,
ratio
)))
goto
done
;
}
width
=
ratio
>>
32
;
width
=
ratio
>>
32
;
height
=
ratio
;
height
=
ratio
;
if
(
FAILED
(
IMFVideoMediaType_GetItem
(
video_type
,
&
MF_MT_FRAME_RATE
,
NULL
)))
if
(
FAILED
(
IMFMediaType_GetUINT64
(
decoder
->
stream_type
,
&
MF_MT_FRAME_RATE
,
&
ratio
)))
{
ratio
=
(
UINT64
)
30000
<<
32
|
1001
;
if
(
FAILED
(
IMFMediaType_GetUINT64
(
decoder
->
stream_type
,
&
MF_MT_FRAME_RATE
,
&
ratio
)))
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT64
(
video_type
,
&
MF_MT_FRAME_RATE
,
ratio
)))
ratio
=
(
UINT64
)
30000
<<
32
|
1001
;
goto
done
;
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT64
(
video_type
,
&
MF_MT_FRAME_RATE
,
ratio
)))
goto
done
;
if
(
FAILED
(
IMFMediaType_GetUINT64
(
decoder
->
stream_type
,
&
MF_MT_PIXEL_ASPECT_RATIO
,
&
ratio
)))
}
ratio
=
(
UINT64
)
1
<<
32
|
1
;
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT64
(
video_type
,
&
MF_MT_PIXEL_ASPECT_RATIO
,
ratio
)))
if
(
FAILED
(
IMFVideoMediaType_GetItem
(
video_type
,
&
MF_MT_PIXEL_ASPECT_RATIO
,
NULL
)))
goto
done
;
{
if
(
FAILED
(
IMFMediaType_GetUINT64
(
decoder
->
stream_type
,
&
MF_MT_PIXEL_ASPECT_RATIO
,
&
ratio
)))
if
(
FAILED
(
hr
=
MFCalculateImageSize
(
subtype
,
width
,
height
,
&
value
)))
ratio
=
(
UINT64
)
1
<<
32
|
1
;
goto
done
;
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT64
(
video_type
,
&
MF_MT_PIXEL_ASPECT_RATIO
,
ratio
)))
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_SAMPLE_SIZE
,
value
)))
goto
done
;
goto
done
;
}
if
(
FAILED
(
hr
=
MFGetStrideForBitmapInfoHeader
(
subtype
->
Data1
,
width
,
(
LONG
*
)
&
value
)))
if
(
FAILED
(
IMFVideoMediaType_GetItem
(
video_type
,
&
MF_MT_SAMPLE_SIZE
,
NULL
)))
goto
done
;
{
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_DEFAULT_STRIDE
,
value
)))
if
(
FAILED
(
hr
=
MFCalculateImageSize
(
subtype
,
width
,
height
,
&
value
)))
goto
done
;
goto
done
;
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_SAMPLE_SIZE
,
value
)))
if
(
!
default_type
||
FAILED
(
IMFMediaType_GetUINT32
(
default_type
,
&
MF_MT_INTERLACE_MODE
,
&
value
)))
goto
done
;
value
=
MFVideoInterlace_MixedInterlaceOrProgressive
;
}
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_INTERLACE_MODE
,
value
)))
goto
done
;
if
(
FAILED
(
IMFVideoMediaType_GetItem
(
video_type
,
&
MF_MT_DEFAULT_STRIDE
,
NULL
)))
{
if
(
!
default_type
||
FAILED
(
IMFMediaType_GetUINT32
(
default_type
,
&
MF_MT_ALL_SAMPLES_INDEPENDENT
,
&
value
)))
if
(
FAILED
(
hr
=
MFGetStrideForBitmapInfoHeader
(
subtype
->
Data1
,
width
,
(
LONG
*
)
&
value
)))
value
=
1
;
goto
done
;
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_ALL_SAMPLES_INDEPENDENT
,
value
)))
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_DEFAULT_STRIDE
,
value
)))
goto
done
;
goto
done
;
}
if
(
!
default_type
||
FAILED
(
IMFMediaType_GetUINT32
(
default_type
,
&
MF_MT_VIDEO_ROTATION
,
&
value
)))
value
=
0
;
if
(
FAILED
(
IMFVideoMediaType_GetItem
(
video_type
,
&
MF_MT_INTERLACE_MODE
,
NULL
)))
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_VIDEO_ROTATION
,
value
)))
{
goto
done
;
if
(
!
default_type
||
FAILED
(
IMFMediaType_GetUINT32
(
default_type
,
&
MF_MT_INTERLACE_MODE
,
&
value
)))
value
=
MFVideoInterlace_MixedInterlaceOrProgressive
;
if
(
!
default_type
||
FAILED
(
IMFMediaType_GetUINT32
(
default_type
,
&
MF_MT_FIXED_SIZE_SAMPLES
,
&
value
)))
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_INTERLACE_MODE
,
value
)))
value
=
1
;
goto
done
;
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_FIXED_SIZE_SAMPLES
,
value
)))
}
goto
done
;
if
(
FAILED
(
IMFVideoMediaType_GetItem
(
video_type
,
&
MF_MT_ALL_SAMPLES_INDEPENDENT
,
NULL
)))
if
(
SUCCEEDED
(
IMFMediaType_GetBlob
(
decoder
->
stream_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
{
if
(
!
default_type
||
FAILED
(
IMFMediaType_GetUINT32
(
default_type
,
&
MF_MT_ALL_SAMPLES_INDEPENDENT
,
&
value
)))
value
=
1
;
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_ALL_SAMPLES_INDEPENDENT
,
value
)))
goto
done
;
}
if
(
FAILED
(
IMFVideoMediaType_GetItem
(
video_type
,
&
MF_MT_VIDEO_ROTATION
,
NULL
)))
{
if
(
!
default_type
||
FAILED
(
IMFMediaType_GetUINT32
(
default_type
,
&
MF_MT_VIDEO_ROTATION
,
&
value
)))
value
=
0
;
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_VIDEO_ROTATION
,
value
)))
goto
done
;
}
if
(
FAILED
(
IMFVideoMediaType_GetItem
(
video_type
,
&
MF_MT_FIXED_SIZE_SAMPLES
,
NULL
)))
{
if
(
!
default_type
||
FAILED
(
IMFMediaType_GetUINT32
(
default_type
,
&
MF_MT_FIXED_SIZE_SAMPLES
,
&
value
)))
value
=
1
;
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_FIXED_SIZE_SAMPLES
,
value
)))
goto
done
;
}
if
(
FAILED
(
IMFVideoMediaType_GetItem
(
video_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
NULL
))
&&
SUCCEEDED
(
IMFMediaType_GetBlob
(
decoder
->
stream_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
value
)))
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
value
)))
{
{
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetBlob
(
video_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetBlob
(
video_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
...
...
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