subscription: change some hardcoded to prioties to defines
This commit is contained in:
parent
2c612051f8
commit
d160e7425a
5 changed files with 13 additions and 5 deletions
|
@ -323,7 +323,7 @@ epggrab_ota_pending_timer_cb ( void *p )
|
|||
epggrab_ota_start(om);
|
||||
|
||||
/* Subscribe to the mux */
|
||||
if (mpegts_mux_subscribe(mm, "epggrab", 2)) {
|
||||
if (mpegts_mux_subscribe(mm, "epggrab", SUBSCRIPTION_PRIO_EPG)) {
|
||||
LIST_REMOVE(om, om_q_link);
|
||||
om->om_active = 0;
|
||||
om->om_when = dispatch_clock + epggrab_ota_period(om) / 2;
|
||||
|
|
|
@ -1468,8 +1468,9 @@ htsp_method_unsubscribe(htsp_connection_t *htsp, htsmsg_t *in)
|
|||
return NULL; /* Subscription did not exist, but we don't really care */
|
||||
|
||||
s->hs_unsubscribe = 1;
|
||||
subscription_change_weight(s->hs_s, 10); // fake unsubscribe (Note: don't set to 0 else other
|
||||
// background tasks could steal the tuner)
|
||||
subscription_change_weight(s->hs_s, SUBSCRIPTION_PRIO_MIN);
|
||||
// Note: fake unsubscribe (Note: don't set to 0 else other
|
||||
// background tasks could steal the tuner)
|
||||
gtimer_arm(&htsp->htsp_timer, htsp_unsubscribe_timer, htsp, 2);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ mpegts_network_initial_scan(void *aux)
|
|||
if (mm == mark) break;
|
||||
|
||||
assert(mm->mm_initial_scan_status == MM_SCAN_PENDING);
|
||||
r = mpegts_mux_subscribe(mm, "initscan", 1);
|
||||
r = mpegts_mux_subscribe(mm, "initscan", SUBSCRIPTION_PRIO_SCAN);
|
||||
|
||||
/* Stop scanning here */
|
||||
if (r == SM_CODE_NO_FREE_ADAPTER)
|
||||
|
|
|
@ -283,7 +283,8 @@ service_mapper_thread ( void *aux )
|
|||
|
||||
/* Subscribe */
|
||||
tvhinfo("service_mapper", "%s: checking availability", s->s_nicename);
|
||||
sub = subscription_create_from_service(s, 3, "service_mapper", &sq.sq_st,
|
||||
sub = subscription_create_from_service(s, SUBSCRIPTION_PRIO_MAPPER,
|
||||
"service_mapper", &sq.sq_st,
|
||||
0, NULL, NULL, "service_mapper");
|
||||
|
||||
/* Failed */
|
||||
|
|
|
@ -27,6 +27,12 @@ extern struct th_subscription_list subscriptions;
|
|||
#define SUBSCRIPTION_NONE 0x2
|
||||
#define SUBSCRIPTION_FULLMUX 0x4
|
||||
|
||||
/* Some internal prioties */
|
||||
#define SUBSCRIPTION_PRIO_SCAN 1
|
||||
#define SUBSCRIPTION_PRIO_EPG 2
|
||||
#define SUBSCRIPTION_PRIO_MAPPER 3
|
||||
#define SUBSCRIPTION_PRIO_MIN 10
|
||||
|
||||
typedef struct th_subscription {
|
||||
|
||||
int ths_id;
|
||||
|
|
Loading…
Add table
Reference in a new issue