Commit 03f0479c authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Rename the "mtCurrent" field of struct strmbase_pin to "mt".

parent 288a6625
......@@ -470,7 +470,7 @@ static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample *
if((This->driver_flags & VIDCF_TEMPORAL) && !(This->driver_flags & VIDCF_FASTTEMPORALC))
FIXME("Unsupported temporal compression\n");
src_videoinfo = (VIDEOINFOHEADER *)This->sink.pin.mtCurrent.pbFormat;
src_videoinfo = (VIDEOINFOHEADER *)This->sink.pin.mt.pbFormat;
This->videoinfo->bmiHeader.biSizeImage = This->max_frame_size;
res = ICCompress(This->hic, sync_point ? ICCOMPRESS_KEYFRAME : 0, &This->videoinfo->bmiHeader, buf,
&src_videoinfo->bmiHeader, ptr, 0, &comp_flags, This->frame_cnt, 0, 0, NULL, NULL);
......@@ -539,7 +539,7 @@ static HRESULT source_get_media_type(struct strmbase_pin *base, unsigned int iPo
amt->subtype = MEDIASUBTYPE_PCM;
amt->bFixedSizeSamples = FALSE;
amt->bTemporalCompression = (This->driver_flags & VIDCF_TEMPORAL) != 0;
amt->lSampleSize = This->sink.pin.mtCurrent.lSampleSize;
amt->lSampleSize = This->sink.pin.mt.lSampleSize;
amt->formattype = FORMAT_VideoInfo;
amt->pUnk = NULL;
amt->cbFormat = This->videoinfo_size;
......
......@@ -1416,7 +1416,7 @@ static HRESULT WINAPI AviMuxIn_Receive(BaseInputPin *base, IMediaSample *pSample
size = IMediaSample_GetActualDataLength(pSample);
}
if(!avimuxin->pin.pin.mtCurrent.bTemporalCompression)
if(!avimuxin->pin.pin.mt.bTemporalCompression)
flags |= AM_SAMPLE_SPLICEPOINT;
hr = IMediaSample_GetTime(pSample, &start, &stop);
......
......@@ -142,7 +142,7 @@ static HRESULT sink_get_media_type(struct strmbase_pin *base,
EnterCriticalSection(&This->filter.csFilter);
if (This->sink.pin.peer)
{
CopyMediaType(amt, &This->sink.pin.mtCurrent);
CopyMediaType(amt, &This->sink.pin.mt);
hr = S_OK;
}
else
......@@ -331,7 +331,7 @@ static HRESULT source_get_media_type(struct strmbase_pin *iface,
if (!filter->sink.pin.peer)
hr = VFW_E_NOT_CONNECTED;
else if (!index)
CopyMediaType(mt, &filter->sink.pin.mtCurrent);
CopyMediaType(mt, &filter->sink.pin.mt);
else
hr = VFW_S_NO_MORE_ITEMS;
......
......@@ -92,14 +92,14 @@ static inline DSoundRenderImpl *impl_from_IAMDirectSound(IAMDirectSound *iface)
}
static REFERENCE_TIME time_from_pos(DSoundRenderImpl *This, DWORD pos) {
WAVEFORMATEX *wfx = (WAVEFORMATEX *)This->renderer.sink.pin.mtCurrent.pbFormat;
WAVEFORMATEX *wfx = (WAVEFORMATEX *)This->renderer.sink.pin.mt.pbFormat;
REFERENCE_TIME ret = 10000000;
ret = ret * pos / wfx->nAvgBytesPerSec;
return ret;
}
static DWORD pos_from_time(DSoundRenderImpl *This, REFERENCE_TIME time) {
WAVEFORMATEX *wfx = (WAVEFORMATEX *)This->renderer.sink.pin.mtCurrent.pbFormat;
WAVEFORMATEX *wfx = (WAVEFORMATEX *)This->renderer.sink.pin.mt.pbFormat;
REFERENCE_TIME ret = time;
ret *= wfx->nAvgBytesPerSec;
ret /= 10000000;
......@@ -108,7 +108,7 @@ static DWORD pos_from_time(DSoundRenderImpl *This, REFERENCE_TIME time) {
}
static void DSoundRender_UpdatePositions(DSoundRenderImpl *This, DWORD *seqwritepos, DWORD *minwritepos) {
WAVEFORMATEX *wfx = (WAVEFORMATEX *)This->renderer.sink.pin.mtCurrent.pbFormat;
WAVEFORMATEX *wfx = (WAVEFORMATEX *)This->renderer.sink.pin.mt.pbFormat;
BYTE *buf1, *buf2;
DWORD size1, size2, playpos, writepos, old_writepos, old_playpos, adv;
BOOL writepos_set = This->writepos < This->buf_size;
......@@ -146,7 +146,7 @@ static void DSoundRender_UpdatePositions(DSoundRenderImpl *This, DWORD *seqwrite
static HRESULT DSoundRender_GetWritePos(DSoundRenderImpl *This, DWORD *ret_writepos, REFERENCE_TIME write_at, DWORD *pfree, DWORD *skip)
{
WAVEFORMATEX *wfx = (WAVEFORMATEX *)This->renderer.sink.pin.mtCurrent.pbFormat;
WAVEFORMATEX *wfx = (WAVEFORMATEX *)This->renderer.sink.pin.mt.pbFormat;
DWORD writepos, min_writepos, playpos;
REFERENCE_TIME max_lag = 50 * 10000;
REFERENCE_TIME min_lag = 25 * 10000;
......@@ -314,7 +314,7 @@ static HRESULT WINAPI DSoundRender_PrepareReceive(struct strmbase_renderer *ifac
if (IMediaSample_GetMediaType(pSample, &amt) == S_OK)
{
AM_MEDIA_TYPE *orig = &This->renderer.sink.pin.mtCurrent;
AM_MEDIA_TYPE *orig = &This->renderer.sink.pin.mt;
WAVEFORMATEX *origfmt = (WAVEFORMATEX *)orig->pbFormat;
WAVEFORMATEX *newfmt = (WAVEFORMATEX *)amt->pbFormat;
......@@ -434,7 +434,7 @@ static void dsound_render_start_stream(struct strmbase_renderer *iface)
static HRESULT WINAPI DSoundRender_CompleteConnect(struct strmbase_renderer *iface, IPin *pReceivePin)
{
DSoundRenderImpl *This = impl_from_strmbase_renderer(iface);
const AM_MEDIA_TYPE *pmt = &This->renderer.sink.pin.mtCurrent;
const AM_MEDIA_TYPE *pmt = &This->renderer.sink.pin.mt;
HRESULT hr = S_OK;
WAVEFORMATEX *format;
DSBUFFERDESC buf_desc;
......@@ -937,7 +937,7 @@ static HRESULT WINAPI ReferenceClock_GetTime(IReferenceClock *iface,
DWORD writepos1, writepos2;
EnterCriticalSection(&This->renderer.filter.csFilter);
DSoundRender_UpdatePositions(This, &writepos1, &writepos2);
if (This->renderer.sink.pin.mtCurrent.pbFormat)
if (This->renderer.sink.pin.mt.pbFormat)
{
*pTime = This->play_time + time_from_pos(This, This->last_playpos);
hr = S_OK;
......
......@@ -651,7 +651,7 @@ static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(struct strmbase_sourc
This->pin.peer = pReceivePin;
IPin_AddRef(pReceivePin);
CopyMediaType(&This->pin.mtCurrent, pmt);
CopyMediaType(&This->pin.mt, pmt);
hr = IPin_ReceiveConnection(pReceivePin, &This->pin.IPin_iface, pmt);
......@@ -659,7 +659,7 @@ static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(struct strmbase_sourc
{
IPin_Release(This->pin.peer);
This->pin.peer = NULL;
FreeMediaType(&This->pin.mtCurrent);
FreeMediaType(&This->pin.mt);
}
TRACE(" -- %x\n", hr);
......
......@@ -574,14 +574,14 @@ static HRESULT WINAPI testsource_AttemptConnection(struct strmbase_source *iface
iface->pin.peer = peer;
IPin_AddRef(peer);
CopyMediaType(&iface->pin.mtCurrent, mt);
CopyMediaType(&iface->pin.mt, mt);
if (FAILED(hr = IPin_ReceiveConnection(peer, &iface->pin.IPin_iface, mt)))
{
ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
IPin_Release(peer);
iface->pin.peer = NULL;
FreeMediaType(&iface->pin.mtCurrent);
FreeMediaType(&iface->pin.mt);
}
return hr;
......
......@@ -933,14 +933,14 @@ static HRESULT WINAPI testsource_AttemptConnection(struct strmbase_source *iface
iface->pin.peer = peer;
IPin_AddRef(peer);
CopyMediaType(&iface->pin.mtCurrent, mt);
CopyMediaType(&iface->pin.mt, mt);
if (FAILED(hr = IPin_ReceiveConnection(peer, &iface->pin.IPin_iface, mt)))
{
ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
IPin_Release(peer);
iface->pin.peer = NULL;
FreeMediaType(&iface->pin.mtCurrent);
FreeMediaType(&iface->pin.mt);
}
return hr;
......
......@@ -937,14 +937,14 @@ static HRESULT WINAPI testsource_AttemptConnection(struct strmbase_source *iface
iface->pin.peer = peer;
IPin_AddRef(peer);
CopyMediaType(&iface->pin.mtCurrent, mt);
CopyMediaType(&iface->pin.mt, mt);
if (FAILED(hr = IPin_ReceiveConnection(peer, &iface->pin.IPin_iface, mt)))
{
ok(hr == VFW_E_TYPE_NOT_ACCEPTED || hr == E_FAIL, "Got hr %#x.\n", hr);
IPin_Release(peer);
iface->pin.peer = NULL;
FreeMediaType(&iface->pin.mtCurrent);
FreeMediaType(&iface->pin.mt);
}
return hr;
......
......@@ -394,7 +394,7 @@ static HRESULT WINAPI VideoRenderer_GetSourceRect(BaseControlVideo* iface, RECT
static HRESULT WINAPI VideoRenderer_GetStaticImage(BaseControlVideo* iface, LONG *pBufferSize, LONG *pDIBImage)
{
VideoRendererImpl *This = impl_from_BaseControlVideo(iface);
AM_MEDIA_TYPE *amt = &This->renderer.sink.pin.mtCurrent;
AM_MEDIA_TYPE *amt = &This->renderer.sink.pin.mt;
BITMAPINFOHEADER *bmiHeader;
LONG needed_size;
char *ptr;
......@@ -464,7 +464,7 @@ static VIDEOINFOHEADER* WINAPI VideoRenderer_GetVideoFormat(BaseControlVideo* if
TRACE("(%p/%p)\n", This, iface);
pmt = &This->renderer.sink.pin.mtCurrent;
pmt = &This->renderer.sink.pin.mt;
if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo)) {
return (VIDEOINFOHEADER*)pmt->pbFormat;
} else if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo2)) {
......
......@@ -198,7 +198,7 @@ static DWORD VMR9_SendSampleData(struct quartz_vmr *This, VMR9PresentationInfo *
TRACE("%p %p %d\n", This, data, size);
amt = &This->renderer.sink.pin.mtCurrent;
amt = &This->renderer.sink.pin.mt;
if (IsEqualIID(&amt->formattype, &FORMAT_VideoInfo))
{
......@@ -609,7 +609,7 @@ static HRESULT WINAPI VMR9_GetSourceRect(BaseControlVideo* This, RECT *pSourceRe
static HRESULT WINAPI VMR9_GetStaticImage(BaseControlVideo* This, LONG *pBufferSize, LONG *pDIBImage)
{
struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
AM_MEDIA_TYPE *amt = &pVMR9->renderer.sink.pin.mtCurrent;
AM_MEDIA_TYPE *amt = &pVMR9->renderer.sink.pin.mt;
BITMAPINFOHEADER *bmiHeader;
LONG needed_size;
char *ptr;
......@@ -679,7 +679,7 @@ static VIDEOINFOHEADER* WINAPI VMR9_GetVideoFormat(BaseControlVideo* This)
TRACE("(%p/%p)\n", pVMR9, This);
pmt = &pVMR9->renderer.sink.pin.mtCurrent;
pmt = &pVMR9->renderer.sink.pin.mt;
if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo)) {
return (VIDEOINFOHEADER*)pmt->pbFormat;
} else if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo2)) {
......
......@@ -196,8 +196,8 @@ HRESULT WINAPI BasePinImpl_Disconnect(IPin * iface)
{
IPin_Release(This->peer);
This->peer = NULL;
FreeMediaType(&This->mtCurrent);
ZeroMemory(&This->mtCurrent, sizeof(This->mtCurrent));
FreeMediaType(&This->mt);
ZeroMemory(&This->mt, sizeof(This->mt));
hr = S_OK;
}
else
......@@ -245,7 +245,7 @@ HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt
{
if (This->peer)
{
CopyMediaType(pmt, &This->mtCurrent);
CopyMediaType(pmt, &This->mt);
strmbase_dump_media_type(pmt);
hr = S_OK;
}
......@@ -456,8 +456,8 @@ HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface)
{
IPin_Release(This->pin.peer);
This->pin.peer = NULL;
FreeMediaType(&This->pin.mtCurrent);
ZeroMemory(&This->pin.mtCurrent, sizeof(This->pin.mtCurrent));
FreeMediaType(&This->pin.mt);
ZeroMemory(&This->pin.mt, sizeof(This->pin.mt));
hr = S_OK;
}
else
......@@ -643,7 +643,7 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *This,
This->pin.peer = pReceivePin;
IPin_AddRef(pReceivePin);
CopyMediaType(&This->pin.mtCurrent, pmt);
CopyMediaType(&This->pin.mt, pmt);
hr = IPin_ReceiveConnection(pReceivePin, &This->pin.IPin_iface, pmt);
......@@ -678,7 +678,7 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *This,
{
IPin_Release(This->pin.peer);
This->pin.peer = NULL;
FreeMediaType(&This->pin.mtCurrent);
FreeMediaType(&This->pin.mt);
}
TRACE(" -- %x\n", hr);
......@@ -699,7 +699,7 @@ void strmbase_source_init(struct strmbase_source *pin, const IPinVtbl *vtbl, str
void strmbase_source_cleanup(struct strmbase_source *pin)
{
FreeMediaType(&pin->pin.mtCurrent);
FreeMediaType(&pin->pin.mt);
if (pin->pAllocator)
IMemAllocator_Release(pin->pAllocator);
pin->pAllocator = NULL;
......@@ -750,7 +750,7 @@ HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceiveP
if (SUCCEEDED(hr))
{
CopyMediaType(&This->pin.mtCurrent, pmt);
CopyMediaType(&This->pin.mt, pmt);
This->pin.peer = pReceivePin;
IPin_AddRef(pReceivePin);
}
......@@ -999,7 +999,7 @@ void strmbase_sink_init(BaseInputPin *pin, const IPinVtbl *vtbl, struct strmbase
void strmbase_sink_cleanup(BaseInputPin *pin)
{
FreeMediaType(&pin->pin.mtCurrent);
FreeMediaType(&pin->pin.mt);
if (pin->pAllocator)
IMemAllocator_Release(pin->pAllocator);
pin->pAllocator = NULL;
......
......@@ -1216,7 +1216,7 @@ static void gstdemux_destroy(struct strmbase_filter *iface)
assert(hr == S_OK);
}
FreeMediaType(&filter->sink.mtCurrent);
FreeMediaType(&filter->sink.mt);
if (filter->alloc)
IMemAllocator_Release(filter->alloc);
filter->alloc = NULL;
......@@ -2022,7 +2022,7 @@ static HRESULT WINAPI GSTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
if (pAlloc)
IMemAllocator_Release(pAlloc);
if (SUCCEEDED(hr)) {
CopyMediaType(&filter->sink.mtCurrent, pmt);
CopyMediaType(&filter->sink.mt, pmt);
filter->sink.peer = pReceivePin;
IPin_AddRef(pReceivePin);
hr = IMemAllocator_Commit(filter->alloc);
......
......@@ -241,7 +241,7 @@ static void qt_splitter_destroy(struct strmbase_filter *iface)
IPin_Release(peer);
}
FreeMediaType(&filter->pInputPin.pin.mtCurrent);
FreeMediaType(&filter->pInputPin.pin.mt);
if (filter->pInputPin.pAlloc)
IMemAllocator_Release(filter->pInputPin.pAlloc);
filter->pInputPin.pAlloc = NULL;
......@@ -1120,7 +1120,7 @@ static HRESULT WINAPI QTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
if (SUCCEEDED(hr))
{
CopyMediaType(&This->pin.mtCurrent, pmt);
CopyMediaType(&This->pin.mt, pmt);
This->pin.peer = pReceivePin;
IPin_AddRef(pReceivePin);
hr = IMemAllocator_Commit(This->pAlloc);
......
......@@ -37,7 +37,7 @@ struct strmbase_pin
PIN_DIRECTION dir;
WCHAR name[128];
IPin *peer;
AM_MEDIA_TYPE mtCurrent;
AM_MEDIA_TYPE mt;
const struct BasePinFuncTable* pFuncsTable;
};
......
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