movieinfo: internally rename epgAudioPid -> AudioPid

Origin commit data
------------------
Branch: ni/coolstream
Commit: c5dcb1c4f6
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-09-09 (Fri, 09 Sep 2016)

Origin message was:
------------------
- movieinfo: internally rename epgAudioPid -> AudioPid

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-09-09 18:58:11 +02:00
parent 90a9e96ab7
commit 9e5c1f0439
5 changed files with 36 additions and 36 deletions

View File

@@ -174,11 +174,11 @@ record_error_msg_t CRecordInstance::Start(CZapitChannel * channel)
}
}
for (unsigned int i = 0; i < recMovieInfo->audioPids.size(); i++) {
apids[numpids++] = recMovieInfo->audioPids[i].epgAudioPid;
apids[numpids++] = recMovieInfo->audioPids[i].AudioPid;
if(channel->getAudioChannel(i)->audioChannelType == CZapitAudioChannel::EAC3){
psi.addPid(recMovieInfo->audioPids[i].epgAudioPid, EN_TYPE_AUDIO_EAC3, recMovieInfo->audioPids[i].atype, channel->getAudioChannel(i)->description.c_str());
psi.addPid(recMovieInfo->audioPids[i].AudioPid, EN_TYPE_AUDIO_EAC3, recMovieInfo->audioPids[i].atype, channel->getAudioChannel(i)->description.c_str());
}else
psi.addPid(recMovieInfo->audioPids[i].epgAudioPid, EN_TYPE_AUDIO, recMovieInfo->audioPids[i].atype, channel->getAudioChannel(i)->description.c_str());
psi.addPid(recMovieInfo->audioPids[i].AudioPid, EN_TYPE_AUDIO, recMovieInfo->audioPids[i].atype, channel->getAudioChannel(i)->description.c_str());
if (numpids >= REC_MAX_APIDS)
break;
@@ -335,10 +335,10 @@ bool CRecordInstance::Update()
record->AddPid(it->apid);
for(unsigned int i = 0; i < allpids.APIDs.size(); i++) {
if(allpids.APIDs[i].pid == it->apid) {
EPG_AUDIO_PIDS audio_pids;
AUDIO_PIDS audio_pids;
audio_pids.epgAudioPid = allpids.APIDs[i].pid;
audio_pids.epgAudioPidName = allpids.APIDs[i].desc;
audio_pids.AudioPid = allpids.APIDs[i].pid;
audio_pids.AudioPidName = allpids.APIDs[i].desc;
audio_pids.atype = allpids.APIDs[i].is_ac3 ? 1 : allpids.APIDs[i].is_aac ? 5 : allpids.APIDs[i].is_eac3 ? 7 : 0;
audio_pids.selected = 0;
recMovieInfo->audioPids.push_back(audio_pids);
@@ -619,15 +619,15 @@ void CRecordInstance::FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis
recMovieInfo->VideoPid = allpids.PIDs.vpid;
recMovieInfo->VideoType = channel->type;
EPG_AUDIO_PIDS audio_pids;
AUDIO_PIDS audio_pids;
APIDList::iterator it;
for(unsigned int i= 0; i< allpids.APIDs.size(); i++) {
for(it = apid_list.begin(); it != apid_list.end(); ++it) {
if(allpids.APIDs[i].pid == it->apid) {
audio_pids.epgAudioPid = allpids.APIDs[i].pid;
audio_pids.epgAudioPidName = allpids.APIDs[i].desc;
audio_pids.AudioPid = allpids.APIDs[i].pid;
audio_pids.AudioPidName = allpids.APIDs[i].desc;
audio_pids.atype = allpids.APIDs[i].is_ac3 ? 1 : allpids.APIDs[i].is_aac ? 5 : allpids.APIDs[i].is_eac3 ? 7 : 0;
audio_pids.selected = (audio_pids.epgAudioPid == channel->getAudioPid()) ? 1 : 0;
audio_pids.selected = (audio_pids.AudioPid == channel->getAudioPid()) ? 1 : 0;
recMovieInfo->audioPids.push_back(audio_pids);
}
}
@@ -635,8 +635,8 @@ void CRecordInstance::FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis
/* FIXME sometimes no apid in xml ?? */
if(recMovieInfo->audioPids.empty() && !allpids.APIDs.empty()) {
int i = 0;
audio_pids.epgAudioPid = allpids.APIDs[i].pid;
audio_pids.epgAudioPidName = allpids.APIDs[i].desc;
audio_pids.AudioPid = allpids.APIDs[i].pid;
audio_pids.AudioPidName = allpids.APIDs[i].desc;
audio_pids.atype = allpids.APIDs[i].is_ac3 ? 1 : allpids.APIDs[i].is_aac ? 5 : allpids.APIDs[i].is_eac3 ? 7 : 0;
audio_pids.selected = 1;
recMovieInfo->audioPids.push_back(audio_pids);
@@ -1901,7 +1901,7 @@ void CStreamRec::FillMovieInfo(CZapitChannel * /*channel*/, APIDList & /*apid_li
AVStream *st = ofcx->streams[i];
AVCodecContext * codec = st->codec;
if (codec->codec_type == AVMEDIA_TYPE_AUDIO) {
EPG_AUDIO_PIDS audio_pids;
AUDIO_PIDS audio_pids;
AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
AVDictionaryEntry *title = av_dict_get(st->metadata, "title", NULL, 0);
@@ -1931,10 +1931,10 @@ void CStreamRec::FillMovieInfo(CZapitChannel * /*channel*/, APIDList & /*apid_li
}
audio_pids.selected = 0;
audio_pids.epgAudioPidName = desc;
audio_pids.epgAudioPid = st->id;
audio_pids.AudioPidName = desc;
audio_pids.AudioPid = st->id;
recMovieInfo->audioPids.push_back(audio_pids);
printf("%s: [AUDIO] 0x%x [%s]\n", __FUNCTION__, audio_pids.epgAudioPid, desc.c_str());
printf("%s: [AUDIO] 0x%x [%s]\n", __FUNCTION__, audio_pids.AudioPid, desc.c_str());
} else if (codec->codec_type == AVMEDIA_TYPE_VIDEO) {
recMovieInfo->VideoPid = st->id;

View File

@@ -593,7 +593,7 @@ int CEpgData::show_mp(MI_MOVIE_INFO *mi, int mp_position, int mp_duration, bool
{
if (i)
extMovieInfo += ", ";
extMovieInfo += mp_movie_info->audioPids[i].epgAudioPidName;
extMovieInfo += mp_movie_info->audioPids[i].AudioPidName;
}
extMovieInfo += "\n";
}

View File

@@ -121,13 +121,13 @@ bool CMovieInfo::encodeMovieInfoXml(std::string * extMessage, MI_MOVIE_INFO * mo
for (unsigned int i = 0; i < movie_info->audioPids.size(); i++) // pids.APIDs.size()
{
*extMessage += "\t\t\t<" MI_XML_TAG_AUDIO " " MI_XML_TAG_PID "=\"";
*extMessage += to_string(movie_info->audioPids[i].epgAudioPid);
*extMessage += to_string(movie_info->audioPids[i].AudioPid);
*extMessage += "\" " MI_XML_TAG_ATYPE "=\"";
*extMessage += to_string(movie_info->audioPids[i].atype);
*extMessage += "\" " MI_XML_TAG_SELECTED "=\"";
*extMessage += to_string(movie_info->audioPids[i].selected);
*extMessage += "\" " MI_XML_TAG_NAME "=\"";
*extMessage += ZapitTools::UTF8_to_UTF8XML(movie_info->audioPids[i].epgAudioPidName.c_str());
*extMessage += ZapitTools::UTF8_to_UTF8XML(movie_info->audioPids[i].AudioPidName.c_str());
*extMessage += "\"/>\n";
}
*extMessage += "\t\t</" MI_XML_TAG_AUDIOPIDS ">\n";
@@ -287,7 +287,7 @@ bool CMovieInfo::parseXmlTree(std::string &_text, MI_MOVIE_INFO *movie_info)
int pos = 0;
EPG_AUDIO_PIDS audio_pids;
AUDIO_PIDS audio_pids;
while ((pos = find_next_char('<', text, pos, bytes)) != -1) {
pos++;
@@ -334,9 +334,9 @@ bool CMovieInfo::parseXmlTree(std::string &_text, MI_MOVIE_INFO *movie_info)
while (text[pos + pos2] != '\"' && text[pos + pos2] != 0 && text[pos + pos2] != '/')
pos2++;
if (text[pos + pos2] == '\"')
audio_pids.epgAudioPid = atoi(&text[pos + pos2 + 1]);
audio_pids.AudioPid = atoi(&text[pos + pos2 + 1]);
} else
audio_pids.epgAudioPid = 0;
audio_pids.AudioPid = 0;
audio_pids.atype = 0;
pos2 = -1;
@@ -366,7 +366,7 @@ bool CMovieInfo::parseXmlTree(std::string &_text, MI_MOVIE_INFO *movie_info)
audio_pids.selected = atoi(&text[pos + pos2 + 1]);
}
audio_pids.epgAudioPidName = "";
audio_pids.AudioPidName = "";
//pos2 = strcspn(&text[pos],MI_XML_TAG_NAME);
pos2 = -1;
ptr = strstr(&text[pos], MI_XML_TAG_NAME);
@@ -382,12 +382,12 @@ bool CMovieInfo::parseXmlTree(std::string &_text, MI_MOVIE_INFO *movie_info)
pos3++;
if (text[pos + pos3] == '\"')
{
audio_pids.epgAudioPidName.append(&text[pos + pos2 + 1], pos3 - pos2 - 1);
audio_pids.epgAudioPidName = htmlEntityDecode(audio_pids.epgAudioPidName);
audio_pids.AudioPidName.append(&text[pos + pos2 + 1], pos3 - pos2 - 1);
audio_pids.AudioPidName = htmlEntityDecode(audio_pids.AudioPidName);
}
}
}
//printf("MOVIE INFO: apid %d type %d name %s selected %d\n", audio_pids.epgAudioPid, audio_pids.atype, audio_pids.epgAudioPidName.c_str(), audio_pids.selected);
//printf("MOVIE INFO: apid %d type %d name %s selected %d\n", audio_pids.AudioPid, audio_pids.atype, audio_pids.AudioPidName.c_str(), audio_pids.selected);
movie_info->audioPids.push_back(audio_pids);
}
/* parse bookmarks */

View File

@@ -108,9 +108,9 @@ typedef struct
{
int atype;
int selected;
int epgAudioPid; // epg audio pid nr, usually filled by VCR
std::string epgAudioPidName; // epg audio pid name, usually filled by VCR
} EPG_AUDIO_PIDS;
int AudioPid; // audio pid nr, usually filled by VCR
std::string AudioPidName; // audio pid name, usually filled by VCR
} AUDIO_PIDS;
class MI_MOVIE_INFO //MI_MOVIE_INFO &operator=(const MI_MOVIE_INFO& src);
{
@@ -135,7 +135,7 @@ class MI_MOVIE_INFO //MI_MOVIE_INFO &operator=(const MI_MOVIE_INFO& src);
//char format; // currently not used
//char audio; // currently not used
MI_MOVIE_BOOKMARKS bookmarks; // bookmark collecton for this movie
std::vector<EPG_AUDIO_PIDS> audioPids; // available AudioPids, usually filled by VCR. Note: Vectors are easy to is also using the heap (memory fragmentation), might be changed to array [MI_MAX_AUDIO_PIDS]
std::vector<AUDIO_PIDS> audioPids; // available AudioPids, usually filled by VCR. Note: Vectors are easy to is also using the heap (memory fragmentation), might be changed to array [MI_MAX_AUDIO_PIDS]
uint64_t epgId; // currently not used, we just do not want to loose this info if movie info is saved backed
uint64_t epgEpgId; // off_t currently not used, we just do not want to loose this info if movie info is saved backed

View File

@@ -403,18 +403,18 @@ void CMoviePlayerGui::fillPids()
numpida = 0; currentapid = 0;
/* FIXME: better way to detect TS recording */
if (!p_movie_info->audioPids.empty()) {
currentapid = p_movie_info->audioPids[0].epgAudioPid;
currentapid = p_movie_info->audioPids[0].AudioPid;
currentac3 = p_movie_info->audioPids[0].atype;
} else if (!vpid) {
is_file_player = true;
return;
}
for (int i = 0; i < (int)p_movie_info->audioPids.size(); i++) {
apids[i] = p_movie_info->audioPids[i].epgAudioPid;
apids[i] = p_movie_info->audioPids[i].AudioPid;
ac3flags[i] = p_movie_info->audioPids[i].atype;
numpida++;
if (p_movie_info->audioPids[i].selected) {
currentapid = p_movie_info->audioPids[i].epgAudioPid;
currentapid = p_movie_info->audioPids[i].AudioPid;
currentac3 = p_movie_info->audioPids[i].atype;
}
}
@@ -1715,8 +1715,8 @@ bool CMoviePlayerGui::getAudioName(int apid, std::string &apidtitle)
return false;
for (int i = 0; i < (int)p_movie_info->audioPids.size(); i++) {
if (p_movie_info->audioPids[i].epgAudioPid == apid && !p_movie_info->audioPids[i].epgAudioPidName.empty()) {
apidtitle = p_movie_info->audioPids[i].epgAudioPidName;
if (p_movie_info->audioPids[i].AudioPid == apid && !p_movie_info->audioPids[i].AudioPidName.empty()) {
apidtitle = p_movie_info->audioPids[i].AudioPidName;
return true;
}
}
@@ -1846,7 +1846,7 @@ void CMoviePlayerGui::selectAudioPid()
CVolume::getInstance()->SetCurrentPid(currentapid);
for (uint i=0; i < numpida; i++) {
percent[i] = CZapit::getInstance()->GetPidVolume(p_movie_info->epgId, apids[i], ac3flags[i]);
APIDSelector.addItem(new CMenuOptionNumberChooser(p_movie_info->audioPids[i].epgAudioPidName,
APIDSelector.addItem(new CMenuOptionNumberChooser(p_movie_info->audioPids[i].AudioPidName,
&percent[i], currentapid == apids[i],
0, 999, CVolume::getInstance()));
}