예제 #1
0
        void WriteStrhHeaderStructure(RiffChunk chunk)
        {
            chunk.WriteFourCC(RiffAviFourCCCode.Vids);            // 'vids'
              chunk.WriteFourCC(RiffAviFourCCCode.Dib);             // 'DIB '
              chunk.WriteDWORD(0);                                  // flags
              chunk.WriteWORD(0);                                   // priority
              chunk.WriteWORD(0);                                   // language
              chunk.WriteDWORD(0);                                  // initial frames
              chunk.WriteDWORD(1);                                  // scale
              chunk.WriteDWORD(framesPerSecond);                    // rate
              chunk.WriteDWORD(0);                                  // start

              strhFrameCountBookmark =
            chunk.WriteAndBookmarkDWORD(0);                     // frameCount

              chunk.WriteDWORD(width * height * 4);                 // suggested buffer size
              chunk.WriteDWORD(0);                                  // quality
              chunk.WriteDWORD(0);                                  // sample size
              chunk.WriteDWORD(0);                                  // left
              chunk.WriteDWORD(0);                                  // top
              chunk.WriteDWORD((ushort)width);                      // right
              chunk.WriteDWORD((ushort)height);                     // bottom
        }
예제 #2
0
        void WriteAvihHeaderStructure(RiffChunk chunk)
        {
            UInt32 microSecondsPerFrame =
            (UInt32)((1.0 / framesPerSecond) * 1.0E6);

              chunk.WriteDWORD(microSecondsPerFrame);             // Microseconds per frame
              chunk.WriteDWORD(0);                                // Max Bytes Per Second
              chunk.WriteDWORD(0);                                // Padding granularity
              chunk.WriteDWORD(0);                                // Flags

              avihFrameCountBookmark =
            chunk.WriteAndBookmarkDWORD(0);                   // Total frames

              chunk.WriteDWORD(0);                                // Initial frames
              chunk.WriteDWORD(1);                                // Streams
              chunk.WriteDWORD(width * height * 4);               // Suggested buffer size
              chunk.WriteDWORD(width);                            // Width
              chunk.WriteDWORD(height);                           // Height
              chunk.WriteDWORD(0);                                // Reserved [0]
              chunk.WriteDWORD(0);                                // Reserved [1]
              chunk.WriteDWORD(0);                                // Reserved [2]
              chunk.WriteDWORD(0);                                // Reserved [3]
        }