~ubuntu-branches/ubuntu/natty/vlc/natty

« back to all changes in this revision

Viewing changes to modules/video_output/fb.c

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2010-07-23 10:41:59 UTC
  • mfrom: (1.1.31 upstream)
  • Revision ID: james.westby@ubuntu.com-20100723104159-pudrtu70a1svhiyl
Tags: 1.1.1-1+exp1ubuntu1
* Merge from Debian experimental, remaining changes:
  - build and install the libx264 plugin
  - add Xb-Npp header to vlc package
  - Add apport hook to include more vlc dependencies in bug reports

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * fb.c : framebuffer plugin for vlc
3
3
 *****************************************************************************
4
4
 * Copyright (C) 2000-2009 the VideoLAN team
5
 
 * $Id: 079f499e9a6a6ebe3acd0154d34431e454a61e07 $
 
5
 * $Id: 822e74ef9bef66c4d12c7ac30b0f9b0638e603d7 $
6
6
 *
7
7
 * Authors: Samuel Hocevar <sam@zoy.org>
8
8
 *          Jean-Paul Saman
108
108
/* */
109
109
static int  OpenDisplay  (vout_display_t *, bool force_resolution);
110
110
static void CloseDisplay (vout_display_t *);
 
111
#if 0
111
112
static void SwitchDisplay(int i_signal);
 
113
#endif
112
114
static void TextMode     (int tty);
113
115
static void GfxMode      (int tty);
114
116
 
123
125
    struct termios      old_termios;
124
126
 
125
127
    /* Original configuration information */
 
128
#if 0
126
129
    struct sigaction            sig_usr1;           /* USR1 previous handler */
127
130
    struct sigaction            sig_usr2;           /* USR2 previous handler */
 
131
#endif
128
132
    struct vt_mode              vt_mode;                 /* previous VT mode */
129
133
 
130
134
    /* Framebuffer information */
455
459
 
456
460
    ioctl(sys->tty, VT_RELDISP, VT_ACKACQ);
457
461
 
 
462
#if 0
458
463
    /* Set-up tty signal handler to be aware of tty changes */
459
464
    struct sigaction sig_tty;
460
465
    memset(&sig_tty, 0, sizeof(sig_tty));
466
471
        /* FIXME SIGUSR1 could have succeed */
467
472
        goto error_signal;
468
473
    }
 
474
#endif
469
475
 
470
476
    /* Set-up tty according to new signal handler */
471
477
    if (-1 == ioctl(sys->tty, VT_GETMODE, &sys->vt_mode)) {
485
491
    return VLC_SUCCESS;
486
492
 
487
493
error:
 
494
#if 0
488
495
    sigaction(SIGUSR1, &sys->sig_usr1, NULL);
489
496
    sigaction(SIGUSR2, &sys->sig_usr2, NULL);
490
497
error_signal:
 
498
#endif
491
499
    tcsetattr(0, 0, &sys->old_termios);
492
500
    TextMode(sys->tty);
493
501
    return VLC_EGENERIC;
499
507
    /* Reset the terminal */
500
508
    ioctl(sys->tty, VT_SETMODE, &sys->vt_mode);
501
509
 
 
510
#if 0
502
511
    /* Remove signal handlers */
503
512
    sigaction(SIGUSR1, &sys->sig_usr1, NULL);
504
513
    sigaction(SIGUSR2, &sys->sig_usr2, NULL);
 
514
#endif
505
515
 
506
516
    /* Reset the keyboard state */
507
517
    tcsetattr(0, 0, &sys->old_termios);
700
710
    }
701
711
}
702
712
 
 
713
#if 0
703
714
/*****************************************************************************
704
715
 * SwitchDisplay: VT change signal handler
705
716
 *****************************************************************************
708
719
 *****************************************************************************/
709
720
static void SwitchDisplay(int i_signal)
710
721
{
711
 
    VLC_UNUSED(i_signal);
712
 
#if 0
713
722
    vout_display_t *vd;
714
723
 
715
724
    vlc_mutex_lock(&p_vout_bank->lock);
737
746
    }
738
747
 
739
748
    vlc_mutex_unlock(&p_vout_bank->lock);
 
749
}
740
750
#endif
741
 
}
742
751
 
743
752
/*****************************************************************************
744
753
 * TextMode and GfxMode : switch tty to text/graphic mode