#include "bouquet.h"
#include "tvhtime.h"
#include "packet.h"
+#include "streaming.h"
#include "memoryinfo.h"
#ifdef PLATFORM_LINUX
tvhthread_create(&mtimer_tick_tid, NULL, mtimer_tick_thread, NULL, "mtick");
tvhthread_create(&tasklet_tid, NULL, tasklet_thread, NULL, "tasklet");
+ streaming_init();
+
tvh_hardware_init();
dbus_server_init(opt_dbus, opt_dbus_session);
tvhlog(LOG_NOTICE, LS_STOP, "Exiting HTS Tvheadend");
tvhlog_end();
+ tvhftrace(LS_MAIN, streaming_done);
tvhftrace(LS_MAIN, config_done);
tvhftrace(LS_MAIN, hts_settings_done);
#include "service.h"
#include "timeshift.h"
+static memoryinfo_t streaming_msg_memoryinfo = { .my_name = "Streaming message" };
+
void
streaming_pad_init(streaming_pad_t *sp)
{
streaming_msg_create(streaming_message_type_t type)
{
streaming_message_t *sm = malloc(sizeof(streaming_message_t));
+ memoryinfo_alloc(&streaming_msg_memoryinfo, sizeof(*sm));
sm->sm_type = type;
#if ENABLE_TIMESHIFT
sm->sm_time = 0;
streaming_message_t *dst = malloc(sizeof(streaming_message_t));
streaming_start_t *ss;
+ memoryinfo_alloc(&streaming_msg_memoryinfo, sizeof(*dst));
+
dst->sm_type = src->sm_type;
#if ENABLE_TIMESHIFT
dst->sm_time = src->sm_time;
default:
abort();
}
+ memoryinfo_free(&streaming_msg_memoryinfo, sizeof(*sm));
free(sm);
}
return N_("Reserved");
}
+
+/*
+ *
+ */
+void streaming_init(void)
+{
+ memoryinfo_register(&streaming_msg_memoryinfo);
+}
+
+void streaming_done(void)
+{
+ pthread_mutex_lock(&global_lock);
+ memoryinfo_unregister(&streaming_msg_memoryinfo);
+ pthread_mutex_unlock(&global_lock);
+}
streaming_start_component_t *streaming_start_component_find_by_index(streaming_start_t *ss, int idx);
-
+void streaming_init(void);
+void streaming_done(void);
#endif /* STREAMING_H_ */