pro = de->de_config->dvr_profile;
prch = malloc(sizeof(*prch));
- if (profile_chain_open(pro, prch, &de->de_config->dvr_muxcnf, 0, 0)) {
+ if (profile_chain_open(pro, prch, de->de_channel, &de->de_config->dvr_muxcnf, 0, 0)) {
tvherror("dvr", "unable to create new channel streaming chain for '%s'",
channel_get_name(de->de_channel));
return;
#endif
pro = profile_find_by_list(htsp->htsp_granted_access->aa_profiles, profile_id, "htsp");
- if (!profile_work(pro, &hs->hs_prch, &hs->hs_input, timeshiftPeriod, pflags)) {
+ if (!profile_work(pro, &hs->hs_prch, ch, &hs->hs_input, timeshiftPeriod, pflags)) {
tvhlog(LOG_ERR, "htsp", "unable to create profile chain '%s'", pro->pro_name);
free(hs);
return htsp_error("Stream setup error");
static int
profile_htsp_work(profile_t *_pro, profile_chain_t *prch,
- streaming_target_t *dst,
+ void *id, streaming_target_t *dst,
uint32_t timeshift_period, int flags)
{
if (!(flags & PRCH_FLAG_SKIPZEROING))
};
static int
-profile_mpegts_pass_open(profile_t *_pro, profile_chain_t *prch,
+profile_mpegts_pass_open(profile_t *_pro, profile_chain_t *prch, void *id,
muxer_config_t *m_cfg, int flags, size_t qsize)
{
profile_mpegts_t *pro = (profile_mpegts_t *)_pro;
};
static int
-profile_matroska_open(profile_t *_pro, profile_chain_t *prch,
+profile_matroska_open(profile_t *_pro, profile_chain_t *prch, void *id,
muxer_config_t *m_cfg, int flags, size_t qsize)
{
profile_matroska_t *pro = (profile_matroska_t *)_pro;
static int
profile_transcode_work(profile_t *_pro, profile_chain_t *prch,
- streaming_target_t *dst,
+ void *id, streaming_target_t *dst,
uint32_t timeshift_period, int flags)
{
profile_transcode_t *pro = (profile_transcode_t *)_pro;
}
static int
-profile_transcode_open(profile_t *_pro, profile_chain_t *prch,
+profile_transcode_open(profile_t *_pro, profile_chain_t *prch, void *id,
muxer_config_t *m_cfg, int flags, size_t qsize)
{
profile_transcode_t *pro = (profile_transcode_t *)_pro;
streaming_queue_init(&prch->prch_sq, 0, qsize);
prch->prch_gh = globalheaders_create(&prch->prch_sq.sq_st);
- r = profile_transcode_work(_pro, prch, prch->prch_gh, 0,
+ r = profile_transcode_work(_pro, prch, prch->prch_gh, id, 0,
PRCH_FLAG_SKIPZEROING | PRCH_FLAG_TSFIX);
if (r)
return r;
muxer_container_type_t (*pro_get_mc)(struct profile *pro);
int (*pro_work)(struct profile *pro, profile_chain_t *prch,
- struct streaming_target *dst,
+ void *id, struct streaming_target *dst,
uint32_t timeshift_period, int flags);
- int (*pro_open)(struct profile *pro, profile_chain_t *prch,
+ int (*pro_open)(struct profile *pro, profile_chain_t *prch, void *id,
muxer_config_t *m_cfg, int flags, size_t qsize);
} profile_t;
static inline int
profile_work(profile_t *pro, profile_chain_t *prch,
- struct streaming_target *dst,
+ void *id, struct streaming_target *dst,
uint32_t timeshift_period, int flags)
- { return pro && pro->pro_work ? pro->pro_work(pro, prch, dst, timeshift_period, flags) : -1; }
+ { return pro && pro->pro_work ? pro->pro_work(pro, prch, id, dst, timeshift_period, flags) : -1; }
static inline int
-profile_chain_open(profile_t *pro, profile_chain_t *prch,
+profile_chain_open(profile_t *pro, profile_chain_t *prch, void *id,
muxer_config_t *m_cfg, int flags, size_t qsize)
- { return pro && pro->pro_open ? pro->pro_open(pro, prch, m_cfg, flags, qsize) : -1; }
+ { return pro && pro->pro_open ? pro->pro_open(pro, prch, id, m_cfg, flags, qsize) : -1; }
int profile_chain_raw_open(profile_chain_t *prch, size_t qsize);
void profile_chain_close(profile_chain_t *prch);
else
qsize = 1500000;
- if (!profile_chain_open(pro, &prch, NULL, 0, qsize)) {
+ if (!profile_chain_open(pro, &prch, service, NULL, 0, qsize)) {
tcp_get_ip_str((struct sockaddr*)hc->hc_peer, addrbuf, 50);
else
qsize = 1500000;
- if (!profile_chain_open(pro, &prch, NULL, 0, qsize)) {
+ if (!profile_chain_open(pro, &prch, ch, NULL, 0, qsize)) {
tcp_get_ip_str((struct sockaddr*)hc->hc_peer, addrbuf, 50);