mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Detect audio stream type only after stream switch.
This commit is contained in:
parent
baa4500a2c
commit
a91533f6d1
@ -1,6 +1,7 @@
|
||||
User johns
|
||||
Date:
|
||||
|
||||
Detect audio stream type only after stream switch.
|
||||
Detect more h264 streams with leading zeros.
|
||||
VDPAU: support for studio levels added.
|
||||
Add support for skip chroma deinterlace to software deinterlacer.
|
||||
|
@ -156,6 +156,11 @@ Setup: /etc/vdr/setup.conf
|
||||
softhddevice.Suspend.X11 = 0
|
||||
1 suspend stops X11 server (not working yet)
|
||||
|
||||
VideoDisplayFormat = ?
|
||||
0 pan and scan
|
||||
1 letter box
|
||||
2 center cut-out
|
||||
|
||||
Setup: /etc/vdr/remote.conf
|
||||
------
|
||||
|
||||
|
4
Todo
4
Todo
@ -40,6 +40,7 @@ video:
|
||||
OSD can only be shown after some stream could be shown
|
||||
yaepghd changed position is lost on channel switch
|
||||
use x11 screen size without geometry configuration
|
||||
pause (live tv) has sometime problems with SAT1 HD Pro7 HD
|
||||
|
||||
vdpau:
|
||||
software decoder path not working
|
||||
@ -83,10 +84,9 @@ audio:
|
||||
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.
|
||||
Mute should do a real mute and not only set volume to zero.
|
||||
Starting suspended and muted, didn't register the mute.
|
||||
switching stero/dolby produces klick sound
|
||||
|
||||
audio/alsa:
|
||||
better downmix of >2 channels on 2 channel hardware
|
||||
|
8
audio.c
8
audio.c
@ -2070,13 +2070,7 @@ int64_t AudioGetClock(void)
|
||||
*/
|
||||
void AudioSetVolume(int volume)
|
||||
{
|
||||
#ifdef USE_ALSA
|
||||
AlsaSetVolume(volume);
|
||||
#endif
|
||||
#ifdef USE_OSS
|
||||
OssSetVolume(volume);
|
||||
#endif
|
||||
(void)volume;
|
||||
return AudioUsedModule->SetVolume(volume);
|
||||
}
|
||||
|
||||
/**
|
||||
|
2
codec.c
2
codec.c
@ -877,7 +877,7 @@ void CodecAudioDecode(AudioDecoder * audio_decoder, const AVPacket * avpkt)
|
||||
int err;
|
||||
int isAC3;
|
||||
|
||||
// FIXME: use swr_convert from swresample
|
||||
// FIXME: use swr_convert from swresample (only in ffmpeg!)
|
||||
// FIXME: tell ac3 decoder to use downmix
|
||||
if (audio_decoder->ReSample) {
|
||||
audio_resample_close(audio_decoder->ReSample);
|
||||
|
13
softhddev.c
13
softhddev.c
@ -76,6 +76,7 @@ static volatile char NewAudioStream; ///< new audio stream
|
||||
static volatile char SkipAudio; ///< skip audio stream
|
||||
static AudioDecoder *MyAudioDecoder; ///< audio decoder
|
||||
static enum CodecID AudioCodecID; ///< current codec id
|
||||
static int AudioChannelID; ///< current audio channel id
|
||||
|
||||
/**
|
||||
** mpeg bitrate table.
|
||||
@ -202,8 +203,7 @@ static int FindAudioSync(const AVPacket * avpkt)
|
||||
** @param size size of PES packet
|
||||
** @param id PES packet type
|
||||
*/
|
||||
int PlayAudio(const uint8_t * data, int size,
|
||||
__attribute__ ((unused)) uint8_t id)
|
||||
int PlayAudio(const uint8_t * data, int size, uint8_t id)
|
||||
{
|
||||
int n;
|
||||
int osize;
|
||||
@ -263,6 +263,9 @@ int PlayAudio(const uint8_t * data, int size,
|
||||
// Detect audio code
|
||||
// MPEG-PS mp2 MPEG1, MPEG2, AC3, LPCM, AAC LATM
|
||||
|
||||
// only if unknown or new channel id
|
||||
if (AudioCodecID == CODEC_ID_NONE || AudioChannelID != id) {
|
||||
AudioChannelID = id;
|
||||
// Syncword - 0x0B77
|
||||
if (data[0] == 0x0B && data[1] == 0x77) {
|
||||
if (AudioCodecID != CODEC_ID_AC3) {
|
||||
@ -281,6 +284,7 @@ int PlayAudio(const uint8_t * data, int size,
|
||||
}
|
||||
// latm header 0x56E0 11bits: 0x2B7
|
||||
} else if (data[0] == 0x56 && (data[1] & 0xE0) == 0xE0) {
|
||||
// && (((data[1] & 0x1F) << 8) + (data[2] & 0xFF)) < size
|
||||
if (AudioCodecID != CODEC_ID_AAC_LATM) {
|
||||
Debug(3, "[softhddev]%s: AAC LATM %d\n", __FUNCTION__, id);
|
||||
CodecAudioClose(MyAudioDecoder);
|
||||
@ -333,7 +337,7 @@ int PlayAudio(const uint8_t * data, int size,
|
||||
avpkt->data = (void *)data;
|
||||
avpkt->size = size;
|
||||
n = FindAudioSync(avpkt);
|
||||
if (n < 0) {
|
||||
if (1 && n < 0) {
|
||||
return osize;
|
||||
}
|
||||
|
||||
@ -343,7 +347,8 @@ int PlayAudio(const uint8_t * data, int size,
|
||||
data += n;
|
||||
size -= n;
|
||||
}
|
||||
// no decoder or codec known
|
||||
}
|
||||
// still no decoder or codec known
|
||||
if (AudioCodecID == CODEC_ID_NONE) {
|
||||
return osize;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user