mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 23:11:47 +00:00
winegstreamer: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f836995ed5
commit
b618a6c6a7
|
@ -794,12 +794,12 @@ static void init_new_decoded_pad(GstElement *bin, GstPad *pad, GSTImpl *This)
|
||||||
piOutput.dir = PINDIR_OUTPUT;
|
piOutput.dir = PINDIR_OUTPUT;
|
||||||
piOutput.pFilter = &This->filter.IBaseFilter_iface;
|
piOutput.pFilter = &This->filter.IBaseFilter_iface;
|
||||||
name = gst_pad_get_name(pad);
|
name = gst_pad_get_name(pad);
|
||||||
MultiByteToWideChar(CP_UNIXCP, 0, name, -1, piOutput.achName, sizeof(piOutput.achName) / sizeof(piOutput.achName[0]) - 1);
|
MultiByteToWideChar(CP_UNIXCP, 0, name, -1, piOutput.achName, ARRAY_SIZE(piOutput.achName) - 1);
|
||||||
TRACE("Name: %s\n", name);
|
TRACE("Name: %s\n", name);
|
||||||
strcpy(my_name, "qz_sink_");
|
strcpy(my_name, "qz_sink_");
|
||||||
strcat(my_name, name);
|
strcat(my_name, name);
|
||||||
g_free(name);
|
g_free(name);
|
||||||
piOutput.achName[sizeof(piOutput.achName) / sizeof(piOutput.achName[0]) - 1] = 0;
|
piOutput.achName[ARRAY_SIZE(piOutput.achName) - 1] = 0;
|
||||||
|
|
||||||
caps = gst_pad_query_caps(pad, NULL);
|
caps = gst_pad_query_caps(pad, NULL);
|
||||||
caps = gst_caps_make_writable(caps);
|
caps = gst_caps_make_writable(caps);
|
||||||
|
@ -1259,7 +1259,7 @@ IUnknown * CALLBACK Gstreamer_Splitter_create(IUnknown *pUnkOuter, HRESULT *phr)
|
||||||
piInput = &This->pInputPin.pin.pinInfo;
|
piInput = &This->pInputPin.pin.pinInfo;
|
||||||
piInput->dir = PINDIR_INPUT;
|
piInput->dir = PINDIR_INPUT;
|
||||||
piInput->pFilter = &This->filter.IBaseFilter_iface;
|
piInput->pFilter = &This->filter.IBaseFilter_iface;
|
||||||
lstrcpynW(piInput->achName, wcsInputPinName, sizeof(piInput->achName) / sizeof(piInput->achName[0]));
|
lstrcpynW(piInput->achName, wcsInputPinName, ARRAY_SIZE(piInput->achName));
|
||||||
This->pInputPin.pin.IPin_iface.lpVtbl = &GST_InputPin_Vtbl;
|
This->pInputPin.pin.IPin_iface.lpVtbl = &GST_InputPin_Vtbl;
|
||||||
This->pInputPin.pin.refCount = 1;
|
This->pInputPin.pin.refCount = 1;
|
||||||
This->pInputPin.pin.pConnectedTo = NULL;
|
This->pInputPin.pin.pConnectedTo = NULL;
|
||||||
|
|
|
@ -223,7 +223,7 @@ FactoryTemplate const g_Templates[] = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const int g_cTemplates = sizeof(g_Templates) / sizeof (g_Templates[0]);
|
const int g_cTemplates = ARRAY_SIZE(g_Templates);
|
||||||
|
|
||||||
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
||||||
{
|
{
|
||||||
|
@ -323,7 +323,7 @@ static HRESULT register_server(BOOL do_register)
|
||||||
INF_SET_ID(MEDIATYPE_Stream);
|
INF_SET_ID(MEDIATYPE_Stream);
|
||||||
INF_SET_ID(WINESUBTYPE_Gstreamer);
|
INF_SET_ID(WINESUBTYPE_Gstreamer);
|
||||||
|
|
||||||
for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++) {
|
for(i = 0; i < ARRAY_SIZE(pse); i++) {
|
||||||
pse[i].pszValue = HeapAlloc(GetProcessHeap(),0,39);
|
pse[i].pszValue = HeapAlloc(GetProcessHeap(),0,39);
|
||||||
sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
|
sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
|
||||||
clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0],
|
clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0],
|
||||||
|
@ -331,7 +331,7 @@ static HRESULT register_server(BOOL do_register)
|
||||||
clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]);
|
clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]);
|
||||||
}
|
}
|
||||||
|
|
||||||
strtable.cEntries = sizeof(pse)/sizeof(pse[0]);
|
strtable.cEntries = ARRAY_SIZE(pse);
|
||||||
strtable.pse = pse;
|
strtable.pse = pse;
|
||||||
|
|
||||||
hAdvpack = LoadLibraryW(wszAdvpack);
|
hAdvpack = LoadLibraryW(wszAdvpack);
|
||||||
|
@ -339,7 +339,7 @@ static HRESULT register_server(BOOL do_register)
|
||||||
|
|
||||||
hres = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", &strtable);
|
hres = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", &strtable);
|
||||||
|
|
||||||
for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++)
|
for(i = 0; i < ARRAY_SIZE(pse); i++)
|
||||||
HeapFree(GetProcessHeap(),0,pse[i].pszValue);
|
HeapFree(GetProcessHeap(),0,pse[i].pszValue);
|
||||||
|
|
||||||
if(FAILED(hres)) {
|
if(FAILED(hres)) {
|
||||||
|
|
Loading…
Reference in a new issue