| 4075 | } |
| 4076 | |
| 4077 | static 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 | |
| 4125 | static int |
| 4126 | do_deep_probe(hb_stream_t *stream, hb_pes_stream_t *pes) |
no test coverage detected