qcap: Pass a single AM_MEDIA_TYPE pointer to get_format().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8ad3707443
commit
ebd4b38f90
|
@ -50,7 +50,7 @@ struct video_capture_device_ops
|
|||
void (*destroy)(struct video_capture_device *device);
|
||||
HRESULT (*check_format)(struct video_capture_device *device, const AM_MEDIA_TYPE *mt);
|
||||
HRESULT (*set_format)(struct video_capture_device *device, const AM_MEDIA_TYPE *mt);
|
||||
HRESULT (*get_format)(struct video_capture_device *device, AM_MEDIA_TYPE **mt);
|
||||
HRESULT (*get_format)(struct video_capture_device *device, AM_MEDIA_TYPE *mt);
|
||||
HRESULT (*get_caps)(struct video_capture_device *device, LONG index, AM_MEDIA_TYPE **mt, VIDEO_STREAM_CONFIG_CAPS *caps);
|
||||
LONG (*get_caps_count)(struct video_capture_device *device);
|
||||
HRESULT (*get_prop_range)(struct video_capture_device *device, VideoProcAmpProperty property,
|
||||
|
|
|
@ -212,15 +212,11 @@ static HRESULT v4l_device_set_format(struct video_capture_device *iface, const A
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT v4l_device_get_format(struct video_capture_device *iface, AM_MEDIA_TYPE **mt)
|
||||
static HRESULT v4l_device_get_format(struct video_capture_device *iface, AM_MEDIA_TYPE *mt)
|
||||
{
|
||||
struct v4l_device *device = v4l_device(iface);
|
||||
|
||||
*mt = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
|
||||
if (!*mt)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
return CopyMediaType(*mt, &device->current_caps->media_type);
|
||||
return CopyMediaType(mt, &device->current_caps->media_type);
|
||||
}
|
||||
|
||||
static __u32 v4l2_cid_from_qcap_property(VideoProcAmpProperty property)
|
||||
|
|
|
@ -223,16 +223,18 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
|
|||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI AMStreamConfig_GetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE **pmt)
|
||||
static HRESULT WINAPI AMStreamConfig_GetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE **mt)
|
||||
{
|
||||
VfwCapture *filter = impl_from_IAMStreamConfig(iface);
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("filter %p, mt %p.\n", filter, pmt);
|
||||
TRACE("filter %p, mt %p.\n", filter, mt);
|
||||
|
||||
hr = filter->device->ops->get_format(filter->device, pmt);
|
||||
if (SUCCEEDED(hr))
|
||||
strmbase_dump_media_type(*pmt);
|
||||
if (!(*mt = CoTaskMemAlloc(sizeof(**mt))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
if (SUCCEEDED(hr = filter->device->ops->get_format(filter->device, *mt)))
|
||||
strmbase_dump_media_type(*mt);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue