/// <summary>
 /// Create a new EncoderPackage
 /// </summary>
 public EncoderPackage(PackageSpec SrcSpec, int Index, EncoderJob Job, MediaFrame Frame)
 {
     Buffers = new List<IEncoderBuffer>();
     this.JobIndex = Index;
     this.Job = Job;
     this.Frame = Frame;
     Specification = SrcSpec;
 }
Esempio n. 2
0
        /// <summary>
        /// Returns the codec's startup data (other than in frames).
        /// This may be null or empty.
        /// </summary>
        public static byte[] GetVideoCodecData(EncoderJob JobSpec)
        {
            int bufsz = EncoderBridge.GetVideoCodecDataSize(ref JobSpec);

            byte[] buffer = null;
            if (bufsz > 0)
            {
                buffer = new byte[bufsz];
                GCHandle bufh = GCHandle.Alloc(buffer, GCHandleType.Pinned);
                try {
                    EncoderBridge.GetVideoCodecData(ref JobSpec, bufh.AddrOfPinnedObject());
                } finally {
                    bufh.Free();
                }
            }
            return(buffer);
        }
Esempio n. 3
0
 private static extern void GetVideoCodecData(ref EncoderJob JobSpec, IntPtr Buffer);
Esempio n. 4
0
 private static extern int GetVideoCodecDataSize(ref EncoderJob JobSpec);
Esempio n. 5
0
 public static extern void CloseEncoderJob(ref EncoderJob JobSpec);
Esempio n. 6
0
 [System.Security.SuppressUnmanagedCodeSecurity]         // this is for performance. Only makes a difference in tight loops.
 public static extern void EncodeFrame(ref EncoderJob JobSpec, ref MediaFrame Frame);
Esempio n. 7
0
 public static extern int InitialiseEncoderJob(ref EncoderJob JobSpec, int Width, int Height,
                                               string BaseDirectory, int FrameRate, int Bitrate, double SegmentDuration);
 private static extern int GetVideoCodecDataSize(ref EncoderJob JobSpec);
 private static extern void GetVideoCodecData(ref EncoderJob JobSpec, IntPtr Buffer);
Esempio n. 10
0
 public static extern int InitialiseEncoderJob(ref EncoderJob JobSpec, int Width, int Height,
     string BaseDirectory, int FrameRate, int Bitrate, double SegmentDuration);
Esempio n. 11
0
 /// <summary>
 /// Returns the codec's startup data (other than in frames).
 /// This may be null or empty.
 /// </summary>
 public static byte[] GetVideoCodecData(EncoderJob JobSpec)
 {
     int bufsz = EncoderBridge.GetVideoCodecDataSize(ref JobSpec);
     byte[] buffer = null;
     if (bufsz > 0) {
         buffer = new byte[bufsz];
         GCHandle bufh = GCHandle.Alloc(buffer, GCHandleType.Pinned);
         try {
             EncoderBridge.GetVideoCodecData(ref JobSpec, bufh.AddrOfPinnedObject());
         } finally {
             bufh.Free();
         }
     }
     return buffer;
 }
Esempio n. 12
0
 public static extern void EncodeFrame(ref EncoderJob JobSpec, ref MediaFrame Frame);
Esempio n. 13
0
 public static extern void CloseEncoderJob(ref EncoderJob JobSpec);