Пример #1
0
 /* ---------------------------------------------------------
  * ----------------  EVENTS PLAY VIDEO ---------------------
  *  --------------------------------------------------------
  */
 //not nice but works
 private void playVideo(string fileName)
 {
     if(File.Exists(fileName)) {
         PlayerBin player = new PlayerBin();
         player.Open(fileName);
         player.Play();
     }
 }
Пример #2
0
    /* ---------------------------------------------------------
     * ----------------  EVENTS PLAY VIDEO ---------------------
     *  --------------------------------------------------------
     */
    //Not used on encoder
    private bool playVideo(string fileName, bool play)
    {
        if(File.Exists(fileName)) {
            LogB.Information("Play video starting...");
            PlayerBin player = new PlayerBin();
            player.Open(fileName);

            //without these lines works also but has less functionalities (speed, go to ms)
            Gtk.Window d = new Gtk.Window(Catalog.GetString("Playing video"));
            d.Add(player);
            d.Modal = true;
            d.SetDefaultSize(500,400);
            d.ShowAll();
            d.DeleteEvent += delegate(object sender, DeleteEventArgs e) {player.Close(); player.Dispose();};

            if(play) {
                LogB.Information("Play video playing...");
                player.Play();
            }
            return true;
        }
        return false;
    }
Пример #3
0
 //this does not work on raspberry
 private void playVideoEncoderInitialSetup()
 {
     LogB.Information("Prepare video encoder");
     playerEncoder = new PlayerBin();
     viewport_video_play_encoder.Add(playerEncoder);
     playerEncoder.SeeControlsBox(true);
 }
Пример #4
0
    private void on_button_video_watch_clicked(object o, EventArgs args)
    {
        if(File.Exists(videoFileName)) {
            Log.WriteLine("Exists and clicked " + videoFileName);

            PlayerBin player = new PlayerBin();
            player.Open(videoFileName);

            Gtk.Window d = new Gtk.Window(Catalog.GetString("Playing video"));
            d.Add(player);
            d.Modal = true;
            d.ShowAll();
            d.DeleteEvent += delegate(object sender, DeleteEventArgs e) {player.Close(); player.Dispose();};
            player.Play();
        }
    }