summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-01-04 13:33:38 +0000
committerRodeo <[email protected]>2013-01-04 13:33:38 +0000
commitccbdd4417db3b6f1262c9f12838e631ff97a3703 (patch)
tree74049f9d1df43aa8e83a8288a0f7da805ace6d19 /libhb
parent15b164a418a5f0b0da912a3acc980b861267e7da (diff)
libhb: add hb_get_default_audio_encoder().
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5144 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/common.c19
-rw-r--r--libhb/common.h2
2 files changed, 14 insertions, 7 deletions
diff --git a/libhb/common.c b/libhb/common.c
index af47f9f89..29435b669 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -431,13 +431,7 @@ int hb_autopassthru_get_encoder( int in_codec, int copy_mask, int fallback, int
{
// fallback not possible with current muxer
// use the default audio encoder instead
-#ifndef __APPLE__
- if( muxer == HB_MUX_MKV )
- // Lame is the default for MKV
- fallback = HB_ACODEC_LAME;
- else
-#endif // Core Audio or faac
- fallback = hb_audio_encoders[0].encoder;
+ fallback = hb_get_default_audio_encoder(muxer);
break;
}
}
@@ -456,6 +450,17 @@ int hb_autopassthru_get_encoder( int in_codec, int copy_mask, int fallback, int
return out_codec;
}
+int hb_get_default_audio_encoder(int muxer)
+{
+#ifndef __APPLE__
+ if (muxer == HB_MUX_MKV)
+ {
+ return HB_ACODEC_LAME;
+ }
+#endif
+ return hb_audio_encoders[0].encoder;
+}
+
// Given an input bitrate, find closest match in the set of allowed bitrates
int hb_find_closest_audio_bitrate(int bitrate)
{
diff --git a/libhb/common.h b/libhb/common.h
index 9697916c0..e9b5c29e3 100644
--- a/libhb/common.h
+++ b/libhb/common.h
@@ -245,6 +245,8 @@ void hb_autopassthru_apply_settings(hb_job_t *job);
void hb_autopassthru_print_settings(hb_job_t *job);
int hb_autopassthru_get_encoder(int in_codec, int copy_mask, int fallback, int muxer);
+int hb_get_default_audio_encoder(int muxer);
+
int hb_get_best_mixdown(uint32_t codec, uint64_t layout, int mixdown);
int hb_get_default_mixdown(uint32_t codec, uint64_t layout);