Exemplo n.º 1
0
        EpgAudioComponentInfo getAudioInfo(SqlDataReader reader0, ref int i0)
        {
            object o1 = reader0[i0++];

            if (!o1.Equals(DBNull.Value))
            {
                byte[] bytes1 = (byte[])o1;
                int    i1     = 0;
                EpgAudioComponentInfo epgAudioComponentInfo1 = new EpgAudioComponentInfo();
                while (i1 < bytes1.Length)
                {
                    epgAudioComponentInfo1.componentList.Add(
                        new EpgAudioComponentInfoData()
                    {
                        stream_content        = bytes1[i1++],
                        component_type        = bytes1[i1++],
                        component_tag         = bytes1[i1++],
                        stream_type           = bytes1[i1++],
                        simulcast_group_tag   = bytes1[i1++],
                        ES_multi_lingual_flag = bytes1[i1++],
                        main_component_flag   = bytes1[i1++],
                        quality_indicator     = bytes1[i1++],
                        sampling_rate         = bytes1[i1++],
                    });
                }
                return(epgAudioComponentInfo1);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 2
0
        void addEpgAudioComponentInfo(ref Dictionary <string, string> dict0, string column0, EpgAudioComponentInfo audioInfo0)
        {
            int           i1  = 0;
            StringBuilder sb1 = new StringBuilder();

            foreach (EpgAudioComponentInfoData epgAudioComponentInfoData1 in audioInfo0.componentList)
            {
                if (sb1.Length == 0)
                {
                    sb1.Append("0x");
                }
                sb1.Append(epgAudioComponentInfoData1.stream_content.ToString("X2"));
                sb1.Append(epgAudioComponentInfoData1.component_type.ToString("X2"));
                sb1.Append(epgAudioComponentInfoData1.component_tag.ToString("X2"));
                sb1.Append(epgAudioComponentInfoData1.stream_type.ToString("X2"));
                sb1.Append(epgAudioComponentInfoData1.simulcast_group_tag.ToString("X2"));
                sb1.Append(epgAudioComponentInfoData1.ES_multi_lingual_flag.ToString("X2"));
                sb1.Append(epgAudioComponentInfoData1.main_component_flag.ToString("X2"));
                sb1.Append(epgAudioComponentInfoData1.quality_indicator.ToString("X2"));
                sb1.Append(epgAudioComponentInfoData1.sampling_rate.ToString("X2"));
                i1++;
                if (2 <= i1)
                {
                    break;
                }                       // 2つまで
            }
            dict0.Add(column0, sb1.ToString());
        }