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
d0a43d18
Commit
d0a43d18
authored
Mar 18, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Add a helper to trace video format name.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
af55f88d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
5 deletions
+41
-5
buffer.c
dlls/mfplat/buffer.c
+1
-1
main.c
dlls/mfplat/main.c
+1
-1
mediatype.c
dlls/mfplat/mediatype.c
+2
-3
mfplat_private.h
dlls/mfplat/mfplat_private.h
+37
-0
No files found.
dlls/mfplat/buffer.c
View file @
d0a43d18
...
...
@@ -642,7 +642,7 @@ HRESULT WINAPI MFCreateAlignedMemoryBuffer(DWORD max_length, DWORD alignment, IM
HRESULT
WINAPI
MFCreate2DMediaBuffer
(
DWORD
width
,
DWORD
height
,
DWORD
fourcc
,
BOOL
bottom_up
,
IMFMediaBuffer
**
buffer
)
{
TRACE
(
"%u, %u, %
#x, %d, %p.
\n
"
,
width
,
height
,
fourcc
,
bottom_up
,
buffer
);
TRACE
(
"%u, %u, %
s, %d, %p.
\n
"
,
width
,
height
,
debugstr_fourcc
(
fourcc
)
,
bottom_up
,
buffer
);
return
create_2d_buffer
(
width
,
height
,
fourcc
,
bottom_up
,
buffer
);
}
...
...
dlls/mfplat/main.c
View file @
d0a43d18
...
...
@@ -1510,7 +1510,7 @@ HRESULT WINAPI MFShutdown(void)
*/
HRESULT
WINAPI
MFCopyImage
(
BYTE
*
dest
,
LONG
deststride
,
const
BYTE
*
src
,
LONG
srcstride
,
DWORD
width
,
DWORD
lines
)
{
TRACE
(
"
(%p, %d, %p, %d, %u, %u)
\n
"
,
dest
,
deststride
,
src
,
srcstride
,
width
,
lines
);
TRACE
(
"
%p, %d, %p, %d, %u, %u.
\n
"
,
dest
,
deststride
,
src
,
srcstride
,
width
,
lines
);
while
(
lines
--
)
{
...
...
dlls/mfplat/mediatype.c
View file @
d0a43d18
...
...
@@ -19,7 +19,6 @@
#define COBJMACROS
#include "mfplat_private.h"
#include "d3d9types.h"
#include "initguid.h"
#include "ks.h"
...
...
@@ -1837,7 +1836,7 @@ HRESULT WINAPI MFGetStrideForBitmapInfoHeader(DWORD fourcc, DWORD width, LONG *s
struct
uncompressed_video_format
*
format
;
GUID
subtype
;
TRACE
(
"%
#x, %u, %p.
\n
"
,
fourcc
,
width
,
stride
);
TRACE
(
"%
s, %u, %p.
\n
"
,
debugstr_fourcc
(
fourcc
)
,
width
,
stride
);
memcpy
(
&
subtype
,
&
MFVideoFormat_Base
,
sizeof
(
subtype
));
subtype
.
Data1
=
fourcc
;
...
...
@@ -1902,7 +1901,7 @@ HRESULT WINAPI MFGetPlaneSize(DWORD fourcc, DWORD width, DWORD height, DWORD *si
unsigned
int
stride
;
GUID
subtype
;
TRACE
(
"%
#x, %u, %u, %p.
\n
"
,
fourcc
,
width
,
height
,
size
);
TRACE
(
"%
s, %u, %u, %p.
\n
"
,
debugstr_fourcc
(
fourcc
)
,
width
,
height
,
size
);
memcpy
(
&
subtype
,
&
MFVideoFormat_Base
,
sizeof
(
subtype
));
subtype
.
Data1
=
fourcc
;
...
...
dlls/mfplat/mfplat_private.h
View file @
d0a43d18
...
...
@@ -23,6 +23,7 @@
#include "mfapi.h"
#include "mfidl.h"
#include "mferror.h"
#include "d3d9types.h"
#include "wine/heap.h"
#include "wine/debug.h"
...
...
@@ -145,3 +146,39 @@ static inline const char *debugstr_propvar(const PROPVARIANT *v)
return
wine_dbg_sprintf
(
"%p {vt %#x}"
,
v
,
v
->
vt
);
}
}
static
inline
const
char
*
debugstr_fourcc
(
DWORD
format
)
{
static
const
struct
format_name
{
unsigned
int
format
;
const
char
*
name
;
}
formats
[]
=
{
{
D3DFMT_R8G8B8
,
"R8G8B8"
},
{
D3DFMT_A8R8G8B8
,
"A8R8G8B8"
},
{
D3DFMT_X8R8G8B8
,
"X8R8G8B8"
},
{
D3DFMT_R5G6B5
,
"R5G6B5"
},
{
D3DFMT_X1R5G5B5
,
"X1R5G6B5"
},
{
D3DFMT_A2B10G10R10
,
"A2B10G10R10"
},
{
D3DFMT_P8
,
"P8"
},
{
D3DFMT_L8
,
"L8"
},
{
D3DFMT_D16
,
"D16"
},
{
D3DFMT_L16
,
"L16"
},
{
D3DFMT_A16B16G16R16F
,
"A16B16G16R16F"
},
};
int
i
;
if
((
format
&
0xff
)
==
format
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
formats
);
++
i
)
{
if
(
formats
[
i
].
format
==
format
)
return
wine_dbg_sprintf
(
"%s"
,
wine_dbgstr_an
(
formats
[
i
].
name
,
-
1
));
}
return
wine_dbg_sprintf
(
"%#x"
,
format
);
}
return
wine_dbgstr_an
((
char
*
)
&
format
,
4
);
}
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