Ejemplo n.º 1
0
		public XviD(int w,int h)
		{
			xvid_gbl_init_t   xvid_gbl_init=new xvid_gbl_init_t();
			xvid_dec_create_t xvid_dec_create=new xvid_dec_create_t();

			xvid_gbl_init.version = XVID_VERSION;
			xvid_gbl_init.cpu_flags = XVID_CPU_FORCE;
			
			xvid_global(IntPtr.Zero, 0, ref xvid_gbl_init, IntPtr.Zero);
			
			xvid_dec_create.version = XVID_VERSION;

			/*
			 * Image dimensions -- set to 0, xvidcore will resize when ever it is
			 * needed
			 */
			xvid_dec_create.width = Width=w;
			xvid_dec_create.height = Height=h;

			int ret = xvid_decore(IntPtr.Zero, XVID_DEC_CREATE, ref xvid_dec_create, IntPtr.Zero);

			if(ret!=0)
				throw new XviDException("XviD Decore Init Error.");

			dec_handle = xvid_dec_create.handle;

		}
Ejemplo n.º 2
0
 private static extern int xvid_global(IntPtr handle, int opt, ref xvid_gbl_init_t param1, IntPtr param2);
Ejemplo n.º 3
0
		private static extern int xvid_global(IntPtr handle, int opt, ref xvid_gbl_init_t param1, IntPtr param2);
Ejemplo n.º 4
0
        public XviD(int w,int h)
        {
            xvid_gbl_init_t   xvid_gbl_init=new xvid_gbl_init_t();
            xvid_dec_create_t xvid_dec_create=new xvid_dec_create_t();

            xvid_gbl_init.version = XVID_VERSION;
            xvid_gbl_init.cpu_flags = XVID_CPU_FORCE;

            xvid_global(IntPtr.Zero, 0, ref xvid_gbl_init, IntPtr.Zero);

            xvid_dec_create.version = XVID_VERSION;

            /*
             * Image dimensions -- set to 0, xvidcore will resize when ever it is
             * needed
             */
            xvid_dec_create.width = Width=w;
            xvid_dec_create.height = Height=h;

            int ret = xvid_decore(IntPtr.Zero, XVID_DEC_CREATE, ref xvid_dec_create, IntPtr.Zero);

            if(ret!=0)
                throw new XviDException("XviD Decore Init Error.");

            dec_handle = xvid_dec_create.handle;
        }