summaryrefslogtreecommitdiffstats
path: root/libhb/common.c
diff options
context:
space:
mode:
authorjstebbins <jstebbins.hb@gmail.com>2015-05-06 16:04:08 +0000
committerjstebbins <jstebbins.hb@gmail.com>2015-05-06 16:04:08 +0000
commit9c0e97cc2c369e0c720441d182bbde20210742f4 (patch)
tree8b8f74ed24d0f617c9980d9043ebd53c33c531f3 /libhb/common.c
parent81bcee10d2ad88f44c0f7791f2dd8da4ee2c1b76 (diff)
libhb,cli: add preset management to libhb, use it in cli
This results in custom preset support in the CLI and additional command line options to fully support all preset keys. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7158 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.c')
-rw-r--r--libhb/common.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/libhb/common.c b/libhb/common.c
index 7bb3f2a56..8a7b72522 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -262,6 +262,9 @@ hb_encoder_internal_t hb_audio_encoders[] =
{ { "Vorbis (vorbis)", "libvorbis", NULL, HB_ACODEC_VORBIS, HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_VORBIS, },
{ { "FLAC (ffmpeg)", "ffflac", NULL, HB_ACODEC_FFFLAC, HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_FLAC, },
{ { "FLAC (24-bit)", "ffflac24", NULL, HB_ACODEC_FFFLAC24, HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_FLAC, },
+ // generic names
+ { { "AAC", "aac", NULL, 0, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_AAC, },
+ { { "HE-AAC", "haac", NULL, 0, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_AAC_HE, },
// actual encoders
{ { "AAC (CoreAudio)", "ca_aac", "AAC (Apple AudioToolbox)", HB_ACODEC_CA_AAC, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_ACODEC_AAC, },
{ { "HE-AAC (CoreAudio)", "ca_haac", "HE-AAC (Apple AudioToolbox)", HB_ACODEC_CA_HAAC, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_ACODEC_AAC_HE, },
@@ -1793,7 +1796,7 @@ int hb_video_encoder_get_default(int muxer)
}
fail:
- return 0;
+ return HB_VCODEC_INVALID;
}
hb_encoder_t * hb_video_encoder_get_from_codec(int codec)
@@ -1826,7 +1829,7 @@ int hb_video_encoder_get_from_name(const char *name)
}
fail:
- return 0;
+ return HB_VCODEC_INVALID;
}
const char* hb_video_encoder_get_name(int encoder)
@@ -1937,10 +1940,10 @@ int hb_audio_encoder_get_fallback_for_passthru(int passthru)
}
// passthru tracks are often the second audio from the same source track
- // if we don't have an encoder matching the passthru codec, return 0
+ // if we don't have an encoder matching the passthru codec, return INVALID
// dropping the track, as well as ensuring that there is at least one
// audio track in the output is then up to the UIs
- return 0;
+ return HB_ACODEC_INVALID;
}
int hb_audio_encoder_get_default(int muxer)
@@ -1974,7 +1977,7 @@ int hb_audio_encoder_get_default(int muxer)
}
fail:
- return 0;
+ return HB_ACODEC_INVALID;
}
hb_encoder_t* hb_audio_encoder_get_from_codec(int codec)
@@ -1988,7 +1991,7 @@ hb_encoder_t* hb_audio_encoder_get_from_codec(int codec)
}
}
- return 0;
+ return NULL;
}
int hb_audio_encoder_get_from_name(const char *name)
@@ -2007,7 +2010,7 @@ int hb_audio_encoder_get_from_name(const char *name)
}
fail:
- return 0;
+ return HB_ACODEC_INVALID;
}
const char* hb_audio_encoder_get_name(int encoder)
@@ -2302,7 +2305,7 @@ int hb_container_get_from_name(const char *name)
}
fail:
- return 0;
+ return HB_MUX_INVALID;
}
int hb_container_get_from_extension(const char *extension)
@@ -2320,7 +2323,7 @@ int hb_container_get_from_extension(const char *extension)
}
fail:
- return 0;
+ return HB_MUX_INVALID;
}
const char* hb_container_get_name(int format)