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
42811d77
Commit
42811d77
authored
Aug 17, 2023
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Implement MFCreateSequencerSegmentOffset().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
572cc841
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
95 additions
and
1 deletion
+95
-1
mf.spec
dlls/mf/mf.spec
+1
-1
mf.c
dlls/mf/tests/mf.c
+17
-0
topology.c
dlls/mf/topology.c
+76
-0
mfidl.idl
include/mfidl.idl
+1
-0
No files found.
dlls/mf/mf.spec
View file @
42811d77
...
...
@@ -56,7 +56,7 @@
@ stdcall MFCreateSampleCopierMFT(ptr)
@ stdcall MFCreateSampleGrabberSinkActivate(ptr ptr ptr)
@ stub MFCreateSecureHttpSchemePlugin
@ st
ub MFCreateSequencerSegmentOffset
@ st
dcall MFCreateSequencerSegmentOffset(long int64 ptr)
@ stdcall MFCreateSequencerSource(ptr ptr)
@ stub MFCreateSequencerSourceRemoteStream
@ stdcall MFCreateSimpleTypeHandler(ptr)
...
...
dlls/mf/tests/mf.c
View file @
42811d77
...
...
@@ -7051,6 +7051,22 @@ static void test_mpeg4_media_sink(void)
IMFMediaType_Release
(
audio_type
);
}
static
void
test_MFCreateSequencerSegmentOffset
(
void
)
{
PROPVARIANT
propvar
;
HRESULT
hr
;
hr
=
MFCreateSequencerSegmentOffset
(
0
,
0
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#lx.
\n
"
,
hr
);
propvar
.
vt
=
VT_EMPTY
;
hr
=
MFCreateSequencerSegmentOffset
(
0
,
0
,
&
propvar
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
propvar
.
vt
==
VT_UNKNOWN
,
"Unexpected type %d.
\n
"
,
propvar
.
vt
);
ok
(
!!
propvar
.
punkVal
,
"Unexpected pointer.
\n
"
);
PropVariantClear
(
&
propvar
);
}
START_TEST
(
mf
)
{
init_functions
();
...
...
@@ -7085,4 +7101,5 @@ START_TEST(mf)
test_MFGetTopoNodeCurrentType
();
test_MFRequireProtectedEnvironment
();
test_mpeg4_media_sink
();
test_MFCreateSequencerSegmentOffset
();
}
dlls/mf/topology.c
View file @
42811d77
...
...
@@ -2230,3 +2230,79 @@ HRESULT WINAPI MFCreateSequencerSource(IUnknown *reserved, IMFSequencerSource **
return
S_OK
;
}
struct
segment_offset
{
IUnknown
IUnknown_iface
;
LONG
refcount
;
MFSequencerElementId
id
;
MFTIME
timeoffset
;
};
static
inline
struct
segment_offset
*
impl_offset_from_IUnknown
(
IUnknown
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
segment_offset
,
IUnknown_iface
);
}
static
HRESULT
WINAPI
segment_offset_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
obj
)
{
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
obj
=
iface
;
IUnknown_AddRef
(
iface
);
return
S_OK
;
}
*
obj
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
segment_offset_AddRef
(
IUnknown
*
iface
)
{
struct
segment_offset
*
offset
=
impl_offset_from_IUnknown
(
iface
);
return
InterlockedIncrement
(
&
offset
->
refcount
);
}
static
ULONG
WINAPI
segment_offset_Release
(
IUnknown
*
iface
)
{
struct
segment_offset
*
offset
=
impl_offset_from_IUnknown
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
offset
->
refcount
);
if
(
!
refcount
)
free
(
offset
);
return
refcount
;
}
static
const
IUnknownVtbl
segment_offset_vtbl
=
{
segment_offset_QueryInterface
,
segment_offset_AddRef
,
segment_offset_Release
,
};
/***********************************************************************
* MFCreateSequencerSegmentOffset (mf.@)
*/
HRESULT
WINAPI
MFCreateSequencerSegmentOffset
(
MFSequencerElementId
id
,
MFTIME
timeoffset
,
PROPVARIANT
*
ret
)
{
struct
segment_offset
*
offset
;
TRACE
(
"%#lx, %s, %p.
\n
"
,
id
,
debugstr_time
(
timeoffset
),
ret
);
if
(
!
ret
)
return
E_POINTER
;
if
(
!
(
offset
=
calloc
(
1
,
sizeof
(
*
offset
))))
return
E_OUTOFMEMORY
;
offset
->
IUnknown_iface
.
lpVtbl
=
&
segment_offset_vtbl
;
offset
->
refcount
=
1
;
offset
->
id
=
id
;
offset
->
timeoffset
=
timeoffset
;
V_VT
(
ret
)
=
VT_UNKNOWN
;
V_UNKNOWN
(
ret
)
=
&
offset
->
IUnknown_iface
;
return
S_OK
;
}
include/mfidl.idl
View file @
42811d77
...
...
@@ -709,6 +709,7 @@ cpp_quote("HRESULT WINAPI MFCreateSimpleTypeHandler(IMFMediaTypeHandler **handle
cpp_quote
(
"HRESULT WINAPI MFCreateSampleCopierMFT(IMFTransform **transform);"
)
cpp_quote
(
"HRESULT WINAPI MFCreateSampleGrabberSinkActivate(IMFMediaType *media_type,"
)
cpp_quote
(
" IMFSampleGrabberSinkCallback *callback, IMFActivate **activate);"
)
cpp_quote
(
"HRESULT WINAPI MFCreateSequencerSegmentOffset(MFSequencerElementId id, MFTIME offset, PROPVARIANT *segment_offset);"
)
cpp_quote
(
"HRESULT WINAPI MFCreateSequencerSource(IUnknown *reserved, IMFSequencerSource **seq_source);"
)
cpp_quote
(
"HRESULT WINAPI MFCreateSourceResolver(IMFSourceResolver **resolver);"
)
cpp_quote
(
"HRESULT WINAPI MFCreateStandardQualityManager(IMFQualityManager **manager);"
)
...
...
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