mirror of https://github.com/mpv-player/mpv
Merge svn changes up to r30448
This commit is contained in:
commit
d84685ce13
|
@ -172,7 +172,7 @@ libvo drivers:
|
||||||
* vo_ivtv.c - Benjamin Zores
|
* vo_ivtv.c - Benjamin Zores
|
||||||
* vo_jpeg.c - Ivo van Poorten
|
* vo_jpeg.c - Ivo van Poorten
|
||||||
* vo_md5sum.c - Ivo van Poorten
|
* vo_md5sum.c - Ivo van Poorten
|
||||||
* vo_mga.c - Attila Kinali
|
* vo_mga.c - None
|
||||||
* vo_mpegpes.c - None
|
* vo_mpegpes.c - None
|
||||||
* vo_null.c - None
|
* vo_null.c - None
|
||||||
* vo_png.c - Felix Bünemann
|
* vo_png.c - Felix Bünemann
|
||||||
|
@ -186,7 +186,7 @@ libvo drivers:
|
||||||
* vo_wii.c - Benjamin Zores
|
* vo_wii.c - Benjamin Zores
|
||||||
* vo_winvidix.c - Sascha Sommer
|
* vo_winvidix.c - Sascha Sommer
|
||||||
* vo_x11.c - Alexander Strasser
|
* vo_x11.c - Alexander Strasser
|
||||||
* vo_xmga.c - Attila Kinali
|
* vo_xmga.c - None
|
||||||
* vo_xover.c - Alban Bedel
|
* vo_xover.c - Alban Bedel
|
||||||
* vo_xv.c - Alexander Strasser
|
* vo_xv.c - Alexander Strasser
|
||||||
* vo_xvidix.c - None
|
* vo_xvidix.c - None
|
||||||
|
|
|
@ -3978,20 +3978,6 @@ audiocodec msadpcmacm
|
||||||
driver acm
|
driver acm
|
||||||
dll "msadp32.acm"
|
dll "msadp32.acm"
|
||||||
|
|
||||||
audiocodec mp3
|
|
||||||
info "mp3lib MPEG layer-2, layer-3"
|
|
||||||
status working
|
|
||||||
comment "Optimized to MMX/SSE/3Dnow!"
|
|
||||||
format 0x50 ; layer-1 && layer-2
|
|
||||||
format 0x55 ; layer-3
|
|
||||||
format 0x5500736d ; "ms\0\x55" older mp3 fcc (MOV files)
|
|
||||||
format 0x5000736d ; "ms\0\x50" older mp2 fcc (MOV files)
|
|
||||||
format 0x55005354 ; broken file
|
|
||||||
fourcc ".mp3" ; CBR/VBR MP3 (MOV files)
|
|
||||||
fourcc "MP3 " ; used in .nsv files
|
|
||||||
fourcc "LAME" ; used in mythtv .nuv files
|
|
||||||
driver mp3lib
|
|
||||||
|
|
||||||
audiocodec ffpcmdaud
|
audiocodec ffpcmdaud
|
||||||
info "D-Cinema audio (FFmpeg)"
|
info "D-Cinema audio (FFmpeg)"
|
||||||
status untested
|
status untested
|
||||||
|
@ -4043,6 +4029,23 @@ audiocodec ffsonic
|
||||||
driver ffmpeg
|
driver ffmpeg
|
||||||
dll "sonic"
|
dll "sonic"
|
||||||
|
|
||||||
|
audiocodec mp3
|
||||||
|
; this is preferred over ffmp2/ffmp3 since it is faster due to using
|
||||||
|
; floating point and there are even broken mkv files where the audio
|
||||||
|
; needs to be parsed, making this codec work more reliably
|
||||||
|
info "mp3lib MPEG layer-2, layer-3"
|
||||||
|
status working
|
||||||
|
comment "Optimized to MMX/SSE/3Dnow!"
|
||||||
|
format 0x50 ; layer-1 && layer-2
|
||||||
|
format 0x55 ; layer-3
|
||||||
|
format 0x5500736d ; "ms\0\x55" older mp3 fcc (MOV files)
|
||||||
|
format 0x5000736d ; "ms\0\x50" older mp2 fcc (MOV files)
|
||||||
|
format 0x55005354 ; broken file
|
||||||
|
fourcc ".mp3" ; CBR/VBR MP3 (MOV files)
|
||||||
|
fourcc "MP3 " ; used in .nsv files
|
||||||
|
fourcc "LAME" ; used in mythtv .nuv files
|
||||||
|
driver mp3lib
|
||||||
|
|
||||||
audiocodec ffmp3on4
|
audiocodec ffmp3on4
|
||||||
info "FFmpeg Multi-channel MPEG layer-3 on MP4 audio"
|
info "FFmpeg Multi-channel MPEG layer-3 on MP4 audio"
|
||||||
status working
|
status working
|
||||||
|
@ -4076,6 +4079,7 @@ audiocodec ffmp2
|
||||||
comment "integer only"
|
comment "integer only"
|
||||||
status working
|
status working
|
||||||
format 0x50
|
format 0x50
|
||||||
|
format 0x5000736d ; "ms\0\x50" older mp2 fcc (MOV files)
|
||||||
fourcc ".mp2" ; MP2 (MOV files)
|
fourcc ".mp2" ; MP2 (MOV files)
|
||||||
fourcc ".mp1" ; MP1 (MOV files)
|
fourcc ".mp1" ; MP1 (MOV files)
|
||||||
driver ffmpeg
|
driver ffmpeg
|
||||||
|
|
|
@ -77,10 +77,7 @@ static snd_pcm_sw_params_t *alsa_swparams;
|
||||||
|
|
||||||
static size_t bytes_per_sample;
|
static size_t bytes_per_sample;
|
||||||
|
|
||||||
static int ao_noblock = 0;
|
static int alsa_can_pause;
|
||||||
|
|
||||||
static int open_mode;
|
|
||||||
static int alsa_can_pause = 0;
|
|
||||||
static snd_pcm_sframes_t prepause_frames;
|
static snd_pcm_sframes_t prepause_frames;
|
||||||
|
|
||||||
#define ALSA_DEVICE_SIZE 256
|
#define ALSA_DEVICE_SIZE 256
|
||||||
|
@ -120,9 +117,9 @@ static int control(int cmd, void *arg)
|
||||||
snd_mixer_elem_t *elem;
|
snd_mixer_elem_t *elem;
|
||||||
snd_mixer_selem_id_t *sid;
|
snd_mixer_selem_id_t *sid;
|
||||||
|
|
||||||
static char *mix_name = "PCM";
|
char *mix_name = "PCM";
|
||||||
static char *card = "default";
|
char *card = "default";
|
||||||
static int mix_index = 0;
|
int mix_index = 0;
|
||||||
|
|
||||||
long pmin, pmax;
|
long pmin, pmax;
|
||||||
long get_vol, set_vol;
|
long get_vol, set_vol;
|
||||||
|
@ -478,25 +475,17 @@ static int init(int rate_hz, int channels, int format, int flags)
|
||||||
print_help();
|
print_help();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
ao_noblock = !block;
|
|
||||||
parse_device(alsa_device, device.str, device.len);
|
parse_device(alsa_device, device.str, device.len);
|
||||||
|
|
||||||
mp_msg(MSGT_AO,MSGL_V,"alsa-init: using device %s\n", alsa_device);
|
mp_msg(MSGT_AO,MSGL_V,"alsa-init: using device %s\n", alsa_device);
|
||||||
|
|
||||||
//setting modes for block or nonblock-mode
|
|
||||||
if (ao_noblock) {
|
|
||||||
open_mode = SND_PCM_NONBLOCK;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
open_mode = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!alsa_handler) {
|
if (!alsa_handler) {
|
||||||
|
int open_mode = block ? 0 : SND_PCM_NONBLOCK;
|
||||||
int isac3 = AF_FORMAT_IS_AC3(format);
|
int isac3 = AF_FORMAT_IS_AC3(format);
|
||||||
//modes = 0, SND_PCM_NONBLOCK, SND_PCM_ASYNC
|
//modes = 0, SND_PCM_NONBLOCK, SND_PCM_ASYNC
|
||||||
if ((err = try_open_device(alsa_device, open_mode, isac3)) < 0)
|
if ((err = try_open_device(alsa_device, open_mode, isac3)) < 0)
|
||||||
{
|
{
|
||||||
if (err != -EBUSY && ao_noblock) {
|
if (err != -EBUSY && !block) {
|
||||||
mp_tmsg(MSGT_AO,MSGL_INFO,"[AO_ALSA] Open in nonblock-mode failed, trying to open in block-mode.\n");
|
mp_tmsg(MSGT_AO,MSGL_INFO,"[AO_ALSA] Open in nonblock-mode failed, trying to open in block-mode.\n");
|
||||||
if ((err = try_open_device(alsa_device, 0, isac3)) < 0) {
|
if ((err = try_open_device(alsa_device, 0, isac3)) < 0) {
|
||||||
mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Playback open error: %s\n", snd_strerror(err));
|
mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Playback open error: %s\n", snd_strerror(err));
|
||||||
|
|
Loading…
Reference in New Issue