diff gui/ui/actions.c @ 36429:28ea255e40ce

Add support for TV/DVB to the GUI. Support is limited to a single (resp. the first) card. At the same time, add the new GUI option 'gui_tv_digital', the new GUI message 'evPlayTV' and the new GUI font symbol 'b'. Additionally, update the documentation.
author ib
date Fri, 29 Nov 2013 12:41:32 +0000
parents f7ef757c95c0
children eed2fb870f43
line wrap: on
line diff
--- a/gui/ui/actions.c	Fri Nov 29 12:34:21 2013 +0000
+++ b/gui/ui/actions.c	Fri Nov 29 12:41:32 2013 +0000
@@ -76,6 +76,8 @@
 
     case STREAMTYPE_CDDA:
     case STREAMTYPE_VCD:
+    case STREAMTYPE_TV:
+    case STREAMTYPE_DVB:
         listMgr(PLAYLIST_DELETE, 0);
     case STREAMTYPE_FILE:
     case STREAMTYPE_STREAM:
@@ -175,6 +177,12 @@
         goto play;
 
 #endif
+#ifdef CONFIG_TV
+    case evPlayTV:
+        guiInfo.StreamType = guiTV[gui_tv_digital].StreamType;
+        goto play;
+
+#endif
     case evPlay:
     case evPlaySwitchToPause:
 play:
@@ -198,6 +206,8 @@
             case STREAMTYPE_CDDA:
             case STREAMTYPE_VCD:
             case STREAMTYPE_DVD:
+            case STREAMTYPE_TV:
+            case STREAMTYPE_DVB:
 
                 if (!guiInfo.Track)
                     guiInfo.Track = (guiInfo.StreamType == STREAMTYPE_VCD ? 2 : 1);
@@ -507,6 +517,8 @@
     if (guiInfo.StreamType != STREAMTYPE_CDDA &&
         guiInfo.StreamType != STREAMTYPE_VCD &&
         guiInfo.StreamType != STREAMTYPE_DVD &&
+        guiInfo.StreamType != STREAMTYPE_TV &&
+        guiInfo.StreamType != STREAMTYPE_DVB &&
         (!guiInfo.Filename || (guiInfo.Filename[0] == 0)))
         return;
 
@@ -721,6 +733,8 @@
     case STREAMTYPE_CDDA:
     case STREAMTYPE_VCD:
     case STREAMTYPE_DVD:
+    case STREAMTYPE_TV:
+    case STREAMTYPE_DVB:
 
         break;
 
@@ -786,6 +800,14 @@
 
         break;
 
+    case STREAMTYPE_TV:
+    case STREAMTYPE_DVB:
+
+        if (guiInfo.Playing == GUI_PLAY)
+            mp_input_queue_cmd(mp_input_parse_cmd("tv_step_channel -1"));
+
+        return;
+
     default:
 
         prev = listMgr(PLAYLIST_ITEM_GET_PREV, 0);
@@ -846,6 +868,14 @@
 
         break;
 
+    case STREAMTYPE_TV:
+    case STREAMTYPE_DVB:
+
+        if (guiInfo.Playing == GUI_PLAY)
+            mp_input_queue_cmd(mp_input_parse_cmd("tv_step_channel 1"));
+
+        return;
+
     default:
 
         next = listMgr(PLAYLIST_ITEM_GET_NEXT, 0);