Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
08e1faa5
Commit
08e1faa5
authored
Aug 02, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qasf: Implement ASF Reader filter pin_query_accept.
parent
782abff9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
+52
-0
asfreader.c
dlls/qasf/asfreader.c
+52
-0
No files found.
dlls/qasf/asfreader.c
View file @
08e1faa5
...
@@ -48,6 +48,57 @@ struct asf_reader
...
@@ -48,6 +48,57 @@ struct asf_reader
struct
asf_stream
streams
[
16
];
struct
asf_stream
streams
[
16
];
};
};
static
inline
struct
asf_stream
*
impl_from_strmbase_pin
(
struct
strmbase_pin
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
asf_stream
,
source
.
pin
);
}
static
inline
struct
asf_reader
*
asf_reader_from_asf_stream
(
struct
asf_stream
*
stream
)
{
return
CONTAINING_RECORD
(
stream
,
struct
asf_reader
,
streams
[
stream
->
index
]);
}
static
HRESULT
asf_stream_query_accept
(
struct
strmbase_pin
*
iface
,
const
AM_MEDIA_TYPE
*
media_type
)
{
struct
asf_stream
*
stream
=
impl_from_strmbase_pin
(
iface
);
struct
asf_reader
*
filter
=
asf_reader_from_asf_stream
(
stream
);
IWMOutputMediaProps
*
props
;
WM_MEDIA_TYPE
*
mt
;
DWORD
size
,
i
=
0
;
HRESULT
hr
;
TRACE
(
"iface %p, media_type %p.
\n
"
,
iface
,
media_type
);
if
(
FAILED
(
hr
=
IWMReader_GetOutputFormat
(
filter
->
reader
,
stream
->
index
,
i
,
&
props
)))
return
hr
;
if
(
FAILED
(
hr
=
IWMOutputMediaProps_GetMediaType
(
props
,
NULL
,
&
size
)))
{
IWMOutputMediaProps_Release
(
props
);
return
hr
;
}
if
(
!
(
mt
=
malloc
(
size
)))
{
IWMOutputMediaProps_Release
(
props
);
return
E_OUTOFMEMORY
;
}
do
{
if
(
SUCCEEDED
(
hr
=
IWMOutputMediaProps_GetMediaType
(
props
,
mt
,
&
size
))
&&
IsEqualGUID
(
&
mt
->
majortype
,
&
media_type
->
majortype
)
&&
IsEqualGUID
(
&
mt
->
subtype
,
&
media_type
->
subtype
))
{
IWMOutputMediaProps_Release
(
props
);
break
;
}
IWMOutputMediaProps_Release
(
props
);
}
while
(
SUCCEEDED
(
hr
=
IWMReader_GetOutputFormat
(
filter
->
reader
,
stream
->
index
,
++
i
,
&
props
)));
free
(
mt
);
return
hr
;
}
static
inline
struct
asf_reader
*
impl_from_strmbase_filter
(
struct
strmbase_filter
*
iface
)
static
inline
struct
asf_reader
*
impl_from_strmbase_filter
(
struct
strmbase_filter
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
struct
asf_reader
,
filter
);
return
CONTAINING_RECORD
(
iface
,
struct
asf_reader
,
filter
);
...
@@ -120,6 +171,7 @@ static HRESULT WINAPI asf_reader_DecideBufferSize(struct strmbase_source *iface,
...
@@ -120,6 +171,7 @@ static HRESULT WINAPI asf_reader_DecideBufferSize(struct strmbase_source *iface,
static
const
struct
strmbase_source_ops
source_ops
=
static
const
struct
strmbase_source_ops
source_ops
=
{
{
.
base
.
pin_query_accept
=
asf_stream_query_accept
,
.
pfnDecideAllocator
=
BaseOutputPinImpl_DecideAllocator
,
.
pfnDecideAllocator
=
BaseOutputPinImpl_DecideAllocator
,
.
pfnAttemptConnection
=
BaseOutputPinImpl_AttemptConnection
,
.
pfnAttemptConnection
=
BaseOutputPinImpl_AttemptConnection
,
.
pfnDecideBufferSize
=
asf_reader_DecideBufferSize
,
.
pfnDecideBufferSize
=
asf_reader_DecideBufferSize
,
...
...
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