Ejemplo n.º 1
0
 public override string ToString()
 {
     return(string.Format("{0} {1} {2} {3} {4} {5} SampleSize={6}",
                          DsToString.MediaTypeToString(mt.majorType).Replace('\0', ' '),
                          DsToString.MediaSubTypeToString(mt.subType).Replace('\0', ' '),
                          DsToString.MediaFormatTypeToString(mt.formatType).Replace('\0', ' '),
                          format_ftp.ToString(),
                          (mt.fixedSizeSamples ? "FixedSamples" : "NotFixedSamples"),
                          (mt.temporalCompression ? "TemporalCompression" : "NotTemporalCompression"),
                          mt.sampleSize.ToString()));
 }
Ejemplo n.º 2
0
        private string ConnectionMediaTypeString(AMMediaType mtype)
        {
            string retval =
                "Major type:\t" + DsToString.MediaTypeToString(mtype.majorType) + "\r\n" +
                "Subtype type:\t" + this.MediaSubTypeToString(mtype.subType) + "\r\n" +
                "Format type:\t" + DsToString.MediaFormatTypeToString(mtype.formatType) + "\r\n";

            if (mtype.formatPtr != IntPtr.Zero)
            {
                if (mtype.formatType == FormatType.WaveEx)
                {
                    retval += WaveFormatExString(mtype);
                }
                else if (mtype.formatType == FormatType.VideoInfo || mtype.formatType == FormatType.MpegVideo)
                {
                    retval += VideoInfoFormatString(mtype);
                }
                else if (mtype.formatType == FormatType.VideoInfo2 || mtype.formatType == FormatType.Mpeg2Video)
                {
                    retval += VideoInfo2FormatString(mtype);
                }
            }
            return(retval + "---\r\n");
        }