예제 #1
0
 public FrameContentCodecGeneric(CodecDescription codec)
 {
     this.codecItems         = codec.Entries;
     this.state.TextCodecSet = codec.TextCodecSet;
     this.supportedVersions  = codec.SupportedVersions;
     this.type = codec.Type;
 }
예제 #2
0
        public void Add(CodecDescription c)
        {
            foreach (Version v in c.SupportedVersions)
            {
                if (!codecRepository.ContainsKey(v))
                {
                    codecRepository.Add(v, new Dictionary <FrameDescription.FrameType, CodecDescription>());
                }

                if (!codecRepository[v].ContainsKey(c.Type))
                {
                    codecRepository[v].Add(c.Type, c);
                }
                else
                {
                    throw new Exception("Codec already added");
                }
            }
        }