detect stream based on codec_type