diff options
author | Rodeo <[email protected]> | 2013-11-08 15:45:03 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2013-11-08 15:45:03 +0000 |
commit | 6eeb619280e58feceed314a3d5864c4e17e62c11 (patch) | |
tree | 46090b95a6920475dbd337a997509b6a1090fe51 /libhb/common.c | |
parent | c7be682975ec4a26c7bb5cf143bf3b29a1a004d8 (diff) |
New getters for video presets, tunes, profiles and levels.
x264 is no longer the only encoder with a built-in preset system; QSV has its own presets, and supports setting the H.264 profile and level, too.
Old getters still in place for compatibility with the old API..
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5883 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.c')
-rw-r--r-- | libhb/common.c | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/libhb/common.c b/libhb/common.c index 9df282cbc..1b996e04a 100644 --- a/libhb/common.c +++ b/libhb/common.c @@ -13,8 +13,10 @@ #include <sys/time.h> #include "hb.h" +#include "x264.h" #include "lang.h" #include "common.h" +#include "h264_common.h" #ifdef USE_QSV #include "qsv_common.h" #endif @@ -1142,6 +1144,61 @@ const char* hb_video_quality_get_name(uint32_t codec) } } +const char* const* hb_video_encoder_get_presets(int encoder) +{ + switch (encoder) + { + case HB_VCODEC_X264: + return x264_preset_names; + +#ifdef USE_QSV + case HB_VCODEC_QSV_H264: + return hb_qsv_preset_get_names(); +#endif + + default: + return NULL; + } +} + +const char* const* hb_video_encoder_get_tunes(int encoder) +{ + switch (encoder) + { + case HB_VCODEC_X264: + return x264_tune_names; + + default: + return NULL; + } +} + +const char* const* hb_video_encoder_get_profiles(int encoder) +{ + switch (encoder) + { + case HB_VCODEC_X264: + case HB_VCODEC_QSV_H264: + return hb_h264_profile_names; + + default: + return NULL; + } +} + +const char* const* hb_video_encoder_get_levels(int encoder) +{ + switch (encoder) + { + case HB_VCODEC_X264: + case HB_VCODEC_QSV_H264: + return hb_h264_level_names; + + default: + return NULL; + } +} + // Get limits and hints for the UIs. // // granularity sets the minimum step increments that should be used |