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
fa41879f
Commit
fa41879f
authored
May 24, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qasf: Implement ASF Reader filter IWMReaderCallback_OnSample.
parent
a3ad00da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
2 deletions
+34
-2
asfreader.c
dlls/qasf/asfreader.c
+34
-2
No files found.
dlls/qasf/asfreader.c
View file @
fa41879f
...
...
@@ -150,6 +150,12 @@ static HRESULT buffer_create(IMediaSample *sample, INSSBuffer **out)
return
S_OK
;
}
static
struct
buffer
*
unsafe_impl_from_INSSBuffer
(
INSSBuffer
*
iface
)
{
if
(
iface
->
lpVtbl
!=
&
buffer_vtbl
)
return
NULL
;
return
impl_from_INSSBuffer
(
iface
);
}
struct
asf_stream
{
struct
strmbase_source
source
;
...
...
@@ -746,9 +752,35 @@ static HRESULT WINAPI reader_callback_OnStatus(IWMReaderCallback *iface, WMT_STA
static
HRESULT
WINAPI
reader_callback_OnSample
(
IWMReaderCallback
*
iface
,
DWORD
output
,
QWORD
time
,
QWORD
duration
,
DWORD
flags
,
INSSBuffer
*
sample
,
void
*
context
)
{
FIXME
(
"iface %p, output %lu, time %I64u, duration %I64u, flags %#lx, sample %p, context %p stub!
\n
"
,
struct
asf_reader
*
filter
=
impl_from_IWMReaderCallback
(
iface
)
->
filter
;
REFERENCE_TIME
start_time
=
time
,
end_time
=
time
+
duration
;
struct
asf_stream
*
stream
=
filter
->
streams
+
output
;
struct
buffer
*
buffer
;
HRESULT
hr
=
S_OK
;
TRACE
(
"iface %p, output %lu, time %I64u, duration %I64u, flags %#lx, sample %p, context %p.
\n
"
,
iface
,
output
,
time
,
duration
,
flags
,
sample
,
context
);
return
E_NOTIMPL
;
if
(
!
stream
->
source
.
pin
.
peer
)
{
WARN
(
"Output %lu pin is not connected, discarding %p.
\n
"
,
output
,
sample
);
return
S_OK
;
}
if
(
!
(
buffer
=
unsafe_impl_from_INSSBuffer
(
sample
)))
WARN
(
"Unexpected buffer iface %p, discarding.
\n
"
,
sample
);
else
{
IMediaSample_SetTime
(
buffer
->
sample
,
&
start_time
,
&
end_time
);
IMediaSample_SetDiscontinuity
(
buffer
->
sample
,
!!
(
flags
&
WM_SF_DISCONTINUITY
));
IMediaSample_SetSyncPoint
(
buffer
->
sample
,
!!
(
flags
&
WM_SF_CLEANPOINT
));
hr
=
IMemInputPin_Receive
(
stream
->
source
.
pMemInputPin
,
buffer
->
sample
);
TRACE
(
"Receive returned hr %#lx.
\n
"
,
hr
);
}
return
hr
;
}
static
const
IWMReaderCallbackVtbl
reader_callback_vtbl
=
...
...
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