Enable toggle AC3 downmix.

This commit is contained in:
jinx 2015-02-16 10:02:27 +01:00 committed by Johns
parent 1d06c5ba59
commit 73ce4ba803
7 changed files with 59 additions and 10 deletions

View File

@ -1,5 +1,10 @@
User jinx
Date: Mon Feb 16 09:58:06 CET 2015
Enable toggle AC3 downmix.
User johns User johns
Date: Date: Thu Feb 12 10:30:50 CET 2015
Compile with vdr 2.1.10. Compile with vdr 2.1.10.
Fix bug: AVCodecContext.framerate not supported. Fix bug: AVCodecContext.framerate not supported.

View File

@ -321,6 +321,7 @@ Keymacros:
@softhddevice Blue 1 2 toggle pass-through @softhddevice Blue 1 2 toggle pass-through
@softhddevice Blue 1 3 decrease audio delay by 10ms @softhddevice Blue 1 3 decrease audio delay by 10ms
@softhddevice Blue 1 4 increase audio delay by 10ms @softhddevice Blue 1 4 increase audio delay by 10ms
@softhddevice Blue 1 5 toggle ac3 mixdown
@softhddevice Blue 2 0 disable fullscreen @softhddevice Blue 2 0 disable fullscreen
@softhddevice Blue 2 1 enable fullscreen @softhddevice Blue 2 1 enable fullscreen
@softhddevice Blue 2 2 toggle fullscreen @softhddevice Blue 2 2 toggle fullscreen

View File

@ -1802,6 +1802,7 @@ static void CodecAudioUpdateFormat(AudioDecoder * audio_decoder)
void CodecAudioDecode(AudioDecoder * audio_decoder, const AVPacket * avpkt) void CodecAudioDecode(AudioDecoder * audio_decoder, const AVPacket * avpkt)
{ {
AVCodecContext *audio_ctx; AVCodecContext *audio_ctx;
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,28,1) #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,28,1)
AVFrame frame[1]; AVFrame frame[1];
#else #else

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: VDR \n" "Project-Id-Version: VDR \n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-03-20 11:50+0100\n" "POT-Creation-Date: 2014-10-31 12:36+0100\n"
"PO-Revision-Date: blabla\n" "PO-Revision-Date: blabla\n"
"Last-Translator: blabla\n" "Last-Translator: blabla\n"
"Language-Team: blabla\n" "Language-Team: blabla\n"
@ -229,9 +229,6 @@ msgstr ""
msgid "audio: can't set channels %d sample-rate %dHz\n" msgid "audio: can't set channels %d sample-rate %dHz\n"
msgstr "" msgstr ""
msgid "audio: can't queue cancel play thread\n"
msgstr ""
msgid "audio: can't cancel play thread\n" msgid "audio: can't cancel play thread\n"
msgstr "" msgstr ""
@ -279,6 +276,9 @@ msgstr ""
msgid "codec: can't allocate audio decoder\n" msgid "codec: can't allocate audio decoder\n"
msgstr "" msgstr ""
msgid "codec: can't allocate audio decoder frame buffer\n"
msgstr ""
msgid "codec: can't allocate audio codec context\n" msgid "codec: can't allocate audio codec context\n"
msgstr "" msgstr ""
@ -753,6 +753,12 @@ msgstr ""
msgid "audio delay changed to %d" msgid "audio delay changed to %d"
msgstr "" msgstr ""
msgid "surround downmix enabled"
msgstr ""
msgid "surround downmix disabled"
msgstr ""
msgid "auto-crop disabled and freezed" msgid "auto-crop disabled and freezed"
msgstr "" msgstr ""
@ -993,14 +999,20 @@ msgstr ""
msgid "video: output buffer full, dropping frame (%d/%d)\n" msgid "video: output buffer full, dropping frame (%d/%d)\n"
msgstr "" msgstr ""
msgid "video/vaapi: can't create a surface\n" #, c-format
msgid "video/vaapi: can't create a surface: %s\n"
msgstr "" msgstr ""
#, c-format #, c-format
msgid "video/vaapi: vaDeriveImage failed %d\n" msgid "video/vaapi: can't associate subpicture: %s\n"
msgstr "" msgstr ""
msgid "video/vaapi: can't map the image!\n" #, c-format
msgid "video/vaapi: can't create image: %s\n"
msgstr ""
#, c-format
msgid "video/vaapi: can't map the image: %s\n"
msgstr "" msgstr ""
msgid "video/vaapi: can't unmap the image!\n" msgid "video/vaapi: can't unmap the image!\n"
@ -1015,6 +1027,10 @@ msgstr ""
msgid "video/vaapi: can't get source image\n" msgid "video/vaapi: can't get source image\n"
msgstr "" msgstr ""
#, c-format
msgid "video/vaapi: vaDeriveImage failed %d\n"
msgstr ""
#, c-format #, c-format
msgid "video/vaapi: can't put image: %d!\n" msgid "video/vaapi: can't put image: %d!\n"
msgstr "" msgstr ""
@ -1022,6 +1038,9 @@ msgstr ""
msgid "video/vaapi: stream <-> surface size mismatch\n" msgid "video/vaapi: stream <-> surface size mismatch\n"
msgstr "" msgstr ""
msgid "video/vaapi: can't map the image!\n"
msgstr ""
#, c-format #, c-format
msgid "video/vaapi: can't put image err:%d!\n" msgid "video/vaapi: can't put image err:%d!\n"
msgstr "" msgstr ""

View File

@ -1101,6 +1101,7 @@ int PlayAudio(const uint8_t * data, int size, uint8_t id)
if (AudioChannelID != id) { // id changed audio track changed if (AudioChannelID != id) { // id changed audio track changed
AudioChannelID = id; AudioChannelID = id;
AudioCodecID = AV_CODEC_ID_NONE; AudioCodecID = AV_CODEC_ID_NONE;
Debug(3, "audio/demux: new channel id\n");
} }
// Private stream + LPCM ID // Private stream + LPCM ID
if ((id & 0xF0) == 0xA0) { if ((id & 0xF0) == 0xA0) {
@ -1304,6 +1305,15 @@ void SetVolumeDevice(int volume)
AudioSetVolume((volume * 1000) / 255); AudioSetVolume((volume * 1000) / 255);
} }
/**
*** Resets channel ID (restarts audio).
**/
void ResetChannelId(void)
{
AudioChannelID = -1;
Debug(3, "audio/demux: reset channel id\n");
}
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// Video // Video
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -42,6 +42,8 @@ extern "C"
extern int PlayTsAudio(const uint8_t *, int); extern int PlayTsAudio(const uint8_t *, int);
/// C plugin set audio volume /// C plugin set audio volume
extern void SetVolumeDevice(int); extern void SetVolumeDevice(int);
/// C plugin reset channel id (restarts audio)
extern void ResetChannelId(void);
/// C plugin play video packet /// C plugin play video packet
extern int PlayVideo(const uint8_t *, int); extern int PlayVideo(const uint8_t *, int);

