| 1928 | } |
| 1929 | |
| 1930 | const hb_encoder_t* |
| 1931 | ghb_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 | |
| 1950 | int |
| 1951 | ghb_lookup_audio_encoder_codec(const char *name) |
no test coverage detected