if(LIST_FIRST(&ch->ch_transports) == NULL)
continue;
- epg_lock();
-
tcp_qprintf(tq, "<div style=\"float:left; width: 25%%\">");
snprintf(dispname, sizeof(dispname), "%s", ch->ch_name);
ajax_box_end(tq, AJAX_BOX_SIDEBOX);
tcp_qprintf(tq, "</div>");
- epg_unlock();
}
http_output_html(hc, hr);
event_t *e;
th_channel_t *ch;
- epg_lock();
-
LIST_FOREACH(ch, &channels, ch_global_link) {
e = ch->ch_epg_cur_event;
if(e == NULL)
if(autorec_cmp(ar, e))
autorec_tag(ar, e);
}
- epg_unlock();
}
if(ch == NULL)
return;
- epg_lock();
-
while(len >= 12) {
event_id = ptr[0] << 8 | ptr[1];
start_time = dvb_convert_date(&ptr[2]);
}
}
-
- epg_unlock();
}
#define EPG_HASH_ID_WIDTH 256
-static pthread_mutex_t epg_mutex = PTHREAD_MUTEX_INITIALIZER;
struct event_list epg_hash[EPG_HASH_ID_WIDTH];
static dtimer_t epg_channel_maintain_timer;
epg_content_group_t *epg_content_groups[16];
-void
-epg_lock(void)
-{
- pthread_mutex_lock(&epg_mutex);
-}
-
-void
-epg_unlock(void)
-{
- pthread_mutex_unlock(&epg_mutex);
-}
-
-
void
epg_event_set_title(event_t *e, const char *title)
{
now = dispatch_clock;
- epg_lock();
-
LIST_FOREACH(ch, &channels, ch_global_link) {
/* Age out any old events */
epg_locate_current_event(ch, now);
}
-
- epg_unlock();
-
}
event_t *e;
int cnt = 0;
- epg_lock();
-
-
if(strcmp(icon ?: "", ch->ch_icon ?: "")) {
free(ch->ch_icon);
ch->ch_icon = icon ? strdup(icon) : NULL;
e->e_content_type);
cnt++;
}
- epg_unlock();
}
static const char *groupnames[16] = {
void epg_init(void);
-void epg_lock(void);
-
-void epg_unlock(void);
-
event_t *epg_event_find_by_time0(struct event_queue *q, time_t start);
event_t *epg_event_find_by_time(th_channel_t *ch, time_t start);
if(argc < 2)
return 1;
- epg_lock();
-
if(!strcasecmp(argv[0], "tag"))
e = epg_event_find_by_tag(atoi(argv[1]));
if(!strcasecmp(argv[0], "now"))
e = epg_event_find_by_time(ch, atoi(argv[2]));
if(e == NULL) {
- epg_unlock();
return 1;
}
next,
pvrr != NULL ? pvrr->pvrr_status : HTSTV_PVR_STATUS_NONE);
- epg_unlock();
return 0;
}
if(argc < 1)
return 1;
- epg_lock();
-
e = epg_event_find_by_tag(atoi(argv[0]));
if(e == NULL) {
- epg_unlock();
return 1;
}
pvr_schedule_by_event(e, "htsclient");
- epg_unlock();
return 0;
}
out = htsmsg_create();
htsmsg_add_u32(out, "seq", ses->rs_seq);
- epg_lock();
-
if(htsmsg_get_u32(in, "tag", &u32) >= 0) {
e = epg_event_find_by_tag(u32);
} else if((s = htsmsg_get_str(in, "channel")) != NULL) {
htsmsg_add_u32(out, "pvrstatus", pvrr->pvrr_status);
}
- epg_unlock();
-
return out;
}