"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libhb/bd.c" between
HandBrake-1.3.0-source.tar.bz2 and HandBrake-1.3.1-source.tar.bz2

About: HandBrake is a multiplatform, multithreaded video transcoder (with GUI) that converts video from nearly any format to modern codecs.

bd.c  (HandBrake-1.3.0-source.tar.bz2):bd.c  (HandBrake-1.3.1-source.tar.bz2)
skipping to change at line 133 skipping to change at line 133
subtitle->timebase.num = 1; subtitle->timebase.num = 1;
subtitle->timebase.den = 90000; subtitle->timebase.den = 90000;
hb_log( "bd: subtitle id=0x%x, lang=%s, 3cc=%s", subtitle->id, hb_log( "bd: subtitle id=0x%x, lang=%s, 3cc=%s", subtitle->id,
subtitle->lang, subtitle->iso639_2 ); subtitle->lang, subtitle->iso639_2 );
hb_list_add( list_subtitle, subtitle ); hb_list_add( list_subtitle, subtitle );
return; return;
} }
static void add_audio(int track, hb_list_t *list_audio, BLURAY_STREAM_INFO *bdau dio, int substream_type, uint32_t codec, uint32_t codec_param) static void add_audio(int track, hb_list_t *list_audio, BLURAY_STREAM_INFO *bdau dio, int substream_type, uint32_t codec, uint32_t codec_param, int attributes)
{ {
const char * codec_name; const char * codec_name;
hb_audio_t * audio; hb_audio_t * audio;
iso639_lang_t * lang; iso639_lang_t * lang;
audio = calloc( sizeof( hb_audio_t ), 1 ); audio = calloc( sizeof( hb_audio_t ), 1 );
audio->id = (substream_type << 16) | bdaudio->pid; audio->id = (substream_type << 16) | bdaudio->pid;
audio->config.in.reg_desc = STR4_TO_UINT32("HDMV"); audio->config.in.reg_desc = STR4_TO_UINT32("HDMV");
audio->config.in.stream_type = bdaudio->coding_type; audio->config.in.stream_type = bdaudio->coding_type;
skipping to change at line 198 skipping to change at line 198
else else
{ {
codec_name = "Unknown"; codec_name = "Unknown";
} }
} }
break; break;
} }
lang = lang_for_code2( (char*)bdaudio->lang ); lang = lang_for_code2( (char*)bdaudio->lang );
audio->config.lang.attributes = HB_AUDIO_ATTR_NONE; audio->config.lang.attributes = attributes;
snprintf( audio->config.lang.simple, snprintf( audio->config.lang.simple,
sizeof( audio->config.lang.simple ), "%s", sizeof( audio->config.lang.simple ), "%s",
strlen( lang->native_name ) ? lang->native_name : lang->eng_name ) ; strlen( lang->native_name ) ? lang->native_name : lang->eng_name ) ;
snprintf( audio->config.lang.iso639_2, snprintf( audio->config.lang.iso639_2,
sizeof( audio->config.lang.iso639_2 ), "%s", lang->iso639_2 ); sizeof( audio->config.lang.iso639_2 ), "%s", lang->iso639_2 );
hb_log("bd: audio id=0x%x, lang=%s (%s), 3cc=%s", audio->id, hb_log("bd: audio id=0x%x, lang=%s (%s), 3cc=%s", audio->id,
audio->config.lang.simple, codec_name, audio->config.lang.iso639_2); audio->config.lang.simple, codec_name, audio->config.lang.iso639_2);
skipping to change at line 477 skipping to change at line 477
{ {
BLURAY_STREAM_INFO * bdaudio; BLURAY_STREAM_INFO * bdaudio;
bdaudio = &ti->clips[audio_clip_index].audio_streams[ii]; bdaudio = &ti->clips[audio_clip_index].audio_streams[ii];
switch (bdaudio->coding_type) switch (bdaudio->coding_type)
{ {
case BLURAY_STREAM_TYPE_AUDIO_TRUHD: case BLURAY_STREAM_TYPE_AUDIO_TRUHD:
// Add 2 audio tracks. One for TrueHD and one for AC-3 // Add 2 audio tracks. One for TrueHD and one for AC-3
add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_AC3, add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_AC3,
HB_ACODEC_AC3, AV_CODEC_ID_AC3); HB_ACODEC_AC3, AV_CODEC_ID_AC3, HB_AUDIO_ATTR_NONE);
add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_TRUEHD , add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_TRUEHD ,
HB_ACODEC_FFTRUEHD, AV_CODEC_ID_TRUEHD); HB_ACODEC_FFTRUEHD, AV_CODEC_ID_TRUEHD,
HB_AUDIO_ATTR_NONE);
break; break;
case BLURAY_STREAM_TYPE_AUDIO_DTS: case BLURAY_STREAM_TYPE_AUDIO_DTS:
add_audio(ii, title->list_audio, bdaudio, 0, add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_DCA, AV_CODEC_ID_DTS); HB_ACODEC_DCA, AV_CODEC_ID_DTS, HB_AUDIO_ATTR_NONE);
break; break;
case BLURAY_STREAM_TYPE_AUDIO_MPEG2: case BLURAY_STREAM_TYPE_AUDIO_MPEG2:
case BLURAY_STREAM_TYPE_AUDIO_MPEG1: case BLURAY_STREAM_TYPE_AUDIO_MPEG1:
add_audio(ii, title->list_audio, bdaudio, 0, add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_FFMPEG, AV_CODEC_ID_MP2); HB_ACODEC_FFMPEG, AV_CODEC_ID_MP2,
HB_AUDIO_ATTR_NONE);
break; break;
case BLURAY_STREAM_TYPE_AUDIO_AC3PLUS: case BLURAY_STREAM_TYPE_AUDIO_AC3PLUS:
add_audio(ii, title->list_audio, bdaudio, 0, add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_FFEAC3, AV_CODEC_ID_EAC3); HB_ACODEC_FFEAC3, AV_CODEC_ID_EAC3,
HB_AUDIO_ATTR_NONE);
break;
case BLURAY_STREAM_TYPE_AUDIO_AC3PLUS_SECONDARY:
add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_FFEAC3, AV_CODEC_ID_EAC3,
HB_AUDIO_ATTR_NONE);
break; break;
case BLURAY_STREAM_TYPE_AUDIO_LPCM: case BLURAY_STREAM_TYPE_AUDIO_LPCM:
add_audio(ii, title->list_audio, bdaudio, 0, add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_FFMPEG, AV_CODEC_ID_PCM_BLURAY); HB_ACODEC_FFMPEG, AV_CODEC_ID_PCM_BLURAY,
HB_AUDIO_ATTR_NONE);
break; break;
case BLURAY_STREAM_TYPE_AUDIO_AC3: case BLURAY_STREAM_TYPE_AUDIO_AC3:
add_audio(ii, title->list_audio, bdaudio, 0, add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_AC3, AV_CODEC_ID_AC3); HB_ACODEC_AC3, AV_CODEC_ID_AC3, HB_AUDIO_ATTR_NONE);
break; break;
case BLURAY_STREAM_TYPE_AUDIO_DTSHD_MASTER: case BLURAY_STREAM_TYPE_AUDIO_DTSHD_MASTER:
case BLURAY_STREAM_TYPE_AUDIO_DTSHD: case BLURAY_STREAM_TYPE_AUDIO_DTSHD:
// Add 2 audio tracks. One for DTS-HD and one for DTS // Add 2 audio tracks. One for DTS-HD and one for DTS
add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_DTS, add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_DTS,
HB_ACODEC_DCA, AV_CODEC_ID_DTS); HB_ACODEC_DCA, AV_CODEC_ID_DTS, HB_AUDIO_ATTR_NONE);
// DTS-HD is special. The substreams must be concatinated // DTS-HD is special. The substreams must be concatinated
// DTS-core followed by DTS-hd-extensions. Setting // DTS-core followed by DTS-hd-extensions. Setting
// a substream id of 0 says use all substreams. // a substream id of 0 says use all substreams.
add_audio(ii, title->list_audio, bdaudio, 0, add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_DCA_HD, AV_CODEC_ID_DTS); HB_ACODEC_DCA_HD, AV_CODEC_ID_DTS,
HB_AUDIO_ATTR_NONE);
break;
case BLURAY_STREAM_TYPE_AUDIO_DTSHD_SECONDARY:
// BD "DTSHD_SECONDARY" is DTS Express which has no
// DTS core
add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_DCA_HD, AV_CODEC_ID_DTS,
HB_AUDIO_ATTR_NONE);
break;
default:
hb_log("scan: unknown audio pid 0x%x codec 0x%x", bdaudio->pid,
bdaudio->coding_type);
break;
}
}
// Add all the secondary audios found in the above clip.
for (jj = 0; jj < ti->clips[audio_clip_index].sec_audio_stream_count; jj++,
ii++)
{
BLURAY_STREAM_INFO * bdaudio;
bdaudio = &ti->clips[audio_clip_index].sec_audio_streams[jj];
switch (bdaudio->coding_type)
{
case BLURAY_STREAM_TYPE_AUDIO_TRUHD:
// Add 2 audio tracks. One for TrueHD and one for AC-3
add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_AC3,
HB_ACODEC_AC3, AV_CODEC_ID_AC3,
HB_AUDIO_ATTR_SECONDARY);
add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_TRUEHD
,
HB_ACODEC_FFTRUEHD, AV_CODEC_ID_TRUEHD,
HB_AUDIO_ATTR_SECONDARY);
break;
case BLURAY_STREAM_TYPE_AUDIO_DTS:
add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_DCA, AV_CODEC_ID_DTS,
HB_AUDIO_ATTR_SECONDARY);
break;
case BLURAY_STREAM_TYPE_AUDIO_MPEG2:
case BLURAY_STREAM_TYPE_AUDIO_MPEG1:
add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_FFMPEG, AV_CODEC_ID_MP2,
HB_AUDIO_ATTR_SECONDARY);
break;
case BLURAY_STREAM_TYPE_AUDIO_AC3PLUS:
case BLURAY_STREAM_TYPE_AUDIO_AC3PLUS_SECONDARY:
add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_FFEAC3, AV_CODEC_ID_EAC3,
HB_AUDIO_ATTR_SECONDARY);
break;
case BLURAY_STREAM_TYPE_AUDIO_LPCM:
add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_FFMPEG, AV_CODEC_ID_PCM_BLURAY,
HB_AUDIO_ATTR_SECONDARY);
break;
case BLURAY_STREAM_TYPE_AUDIO_AC3:
add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_AC3, AV_CODEC_ID_AC3,
HB_AUDIO_ATTR_SECONDARY);
break;
case BLURAY_STREAM_TYPE_AUDIO_DTSHD_MASTER:
case BLURAY_STREAM_TYPE_AUDIO_DTSHD:
// Add 2 audio tracks. One for DTS-HD and one for DTS
add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_DTS,
HB_ACODEC_DCA, AV_CODEC_ID_DTS,
HB_AUDIO_ATTR_SECONDARY);
// DTS-HD is special. The substreams must be concatinated
// DTS-core followed by DTS-hd-extensions. Setting
// a substream id of 0 says use all substreams.
add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_DCA_HD, AV_CODEC_ID_DTS,
HB_AUDIO_ATTR_SECONDARY);
break;
case BLURAY_STREAM_TYPE_AUDIO_DTSHD_SECONDARY:
// BD "DTSHD_SECONDARY" is DTS Express which has no
// DTS core
add_audio(ii, title->list_audio, bdaudio, 0,
HB_ACODEC_DCA_HD, AV_CODEC_ID_DTS,
HB_AUDIO_ATTR_SECONDARY);
break; break;
default: default:
hb_log("scan: unknown audio pid 0x%x codec 0x%x", bdaudio->pid, hb_log("scan: unknown audio pid 0x%x codec 0x%x", bdaudio->pid,
bdaudio->coding_type); bdaudio->coding_type);
break; break;
} }
} }
// Add all the subtitles found in the above clip. // Add all the subtitles found in the above clip.
 End of changes. 11 change blocks. 
11 lines changed or deleted 112 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)