mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 11:33:38 +00:00
qcap: Use wide-char string literals.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
69932cf76f
commit
8f8cdc7ac7
|
@ -108,12 +108,11 @@ static HRESULT WINAPI PPB_Load(IPersistPropertyBag *iface, IPropertyBag *pPropBa
|
|||
AudioRecord *This = impl_from_IPersistPropertyBag(iface);
|
||||
HRESULT hr;
|
||||
VARIANT var;
|
||||
static const WCHAR WaveInIDW[] = {'W','a','v','e','I','n','I','D',0};
|
||||
|
||||
TRACE("(%p/%p)->(%p, %p)\n", iface, This, pPropBag, pErrorLog);
|
||||
|
||||
V_VT(&var) = VT_I4;
|
||||
hr = IPropertyBag_Read(pPropBag, WaveInIDW, &var, pErrorLog);
|
||||
hr = IPropertyBag_Read(pPropBag, L"WaveInID", &var, pErrorLog);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
FIXME("FIXME: implement opening waveIn device %d\n", V_I4(&var));
|
||||
|
|
|
@ -213,12 +213,10 @@ static HRESULT WINAPI AVICompressorPropertyBag_Load(IPersistPropertyBag *iface,
|
|||
VARIANT v;
|
||||
HRESULT hres;
|
||||
|
||||
static const WCHAR fcc_handlerW[] = {'F','c','c','H','a','n','d','l','e','r',0};
|
||||
|
||||
TRACE("(%p)->(%p %p)\n", This, pPropBag, pErrorLog);
|
||||
|
||||
V_VT(&v) = VT_BSTR;
|
||||
hres = IPropertyBag_Read(pPropBag, fcc_handlerW, &v, NULL);
|
||||
hres = IPropertyBag_Read(pPropBag, L"FccHandler", &v, NULL);
|
||||
if(FAILED(hres)) {
|
||||
WARN("Could not read FccHandler: %08x\n", hres);
|
||||
return hres;
|
||||
|
@ -470,8 +468,6 @@ static const struct strmbase_source_ops source_ops =
|
|||
|
||||
HRESULT avi_compressor_create(IUnknown *outer, IUnknown **out)
|
||||
{
|
||||
static const WCHAR source_name[] = {'O','u','t',0};
|
||||
static const WCHAR sink_name[] = {'I','n',0};
|
||||
AVICompressor *object;
|
||||
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
|
@ -480,8 +476,8 @@ HRESULT avi_compressor_create(IUnknown *outer, IUnknown **out)
|
|||
strmbase_filter_init(&object->filter, outer, &CLSID_AVICo, &filter_ops);
|
||||
object->IPersistPropertyBag_iface.lpVtbl = &PersistPropertyBagVtbl;
|
||||
|
||||
strmbase_sink_init(&object->sink, &object->filter, sink_name, &sink_ops, NULL);
|
||||
strmbase_source_init(&object->source, &object->filter, source_name, &source_ops);
|
||||
strmbase_sink_init(&object->sink, &object->filter, L"In", &sink_ops, NULL);
|
||||
strmbase_source_init(&object->source, &object->filter, L"Out", &source_ops);
|
||||
|
||||
TRACE("Created AVI compressor %p.\n", object);
|
||||
*out = &object->filter.IUnknown_inner;
|
||||
|
|
|
@ -1777,15 +1777,14 @@ static const IQualityControlVtbl AviMuxIn_QualityControlVtbl = {
|
|||
|
||||
static HRESULT create_input_pin(AviMux *avimux)
|
||||
{
|
||||
WCHAR name[] = {'I','n','p','u','t',' ','0','0',0};
|
||||
AviMuxIn *object;
|
||||
WCHAR name[19];
|
||||
HRESULT hr;
|
||||
|
||||
if(avimux->input_pin_no >= MAX_PIN_NO-1)
|
||||
return E_FAIL;
|
||||
|
||||
name[7] = '0' + (avimux->input_pin_no+1) % 10;
|
||||
name[6] = '0' + (avimux->input_pin_no+1) / 10;
|
||||
swprintf(name, ARRAY_SIZE(name), L"Input %02u", avimux->input_pin_no + 1);
|
||||
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
@ -1824,10 +1823,7 @@ static HRESULT create_input_pin(AviMux *avimux)
|
|||
|
||||
HRESULT avi_mux_create(IUnknown *outer, IUnknown **out)
|
||||
{
|
||||
static const WCHAR output_name[] = {'A','V','I',' ','O','u','t',0};
|
||||
|
||||
AviMux *avimux;
|
||||
PIN_INFO info;
|
||||
HRESULT hr;
|
||||
|
||||
if (!(avimux = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(AviMux))))
|
||||
|
@ -1840,10 +1836,7 @@ HRESULT avi_mux_create(IUnknown *outer, IUnknown **out)
|
|||
avimux->IPersistMediaPropertyBag_iface.lpVtbl = &PersistMediaPropertyBagVtbl;
|
||||
avimux->ISpecifyPropertyPages_iface.lpVtbl = &SpecifyPropertyPagesVtbl;
|
||||
|
||||
info.dir = PINDIR_OUTPUT;
|
||||
info.pFilter = &avimux->filter.IBaseFilter_iface;
|
||||
lstrcpyW(info.achName, output_name);
|
||||
strmbase_source_init(&avimux->source, &avimux->filter, output_name, &source_ops);
|
||||
strmbase_source_init(&avimux->source, &avimux->filter, L"AVI Out", &source_ops);
|
||||
avimux->IQualityControl_iface.lpVtbl = &AviMuxOut_QualityControlVtbl;
|
||||
avimux->cur_stream = 0;
|
||||
avimux->cur_time = 0;
|
||||
|
|
|
@ -315,7 +315,6 @@ static const IAMFilterMiscFlagsVtbl misc_flags_vtbl =
|
|||
|
||||
HRESULT file_writer_create(IUnknown *outer, IUnknown **out)
|
||||
{
|
||||
static const WCHAR sink_name[] = {'i','n',0};
|
||||
struct file_writer *object;
|
||||
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
|
@ -325,7 +324,7 @@ HRESULT file_writer_create(IUnknown *outer, IUnknown **out)
|
|||
object->IFileSinkFilter_iface.lpVtbl = &filesinkfilter_vtbl;
|
||||
object->IAMFilterMiscFlags_iface.lpVtbl = &misc_flags_vtbl;
|
||||
|
||||
strmbase_sink_init(&object->sink, &object->filter, sink_name, &sink_ops, NULL);
|
||||
strmbase_sink_init(&object->sink, &object->filter, L"in", &sink_ops, NULL);
|
||||
|
||||
TRACE("Created file writer %p.\n", object);
|
||||
*out = &object->filter.IUnknown_inner;
|
||||
|
|
|
@ -229,9 +229,6 @@ static const REGFILTER2 reg_file_writer =
|
|||
*/
|
||||
HRESULT WINAPI DllRegisterServer(void)
|
||||
{
|
||||
static const WCHAR avi_muxW[] = {'A','V','I',' ','M','u','x',0};
|
||||
static const WCHAR file_writerW[] = {'F','i','l','e',' ','w','r','i','t','e','r',0};
|
||||
static const WCHAR smart_teeW[] = {'S','m','a','r','t',' ','T','e','e',0};
|
||||
IFilterMapper2 *mapper;
|
||||
HRESULT hr;
|
||||
|
||||
|
@ -242,11 +239,11 @@ HRESULT WINAPI DllRegisterServer(void)
|
|||
&IID_IFilterMapper2, (void **)&mapper)))
|
||||
return hr;
|
||||
|
||||
IFilterMapper2_RegisterFilter(mapper, &CLSID_AviDest, avi_muxW,
|
||||
IFilterMapper2_RegisterFilter(mapper, &CLSID_AviDest, L"AVI Mux",
|
||||
NULL, NULL, NULL, ®_avi_mux);
|
||||
IFilterMapper2_RegisterFilter(mapper, &CLSID_FileWriter, file_writerW,
|
||||
IFilterMapper2_RegisterFilter(mapper, &CLSID_FileWriter, L"File writer",
|
||||
NULL, NULL, NULL, ®_file_writer);
|
||||
IFilterMapper2_RegisterFilter(mapper, &CLSID_SmartTee, smart_teeW,
|
||||
IFilterMapper2_RegisterFilter(mapper, &CLSID_SmartTee, L"Smart Tee",
|
||||
NULL, NULL, NULL, ®_smart_tee);
|
||||
|
||||
IFilterMapper2_Release(mapper);
|
||||
|
|
|
@ -316,9 +316,6 @@ static const struct strmbase_source_ops preview_ops =
|
|||
|
||||
HRESULT smart_tee_create(IUnknown *outer, IUnknown **out)
|
||||
{
|
||||
static const WCHAR captureW[] = {'C','a','p','t','u','r','e',0};
|
||||
static const WCHAR previewW[] = {'P','r','e','v','i','e','w',0};
|
||||
static const WCHAR inputW[] = {'I','n','p','u','t',0};
|
||||
SmartTeeFilter *object;
|
||||
HRESULT hr;
|
||||
|
||||
|
@ -327,7 +324,7 @@ HRESULT smart_tee_create(IUnknown *outer, IUnknown **out)
|
|||
memset(object, 0, sizeof(*object));
|
||||
|
||||
strmbase_filter_init(&object->filter, outer, &CLSID_SmartTee, &filter_ops);
|
||||
strmbase_sink_init(&object->sink, &object->filter, inputW, &sink_ops, NULL);
|
||||
strmbase_sink_init(&object->sink, &object->filter, L"Input", &sink_ops, NULL);
|
||||
hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IMemAllocator, (void **)&object->sink.pAllocator);
|
||||
if (FAILED(hr))
|
||||
|
@ -337,8 +334,8 @@ HRESULT smart_tee_create(IUnknown *outer, IUnknown **out)
|
|||
return hr;
|
||||
}
|
||||
|
||||
strmbase_source_init(&object->capture, &object->filter, captureW, &capture_ops);
|
||||
strmbase_source_init(&object->preview, &object->filter, previewW, &preview_ops);
|
||||
strmbase_source_init(&object->capture, &object->filter, L"Capture", &capture_ops);
|
||||
strmbase_source_init(&object->preview, &object->filter, L"Preview", &preview_ops);
|
||||
|
||||
TRACE("Created smart tee %p.\n", object);
|
||||
*out = &object->filter.IUnknown_inner;
|
||||
|
|
|
@ -530,7 +530,6 @@ static HRESULT WINAPI PPB_InitNew(IPersistPropertyBag * iface)
|
|||
|
||||
static HRESULT WINAPI PPB_Load(IPersistPropertyBag *iface, IPropertyBag *bag, IErrorLog *error_log)
|
||||
{
|
||||
static const OLECHAR VFWIndex[] = {'V','F','W','I','n','d','e','x',0};
|
||||
struct vfw_capture *filter = impl_from_IPersistPropertyBag(iface);
|
||||
HRESULT hr;
|
||||
VARIANT var;
|
||||
|
@ -538,7 +537,7 @@ static HRESULT WINAPI PPB_Load(IPersistPropertyBag *iface, IPropertyBag *bag, IE
|
|||
TRACE("filter %p, bag %p, error_log %p.\n", filter, bag, error_log);
|
||||
|
||||
V_VT(&var) = VT_I4;
|
||||
if (FAILED(hr = IPropertyBag_Read(bag, VFWIndex, &var, error_log)))
|
||||
if (FAILED(hr = IPropertyBag_Read(bag, L"VFWIndex", &var, error_log)))
|
||||
return hr;
|
||||
|
||||
if (!(filter->device = capture_funcs->create(V_I4(&var))))
|
||||
|
@ -848,7 +847,6 @@ static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT;
|
|||
|
||||
HRESULT vfw_capture_create(IUnknown *outer, IUnknown **out)
|
||||
{
|
||||
static const WCHAR source_name[] = {'O','u','t','p','u','t',0};
|
||||
struct vfw_capture *object;
|
||||
|
||||
if (!InitOnceExecuteOnce(&init_once, load_capture_funcs, NULL, NULL) || !capture_funcs)
|
||||
|
@ -866,7 +864,7 @@ HRESULT vfw_capture_create(IUnknown *outer, IUnknown **out)
|
|||
object->IPersistPropertyBag_iface.lpVtbl = &IPersistPropertyBag_VTable;
|
||||
object->init = FALSE;
|
||||
|
||||
strmbase_source_init(&object->source, &object->filter, source_name, &source_ops);
|
||||
strmbase_source_init(&object->source, &object->filter, L"Output", &source_ops);
|
||||
|
||||
object->IKsPropertySet_iface.lpVtbl = &IKsPropertySet_VTable;
|
||||
|
||||
|
|
Loading…
Reference in a new issue