diff --git a/htsclient.c b/htsclient.c index 6f990ee8..9ff5d60b 100644 --- a/htsclient.c +++ b/htsclient.c @@ -412,7 +412,7 @@ cr_channel_subscribe(client_t *c, char **argv, int argc) if((ch = channel_by_index(chindex)) == NULL) return 1; - s = channel_subscribe(ch, c, client_ip_streamer, weight, "client"); + s = subscription_create(ch, c, client_ip_streamer, weight, "client"); if(s == NULL) return 1; diff --git a/iptv_output.c b/iptv_output.c index 30064df8..485ad9ee 100644 --- a/iptv_output.c +++ b/iptv_output.c @@ -135,7 +135,7 @@ output_multicast_load(struct config_head *head) syslog(LOG_INFO, "Static multicast output: \"%s\" to %s, source %s ", ch->ch_name, title, inet_ntoa(sin.sin_addr)); - channel_subscribe(ch, om, om_ip_streamer, 900, title); + subscription_create(ch, om, om_ip_streamer, 900, title); return; diff --git a/pvr.c b/pvr.c index 1b773833..eb36e629 100644 --- a/pvr.c +++ b/pvr.c @@ -518,8 +518,8 @@ pvrr_fsm(pvr_rec_t *pvrr) pthread_cond_init(&pvrr->pvrr_dq_cond, NULL); pthread_mutex_init(&pvrr->pvrr_dq_mutex, NULL); - pvrr->pvrr_s = channel_subscribe(pvrr->pvrr_channel, pvrr, - pvr_record_callback, 1000, "pvr"); + pvrr->pvrr_s = subscription_create(pvrr->pvrr_channel, pvrr, + pvr_record_callback, 1000, "pvr"); pvrr->pvrr_status = HTSTV_PVR_STATUS_RECORDING; pvr_inform_status_change(pvrr); diff --git a/rtsp.c b/rtsp.c index f4282336..923fb44e 100644 --- a/rtsp.c +++ b/rtsp.c @@ -209,8 +209,8 @@ rtsp_session_create(th_channel_t *ch, struct sockaddr_in *dst) rtp_streamer_init(&rs->rs_rtp_streamer, rs->rs_fd[0], dst); - rs->rs_s = channel_subscribe(ch, &rs->rs_rtp_streamer, - rtp_streamer, 600, "RTSP"); + rs->rs_s = subscription_create(ch, &rs->rs_rtp_streamer, + rtp_streamer, 600, "RTSP"); return rs; } diff --git a/transports.c b/transports.c index 86818ba2..1ec67cd1 100644 --- a/transports.c +++ b/transports.c @@ -251,11 +251,11 @@ subscription_sort(th_subscription_t *a, th_subscription_t *b) th_subscription_t * -channel_subscribe(th_channel_t *ch, void *opaque, - void (*callback)(struct th_subscription *s, - uint8_t *pkt, th_pid_t *pi, int64_t pcr), - unsigned int weight, - const char *name) +subscription_create(th_channel_t *ch, void *opaque, + void (*callback)(struct th_subscription *s, + uint8_t *pkt, th_pid_t *pi, int64_t pcr), + unsigned int weight, + const char *name) { th_subscription_t *s; diff --git a/transports.h b/transports.h index 49acd261..198681f3 100644 --- a/transports.h +++ b/transports.h @@ -44,14 +44,14 @@ void transport_link(th_transport_t *t, th_channel_t *ch); void transport_scheduler_init(void); +typedef void (subscription_callback_t)(struct th_subscription *s, + uint8_t *pkt, th_pid_t *pi, + int64_t pcr); -th_subscription_t *channel_subscribe(th_channel_t *ch, void *opaque, - void (*ths_callback) - (struct th_subscription *s, - uint8_t *pkt, th_pid_t *pi, - int64_t pcr), - unsigned int weight, - const char *name); +th_subscription_t *subscription_create(th_channel_t *ch, void *opaque, + subscription_callback_t *ths_callback, + unsigned int weight, + const char *name); #endif /* TRANSPORTS_H */