mirror of
https://github.com/mpv-player/mpv
synced 2024-12-16 11:55:42 +00:00
57048c7393
This provides a new method for enabling spdif passthrough. The old method via --ad (--ad=spdif:ac3 etc.) is deprecated. The deprecated method will probably stop working at some point. This also supports PCM fallback. One caveat is that it will lose at least 1 audio packet in doing so. (I don't care enough to prevent this.) (This is named after the old S/PDIF connector, because it uses the same underlying technology as far as the higher level protoco is concerned. Also, the user should be renamed that passthrough is backwards.)
52 lines
1.9 KiB
C
52 lines
1.9 KiB
C
/*
|
|
* This file is part of mpv.
|
|
*
|
|
* mpv is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* mpv is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with mpv. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef MP_CODECS_H
|
|
#define MP_CODECS_H
|
|
|
|
struct mp_decoder_entry {
|
|
const char *family; // decoder module (e.g. ad_lavc => "lavc")
|
|
const char *codec; // name of the codec (e.g. "mp3")
|
|
const char *decoder; // decoder name (e.g. "mp3float")
|
|
const char *desc; // human readable description
|
|
};
|
|
|
|
struct mp_decoder_list {
|
|
struct mp_decoder_entry *entries;
|
|
int num_entries;
|
|
};
|
|
|
|
void mp_add_decoder(struct mp_decoder_list *list, const char *family,
|
|
const char *codec, const char *decoder, const char *desc);
|
|
|
|
struct mp_decoder_list *mp_select_decoders(struct mp_decoder_list *all,
|
|
const char *codec,
|
|
const char *selection);
|
|
|
|
struct mp_decoder_list *mp_select_decoder_list(struct mp_decoder_list *all,
|
|
const char *codec,
|
|
const char *family,
|
|
const char *selection);
|
|
|
|
void mp_append_decoders(struct mp_decoder_list *list, struct mp_decoder_list *a);
|
|
|
|
struct mp_log;
|
|
void mp_print_decoders(struct mp_log *log, int msgl, const char *header,
|
|
struct mp_decoder_list *list);
|
|
|
|
#endif
|