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
71293a01
Commit
71293a01
authored
Dec 01, 2023
by
Anton Baskanov
Committed by
Alexandre Julliard
Dec 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Send quality control messages from AMDirectDrawStream::Receive.
parent
cf931159
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
10 deletions
+24
-10
ddrawstream.c
dlls/amstream/ddrawstream.c
+14
-0
amstream.c
dlls/amstream/tests/amstream.c
+10
-10
No files found.
dlls/amstream/ddrawstream.c
View file @
71293a01
...
@@ -1409,6 +1409,7 @@ static HRESULT WINAPI ddraw_meminput_Receive(IMemInputPin *iface, IMediaSample *
...
@@ -1409,6 +1409,7 @@ static HRESULT WINAPI ddraw_meminput_Receive(IMemInputPin *iface, IMediaSample *
if
(
!
list_empty
(
&
stream
->
update_queue
))
if
(
!
list_empty
(
&
stream
->
update_queue
))
{
{
struct
ddraw_sample
*
sample
=
LIST_ENTRY
(
list_head
(
&
stream
->
update_queue
),
struct
ddraw_sample
,
entry
);
struct
ddraw_sample
*
sample
=
LIST_ENTRY
(
list_head
(
&
stream
->
update_queue
),
struct
ddraw_sample
,
entry
);
IQualityControl
*
qc
;
sample
->
update_hr
=
process_update
(
sample
,
top_down_stride
,
top_down_pointer
,
sample
->
update_hr
=
process_update
(
sample
,
top_down_stride
,
top_down_pointer
,
start_stream_time
,
end_stream_time
);
start_stream_time
,
end_stream_time
);
...
@@ -1422,6 +1423,19 @@ static HRESULT WINAPI ddraw_meminput_Receive(IMemInputPin *iface, IMediaSample *
...
@@ -1422,6 +1423,19 @@ static HRESULT WINAPI ddraw_meminput_Receive(IMemInputPin *iface, IMediaSample *
{
{
remove_queued_update
(
sample
);
remove_queued_update
(
sample
);
}
}
if
(
S_OK
==
IMediaStreamFilter_GetCurrentStreamTime
(
filter
,
&
current_time
)
&&
SUCCEEDED
(
IPin_QueryInterface
(
stream
->
peer
,
&
IID_IQualityControl
,
(
void
**
)
&
qc
)))
{
Quality
q
;
q
.
Type
=
Famine
;
q
.
Proportion
=
1000
;
q
.
Late
=
current_time
-
start_time
;
q
.
TimeStamp
=
start_time
;
IQualityControl_Notify
(
qc
,
(
IBaseFilter
*
)
stream
->
filter
,
q
);
IQualityControl_Release
(
qc
);
}
LeaveCriticalSection
(
&
stream
->
cs
);
LeaveCriticalSection
(
&
stream
->
cs
);
return
S_OK
;
return
S_OK
;
}
}
...
...
dlls/amstream/tests/amstream.c
View file @
71293a01
...
@@ -8400,15 +8400,15 @@ static void test_ddrawstream_qc(void)
...
@@ -8400,15 +8400,15 @@ static void test_ddrawstream_qc(void)
hr
=
IDirectDrawStreamSample_CompletionStatus
(
stream_sample
,
0
,
0
);
hr
=
IDirectDrawStreamSample_CompletionStatus
(
stream_sample
,
0
,
0
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
source
.
qc_notify_sender
==
(
IBaseFilter
*
)
filter
,
"Got sender %p.
\n
"
,
ok
(
source
.
qc_notify_sender
==
(
IBaseFilter
*
)
filter
,
"Got sender %p.
\n
"
,
source
.
qc_notify_sender
);
source
.
qc_notify_sender
);
todo_wine
ok
(
source
.
qc_notify_quality
.
Type
==
Famine
,
"Got type %d.
\n
"
,
ok
(
source
.
qc_notify_quality
.
Type
==
Famine
,
"Got type %d.
\n
"
,
source
.
qc_notify_quality
.
Type
);
source
.
qc_notify_quality
.
Type
);
todo_wine
ok
(
source
.
qc_notify_quality
.
Proportion
==
1000
,
"Got proportion %ld.
\n
"
,
ok
(
source
.
qc_notify_quality
.
Proportion
==
1000
,
"Got proportion %ld.
\n
"
,
source
.
qc_notify_quality
.
Proportion
);
source
.
qc_notify_quality
.
Proportion
);
todo_wine
ok
(
source
.
qc_notify_quality
.
Late
==
0
,
"Got late %s.
\n
"
,
ok
(
source
.
qc_notify_quality
.
Late
==
0
,
"Got late %s.
\n
"
,
wine_dbgstr_longlong
(
source
.
qc_notify_quality
.
Late
));
wine_dbgstr_longlong
(
source
.
qc_notify_quality
.
Late
));
todo_wine
ok
(
source
.
qc_notify_quality
.
TimeStamp
==
start_time
,
"Got time stamp %s.
\n
"
,
ok
(
source
.
qc_notify_quality
.
TimeStamp
==
start_time
,
"Got time stamp %s.
\n
"
,
wine_dbgstr_longlong
(
source
.
qc_notify_quality
.
TimeStamp
));
wine_dbgstr_longlong
(
source
.
qc_notify_quality
.
TimeStamp
));
/* Test Update() after Reveive(). */
/* Test Update() after Reveive(). */
...
@@ -8451,15 +8451,15 @@ static void test_ddrawstream_qc(void)
...
@@ -8451,15 +8451,15 @@ static void test_ddrawstream_qc(void)
ok
(
!
WaitForSingleObject
(
thread
,
2000
),
"Wait timed out.
\n
"
);
ok
(
!
WaitForSingleObject
(
thread
,
2000
),
"Wait timed out.
\n
"
);
CloseHandle
(
thread
);
CloseHandle
(
thread
);
todo_wine
ok
(
source
.
qc_notify_sender
==
(
IBaseFilter
*
)
filter
,
"Got sender %p.
\n
"
,
ok
(
source
.
qc_notify_sender
==
(
IBaseFilter
*
)
filter
,
"Got sender %p.
\n
"
,
source
.
qc_notify_sender
);
source
.
qc_notify_sender
);
todo_wine
ok
(
source
.
qc_notify_quality
.
Type
==
Famine
,
"Got type %d.
\n
"
,
ok
(
source
.
qc_notify_quality
.
Type
==
Famine
,
"Got type %d.
\n
"
,
source
.
qc_notify_quality
.
Type
);
source
.
qc_notify_quality
.
Type
);
todo_wine
ok
(
source
.
qc_notify_quality
.
Proportion
==
1000
,
"Got proportion %ld.
\n
"
,
ok
(
source
.
qc_notify_quality
.
Proportion
==
1000
,
"Got proportion %ld.
\n
"
,
source
.
qc_notify_quality
.
Proportion
);
source
.
qc_notify_quality
.
Proportion
);
todo_wine
ok
(
source
.
qc_notify_quality
.
Late
==
100000
,
"Got late %s.
\n
"
,
ok
(
source
.
qc_notify_quality
.
Late
==
100000
,
"Got late %s.
\n
"
,
wine_dbgstr_longlong
(
source
.
qc_notify_quality
.
Late
));
wine_dbgstr_longlong
(
source
.
qc_notify_quality
.
Late
));
todo_wine
ok
(
source
.
qc_notify_quality
.
TimeStamp
==
start_time
,
"Got time stamp %s.
\n
"
,
ok
(
source
.
qc_notify_quality
.
TimeStamp
==
start_time
,
"Got time stamp %s.
\n
"
,
wine_dbgstr_longlong
(
source
.
qc_notify_quality
.
TimeStamp
));
wine_dbgstr_longlong
(
source
.
qc_notify_quality
.
TimeStamp
));
hr
=
IAMMultiMediaStream_SetState
(
mmstream
,
STREAMSTATE_STOP
);
hr
=
IAMMultiMediaStream_SetState
(
mmstream
,
STREAMSTATE_STOP
);
...
...
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