MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / ghb_lookup_audio_encoder

Function ghb_lookup_audio_encoder

gtk/src/hb-backend.c:1930–1948  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1928}
1929
1930const hb_encoder_t*
1931ghb_lookup_audio_encoder(const char *name)
1932{
1933 // First find an enabled encoder
1934 int codec = hb_audio_encoder_get_from_name(name);
1935
1936 // Now find the matching encoder info
1937 const hb_encoder_t *enc, *first;
1938 for (first = enc = hb_audio_encoder_get_next(NULL); enc != NULL;
1939 enc = hb_audio_encoder_get_next(enc))
1940 {
1941 if (codec == enc->codec)
1942 {
1943 return enc;
1944 }
1945 }
1946 // Return a default encoder if nothing matches
1947 return first;
1948}
1949
1950int
1951ghb_lookup_audio_encoder_codec(const char *name)

Callers 2

Calls 2

Tested by

no test coverage detected