public bool SetInterlacedFormat(Gst.Video.VideoFormat format, Gst.Video.VideoInterlaceMode mode, uint width, uint height)
        {
            bool raw_ret = gst_video_info_set_interlaced_format(Handle, (int)format, (int)mode, width, height);
            bool ret     = raw_ret;

            return(ret);
        }
Beispiel #2
0
    public static void Main(string[] args)
    {
        Application.Init();
        loop = new MainLoop();

        // Construct all the elements
        pipeline = new Pipeline();
        appsrc   = new Gst.App.AppSrc("AppSrcDemo");
        Element color = ElementFactory.Make("ffmpegcolorspace");
        Element sink  = ElementFactory.Make("autovideosink");

        // Link the elements
        pipeline.Add(appsrc, color, sink);
        Element.Link(appsrc, color, sink);

        // Set the caps on the AppSrc to RGBA, 640x480, 4 fps, square pixels
        Gst.Video.VideoFormat fmt = (BitConverter.IsLittleEndian) ? Gst.Video.VideoFormat.BGRA : Gst.Video.VideoFormat.ARGB;
        appsrc.Caps = Gst.Video.VideoUtil.FormatNewCaps(fmt, 640, 480, 4, 1, 1, 1);

        // Connect the handlers
        appsrc.NeedData += PushAppData;
        pipeline.Bus.AddSignalWatch();
        pipeline.Bus.Message += MessageHandler;

        // Run, loop, run!
        pipeline.SetState(State.Playing);
        loop.Run();
        pipeline.SetState(State.Null);
    }
        public bool SetFormat(Gst.Video.VideoFormat format, uint width, uint height)
        {
            bool raw_ret = gst_video_info_set_format(Handle, (int)format, width, height);
            bool ret     = raw_ret;

            return(ret);
        }
Beispiel #4
0
        public static VideoVBIEncoder New(Gst.Video.VideoFormat format, uint pixel_width)
        {
            VideoVBIEncoder result = VideoVBIEncoder.New(gst_video_vbi_encoder_new((int)format, pixel_width));

            return(result);
        }
 public void Vertical(Gst.Video.VideoFormat format, uint dest_offset, uint width)
 {
     Vertical(format, IntPtr.Zero, IntPtr.Zero, dest_offset, width);
 }
 public void Vertical(Gst.Video.VideoFormat format, IntPtr src_lines, IntPtr dest, uint dest_offset, uint width)
 {
     gst_video_scaler_vertical(Handle, (int)format, src_lines, dest, dest_offset, width);
 }
 public void Horizontal(Gst.Video.VideoFormat format, uint dest_offset, uint width)
 {
     Horizontal(format, IntPtr.Zero, IntPtr.Zero, dest_offset, width);
 }
 public void Horizontal(Gst.Video.VideoFormat format, IntPtr src, IntPtr dest, uint dest_offset, uint width)
 {
     gst_video_scaler_horizontal(Handle, (int)format, src, dest, dest_offset, width);
 }
 public void TwoD(Gst.Video.VideoScaler vscale, Gst.Video.VideoFormat format, int src_stride, int dest_stride, uint x, uint y, uint width, uint height)
 {
     TwoD(vscale, format, IntPtr.Zero, src_stride, IntPtr.Zero, dest_stride, x, y, width, height);
 }
 public void TwoD(Gst.Video.VideoScaler vscale, Gst.Video.VideoFormat format, IntPtr src, int src_stride, IntPtr dest, int dest_stride, uint x, uint y, uint width, uint height)
 {
     gst_video_scaler_2d(Handle, vscale == null ? IntPtr.Zero : vscale.Handle, (int)format, src, src_stride, dest, dest_stride, x, y, width, height);
 }