1
0
mirror of https://github.com/Tha14/toxic.git synced 2026-01-27 11:13:14 +01:00

Fixed v4l2 capture crash, and refactored to prepare for new features

This commit is contained in:
cnhenry
2015-08-08 21:21:23 -05:00
parent d359ba6a54
commit c2c612b85a
8 changed files with 171 additions and 123 deletions

View File

@@ -167,6 +167,15 @@ static void help_draw_global(ToxWindow *self)
wprintw(win, " /sdev <type> <id> : Set active device\n");
#endif /* AUDIO */
#ifdef VIDEO
wattron(win, A_BOLD);
wprintw(win, "\n Video:\n");
wattroff(win, A_BOLD);
wprintw(win, " /lsvdev <type> : List video devices where type: in|out\n");
wprintw(win, " /svdev <type> <id> : Set active video device\n");
#endif /* VIDEO */
help_draw_bottom_menu(win);
box(win, ACS_VLINE, ACS_HLINE);
@@ -203,6 +212,14 @@ static void help_draw_chat(ToxWindow *self)
wprintw(win, " /sense <n> : VAD sensitivity threshold\n");
#endif /* AUDIO */
#ifdef VIDEO
wattron(win, A_BOLD);
wprintw(win, "\n Video:\n");
wattroff(win, A_BOLD);
wprintw(win, " /video : Send video capture\n");
wprintw(win, " /endvideo : Close all video windows\n");
#endif /* VIDEO */
help_draw_bottom_menu(win);
box(win, ACS_VLINE, ACS_HLINE);
@@ -282,7 +299,9 @@ void help_onKey(ToxWindow *self, wint_t key)
break;
case 'c':
#ifdef AUDIO
#ifdef VIDEO
help_init_window(self, 23, 80);
#elif AUDIO
help_init_window(self, 19, 80);
#else
help_init_window(self, 9, 80);
@@ -291,7 +310,9 @@ void help_onKey(ToxWindow *self, wint_t key)
break;
case 'g':
#ifdef AUDIO
#ifdef VIDEO
help_init_window(self, 28, 80);
#elif AUDIO
help_init_window(self, 24, 80);
#else
help_init_window(self, 20, 80);