Commit 4f242f09 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winegstreamer: Rename mf_(create|destroy)_wg_sample helpers.

parent 240aff38
......@@ -120,8 +120,8 @@ extern HRESULT mfplat_DllRegisterServer(void);
IMFMediaType *mf_media_type_from_wg_format(const struct wg_format *format);
void mf_media_type_to_wg_format(IMFMediaType *type, struct wg_format *format);
HRESULT mf_create_wg_sample(IMFSample *sample, struct wg_sample **out);
void mf_destroy_wg_sample(struct wg_sample *wg_sample);
HRESULT wg_sample_create_mf(IMFSample *sample, struct wg_sample **out);
void wg_sample_release(struct wg_sample *wg_sample);
HRESULT wg_transform_push_mf(struct wg_transform *transform, struct wg_sample *sample);
HRESULT wg_transform_read_mf(struct wg_transform *transform, struct wg_sample *sample,
......
......@@ -540,11 +540,11 @@ static HRESULT WINAPI transform_ProcessInput(IMFTransform *iface, DWORD id, IMFS
if (!decoder->wg_transform)
return MF_E_TRANSFORM_TYPE_NOT_SET;
if (FAILED(hr = mf_create_wg_sample(sample, &wg_sample)))
if (FAILED(hr = wg_sample_create_mf(sample, &wg_sample)))
return hr;
hr = wg_transform_push_mf(decoder->wg_transform, wg_sample);
mf_destroy_wg_sample(wg_sample);
wg_sample_release(wg_sample);
return hr;
}
......@@ -573,17 +573,17 @@ static HRESULT WINAPI transform_ProcessOutput(IMFTransform *iface, DWORD flags,
samples[0].dwStatus = 0;
if (!samples[0].pSample) return E_INVALIDARG;
if (FAILED(hr = mf_create_wg_sample(samples[0].pSample, &wg_sample)))
if (FAILED(hr = wg_sample_create_mf(samples[0].pSample, &wg_sample)))
return hr;
if (wg_sample->max_size < info.cbSize)
{
mf_destroy_wg_sample(wg_sample);
wg_sample_release(wg_sample);
return MF_E_BUFFERTOOSMALL;
}
hr = wg_transform_read_mf(decoder->wg_transform, wg_sample, &wg_format);
mf_destroy_wg_sample(wg_sample);
wg_sample_release(wg_sample);
if (hr == MF_E_TRANSFORM_STREAM_CHANGE)
{
......
......@@ -965,7 +965,7 @@ struct mf_sample
struct wg_sample wg_sample;
};
HRESULT mf_create_wg_sample(IMFSample *sample, struct wg_sample **out)
HRESULT wg_sample_create_mf(IMFSample *sample, struct wg_sample **out)
{
DWORD current_length, max_length;
struct mf_sample *mf_sample;
......@@ -995,7 +995,7 @@ out:
return hr;
}
void mf_destroy_wg_sample(struct wg_sample *wg_sample)
void wg_sample_release(struct wg_sample *wg_sample)
{
struct mf_sample *mf_sample = CONTAINING_RECORD(wg_sample, struct mf_sample, wg_sample);
......
......@@ -534,18 +534,18 @@ static HRESULT WINAPI transform_ProcessInput(IMFTransform *iface, DWORD id, IMFS
if (FAILED(hr = IMFTransform_GetInputStreamInfo(iface, 0, &info)))
return hr;
if (FAILED(hr = mf_create_wg_sample(sample, &wg_sample)))
if (FAILED(hr = wg_sample_create_mf(sample, &wg_sample)))
return hr;
/* WMA transform uses fixed size input samples and ignores samples with invalid sizes */
if (wg_sample->size % info.cbSize)
{
mf_destroy_wg_sample(wg_sample);
wg_sample_release(wg_sample);
return S_OK;
}
hr = wg_transform_push_mf(decoder->wg_transform, wg_sample);
mf_destroy_wg_sample(wg_sample);
wg_sample_release(wg_sample);
return hr;
}
......@@ -576,13 +576,13 @@ static HRESULT WINAPI transform_ProcessOutput(IMFTransform *iface, DWORD flags,
return MF_E_TRANSFORM_NEED_MORE_INPUT;
}
if (FAILED(hr = mf_create_wg_sample(samples[0].pSample, &wg_sample)))
if (FAILED(hr = wg_sample_create_mf(samples[0].pSample, &wg_sample)))
return hr;
wg_sample->size = 0;
if (wg_sample->max_size < info.cbSize)
{
mf_destroy_wg_sample(wg_sample);
wg_sample_release(wg_sample);
return MF_E_BUFFERTOOSMALL;
}
......@@ -592,7 +592,7 @@ static HRESULT WINAPI transform_ProcessOutput(IMFTransform *iface, DWORD flags,
samples[0].dwStatus |= MFT_OUTPUT_DATA_BUFFER_INCOMPLETE;
}
mf_destroy_wg_sample(wg_sample);
wg_sample_release(wg_sample);
if (hr == MF_E_TRANSFORM_STREAM_CHANGE)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment