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
d4bf8b2a
Commit
d4bf8b2a
authored
Jan 15, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qedit: Use wide character string literals.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bfaf9013
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
48 deletions
+32
-48
mediadet.c
dlls/qedit/mediadet.c
+3
-7
nullrenderer.c
dlls/qedit/nullrenderer.c
+1
-3
mediadet.c
dlls/qedit/tests/mediadet.c
+6
-8
nullrenderer.c
dlls/qedit/tests/nullrenderer.c
+8
-11
samplegrabber.c
dlls/qedit/tests/samplegrabber.c
+14
-19
No files found.
dlls/qedit/mediadet.c
View file @
d4bf8b2a
...
...
@@ -340,8 +340,6 @@ static HRESULT WINAPI MediaDet_get_Filename(IMediaDet* iface, BSTR *pVal)
/* From quartz, 2008/04/07 */
static
HRESULT
GetFilterInfo
(
IMoniker
*
pMoniker
,
GUID
*
pclsid
,
VARIANT
*
pvar
)
{
static
const
WCHAR
wszClsidName
[]
=
{
'C'
,
'L'
,
'S'
,
'I'
,
'D'
,
0
};
static
const
WCHAR
wszFriendlyName
[]
=
{
'F'
,
'r'
,
'i'
,
'e'
,
'n'
,
'd'
,
'l'
,
'y'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
IPropertyBag
*
pPropBagCat
=
NULL
;
HRESULT
hr
;
...
...
@@ -352,7 +350,7 @@ static HRESULT GetFilterInfo(IMoniker *pMoniker, GUID *pclsid, VARIANT *pvar)
(
LPVOID
*
)
&
pPropBagCat
);
if
(
SUCCEEDED
(
hr
))
hr
=
IPropertyBag_Read
(
pPropBagCat
,
wszClsidName
,
pvar
,
NULL
);
hr
=
IPropertyBag_Read
(
pPropBagCat
,
L"CLSID"
,
pvar
,
NULL
);
if
(
SUCCEEDED
(
hr
))
{
...
...
@@ -362,7 +360,7 @@ static HRESULT GetFilterInfo(IMoniker *pMoniker, GUID *pclsid, VARIANT *pvar)
}
if
(
SUCCEEDED
(
hr
))
hr
=
IPropertyBag_Read
(
pPropBagCat
,
wszFriendlyName
,
pvar
,
NULL
);
hr
=
IPropertyBag_Read
(
pPropBagCat
,
L"FriendlyName"
,
pvar
,
NULL
);
if
(
SUCCEEDED
(
hr
))
TRACE
(
"Moniker = %s - %s
\n
"
,
debugstr_guid
(
pclsid
),
debugstr_w
(
V_BSTR
(
pvar
)));
...
...
@@ -484,7 +482,6 @@ retry:
static
HRESULT
WINAPI
MediaDet_put_Filename
(
IMediaDet
*
iface
,
BSTR
newVal
)
{
static
const
WCHAR
reader
[]
=
{
'R'
,
'e'
,
'a'
,
'd'
,
'e'
,
'r'
,
0
};
MediaDetImpl
*
This
=
impl_from_IMediaDet
(
iface
);
IGraphBuilder
*
gb
;
IBaseFilter
*
bf
;
...
...
@@ -503,8 +500,7 @@ static HRESULT WINAPI MediaDet_put_Filename(IMediaDet* iface, BSTR newVal)
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IGraphBuilder_AddSourceFilter
(
gb
,
newVal
,
reader
,
&
bf
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
=
IGraphBuilder_AddSourceFilter
(
gb
,
newVal
,
L"Reader"
,
&
bf
)))
{
IGraphBuilder_Release
(
gb
);
return
hr
;
...
...
dlls/qedit/nullrenderer.c
View file @
d4bf8b2a
...
...
@@ -64,8 +64,6 @@ static const struct strmbase_renderer_ops renderer_ops =
HRESULT
NullRenderer_create
(
IUnknown
*
outer
,
void
**
out
)
{
static
const
WCHAR
sink_name
[]
=
{
'I'
,
'n'
,
0
};
HRESULT
hr
;
NullRendererImpl
*
pNullRenderer
;
...
...
@@ -74,7 +72,7 @@ HRESULT NullRenderer_create(IUnknown *outer, void **out)
pNullRenderer
=
CoTaskMemAlloc
(
sizeof
(
NullRendererImpl
));
hr
=
strmbase_renderer_init
(
&
pNullRenderer
->
renderer
,
outer
,
&
CLSID_NullRenderer
,
sink_name
,
&
renderer_ops
);
&
CLSID_NullRenderer
,
L"In"
,
&
renderer_ops
);
if
(
FAILED
(
hr
))
CoTaskMemFree
(
pNullRenderer
);
...
...
dlls/qedit/tests/mediadet.c
View file @
d4bf8b2a
...
...
@@ -137,8 +137,6 @@ static WCHAR test_sound_avi_filename[MAX_PATH];
static
BOOL
unpack_avi_file
(
int
id
,
WCHAR
name
[
MAX_PATH
])
{
static
WCHAR
temp_path
[
MAX_PATH
];
static
const
WCHAR
prefix
[]
=
{
'D'
,
'E'
,
'S'
,
0
};
static
const
WCHAR
avi
[]
=
{
'a'
,
'v'
,
'i'
,
0
};
HRSRC
res
;
HGLOBAL
data
;
char
*
mem
;
...
...
@@ -166,11 +164,11 @@ static BOOL unpack_avi_file(int id, WCHAR name[MAX_PATH])
return
FALSE
;
/* We might end up relying on the extension here, so .TMP is no good. */
if
(
!
GetTempFileNameW
(
temp_path
,
prefix
,
0
,
name
))
if
(
!
GetTempFileNameW
(
temp_path
,
L"DES"
,
0
,
name
))
return
FALSE
;
DeleteFileW
(
name
);
lstrcpyW
(
name
+
lstrlenW
(
name
)
-
3
,
avi
);
wcscpy
(
name
+
wcslen
(
name
)
-
3
,
L"avi"
);
fh
=
CreateFileW
(
name
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_NEW
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
...
...
@@ -272,8 +270,8 @@ static void test_mediadet(void)
filename
=
NULL
;
hr
=
IMediaDet_get_Filename
(
pM
,
&
filename
);
ok
(
hr
==
S_OK
,
"IMediaDet_get_Filename failed: %08x
\n
"
,
hr
);
ok
(
lstrcmpW
(
filename
,
test_avi_filename
)
==
0
,
"IMediaDet_get_Filename
\n
"
);
ok
(
!
wcscmp
(
filename
,
test_avi_filename
),
"Expected filename %s, got %s.
\n
"
,
debugstr_w
(
test_avi_filename
),
debugstr_w
(
filename
)
);
SysFreeString
(
filename
);
hr
=
IMediaDet_get_Filename
(
pM
,
NULL
);
...
...
@@ -344,8 +342,8 @@ static void test_mediadet(void)
filename
=
NULL
;
hr
=
IMediaDet_get_Filename
(
pM
,
&
filename
);
ok
(
hr
==
S_OK
,
"IMediaDet_get_Filename failed: %08x
\n
"
,
hr
);
ok
(
lstrcmpW
(
filename
,
test_sound_avi_filename
)
==
0
,
"IMediaDet_get_Filename
\n
"
);
ok
(
!
wcscmp
(
filename
,
test_sound_avi_filename
),
"Expected filename %s, got %s.
\n
"
,
debugstr_w
(
test_sound_avi_filename
),
debugstr_w
(
filename
)
);
SysFreeString
(
filename
);
/* I don't know if the stream order is deterministic. Just check
...
...
dlls/qedit/tests/nullrenderer.c
View file @
d4bf8b2a
...
...
@@ -22,8 +22,6 @@
#include "dshow.h"
#include "wine/test.h"
static
const
WCHAR
sink_id
[]
=
{
'I'
,
'n'
,
0
};
static
IBaseFilter
*
create_null_renderer
(
void
)
{
IBaseFilter
*
filter
=
NULL
;
...
...
@@ -79,7 +77,7 @@ static void test_interfaces(void)
check_interface
(
filter
,
&
IID_IReferenceClock
,
FALSE
);
check_interface
(
filter
,
&
IID_IVideoWindow
,
FALSE
);
IBaseFilter_FindPin
(
filter
,
sink_id
,
&
pin
);
IBaseFilter_FindPin
(
filter
,
L"In"
,
&
pin
);
check_interface
(
pin
,
&
IID_IMemInputPin
,
TRUE
);
check_interface
(
pin
,
&
IID_IPin
,
TRUE
);
...
...
@@ -187,20 +185,19 @@ static void test_enum_pins(void)
static
void
test_find_pin
(
void
)
{
static
const
WCHAR
input_pinW
[]
=
{
'i'
,
'n'
,
'p'
,
'u'
,
't'
,
' '
,
'p'
,
'i'
,
'n'
,
0
};
IBaseFilter
*
filter
=
create_null_renderer
();
IEnumPins
*
enum_pins
;
IPin
*
pin
,
*
pin2
;
HRESULT
hr
;
ULONG
ref
;
hr
=
IBaseFilter_FindPin
(
filter
,
input_pinW
,
&
pin
);
hr
=
IBaseFilter_FindPin
(
filter
,
L"input pin"
,
&
pin
);
ok
(
hr
==
VFW_E_NOT_FOUND
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_EnumPins
(
filter
,
&
enum_pins
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_FindPin
(
filter
,
sink_id
,
&
pin
);
hr
=
IBaseFilter_FindPin
(
filter
,
L"In"
,
&
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
enum_pins
,
1
,
&
pin2
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -223,7 +220,7 @@ static void test_pin_info(void)
ULONG
ref
;
IPin
*
pin
;
hr
=
IBaseFilter_FindPin
(
filter
,
sink_id
,
&
pin
);
hr
=
IBaseFilter_FindPin
(
filter
,
L"In"
,
&
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ref
=
get_refcount
(
filter
);
ok
(
ref
==
2
,
"Got unexpected refcount %d.
\n
"
,
ref
);
...
...
@@ -234,7 +231,7 @@ static void test_pin_info(void)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
info
.
pFilter
==
filter
,
"Expected filter %p, got %p.
\n
"
,
filter
,
info
.
pFilter
);
ok
(
info
.
dir
==
PINDIR_INPUT
,
"Got direction %d.
\n
"
,
info
.
dir
);
ok
(
!
lstrcmpW
(
info
.
achName
,
sink_id
),
"Got name %s.
\n
"
,
wine_dbgstr_w
(
info
.
achName
));
ok
(
!
wcscmp
(
info
.
achName
,
L"In"
),
"Got name %s.
\n
"
,
wine_dbgstr_w
(
info
.
achName
));
ref
=
get_refcount
(
filter
);
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
pin
);
...
...
@@ -247,7 +244,7 @@ static void test_pin_info(void)
hr
=
IPin_QueryId
(
pin
,
&
id
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
id
,
sink_id
),
"Got id %s.
\n
"
,
wine_dbgstr_w
(
id
));
ok
(
!
wcscmp
(
id
,
L"In"
),
"Got id %s.
\n
"
,
wine_dbgstr_w
(
id
));
CoTaskMemFree
(
id
);
hr
=
IPin_QueryInternalConnections
(
pin
,
NULL
,
NULL
);
...
...
@@ -361,7 +358,7 @@ static void test_media_types(void)
ULONG
ref
;
IPin
*
pin
;
IBaseFilter_FindPin
(
filter
,
sink_id
,
&
pin
);
IBaseFilter_FindPin
(
filter
,
L"In"
,
&
pin
);
hr
=
IPin_EnumMediaTypes
(
pin
,
&
enummt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -388,7 +385,7 @@ static void test_enum_media_types(void)
HRESULT
hr
;
IPin
*
pin
;
IBaseFilter_FindPin
(
filter
,
sink_id
,
&
pin
);
IBaseFilter_FindPin
(
filter
,
L"In"
,
&
pin
);
hr
=
IPin_EnumMediaTypes
(
pin
,
&
enum1
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
dlls/qedit/tests/samplegrabber.c
View file @
d4bf8b2a
...
...
@@ -23,11 +23,6 @@
#include "qedit.h"
#include "wine/test.h"
static
const
WCHAR
sink_id
[]
=
{
'I'
,
'n'
,
0
};
static
const
WCHAR
source_id
[]
=
{
'O'
,
'u'
,
't'
,
0
};
static
const
WCHAR
sink_name
[]
=
{
'I'
,
'n'
,
'p'
,
'u'
,
't'
,
0
};
static
const
WCHAR
source_name
[]
=
{
'O'
,
'u'
,
't'
,
'p'
,
'u'
,
't'
,
0
};
static
IBaseFilter
*
create_sample_grabber
(
void
)
{
IBaseFilter
*
filter
=
NULL
;
...
...
@@ -97,7 +92,7 @@ static void test_interfaces(void)
check_interface
(
filter
,
&
IID_ISeekingPassThru
,
FALSE
);
check_interface
(
filter
,
&
IID_IVideoWindow
,
FALSE
);
IBaseFilter_FindPin
(
filter
,
sink_id
,
&
pin
);
IBaseFilter_FindPin
(
filter
,
L"In"
,
&
pin
);
check_interface
(
pin
,
&
IID_IMemInputPin
,
TRUE
);
check_interface
(
pin
,
&
IID_IPin
,
TRUE
);
...
...
@@ -110,7 +105,7 @@ static void test_interfaces(void)
IPin_Release
(
pin
);
IBaseFilter_FindPin
(
filter
,
source_id
,
&
pin
);
IBaseFilter_FindPin
(
filter
,
L"Out"
,
&
pin
);
/* Queries for IMediaPosition or IMediaSeeking do not seem to increase the
* reference count. */
...
...
@@ -263,15 +258,15 @@ static void test_find_pin(void)
HRESULT
hr
;
ULONG
ref
;
hr
=
IBaseFilter_FindPin
(
filter
,
sink_name
,
&
pin
);
hr
=
IBaseFilter_FindPin
(
filter
,
L"Input"
,
&
pin
);
ok
(
hr
==
VFW_E_NOT_FOUND
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_FindPin
(
filter
,
source_name
,
&
pin
);
hr
=
IBaseFilter_FindPin
(
filter
,
L"Output"
,
&
pin
);
ok
(
hr
==
VFW_E_NOT_FOUND
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_EnumPins
(
filter
,
&
enum_pins
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_FindPin
(
filter
,
sink_id
,
&
pin
);
hr
=
IBaseFilter_FindPin
(
filter
,
L"In"
,
&
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
enum_pins
,
1
,
&
pin2
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -279,7 +274,7 @@ static void test_find_pin(void)
IPin_Release
(
pin2
);
IPin_Release
(
pin
);
hr
=
IBaseFilter_FindPin
(
filter
,
source_id
,
&
pin
);
hr
=
IBaseFilter_FindPin
(
filter
,
L"Out"
,
&
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
enum_pins
,
1
,
&
pin2
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -303,14 +298,14 @@ static void test_pin_info(void)
ULONG
ref
;
IPin
*
pin
;
hr
=
IBaseFilter_FindPin
(
filter
,
sink_id
,
&
pin
);
hr
=
IBaseFilter_FindPin
(
filter
,
L"In"
,
&
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IPin_QueryPinInfo
(
pin
,
&
info
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
info
.
pFilter
==
filter
,
"Expected filter %p, got %p.
\n
"
,
filter
,
info
.
pFilter
);
ok
(
info
.
dir
==
PINDIR_INPUT
,
"Got direction %d.
\n
"
,
info
.
dir
);
todo_wine
ok
(
!
lstrcmpW
(
info
.
achName
,
sink_name
),
"Got name %s.
\n
"
,
wine_dbgstr_w
(
info
.
achName
));
todo_wine
ok
(
!
wcscmp
(
info
.
achName
,
L"Input"
),
"Got name %s.
\n
"
,
wine_dbgstr_w
(
info
.
achName
));
IBaseFilter_Release
(
info
.
pFilter
);
hr
=
IPin_QueryDirection
(
pin
,
&
dir
);
...
...
@@ -319,7 +314,7 @@ static void test_pin_info(void)
hr
=
IPin_QueryId
(
pin
,
&
id
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
id
,
sink_id
),
"Got id %s.
\n
"
,
wine_dbgstr_w
(
id
));
ok
(
!
wcscmp
(
id
,
L"In"
),
"Got id %s.
\n
"
,
wine_dbgstr_w
(
id
));
CoTaskMemFree
(
id
);
hr
=
IPin_QueryInternalConnections
(
pin
,
NULL
,
&
count
);
...
...
@@ -327,14 +322,14 @@ static void test_pin_info(void)
IPin_Release
(
pin
);
hr
=
IBaseFilter_FindPin
(
filter
,
source_id
,
&
pin
);
hr
=
IBaseFilter_FindPin
(
filter
,
L"Out"
,
&
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IPin_QueryPinInfo
(
pin
,
&
info
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
info
.
pFilter
==
filter
,
"Expected filter %p, got %p.
\n
"
,
filter
,
info
.
pFilter
);
ok
(
info
.
dir
==
PINDIR_OUTPUT
,
"Got direction %d.
\n
"
,
info
.
dir
);
todo_wine
ok
(
!
lstrcmpW
(
info
.
achName
,
source_name
),
"Got name %s.
\n
"
,
wine_dbgstr_w
(
info
.
achName
));
todo_wine
ok
(
!
wcscmp
(
info
.
achName
,
L"Output"
),
"Got name %s.
\n
"
,
wine_dbgstr_w
(
info
.
achName
));
IBaseFilter_Release
(
info
.
pFilter
);
hr
=
IPin_QueryDirection
(
pin
,
&
dir
);
...
...
@@ -343,7 +338,7 @@ static void test_pin_info(void)
hr
=
IPin_QueryId
(
pin
,
&
id
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
id
,
source_id
),
"Got id %s.
\n
"
,
wine_dbgstr_w
(
id
));
ok
(
!
wcscmp
(
id
,
L"Out"
),
"Got id %s.
\n
"
,
wine_dbgstr_w
(
id
));
CoTaskMemFree
(
id
);
hr
=
IPin_QueryInternalConnections
(
pin
,
NULL
,
&
count
);
...
...
@@ -458,7 +453,7 @@ static void test_media_types(void)
ULONG
ref
;
IPin
*
pin
;
IBaseFilter_FindPin
(
filter
,
sink_id
,
&
pin
);
IBaseFilter_FindPin
(
filter
,
L"In"
,
&
pin
);
hr
=
IPin_EnumMediaTypes
(
pin
,
&
enummt
);
todo_wine
ok
(
hr
==
VFW_E_NOT_CONNECTED
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -469,7 +464,7 @@ static void test_media_types(void)
IPin_Release
(
pin
);
IBaseFilter_FindPin
(
filter
,
source_id
,
&
pin
);
IBaseFilter_FindPin
(
filter
,
L"Out"
,
&
pin
);
hr
=
IPin_EnumMediaTypes
(
pin
,
&
enummt
);
todo_wine
ok
(
hr
==
VFW_E_NOT_CONNECTED
,
"Got hr %#x.
\n
"
,
hr
);
...
...
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