Exemplo n.º 1
0
// creates the buffer for the source
// This overload supplies the sink buffer, as optimal source buffer size creation may depend on this
CMMFBuffer* CMMFRawFormatRead::CreateSourceBufferL(TMediaId aMediaId, CMMFBuffer& aSinkBuffer, TBool &aReference)
	{
	if (aMediaId.iMediaType == KUidMediaTypeAudio) 
		{
		NegotiateSourceBufferL(aSinkBuffer); //sets frame size to match sink buffer
		return CreateSourceBufferL(aMediaId, aReference);
		}
	else User::Leave(KErrNotSupported);
	return NULL;
	}
// -----------------------------------------------------------------------------
// CG711PayloadFormatRead::CreateSourceBufferL
// Create a source buffer for the given media, setting frame size to match
// the given sink buffer.
// -----------------------------------------------------------------------------
CMMFBuffer* CG711PayloadFormatRead::CreateSourceBufferL( TMediaId aMediaId,
        CMMFBuffer& /*aSinkBuffer*/,
        TBool& aReference )
{
    if ( KUidMediaTypeAudio != aMediaId.iMediaType )
    {
        User::Leave( KErrNotSupported );
    }

    return CreateSourceBufferL( aMediaId, aReference );
}
CMMFBuffer* MTSIMmfDataSource::CreateSourceBufferL(TMediaId aMediaId, CMMFBuffer& /*aSinkBuffer*/, TBool &aReference)
	{
	return CreateSourceBufferL(aMediaId, aReference);
	}