SDI Technologies iH30 Especificações Página 42

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 147
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 41
Ancillary Data
Quadro SDI Output PG-03776-001_v06 | 37
6.4.3 Determining the Number of Audio Samples per
Frame
It is the responsibility of the application to send the required number of audio samples
per frame. Sending an insufficient number of samples will result in breaks in the audio
stream. To determine the number of required audio samples per frame for a given video
signal format and the length of the audio frame sequence, an application should use
NvVIOANCAPI_NumAudioSamples as demonstrated in the following code sample.
Note: As specified by the SMPTE 272M and 299M specifications, 1000/1001 signal
formats have an uneven number of audio samples per frame. In this case, the
number of audio samples per frame varies over a sequence of frames and the
position of the frame as specified by the frame sequence number dictates the
number of required audio samples.
Code Listing 34: Determining Number of Audio Samples / Frame
// Determine the length of the audio sample sequence.
NvVIOANCAPI_NumAudioSamples(getHandle(),
NVVIOANCAUDIO_SAMPLING_RATE_48_0,
(NvU32 *)&m_uiSequenceLength,
NULL);
// Allocate/reallocate required memory for the array to hold the
// number of audio samples for each frame in a sequence.
if (m_uiNumAudioSamples)
free(m_uiNumAudioSamples);
m_uiNumAudioSamples = (unsigned int*)calloc((size_t)m_uiSequenceLength,
sizeof(NvU32));
// Determine number of audio samples based on signal format
// and audio sampling rate.
NvVIOANCAPI_NumAudioSamples(getHandle(),
NVVIOANCAUDIO_SAMPLING_RATE_48_0,
(NvU32 *)&m_uiSequenceLength,
(NvU32 *)m_uiNumAudioSamples);
6.4.4 Specifying Audio Data
Once the raw PCM audio data is packed as described, it is inserted into the
NVVIOANCDATAFRAME structure as shown in Code Listing 35. Each group of four audio
channels also has an associated 32-bit control value. This 32-bit variable permits the
specification of the active channels, frame numbers and other controls within the SMPTE
per-frame audio control packet that accompanies the audio data packets for the specified
audio group.
Vista de página 41
1 2 ... 37 38 39 40 41 42 43 44 45 46 47 ... 146 147

Comentários a estes Manuais

Sem comentários