/// <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;
 }
示例#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);
        }
示例#3
0
 private static extern void GetVideoCodecData(ref EncoderJob JobSpec, IntPtr Buffer);
示例#4
0
 private static extern int GetVideoCodecDataSize(ref EncoderJob JobSpec);
示例#5
0
 public static extern void CloseEncoderJob(ref EncoderJob JobSpec);
示例#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);
示例#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);
示例#10
0
 public static extern int InitialiseEncoderJob(ref EncoderJob JobSpec, int Width, int Height,
     string BaseDirectory, int FrameRate, int Bitrate, double SegmentDuration);
示例#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;
 }
示例#12
0
 public static extern void EncodeFrame(ref EncoderJob JobSpec, ref MediaFrame Frame);
示例#13
0
 public static extern void CloseEncoderJob(ref EncoderJob JobSpec);