private List <outputFormatExtList> makeVideoInfoList(ref Int32 counter) { List <outputFormatExtList> result = new List <outputFormatExtList>(); videoDataStruct data = videoDataAry[counter % videoDataAry.Count()]; outputFormatVideo p = new outputFormatVideo(); p.componentType = new epgVideoComponentType(data.type); p.videoType = new epgVideoType(data.name); result.Add(p); return(result); }
private void editToMadaraSeq(serviceFormat service, int counter) { Int32 lineMax = this.table.getLineNum(service.madaraType); Int32 rawMax = this.table.getServiceNum(service.madaraType); Int32 index = counter % lineMax; bool parentFlag = true; for (Int32 serviceNum = 0; serviceNum < rawMax; serviceNum++) { Int32 point = this.table.getPointTo(service.madaraType, serviceNum, index); outputFormatVideo video = new outputFormatVideo(this.table.getResolution(service.madaraType, service.madaraSeqNum, index)); this.setMadara(service, counter, serviceNum, rawMax, index, video, point, ref parentFlag); } }
private List <outputFormatExtList> makeVideoInfoListFromType(ref Int32 type) { List <outputFormatExtList> result = new List <outputFormatExtList>(); int t = type; videoDataStruct data = videoDataAry[7]; var obj = from v in videoDataAry where v.type == t select v; if (obj.Count() > 0) { data = obj.First(); } outputFormatVideo p = new outputFormatVideo(); p.componentType = new epgVideoComponentType(data.type); p.videoType = new epgVideoType(data.name); result.Add(p); return(result); }
public override List <outputFormatBasic> getData() { List <outputFormatBasic> result = new List <outputFormatBasic>(); Int32 index = 0; Int32.TryParse(this.service.uri, out index); if (index > data.Count) { index = data.Count - 1; } serviceData conf = this.data.First(); // 特殊 1日当たり96event、9:30AM-17:30で5分間隔。 // StartTime は、this.today の 日付のみ借りて 9:30AM強制 // これを this.daycount日分繰り返す for (Int32 days = 0; days < 24 /* this.daycount */; days++) { DateTime startTime = new DateTime(today.Year, today.Month, today.Day, conf.startTime.Hour, conf.startTime.Minute, 0).AddDays(days); int counterEncodeRate = 0; for (Int32 eventCount = 0; eventCount < 96; eventCount++) { outputFormatBasic ou = new outputFormatBasic( service.networkId.value, service, null); ou.eventtime = new epgEventTime(startTime); ou.eventid.value = ou.eventid.setEventIdFromDate(ou.eventtime.value); ou.duration = new epgDuration(conf.duration); ou.videoInfo = new List <outputFormatExtList>(); outputFormatVideo p = new outputFormatVideo(); // p.componentType = new epgVideoComponentType(0xb3); p.componentType = new epgVideoComponentType(service.DefaultVideoComponentType.value); p.videoType = new epgVideoType("HD映像"); ou.videoInfo.Add(p); ou.audioInfo = new List <outputFormatExtList>(); ou.audioInfo.Add(new outputFormatAudio(ou.service.forceJlab035)); ou.title.value = conf.title; ou.contents.set(conf.desc.Trim()); if (conf.addEncRateText == true) { ou.encoderInfo = new outputFormatEncoderInfo(); Int32 rate = conf.rate[counterEncodeRate % conf.rate.Length]; ou.encoderInfo.rate.value = rate; ou.title.value += " " + ((Int32)(rate / 1000)).ToString() + "Mbps"; } else { ou.encoderInfo.clear(); } ou.genleInfo = new List <outputFormatExtList>(); outputFormatGenle genle = new outputFormatGenle(); genle.genleBig = new epgGenleBig(0x02); // 情報/ワイドショー genle.genleSmall = new epgGenleSmall(0x04); // ショッピング・通販 ou.genleInfo.Add(genle); ou.extDescriptorInfo = new List <outputFormatExtList>(); foreach (TagData tag in conf.tags) { outputFormatExtDescription exDesc = new outputFormatExtDescription(); exDesc.makeExtDescription(tag.name, tag.desc); ou.extDescriptorInfo.Add(exDesc); } counterEncodeRate++; startTime = startTime.AddMinutes(conf.duration); result.Add(ou); } } return(result); }
private void setMadara(serviceFormat service, Int32 counter, Int32 serviceNum, Int32 rawMax, Int32 index, outputFormatVideo video, Int32 point, ref bool parent) { outputFormatBasic target; // serviceNum:0 は service, それ以上は serviceNum.children に設定する必要がある。 if (serviceNum == 0) { target = service.outList[counter]; } else { //target = DeepCopyHelper.DeepCopy<outputFormatBasic>(service.children[serviceNum - 1].outList[counter]); //service.children[serviceNum - 1].outList[counter] = target; target = service.children[serviceNum - 1].outList[counter]; } target.videoInfo.Clear(); target.videoInfo.Add(video); if (point == -1) { target.madara.Clear(); return; } if (parent == true) { parent = false; // まず自分を追加 serviceFormat from = (serviceNum == 0) ? service : (service.children[serviceNum - 1]); target.madara.eventIdList.Add(from.outList[counter].eventid.ToOutput()); target.madara.serviceList.Add(from.serviceId.ToOutput()); // serviceNum これ以降の event から、自分を指している serviceId/eventIdを収集 for (Int32 i = (serviceNum + 1); i < rawMax; i++) { Int32 pointRef = this.table.getPointTo(service.madaraType, i, index); if (pointRef != -1) { target.madara.serviceList.Add(service.children[i - 1].serviceId.ToOutput()); target.madara.eventIdList.Add(service.children[i - 1].outList[counter].eventid.ToOutput()); } } } else { // 子。 if (point == 0) { target.madara.serviceList.Add(service.serviceId.ToOutput()); target.madara.eventIdList.Add(service.outList[counter].eventid.ToOutput()); } else { target.madara.serviceList.Add(service.children[point - 1].serviceId.ToOutput()); target.madara.eventIdList.Add(service.children[point - 1].outList[counter].eventid.ToOutput()); } } }