Exemple #1
0
 public static void SMPEG_double(IntPtr mpeg, int on)
 {
     if (on != 0)
     {
         Smpeg.SMPEG_scale(mpeg, 2);
     }
     else
     {
         Smpeg.SMPEG_scale(mpeg, 1);
     }
 }
Exemple #2
0
        public void SMPEG_new_rwops()
        {
            this.InitSdl();

            //IntPtr intPtr = Smpeg.SMPEG_new("test.mpg", out info, 0);
            //IntPtr intPtr = Sdl.SDL_RWFromFile("test.mpg", "rb");
            IntPtr intPtr = Smpeg.SMPEG_new_rwops(Sdl.SDL_RWFromFile("../../test.mpg", "rb"), out info, 0);

            Console.WriteLine("Smpeg_error: " + Smpeg.SMPEG_error(intPtr));
            Assert.IsFalse(intPtr == IntPtr.Zero);
            this.Quit();
        }
Exemple #3
0
        public void SMPEG_play()
        {
            this.InitSdl();

            //IntPtr intPtr = Smpeg.SMPEG_new("test.mpg", out info, 0);
            //IntPtr intPtr = Sdl.SDL_RWFromFile("test.mpg", "rb");
            IntPtr intPtr = Smpeg.SMPEG_new("../../test.mpg", out info, 0);

            Console.WriteLine("Smpeg_error: " + Smpeg.SMPEG_error(intPtr));
            Assert.IsFalse(intPtr == IntPtr.Zero);
            Smpeg.SMPEG_enableaudio(intPtr, 1);
            Smpeg.SMPEG_enablevideo(intPtr, 1);
            Smpeg.SMPEG_setvolume(intPtr, 100);
            Smpeg.SMPEG_setdisplay(intPtr, surfacePtr, IntPtr.Zero, null);

            Smpeg.SMPEG_play(intPtr);
            //while (Smpeg.SMPEG_status(intPtr) == Smpeg.SMPEG_PLAYING){}
            Thread.Sleep(sleepTime);
            Smpeg.SMPEG_stop(intPtr);
            Smpeg.SMPEG_delete(intPtr);
            this.Quit();
        }
Exemple #4
0
 public static void SMPEG_getinfo(IntPtr mpeg, out Smpeg.SMPEG_Info info);
Exemple #5
0
 public static void SMPEG_setdisplay(IntPtr mpeg, IntPtr dst, IntPtr surfLock, Smpeg.SMPEG_DisplayCallback callback);
Exemple #6
0
 public static IntPtr SMPEG_new_rwops(IntPtr src, out Smpeg.SMPEG_Info info, int sdl_audio);
Exemple #7
0
 public static IntPtr SMPEG_new_descr(int file, out Smpeg.SMPEG_Info info, int sdl_audio);
Exemple #8
0
 public static IntPtr SMPEG_new_data(object data, int size, out Smpeg.SMPEG_Info info, int sdl_audio);
Exemple #9
0
 public static IntPtr SMPEG_new(string file, out Smpeg.SMPEG_Info info, int sdl_audio);