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
ee16e714
Commit
ee16e714
authored
Apr 07, 2023
by
Giovanni Mascellani
Committed by
Alexandre Julliard
Apr 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/tests: Test locking flags for D3D9 buffers.
parent
ef4441a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
1 deletion
+66
-1
mfplat.c
dlls/mfplat/tests/mfplat.c
+66
-1
No files found.
dlls/mfplat/tests/mfplat.c
View file @
ee16e714
...
@@ -6647,6 +6647,8 @@ static void test_MFCreateDXSurfaceBuffer(void)
...
@@ -6647,6 +6647,8 @@ static void test_MFCreateDXSurfaceBuffer(void)
hr
=
IMFMediaBuffer_QueryInterface
(
buffer
,
&
IID_IMF2DBuffer2
,
(
void
**
)
&
_2dbuffer2
);
hr
=
IMFMediaBuffer_QueryInterface
(
buffer
,
&
IID_IMF2DBuffer2
,
(
void
**
)
&
_2dbuffer2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
/* Lock flags are ignored, so writing is allowed when locking for
* reading and viceversa. */
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_Read
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_Read
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
data
==
data2
,
"Unexpected scanline pointer.
\n
"
);
ok
(
data
==
data2
,
"Unexpected scanline pointer.
\n
"
);
...
@@ -6664,9 +6666,72 @@ static void test_MFCreateDXSurfaceBuffer(void)
...
@@ -6664,9 +6666,72 @@ static void test_MFCreateDXSurfaceBuffer(void)
hr
=
IMFMediaBuffer_Unlock
(
buffer
);
hr
=
IMFMediaBuffer_Unlock
(
buffer
);
ok
(
hr
==
S_OK
||
broken
(
broken_test
),
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
broken
(
broken_test
),
"Unexpected hr %#lx.
\n
"
,
hr
);
/* Also, flags incompatibilities are not taken into account even
* if a buffer is already locked. */
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_ReadWrite
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_ReadWrite
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_ReadWrite
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_Read
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_Write
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer_Lock2D
(
_2dbuffer
,
&
data
,
&
pitch
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_Read
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_Read
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_ReadWrite
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_Write
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer_Lock2D
(
_2dbuffer
,
&
data
,
&
pitch
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
/* Except when originally locking for writing. */
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_Write
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_Write
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_ReadWrite
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
todo_wine
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_WAS_LOCKED
),
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_Read
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
todo_wine
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_WAS_LOCKED
),
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer_Lock2D
(
_2dbuffer
,
&
data
,
&
pitch
);
todo_wine
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_WAS_LOCKED
),
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
todo_wine
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_WAS_UNLOCKED
),
"Unexpected hr %#lx.
\n
"
,
hr
);
IMF2DBuffer2_Release
(
_2dbuffer2
);
IMF2DBuffer2_Release
(
_2dbuffer2
);
...
...
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