Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mpegts: add mpegts_mux_t arg to mi_get_weight() callback
  • Loading branch information
perexg committed Apr 22, 2015
1 parent 89bb07f commit 6a110d8
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/input/mpegts.h
Expand Up @@ -640,7 +640,7 @@ struct mpegts_input
int (*mi_is_enabled) (mpegts_input_t*, mpegts_mux_t *mm, int flags);
void (*mi_enabled_updated)(mpegts_input_t*);
void (*mi_display_name) (mpegts_input_t*, char *buf, size_t len);
int (*mi_get_weight) (mpegts_input_t*, int flags);
int (*mi_get_weight) (mpegts_input_t*, mpegts_mux_t *mm, int flags);
int (*mi_get_priority) (mpegts_input_t*, mpegts_mux_t *mm, int flags);
int (*mi_get_grace) (mpegts_input_t*, mpegts_mux_t *mm);
int (*mi_warm_mux) (mpegts_input_t*,mpegts_mux_instance_t*);
Expand Down Expand Up @@ -836,7 +836,7 @@ void mpegts_input_recv_packets
(mpegts_input_t *mi, mpegts_mux_instance_t *mmi, sbuf_t *sb,
int64_t *pcr, uint16_t *pcr_pid);

int mpegts_input_get_weight ( mpegts_input_t *mi, int flags );
int mpegts_input_get_weight ( mpegts_input_t *mi, mpegts_mux_t *mm, int flags );
int mpegts_input_get_priority ( mpegts_input_t *mi, mpegts_mux_t *mm, int flags );
int mpegts_input_get_grace ( mpegts_input_t *mi, mpegts_mux_t *mm );

Expand Down
2 changes: 1 addition & 1 deletion src/input/mpegts/iptv/iptv.c
Expand Up @@ -127,7 +127,7 @@ iptv_input_is_free ( mpegts_input_t *mi )
}

static int
iptv_input_get_weight ( mpegts_input_t *mi, int flags )
iptv_input_get_weight ( mpegts_input_t *mi, mpegts_mux_t *mm, int flags )
{
int w = 0;
const th_subscription_t *ths;
Expand Down
4 changes: 2 additions & 2 deletions src/input/mpegts/linuxdvb/linuxdvb_frontend.c
Expand Up @@ -252,13 +252,13 @@ linuxdvb_frontend_enabled_updated ( mpegts_input_t *mi )
}

static int
linuxdvb_frontend_get_weight ( mpegts_input_t *mi, int flags )
linuxdvb_frontend_get_weight ( mpegts_input_t *mi, mpegts_mux_t *mm, int flags )
{
int weight = 0;
linuxdvb_adapter_t *la = ((linuxdvb_frontend_t*)mi)->lfe_adapter;
linuxdvb_frontend_t *lfe;
LIST_FOREACH(lfe, &la->la_frontends, lfe_link)
weight = MAX(weight, mpegts_input_get_weight((mpegts_input_t*)lfe, flags));
weight = MAX(weight, mpegts_input_get_weight((mpegts_input_t*)lfe, mm, flags));
return weight;
}

Expand Down
2 changes: 1 addition & 1 deletion src/input/mpegts/mpegts_input.c
Expand Up @@ -322,7 +322,7 @@ mpegts_input_display_name ( mpegts_input_t *mi, char *buf, size_t len )
}

int
mpegts_input_get_weight ( mpegts_input_t *mi, int flags )
mpegts_input_get_weight ( mpegts_input_t *mi, mpegts_mux_t *mm, int flags )
{
const service_t *s;
const th_subscription_t *ths;
Expand Down
2 changes: 1 addition & 1 deletion src/input/mpegts/mpegts_service.c
Expand Up @@ -286,7 +286,7 @@ mpegts_service_enlist(service_t *t, tvh_input_t *ti,
w = -1;
p = -1;
} else {
w = mi->mi_get_weight(mi, flags);
w = mi->mi_get_weight(mi, mmi->mmi_mux, flags);
p = mi->mi_get_priority(mi, mmi->mmi_mux, flags);
}

Expand Down
4 changes: 2 additions & 2 deletions src/input/mpegts/satip/satip_frontend.c
Expand Up @@ -357,9 +357,9 @@ const idclass_t satip_frontend_atsc_class =
* *************************************************************************/

static int
satip_frontend_get_weight ( mpegts_input_t *mi, int flags )
satip_frontend_get_weight ( mpegts_input_t *mi, mpegts_mux_t *mm, int flags )
{
return mpegts_input_get_weight(mi, flags);
return mpegts_input_get_weight(mi, mm, flags);
}

static int
Expand Down
4 changes: 2 additions & 2 deletions src/input/mpegts/tvhdhomerun/tvhdhomerun_frontend.c
Expand Up @@ -28,9 +28,9 @@ static void tvhdhomerun_device_open_pid(tvhdhomerun_frontend_t *hfe, mpegts_pid_
static mpegts_pid_t * tvhdhomerun_frontend_open_pid( mpegts_input_t *mi, mpegts_mux_t *mm, int pid, int type, void *owner );

static int
tvhdhomerun_frontend_get_weight ( mpegts_input_t *mi, int flags )
tvhdhomerun_frontend_get_weight ( mpegts_input_t *mi, mpegts_mux_t *mm, int flags )
{
return mpegts_input_get_weight(mi, flags);
return mpegts_input_get_weight(mi, mm, flags);
}

static int
Expand Down

0 comments on commit 6a110d8

Please sign in to comment.