tsfile: some hacking to create channels.

This commit is contained in:
Adam Sutton 2013-04-29 09:39:13 +01:00
parent 7efc74c119
commit 844b65a840
2 changed files with 11 additions and 0 deletions

View file

@ -17,7 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "tvheadend.h"
#include "input.h"
#include "channels.h"
#include "tsfile.h"
#include "tsfile_private.h"
@ -43,9 +45,16 @@ static mpegts_service_t *
tsfile_network_create_service
( mpegts_mux_t *mm, uint16_t sid, uint16_t pmt_pid )
{
static int t = 0;
mpegts_service_t *s = mpegts_service_create0(sizeof(mpegts_service_t),
&mpegts_service_class,
NULL, mm, sid, pmt_pid);
if (s) {
char buf[128];
sprintf(buf, "channel-%d", t);
channel_t *c = channel_find_by_name(buf, 1, t);
service_map_channel((service_t*)s, c, 1);
}
return s;
}

View file

@ -167,8 +167,10 @@ tsfile_input_start_mux ( mpegts_input_t *mi, mpegts_mux_instance_t *t )
printf("tsfile_input_start_mux(%p, %p)\n", mi, t);
/* Already tuned */
#if 0
assert(mmi->mmi_mux->mm_active == NULL);
assert(LIST_FIRST(&mi->mi_mux_active) == NULL);
#endif
/* Check file is accessible */
if (lstat(mmi->mmi_tsfile_path, &st)) {