View File

@ -1883,6 +1883,17 @@ static void HandleHotkey(int code)
cString::sprintf(tr("audio delay changed to %d"), cString::sprintf(tr("audio delay changed to %d"),
ConfigVideoAudioDelay)); ConfigVideoAudioDelay));
break; break;
case 15:
ConfigAudioDownmix ^= 1;
fprintf(stderr, "toggle downmix\n");
CodecSetAudioDownmix(ConfigAudioDownmix);
if (ConfigAudioDownmix) {
Skins.QueueMessage(mtInfo, tr("surround downmix enabled"));
} else {
Skins.QueueMessage(mtInfo, tr("surround downmix disabled"));
}
ResetChannelId();
break;
case 20: // disable full screen case 20: // disable full screen
VideoSetFullscreen(0); VideoSetFullscreen(0);
@ -2288,7 +2299,7 @@ int64_t cSoftHdDevice::GetSTC(void)
#if APIVERSNUM >= 20103 #if APIVERSNUM >= 20103
void cSoftHdDevice::TrickSpeed(int speed, bool forward) void cSoftHdDevice::TrickSpeed(int speed, bool forward)
{ {
dsyslog("[softhddev]%s: %d $d\n", __FUNCTION__, speed, forward); dsyslog("[softhddev]%s: %d %d\n", __FUNCTION__, speed, forward);
::TrickSpeed(speed); ::TrickSpeed(speed);
} }
@ -3258,7 +3269,7 @@ static const char *SVDRPHelpText[] = {
" 11: enable audio pass-through\n" " 11: enable audio pass-through\n"
" 12: toggle audio pass-through\n" " 12: toggle audio pass-through\n"
" 13: decrease audio delay by 10ms\n" " 13: decrease audio delay by 10ms\n"
" 14: increase audio delay by 10ms\n" " 14: increase audio delay by 10ms\n" " 15: toggle ac3 mixdown\n"
" 20: disable fullscreen\n\040 21: enable fullscreen\n" " 20: disable fullscreen\n\040 21: enable fullscreen\n"
" 22: toggle fullscreen\n" " 22: toggle fullscreen\n"
" 23: disable auto-crop\n\040 24: enable auto-crop\n" " 23: disable auto-crop\n\040 24: enable auto-crop\n"