MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / probe_dts_profile

Function probe_dts_profile

libhb/stream.c:4077–4123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4075}
4076
4077static int probe_dts_profile( hb_stream_t *stream, hb_pes_stream_t *pes )
4078{
4079 hb_work_info_t info;
4080 hb_work_object_t *w = hb_audio_decoder( stream->h, pes->codec );
4081
4082 w->codec_param = pes->codec_param;
4083 int ret = w->bsinfo( w, pes->probe_buf, &info );
4084 if ( ret < 0 )
4085 {
4086 hb_log( "probe_dts_profile: no info type %d/0x%x for id 0x%x",
4087 pes->codec, pes->codec_param, pes->stream_id );
4088
4089 }
4090 switch (info.profile)
4091 {
4092 case AV_PROFILE_DTS:
4093 case AV_PROFILE_DTS_ES:
4094 case AV_PROFILE_DTS_96_24:
4095 case AV_PROFILE_DTS_EXPRESS:
4096 pes->codec = HB_ACODEC_DCA;
4097 pes->stream_type = 0x82;
4098 pes->stream_kind = A;
4099 break;
4100
4101 case AV_PROFILE_DTS_HD_HRA:
4102 case AV_PROFILE_DTS_HD_MA:
4103 case AV_PROFILE_DTS_HD_MA_X:
4104 case AV_PROFILE_DTS_HD_MA_X_IMAX:
4105 pes->stream_type = 0;
4106 pes->stream_kind = A;
4107 break;
4108
4109 default:
4110 free(w);
4111 return 0;
4112 }
4113 const char *profile_name;
4114 const AVCodec *codec = avcodec_find_decoder( pes->codec_param );
4115 profile_name = av_get_profile_name( codec, info.profile );
4116 if ( profile_name )
4117 {
4118 strncpy(pes->codec_name, profile_name, 80);
4119 pes->codec_name[79] = 0;
4120 }
4121 free(w);
4122 return 1;
4123}
4124
4125static int
4126do_deep_probe(hb_stream_t *stream, hb_pes_stream_t *pes)

Callers 1

do_probeFunction · 0.85

Calls 2

hb_audio_decoderFunction · 0.85
hb_logFunction · 0.85

Tested by

no test coverage detected