2.4.5 Streaming Encoder¶
Streaming encoder functionality is supported by certain DeckLink devices such as the H.264 Pro Recorder. Uncompressed video and audio streams may be encoded into a compressed bitstream and made available to suitable applications involving compressed video and audio.
2.4.5.1 Streaming Encoder Capture¶
An application performing a typical streaming encoder capture operation should perform the following steps:
Enumerate the preset video encoding modes by calling
IBMDStreamingDeviceInput::GetVideoEncodingModePresetIterator(). For each reported video encoding mode callIBMDStreamingDeviceInput::GetCurrentDetectedVideoInputMode()andIBMDStreamingDeviceInput::DoesSupportVideoEncodingMode()to check if the current video input mode and video encoding mode are supported.If desired, call
IBMDStreamingVideoEncodingMode::CreateMutableVideoEncodingMode()to change the encoder bitrate or other encoder settings.
While capture is running:
receive calls to
IBMDStreamingH264InputCallback::MPEG2TSPacketArrived()with MPEG transport stream data to process both compressed video and audio alternatively, receive calls toIBMDStreamingH264InputCallback::H264NALPacketArrived()andIBMDStreamingH264InputCallback::H264AudioPacketArrived()to process compressed video and audio data separately.