Inheritance: EbmlGeneric
Exemplo n.º 1
0
        public override EbmlGeneric New()
        {
            EbmlBinary b = new EbmlBinary();
            b.Id = Id;
            b.InputOffset = InputOffset;
            b.Value = Value;
            b.Weight = Weight;

            return b;
        }
Exemplo n.º 2
0
        public override EbmlGeneric New()
        {
            EbmlBinary b = new EbmlBinary();

            b.Id          = Id;
            b.InputOffset = InputOffset;
            b.Value       = Value;
            b.Weight      = Weight;

            return(b);
        }
Exemplo n.º 3
0
        internal static EbmlBinary NormalizeHeader(Container c)
        {
            //Remove DATEUTC
            EbmlMaster info = (EbmlMaster)c.FindFirst(Ids.MATROSKA_ID_INFO);
            EbmlBinary date = (EbmlBinary)info.FindFirst(Ids.MATROSKA_ID_DATEUTC);
            if (date != null)
                info.Value.Remove(date);
            //Changing Muxing and Writting App to a Constant.
            EbmlUtf8 muxapp = (EbmlUtf8)info.FindFirst(Ids.MATROSKA_ID_MUXINGAPP);
            if (muxapp == null)
            {
                muxapp = new EbmlUtf8 { Id = Ids.MATROSKA_ID_MUXINGAPP };
                info.Value.Add(muxapp);
            }
            EbmlUtf8 wrtapp = (EbmlUtf8)info.FindFirst(Ids.MATROSKA_ID_WRITINGAPP);
            if (wrtapp == null)
            {
                wrtapp = new EbmlUtf8 { Id = Ids.MATROSKA_ID_WRITINGAPP };
                info.Value.Add(wrtapp);
            }
            muxapp.Value = wrtapp.Value = "AOD";
            EbmlBinary seguid = (EbmlBinary)info.FindFirst(Ids.MATROSKA_ID_SEGMENTUID);
            if (seguid == null)
            {
                seguid = new EbmlBinary { Id = Ids.MATROSKA_ID_SEGMENTUID, Value = new byte[16] };
                info.Value.Add(seguid);
            }

            info.Value.Sort();
            return seguid;
        }