summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-03-17 20:17:33 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-03-17 20:17:33 +0100
commit1e4f917e159bbe50f21b7107d658152b0593e6a1 (patch)
tree58fef0133469d6fd99d3f3f1ec72066366c1dc9a /src
parent0316e66b92f7519648ea3f17fe8530fc27f5b84f (diff)
downloaddabmux-1e4f917e159bbe50f21b7107d658152b0593e6a1.tar.gz
dabmux-1e4f917e159bbe50f21b7107d658152b0593e6a1.tar.bz2
dabmux-1e4f917e159bbe50f21b7107d658152b0593e6a1.zip
Rename subchannelIndicator to subchannelFIG0_1
Diffstat (limited to 'src')
-rw-r--r--src/DabMux.cpp34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/DabMux.cpp b/src/DabMux.cpp
index fd008a1..714aeff 100644
--- a/src/DabMux.cpp
+++ b/src/DabMux.cpp
@@ -283,7 +283,7 @@ int main(int argc, char *argv[])
vector<DabComponent*>::iterator componentIndicatorProgram;
vector<DabComponent*>::iterator componentIndicatorData;
vector<dabSubchannel*>::iterator subchannel = ensemble->subchannels.end();
- vector<dabSubchannel*>::iterator subchannelIndicator;
+ vector<dabSubchannel*>::iterator subchannelFIG0_1;
vector<dabOutput*>::iterator output;
dabProtection* protection = NULL;
@@ -623,12 +623,16 @@ int main(int argc, char *argv[])
/* Each iteration of the main loop creates one ETI frame */
+ /* Used for FIG0/2 insertion */
serviceProgramInd = ensemble->services.end();
serviceDataInd = ensemble->services.end();
+
componentIndicatorProgram = ensemble->components.end();
componentIndicatorData = ensemble->components.end();
servicePty = ensemble->services.end();
- subchannelIndicator = ensemble->subchannels.end();
+
+ /* used for FIG0/1 insertion */
+ subchannelFIG0_1 = ensemble->subchannels.end();
for (currentFrame = 0; running; currentFrame++) {
@@ -866,12 +870,12 @@ int main(int argc, char *argv[])
figSize += 2;
//Sous-partie du FIG type 0/1
- if (subchannelIndicator == ensemble->subchannels.end()) {
- subchannelIndicator = ensemble->subchannels.begin();
+ if (subchannelFIG0_1 == ensemble->subchannels.end()) {
+ subchannelFIG0_1 = ensemble->subchannels.begin();
}
- for (; subchannelIndicator != ensemble->subchannels.end();
- ++subchannelIndicator) {
- protection = &(*subchannelIndicator)->protection;
+ for (; subchannelFIG0_1 != ensemble->subchannels.end();
+ ++subchannelFIG0_1) {
+ protection = &(*subchannelFIG0_1)->protection;
if ((protection->form == 0 && figSize > 27) ||
(protection->form != 0 && figSize > 26)) {
@@ -881,11 +885,11 @@ int main(int argc, char *argv[])
if (protection->form == 0) {
fig0_1subchShort =
(FIG_01_SubChannel_ShortF*) &etiFrame[index];
- fig0_1subchShort->SubChId = (*subchannelIndicator)->id;
+ fig0_1subchShort->SubChId = (*subchannelFIG0_1)->id;
fig0_1subchShort->StartAdress_high =
- (*subchannelIndicator)->startAddress / 256;
+ (*subchannelFIG0_1)->startAddress / 256;
fig0_1subchShort->StartAdress_low =
- (*subchannelIndicator)->startAddress % 256;
+ (*subchannelFIG0_1)->startAddress % 256;
fig0_1subchShort->Short_Long_form = 0;
fig0_1subchShort->TableSwitch = 0;
fig0_1subchShort->TableIndex =
@@ -897,19 +901,19 @@ int main(int argc, char *argv[])
} else {
fig0_1subchLong1 =
(FIG_01_SubChannel_LongF*) &etiFrame[index];
- fig0_1subchLong1->SubChId = (*subchannelIndicator)->id;
+ fig0_1subchLong1->SubChId = (*subchannelFIG0_1)->id;
fig0_1subchLong1->StartAdress_high =
- (*subchannelIndicator)->startAddress / 256;
+ (*subchannelFIG0_1)->startAddress / 256;
fig0_1subchLong1->StartAdress_low =
- (*subchannelIndicator)->startAddress % 256;
+ (*subchannelFIG0_1)->startAddress % 256;
fig0_1subchLong1->Short_Long_form = 1;
fig0_1subchLong1->Option = protection->longForm.option;
fig0_1subchLong1->ProtectionLevel =
protection->level;
fig0_1subchLong1->Sub_ChannelSize_high =
- getSizeCu(*subchannelIndicator) / 256;
+ getSizeCu(*subchannelFIG0_1) / 256;
fig0_1subchLong1->Sub_ChannelSize_low =
- getSizeCu(*subchannelIndicator) % 256;
+ getSizeCu(*subchannelFIG0_1) % 256;
index = index + 4;
figSize += 4;