
Ancillary Data
Quadro SDI Output PG-03776-001_v06 | 40
m_pRingBuffer->NumValidSamples(0);
m_AncData.AudioGroup4.audioData[0] = m_pRingBuffer->GetBuffer(0);
m_AncData.AudioGroup4.audioData[1] = m_pRingBuffer->GetBuffer(1);
m_AncData.AudioGroup4.audioData[2] = m_pRingBuffer->GetBuffer(0);
m_AncData.AudioGroup4.audioData[3] = m_pRingBuffer->GetBuffer(1);
// Increment frame sequence number.
// When sequence length reached, reset.
frameSequenceNum++;
if (frameSequenceNum == m_uiSequenceLength)
frameSequenceNum = 0;
6.5 CUSTOM DATA
An application can also send custom ancillary data packets. In this case, in addition to
specifying the custom data, an application must also specify the ancillary data packet
data identification (DID, secondary data identification (SDID) and data count (DC)
words as well as the checksum (CS) word for each custom data packet. Custom ancillary
data packets are placed in the VANC region of the video stream. Code Listing 36
illustrates how this can be done.
Code Listing 36: Specifying Custom Data
// Create custom packet(s)
ancData.fields |= NVVIOANCDATAFRAME_CUSTOM;
#define NUM_CUSTOM_PACKETS 255
NVVIOANCDATAPACKET customPackets[NUM_CUSTOM_PACKETS];
for (int i = 0; i < NUM_CUSTOM_PACKETS; i++) {
customPackets[i].version = NVVIOANCDATAPACKET_VERSION;
customPackets[i].DID = 0x69;
customPackets[i].SDID = 0x69;
customPackets[i].DC = 0xff;
customPackets[i].CS = 0x0; //
for (NvU8 j = 0; j < customPackets[i].DC; j++) {
customPackets[i].data[j] = j;
}
}
ancData.numCustomPackets = NUM_CUSTOM_PACKETS;
ancData.CustomPackets = &customPackets[0];
Comentários a estes Manuais