diff --git a/src/input/mpegts/mpegts_mux_sched.c b/src/input/mpegts/mpegts_mux_sched.c index 46ca4d18e..9e484cf7e 100644 --- a/src/input/mpegts/mpegts_mux_sched.c +++ b/src/input/mpegts/mpegts_mux_sched.c @@ -90,13 +90,13 @@ mpegts_mux_sched_class_mux_list ( void *o, const char *lang ) htsmsg_t *m, *p; p = htsmsg_create_map(); - htsmsg_add_str (p, "class", "mpegts_mux"); + htsmsg_add_str (p, "class", "mpegts_service"); htsmsg_add_bool(p, "enum", 1); m = htsmsg_create_map(); htsmsg_add_str (m, "type", "api"); htsmsg_add_str (m, "uri", "idnode/load"); - htsmsg_add_str (m, "event", "mpegts_mux"); + htsmsg_add_str (m, "event", "mpegts_service"); htsmsg_add_msg (m, "params", p); return m; @@ -142,9 +142,9 @@ const idclass_t mpegts_mux_sched_class = }, { .type = PT_STR, - .id = "mux", - .name = N_("Mux"), - .desc = N_("The mux to play when the entry is triggered."), + .id = "service", + .name = N_("Service"), + .desc = N_("The service to play when the entry is triggered."), .off = offsetof(mpegts_mux_sched_t, mms_mux), .list = mpegts_mux_sched_class_mux_list, }, @@ -161,9 +161,10 @@ const idclass_t mpegts_mux_sched_class = .type = PT_INT, .id = "timeout", .name = N_("Timeout (secs)"), - .desc = N_("The length of time (in seconds) to play the mux " + .desc = N_("The length of time (in seconds) to play the service " "(1 hour = 3600)."), .off = offsetof(mpegts_mux_sched_t, mms_timeout), + .def.i = 600, }, { .type = PT_BOOL, @@ -216,7 +217,7 @@ static streaming_ops_t mpegts_mux_sched_input_ops = { static void mpegts_mux_sched_timer ( void *p ) { - mpegts_mux_t *mm; + service_t *s; mpegts_mux_sched_t *mms = p; time_t nxt; @@ -228,9 +229,9 @@ mpegts_mux_sched_timer ( void *p ) if (!mms->mms_mux) return; - /* Find mux */ - if (!(mm = mpegts_mux_find(mms->mms_mux))) { - tvhdebug(LS_MUXSCHED, "mux has been removed, delete sched entry"); + /* Find service */ + if (!(s = service_find_by_uuid(mms->mms_mux))) { + tvhdebug(LS_MUXSCHED, "service has been removed, delete sched entry"); mpegts_mux_sched_delete(mms, 1); return; } @@ -241,13 +242,13 @@ mpegts_mux_sched_timer ( void *p ) if (!mms->mms_prch) mms->mms_prch = calloc(1, sizeof(*mms->mms_prch)); - mms->mms_prch->prch_id = mm; + mms->mms_prch->prch_id = s; mms->mms_prch->prch_st = &mms->mms_input; mms->mms_sub - = subscription_create_from_mux(mms->mms_prch, NULL, mms->mms_weight, + = subscription_create_from_service(mms->mms_prch, NULL, mms->mms_weight, mms->mms_creator ?: "", - SUBSCRIPTION_MINIMAL, + SUBSCRIPTION_CONTACCESS |SUBSCRIPTION_EMM, NULL, NULL, NULL, NULL); /* Failed (try-again soon) */ @@ -324,7 +325,7 @@ mpegts_mux_sched_create ( const char *uuid, htsmsg_t *conf ) idnode_load(&mms->mms_id, conf); /* Validate */ - if (!mpegts_mux_find(mms->mms_mux ?: "") || + if (!service_find_by_uuid(mms->mms_mux ?: "") || !mms->mms_cronstr) { mpegts_mux_sched_delete(mms, 1); return NULL;