User`s manual
108 Reference Manual
if ( pmt->formattype != FORMAT_MPEGVideo ) goto
next_stream_caps;
MPEG1VIDEOINFO* format = (MPEG1VIDEOINFO*)pmt-
>pbFormat;
if ( format->hdr.bmiHeader.biWidth !=
(int)video_config->rescfg.width )
goto next_stream_caps;
if ( format->hdr.bmiHeader.biHeight !=
(int)video_config->rescfg.height )
goto next_stream_caps;
normal_format_size =
SIZE_MPEG1VIDEOINFO(format);
format->hdr.AvgTimePerFrame =
(ULONGLONG)(10010000000) / video_config-
>fpscfg.frame_rate;
format->hdr.bmiHeader.biWidth = video_config-
>rescfg.width;
format->hdr.bmiHeader.biHeight = video_config-
>rescfg.height;
format->hdr.bmiHeader.biSizeImage =
video_config->rescfg.width * video_config-
>rescfg.height * 3 / 2;
format->hdr.dwBitRate = video_config-
>ctlcfg.target_bitrate;
if ( pmt->cbFormat > normal_format_size )
{
assert( pmt->cbFormat == normal_format_size +
sizeof(TCFG_FORMAT_EXTENSION) );
TCFG_FORMAT_EXTENSION* extension =
(TCFG_FORMAT_EXTENSION*)(pmt->pbFormat +
normal_format_size);
extension->_stream =
video_config->strcfg;