Detect dvb LPCM stream and ignore it.

This commit is contained in:
Johns 2012-02-05 14:17:46 +01:00
parent 8db8b68edd
commit 7d38dff5bf
3 changed files with 21 additions and 3 deletions

View File

@ -1,3 +1,8 @@
User johns
Date:
Detect dvb LPCM stream and ignore it.
User johns
Date: Thu Feb 2 23:29:35 CET 2012

4
Todo
View File

@ -81,6 +81,9 @@ audio:
Make alsa thread/polled and oss thread/polled output module runtime
selectable.
software volume support
add pause support for replay pause
some plugin send a private LPCM stream (CODEC_ID_PCM_DVD), which
isn't supported by ffmpeg, write own parser.
audio/alsa:
better downmix of >2 channels on 2 channel hardware
@ -113,6 +116,7 @@ setup:
unsorted:
Menu -> Setup -> Plugins -> skingenigmang -> General
-> Try 8bpp single area: no, has missing parts.
FSE Skin anthra FSE has missing parts
stoping vdr while plugin is suspended opens and closes a window.
future features (not planed for 1.0 - 1.5)

View File

@ -261,7 +261,7 @@ int PlayAudio(const uint8_t * data, int size,
return osize;
}
// Detect audio code
// MPEG-PS mp2 MPEG1, MPEG2, AC3
// MPEG-PS mp2 MPEG1, MPEG2, AC3, LPCM
// Syncword - 0x0B77
if (data[0] == 0x0B && data[1] == 0x77) {
@ -279,6 +279,14 @@ int PlayAudio(const uint8_t * data, int size,
CodecAudioOpen(MyAudioDecoder, NULL, CODEC_ID_MP2);
AudioCodecID = CODEC_ID_MP2;
}
// Private stram + LPCM ID
} else if (data[-n - 9 + 3] == 0xBD && data[0] == 0xA0) {
if (AudioCodecID != CODEC_ID_PCM_DVD) {
Debug(3, "[softhddev]%s: LPCM %d\n", __FUNCTION__, id);
CodecAudioClose(MyAudioDecoder);
//CodecAudioOpen(MyAudioDecoder, NULL, CODEC_ID_PCM_DVD);
AudioCodecID = CODEC_ID_PCM_DVD;
}
} else {
// no start package
// FIXME: Nick/Viva sends this shit, need to find sync in packet
@ -307,8 +315,9 @@ int PlayAudio(const uint8_t * data, int size,
avpkt->data = (void *)data;
avpkt->size = size;
//memset(avpkt->data + avpkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
CodecAudioDecode(MyAudioDecoder, avpkt);
if (AudioCodecID != CODEC_ID_PCM_DVD) {
CodecAudioDecode(MyAudioDecoder, avpkt);
}
return osize;
}