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
7d2d5a25
Commit
7d2d5a25
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_get_Filename.
parent
dc3d6fbe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
6 deletions
+59
-6
Makefile.in
dlls/qedit/Makefile.in
+1
-1
mediadet.c
dlls/qedit/mediadet.c
+40
-2
mediadet.c
dlls/qedit/tests/mediadet.c
+18
-3
No files found.
dlls/qedit/Makefile.in
View file @
7d2d5a25
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
qedit.dll
IMPORTS
=
ole32 advapi32 kernel32
IMPORTS
=
ole
aut32 ole
32 advapi32 kernel32
EXTRALIBS
=
-lstrmiids
-luuid
C_SRCS
=
\
...
...
dlls/qedit/mediadet.c
View file @
7d2d5a25
...
...
@@ -17,6 +17,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "qedit_private.h"
#include "wine/debug.h"
...
...
@@ -137,8 +146,37 @@ static HRESULT WINAPI MediaDet_get_StreamLength(IMediaDet* iface, double *pVal)
static
HRESULT
WINAPI
MediaDet_get_Filename
(
IMediaDet
*
iface
,
BSTR
*
pVal
)
{
MediaDetImpl
*
This
=
(
MediaDetImpl
*
)
iface
;
FIXME
(
"(%p)->(%p): not implemented!
\n
"
,
This
,
pVal
);
return
E_NOTIMPL
;
IFileSourceFilter
*
file
;
LPOLESTR
name
;
HRESULT
hr
;
TRACE
(
"(%p)
\n
"
,
This
);
if
(
!
pVal
)
return
E_POINTER
;
*
pVal
=
NULL
;
/* MSDN says it should return E_FAIL if no file is open, but tests
show otherwise. */
if
(
!
This
->
source
)
return
S_OK
;
hr
=
IBaseFilter_QueryInterface
(
This
->
source
,
&
IID_IFileSourceFilter
,
(
void
**
)
&
file
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IFileSourceFilter_GetCurFile
(
file
,
&
name
,
NULL
);
IFileSourceFilter_Release
(
file
);
if
(
FAILED
(
hr
))
return
hr
;
*
pVal
=
SysAllocString
(
name
);
CoTaskMemFree
(
name
);
if
(
!*
pVal
)
return
E_OUTOFMEMORY
;
return
S_OK
;
}
static
HRESULT
WINAPI
MediaDet_put_Filename
(
IMediaDet
*
iface
,
BSTR
newVal
)
...
...
dlls/qedit/tests/mediadet.c
View file @
7d2d5a25
...
...
@@ -93,6 +93,18 @@ static void test_mediadet(void)
ok
(
hr
==
S_OK
,
"CoCreateInstance failed with %x
\n
"
,
hr
);
ok
(
pM
!=
NULL
,
"pM is NULL
\n
"
);
filename
=
NULL
;
hr
=
IMediaDet_get_Filename
(
pM
,
&
filename
);
/* Despite what MSDN claims, this returns S_OK. */
ok
(
hr
==
S_OK
,
"IMediaDet_get_Filename
\n
"
);
ok
(
filename
==
NULL
,
"IMediaDet_get_Filename
\n
"
);
filename
=
(
BSTR
)
-
1
;
hr
=
IMediaDet_get_Filename
(
pM
,
&
filename
);
/* Despite what MSDN claims, this returns S_OK. */
ok
(
hr
==
S_OK
,
"IMediaDet_get_Filename
\n
"
);
ok
(
filename
==
NULL
,
"IMediaDet_get_Filename
\n
"
);
filename
=
SysAllocString
(
test_avi_filename
);
hr
=
IMediaDet_put_Filename
(
pM
,
filename
);
ok
(
hr
==
S_OK
,
"IMediaDet_put_Filename -> %x
\n
"
,
hr
);
...
...
@@ -104,11 +116,14 @@ static void test_mediadet(void)
filename
=
NULL
;
hr
=
IMediaDet_get_Filename
(
pM
,
&
filename
);
todo_wine
ok
(
hr
==
S_OK
,
"IMediaDet_get_Filename
\n
"
);
todo_wine
ok
(
lstrcmpW
(
filename
,
test_avi_filename
)
==
0
,
"IMediaDet_get_Filename
\n
"
);
ok
(
hr
==
S_OK
,
"IMediaDet_get_Filename
\n
"
);
ok
(
lstrcmpW
(
filename
,
test_avi_filename
)
==
0
,
"IMediaDet_get_Filename
\n
"
);
SysFreeString
(
filename
);
hr
=
IMediaDet_get_Filename
(
pM
,
NULL
);
ok
(
hr
==
E_POINTER
,
"IMediaDet_get_Filename
\n
"
);
hr
=
IMediaDet_put_CurrentStream
(
pM
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"IMediaDet_put_CurrentStream
\n
"
);
...
...
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