The proposal to add the AAC audio format for "Auto language selection".
AAC popular in IPTV/Stream.
Who is behind this idea?
Posted 2 October 2014 - 17:36
Posted 3 October 2014 - 05:22
This is what I wrote in the commit log
http://sourceforge.n...b2ac7a7c26ec80/
So at least Xtrend boxes couldn't decode other AAC versions.
Task --> add the AAC for "Auto language selection" and all.
GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K
Posted 19 October 2014 - 15:24
I made a patch, but it does not work. Language is not automatically selected.
Where is my mistake?
--- a/lib/dvb/idvb.h +++ b/lib/dvb/idvb.h @@ -275,7 +275,7 @@ { cVPID, cMPEGAPID, cTPID, cPCRPID, cAC3PID, cVTYPE, cACHANNEL, cAC3DELAY, cPCMDELAY, - cSUBTITLE, cAACHEAPID=12, cDDPPID, cacheMax + cSUBTITLE, cAACHEAPID=12, cDDPPID, cacheMax, cAACAPID }; int getCacheEntry(cacheID); --- a/lib/dvb/pmt.cpp +++ b/lib/dvb/pmt.cpp @@ -358,6 +358,7 @@ int cached_apid_ac3 = -1; int cached_apid_ddp = -1; int cached_apid_mpeg = -1; + int cached_apid_aac = -1; int cached_apid_aache = -1; int cached_vpid = -1; int cached_tpid = -1; @@ -378,6 +379,7 @@ cached_apid_mpeg = m_service->getCacheEntry(eDVBService::cMPEGAPID); cached_apid_ac3 = m_service->getCacheEntry(eDVBService::cAC3PID); cached_apid_ddp = m_service->getCacheEntry(eDVBService::cDDPPID); + cached_apid_aac = m_service->getCacheEntry(eDVBService::cAACAPID); cached_apid_aache = m_service->getCacheEntry(eDVBService::cAACHEAPID); cached_tpid = m_service->getCacheEntry(eDVBService::cTPID); } @@ -390,6 +392,7 @@ int autoaudio_mpeg = -1; int autoaudio_ac3 = -1; int autoaudio_ddp = -1; + int autoaudio_aac = -1; int autoaudio_aache = -1; int autoaudio_level = 4; @@ -453,6 +456,7 @@ if (program.audioStreams[i].pid == cached_apid_ac3 || program.audioStreams[i].pid == cached_apid_ddp || program.audioStreams[i].pid == cached_apid_mpeg + || program.audioStreams[i].pid == cached_apid_aac || program.audioStreams[i].pid == cached_apid_aache) { /* if we find the cached pids, this will be our default stream */ @@ -462,6 +466,7 @@ if ((program.audioStreams[i].type != audioStream::atMPEG) && ((first_non_mpeg == -1) || (program.audioStreams[i].pid == cached_apid_ac3) || (program.audioStreams[i].pid == cached_apid_ddp) + || (program.audioStreams[i].pid == cached_apid_aac) || (program.audioStreams[i].pid == cached_apid_aache))) { first_non_mpeg = i; @@ -479,6 +484,8 @@ autoaudio_ac3 = i; else if (program.audioStreams[i].type == audioStream::atDDP && (autoaudio_level > x || autoaudio_ddp == -1)) autoaudio_ddp = i; + else if (program.audioStreams[i].type == audioStream::atAAC && (autoaudio_level > x || autoaudio_aac == -1)) + autoaudio_aac = i; else if (program.audioStreams[i].type == audioStream::atAACHE && (autoaudio_level > x || autoaudio_aache == -1)) autoaudio_aache = i; autoaudio_level = x; @@ -537,6 +544,8 @@ program.defaultAudioStream = autoaudio_ac3; else if (autoaudio_ddp != -1) program.defaultAudioStream = autoaudio_ddp; + else if (autoaudio_aac != -1) + program.defaultAudioStream = autoaudio_aac; else if (autoaudio_aache != -1) program.defaultAudioStream = autoaudio_aache; else if (first_non_mpeg != -1) @@ -612,6 +621,15 @@ audioStream s; s.type = audioStream::atDDP; s.pid = cached_apid_ddp; + s.rdsPid = -1; + program.audioStreams.push_back(s); + ++cnt; + } + if ( cached_apid_aac != -1 ) + { + audioStream s; + s.type = audioStream::atAAC; + s.pid = cached_apid_aac; s.rdsPid = -1; program.audioStreams.push_back(s); ++cnt; --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -1971,6 +1971,9 @@ apid = m_dvb_service->getCacheEntry(eDVBService::cDDPPID); if (apid != -1) return apid; + apid = m_dvb_service->getCacheEntry(eDVBService::cAACAPID); + if (apid != -1) + return apid; apid = m_dvb_service->getCacheEntry(eDVBService::cAACHEAPID); if (apid != -1) return apid; @@ -2201,6 +2204,7 @@ || ((m_dvb_service->getCacheEntry(eDVBService::cMPEGAPID) == -1) && (m_dvb_service->getCacheEntry(eDVBService::cAC3PID)== -1) && (m_dvb_service->getCacheEntry(eDVBService::cDDPPID)== -1) + && (m_dvb_service->getCacheEntry(eDVBService::cAACAPID)== -1) && (m_dvb_service->getCacheEntry(eDVBService::cAACHEAPID) == -1)))) { if (apidtype == eDVBAudio::aMPEG) @@ -2208,6 +2212,7 @@ m_dvb_service->setCacheEntry(eDVBService::cMPEGAPID, apid); m_dvb_service->setCacheEntry(eDVBService::cAC3PID, -1); m_dvb_service->setCacheEntry(eDVBService::cDDPPID, -1); + m_dvb_service->setCacheEntry(eDVBService::cAACAPID, -1); m_dvb_service->setCacheEntry(eDVBService::cAACHEAPID, -1); } else if (apidtype == eDVBAudio::aAC3) @@ -2215,6 +2220,7 @@ m_dvb_service->setCacheEntry(eDVBService::cMPEGAPID, -1); m_dvb_service->setCacheEntry(eDVBService::cAC3PID, apid); m_dvb_service->setCacheEntry(eDVBService::cDDPPID, -1); + m_dvb_service->setCacheEntry(eDVBService::cAACAPID, -1); m_dvb_service->setCacheEntry(eDVBService::cAACHEAPID, -1); } else if (apidtype == eDVBAudio::aDDP) @@ -2222,13 +2228,23 @@ m_dvb_service->setCacheEntry(eDVBService::cMPEGAPID, -1); m_dvb_service->setCacheEntry(eDVBService::cAC3PID, -1); m_dvb_service->setCacheEntry(eDVBService::cDDPPID, apid); + m_dvb_service->setCacheEntry(eDVBService::cAACAPID, -1); m_dvb_service->setCacheEntry(eDVBService::cAACHEAPID, -1); } + else if (apidtype == eDVBAudio::aAAC) + { + m_dvb_service->setCacheEntry(eDVBService::cMPEGAPID, -1); + m_dvb_service->setCacheEntry(eDVBService::cAC3PID, -1); + m_dvb_service->setCacheEntry(eDVBService::cDDPPID, -1); + m_dvb_service->setCacheEntry(eDVBService::cAACAPID, apid); + m_dvb_service->setCacheEntry(eDVBService::cAACHEAPID, -1); + } else if (apidtype == eDVBAudio::aAACHE) { m_dvb_service->setCacheEntry(eDVBService::cMPEGAPID, -1); m_dvb_service->setCacheEntry(eDVBService::cAC3PID, -1); m_dvb_service->setCacheEntry(eDVBService::cDDPPID, -1); + m_dvb_service->setCacheEntry(eDVBService::cAACAPID, -1); m_dvb_service->setCacheEntry(eDVBService::cAACHEAPID, apid); } else @@ -2236,6 +2252,7 @@ m_dvb_service->setCacheEntry(eDVBService::cMPEGAPID, -1); m_dvb_service->setCacheEntry(eDVBService::cAC3PID, -1); m_dvb_service->setCacheEntry(eDVBService::cDDPPID, -1); + m_dvb_service->setCacheEntry(eDVBService::cAACAPID, -1); m_dvb_service->setCacheEntry(eDVBService::cAACHEAPID, -1); } }
GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K
Posted 19 October 2014 - 16:19
./service/servicedvbrecord.cpp:123: for (int x=0; x < eDVBService::cacheMax; ++x) ./service/servicedvb.cpp:1064: for (int x=0; x < eDVBService::cacheMax; ++x) ./dvb/db.cpp:281: for (int i=0; i < cacheMax; ++i) ./dvb/db.cpp:289: m_cache = new int[cacheMax]; ./dvb/db.cpp:290: memset(m_cache, -1, sizeof(int) * cacheMax); ./dvb/db.cpp:298: m_cache = new int[cacheMax]; ./dvb/db.cpp:299: memcpy(m_cache, source, cacheMax * sizeof(int)); ./dvb/db.cpp:310: if (id >= cacheMax || !m_cache) ./dvb/db.cpp:319: if (id < cacheMax) ./dvb/db.cpp:683: for (int x=0; x < eDVBService::cacheMax; ++x)Also are you using TS (1:) stream or GStreamer (4097:) stream?
Posted 19 October 2014 - 16:36
Also are you using TS (1:) stream or GStreamer (4097:) stream?
Thank you.
I check on the TS.
But this plugin have a choice how to create references of services TS (1:) stream or GStreamer (4097:) stream.
Edited by Dima73, 19 October 2014 - 16:39.
GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K
Posted 19 October 2014 - 18:27
You declared cAACAPID after cacheMax, see why:
./service/servicedvbrecord.cpp:123: for (int x=0; x < eDVBService::cacheMax; ++x) ./service/servicedvb.cpp:1064: for (int x=0; x < eDVBService::cacheMax; ++x) ./dvb/db.cpp:281: for (int i=0; i < cacheMax; ++i) ./dvb/db.cpp:289: m_cache = new int[cacheMax]; ./dvb/db.cpp:290: memset(m_cache, -1, sizeof(int) * cacheMax); ./dvb/db.cpp:298: m_cache = new int[cacheMax]; ./dvb/db.cpp:299: memcpy(m_cache, source, cacheMax * sizeof(int)); ./dvb/db.cpp:310: if (id >= cacheMax || !m_cache) ./dvb/db.cpp:319: if (id < cacheMax) ./dvb/db.cpp:683: for (int x=0; x < eDVBService::cacheMax; ++x)Also are you using TS (1:) stream or GStreamer (4097:) stream?
{ cVPID, cMPEGAPID, cTPID, cPCRPID, cAC3PID, cVTYPE, cACHANNEL, cAC3DELAY, cPCMDELAY, - cSUBTITLE, cAACHEAPID=12, cDDPPID, cacheMax + cSUBTITLE, cAACHEAPID=12, cDDPPID, cAACAPID ,cacheMax
Checked, not working.
In what may be another reason?
GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K
0 members, 0 guests, 0 anonymous users