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
dc3d6fbe
Commit
dc3d6fbe
authored
Apr 08, 2008
by
Dan Hipschman
Committed by
Alexandre Julliard
Apr 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qedit: Implement IMediaDet_put_Filename.
parent
063aa3a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
3 deletions
+42
-3
mediadet.c
dlls/qedit/mediadet.c
+41
-2
mediadet.c
dlls/qedit/tests/mediadet.c
+1
-1
No files found.
dlls/qedit/mediadet.c
View file @
dc3d6fbe
...
...
@@ -25,8 +25,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(qedit);
typedef
struct
MediaDetImpl
{
const
IMediaDetVtbl
*
MediaDet_Vtbl
;
LONG
refCount
;
IGraphBuilder
*
graph
;
IBaseFilter
*
source
;
}
MediaDetImpl
;
static
void
MD_cleanup
(
MediaDetImpl
*
This
)
{
if
(
This
->
source
)
IBaseFilter_Release
(
This
->
source
);
This
->
source
=
NULL
;
if
(
This
->
graph
)
IGraphBuilder_Release
(
This
->
graph
);
This
->
graph
=
NULL
;
}
static
ULONG
WINAPI
MediaDet_AddRef
(
IMediaDet
*
iface
)
{
MediaDetImpl
*
This
=
(
MediaDetImpl
*
)
iface
;
...
...
@@ -43,6 +53,7 @@ static ULONG WINAPI MediaDet_Release(IMediaDet* iface)
if
(
refCount
==
0
)
{
MD_cleanup
(
This
);
CoTaskMemFree
(
This
);
return
0
;
}
...
...
@@ -132,9 +143,35 @@ static HRESULT WINAPI MediaDet_get_Filename(IMediaDet* iface, BSTR *pVal)
static
HRESULT
WINAPI
MediaDet_put_Filename
(
IMediaDet
*
iface
,
BSTR
newVal
)
{
static
const
WCHAR
reader
[]
=
{
'R'
,
'e'
,
'a'
,
'd'
,
'e'
,
'r'
,
0
};
MediaDetImpl
*
This
=
(
MediaDetImpl
*
)
iface
;
FIXME
(
"(%p)->(%p): not implemented!
\n
"
,
This
,
newVal
);
return
E_NOTIMPL
;
IGraphBuilder
*
gb
;
IBaseFilter
*
bf
;
HRESULT
hr
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
newVal
));
if
(
This
->
graph
)
{
WARN
(
"MSDN says not to call this method twice
\n
"
);
MD_cleanup
(
This
);
}
hr
=
CoCreateInstance
(
&
CLSID_FilterGraph
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IGraphBuilder
,
(
void
**
)
&
gb
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IGraphBuilder_AddSourceFilter
(
gb
,
newVal
,
reader
,
&
bf
);
if
(
FAILED
(
hr
))
{
IGraphBuilder_Release
(
gb
);
return
hr
;
}
This
->
graph
=
gb
;
This
->
source
=
bf
;
return
S_OK
;
}
static
HRESULT
WINAPI
MediaDet_GetBitmapBits
(
IMediaDet
*
iface
,
...
...
@@ -228,6 +265,8 @@ HRESULT MediaDet_create(IUnknown * pUnkOuter, LPVOID * ppv) {
obj
->
refCount
=
1
;
obj
->
MediaDet_Vtbl
=
&
IMediaDet_VTable
;
obj
->
graph
=
NULL
;
obj
->
source
=
NULL
;
*
ppv
=
obj
;
return
S_OK
;
...
...
dlls/qedit/tests/mediadet.c
View file @
dc3d6fbe
...
...
@@ -95,7 +95,7 @@ static void test_mediadet(void)
filename
=
SysAllocString
(
test_avi_filename
);
hr
=
IMediaDet_put_Filename
(
pM
,
filename
);
todo_wine
ok
(
hr
==
S_OK
,
"IMediaDet_put_Filename -> %x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IMediaDet_put_Filename -> %x
\n
"
,
hr
);
SysFreeString
(
filename
);
hr
=
IMediaDet_get_OutputStreams
(
pM
,
&
nstrms
);
...
...
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