linux/drivers/media/test-drivers/vidtv/vidtv_channel.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Vidtv serves as a reference DVB driver and helps validate the existing APIs
 * in the media subsystem. It can also aid developers working on userspace
 * applications.
 *
 * This file contains the code for a 'channel' abstraction.
 *
 * When vidtv boots, it will create some hardcoded channels.
 * Their services will be concatenated to populate the SDT.
 * Their programs will be concatenated to populate the PAT
 * Their events will be concatenated to populate the EIT
 * For each program in the PAT, a PMT section will be created
 * The PMT section for a channel will be assigned its streams.
 * Every stream will have its corresponding encoder polled to produce TS packets
 * These packets may be interleaved by the mux and then delivered to the bridge
 *
 *
 * Copyright (C) 2020 Daniel W. S. Almeida
 */

#include <linux/dev_printk.h>
#include <linux/ratelimit.h>
#include <linux/slab.h>
#include <linux/types.h>

#include "vidtv_channel.h"
#include "vidtv_common.h"
#include "vidtv_encoder.h"
#include "vidtv_mux.h"
#include "vidtv_psi.h"
#include "vidtv_s302m.h"

static void vidtv_channel_encoder_destroy(struct vidtv_encoder *e)
{}

#define ENCODING_ISO8859_15
#define TS_NIT_PID

/*
 * init an audio only channel with a s302m encoder
 */
struct vidtv_channel
*vidtv_channel_s302m_init(struct vidtv_channel *head, u16 transport_stream_id)
{}

static struct vidtv_psi_table_eit_event
*vidtv_channel_eit_event_cat_into_new(struct vidtv_mux *m)
{}

static struct vidtv_psi_table_sdt_service
*vidtv_channel_sdt_serv_cat_into_new(struct vidtv_mux *m)
{}

static struct vidtv_psi_table_pat_program*
vidtv_channel_pat_prog_cat_into_new(struct vidtv_mux *m)
{}

/*
 * Match channels to their respective PMT sections, then assign the
 * streams
 */
static void
vidtv_channel_pmt_match_sections(struct vidtv_channel *channels,
				 struct vidtv_psi_table_pmt **sections,
				 u32 nsections)
{}

static void
vidtv_channel_destroy_service_list(struct vidtv_psi_desc_service_list_entry *e)
{}

static struct vidtv_psi_desc_service_list_entry
*vidtv_channel_build_service_list(struct vidtv_psi_table_sdt_service *s)
{}

int vidtv_channel_si_init(struct vidtv_mux *m)
{}

void vidtv_channel_si_destroy(struct vidtv_mux *m)
{}

int vidtv_channels_init(struct vidtv_mux *m)
{}

void vidtv_channels_destroy(struct vidtv_mux *m)
{}