]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
streaming: add SMT_NOSTART_WARN for HTSP, fixes #2771
authorJaroslav Kysela <perex@perex.cz>
Tue, 22 Sep 2015 08:33:48 +0000 (10:33 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 22 Sep 2015 08:33:48 +0000 (10:33 +0200)
12 files changed:
src/dvr/dvr_rec.c
src/htsp_server.c
src/plumbing/globalheaders.c
src/plumbing/transcoding.c
src/plumbing/tsfix.c
src/satip/rtp.c
src/streaming.c
src/subscriptions.c
src/timeshift/timeshift_reader.c
src/timeshift/timeshift_writer.c
src/tvheadend.h
src/webui/webui.c

index 027c2db2633e8405b14a5afc67cadfff3b5e0e21..a5e531f70a17dcfa49a764c81f9382bdf48f633f 100644 (file)
@@ -1075,6 +1075,7 @@ dvr_thread(void *aux)
       break;
 
     case SMT_GRACE:
+    case SMT_NOSTART_WARN:
     case SMT_SPEED:
     case SMT_SKIP:
     case SMT_SIGNAL_STATUS:
index 063741d154824942d7049de0de75a3257de9ecad..fd25b5f2b312a761fac30e1cabd0c1882ce8ed0f 100644 (file)
@@ -3798,6 +3798,7 @@ htsp_streaming_input(void *opaque, streaming_message_t *sm)
     break;
 
   case SMT_NOSTART:
+  case SMT_NOSTART_WARN:
     htsp_subscription_status(hs,  streaming_code2txt(sm->sm_code),
         sm->sm_code ? _htsp_get_subscription_status(sm->sm_code) : NULL);
     break;
index 010f59dcc5471ba2cd1a4d1aa59b466bfa7ef48f..75e8d08cc3c1e422998f6c18b1e18ae59af4ef52 100644 (file)
@@ -331,6 +331,7 @@ gh_hold(globalheaders_t *gh, streaming_message_t *sm)
   case SMT_SERVICE_STATUS:
   case SMT_SIGNAL_STATUS:
   case SMT_NOSTART:
+  case SMT_NOSTART_WARN:
   case SMT_MPEGTS:
   case SMT_SPEED:
   case SMT_SKIP:
@@ -366,6 +367,7 @@ gh_pass(globalheaders_t *gh, streaming_message_t *sm)
   case SMT_SERVICE_STATUS:
   case SMT_SIGNAL_STATUS:
   case SMT_NOSTART:
+  case SMT_NOSTART_WARN:
   case SMT_MPEGTS:
   case SMT_SKIP:
   case SMT_SPEED:
index d4af38780a418d1bd17964d331caa5ac65a214ae..49469bb3d99fadc9aebe54a3bdee46f240f162fe 100644 (file)
@@ -1832,6 +1832,7 @@ transcoder_input(void *opaque, streaming_message_t *sm)
   case SMT_SERVICE_STATUS:
   case SMT_SIGNAL_STATUS:
   case SMT_NOSTART:
+  case SMT_NOSTART_WARN:
   case SMT_MPEGTS:
     streaming_target_deliver2(t->t_output, sm);
     break;
index 622ea1b7b8d6c90413b72b4fffa02de2acb28042..08614401f001d70c08db7014cae4a4bf78361ba8 100644 (file)
@@ -549,6 +549,7 @@ tsfix_input(void *opaque, streaming_message_t *sm)
   case SMT_SERVICE_STATUS:
   case SMT_SIGNAL_STATUS:
   case SMT_NOSTART:
+  case SMT_NOSTART_WARN:
   case SMT_MPEGTS:
   case SMT_SPEED:
   case SMT_SKIP:
index dc524fe5b2262ad13af607b49eb5313600f55e61..dd4835bb041edc9eb886102b385091ae096ee061 100644 (file)
@@ -210,6 +210,7 @@ satip_rtp_thread(void *aux)
 
     case SMT_START:
     case SMT_STOP:
+    case SMT_NOSTART_WARN:
     case SMT_PACKET:
     case SMT_GRACE:
     case SMT_SKIP:
index d68637d929dea8255a973dd9b898c9bcb6e0432e..0b822564371239044ae88e8774112469dd39b70b 100644 (file)
@@ -270,6 +270,7 @@ streaming_msg_clone(streaming_message_t *src)
   case SMT_STOP:
   case SMT_SERVICE_STATUS:
   case SMT_NOSTART:
+  case SMT_NOSTART_WARN:
     dst->sm_code = src->sm_code;
     break;
 
@@ -331,6 +332,7 @@ streaming_msg_free(streaming_message_t *sm)
   case SMT_EXIT:
   case SMT_SERVICE_STATUS:
   case SMT_NOSTART:
+  case SMT_NOSTART_WARN:
   case SMT_SPEED:
     break;
 
index 30894e13f8f423caf9baabf504851fe4f9bf9785..b9118e2d17a1a76d4993f598ac7ae32ca5aa50fc 100644 (file)
@@ -366,6 +366,8 @@ subscription_reschedule(void)
         s->ths_testing_error = 0;
         s->ths_current_instance = NULL;
         service_instance_list_clear(&s->ths_instances);
+        sm = streaming_msg_create_code(SMT_NOSTART_WARN, error);
+        streaming_target_deliver(s->ths_output, sm);
         continue;
       }
       /* No service available */
index 162ec781ed220a1f6dc97191d88c52b8fe9fbff0..b3af8b5c0687330215b7ae9e7e5bd9b3d90aa1d3 100644 (file)
@@ -135,6 +135,7 @@ static ssize_t _read_msg ( timeshift_file_t *tsf, int fd, streaming_message_t **
     /* Unhandled */
     case SMT_START:
     case SMT_NOSTART:
+    case SMT_NOSTART_WARN:
     case SMT_SERVICE_STATUS:
       return -1;
       break;
index 61d3989af1cb9c87731a31730a54e06912977d02..3c4ccb5683cd0619aaad305f015dbcd4cda9053b 100644 (file)
@@ -308,6 +308,7 @@ static void _process_msg
     /* Status */
     case SMT_GRACE:
     case SMT_NOSTART:
+    case SMT_NOSTART_WARN:
     case SMT_SERVICE_STATUS:
     case SMT_TIMESHIFT_STATUS:
       break;
index 4fb6c0ff9d92b001bc309ed93d3a469458662474..05d5b2b6ec3ff6610da47bbcd55e64fe58ce4905 100644 (file)
@@ -389,6 +389,13 @@ typedef enum {
    */
   SMT_NOSTART,
 
+  /**
+   * Streaming unable to start (non-fatal).
+   *
+   * sm_code indicates reason. Scheduler will try to restart
+   */
+  SMT_NOSTART_WARN,
+
   /**
    * Raw MPEG TS data
    */
index 1005af7ef5a640efd62e1dbc98290457e30d3a21..bc64f8c4ec3eb728b0f021477fe0c5158dc5a1be 100644 (file)
@@ -425,6 +425,7 @@ http_stream_run(http_connection_t *hc, profile_chain_t *prch,
       }
       break;
 
+    case SMT_NOSTART_WARN:
     case SMT_SKIP:
     case SMT_SPEED:
     case SMT_SIGNAL_STATUS: