Project

General

Profile

Actions

Support Request #11090

closed

Copy a sample stream to a buffer

Added by hidden about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Customer:
AUDI
Department:
EF
Requester's Priority:
Normal
Support Level:
2nd Level
Resolution:
Solved Issue
Product Issue Numbers:
Affected Products:
Platform:
Topic:
ADTF::SDK
FAQ Links:

Description

Supportanfrage

we notice that in ADTF2 we can use "CopyBufferTo" to copy a sample stream to a buffer, is there same function or similar thing in ADTF3?
Our goal is to sample all the streams coming from input pins to a buffer.

Thanks in advance!

Lösung

The equivalent to CopyToBuffer in ADTF 3 is

    object_ptr<const ISample> pSample;

    object_ptr_locked<const ISampleBuffer> pBuffer;
    RETURN_IF_FAILED(pSample->Lock(pBuffer));

    memcpy(pDest, pBuffer->GetPtr(),  std::min(nDestSize, pBuffer->GetSize()));
Actions

Also available in: Atom PDF