linux/drivers/media/test-drivers/vidtv/vidtv_mux.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 multiplexer logic for TS packets from different
 * elementary streams
 *
 * Loosely based on libavcodec/mpegtsenc.c
 *
 * Copyright (C) 2020 Daniel W. S. Almeida
 */

#include <linux/delay.h>
#include <linux/dev_printk.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/math64.h>
#include <linux/ratelimit.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/vmalloc.h>

#include "vidtv_channel.h"
#include "vidtv_common.h"
#include "vidtv_encoder.h"
#include "vidtv_mux.h"
#include "vidtv_pes.h"
#include "vidtv_psi.h"
#include "vidtv_ts.h"

static struct vidtv_mux_pid_ctx
*vidtv_mux_get_pid_ctx(struct vidtv_mux *m, u16 pid)
{}

static struct vidtv_mux_pid_ctx
*vidtv_mux_create_pid_ctx_once(struct vidtv_mux *m, u16 pid)
{}

static void vidtv_mux_pid_ctx_destroy(struct vidtv_mux *m)
{}

static int vidtv_mux_pid_ctx_init(struct vidtv_mux *m)
{}

static void vidtv_mux_update_clk(struct vidtv_mux *m)
{}

static u32 vidtv_mux_push_si(struct vidtv_mux *m)
{}

static u32 vidtv_mux_push_pcr(struct vidtv_mux *m)
{}

static bool vidtv_mux_should_push_pcr(struct vidtv_mux *m)
{}

static bool vidtv_mux_should_push_si(struct vidtv_mux *m)
{}

static u32 vidtv_mux_packetize_access_units(struct vidtv_mux *m,
					    struct vidtv_encoder *e)
{}

static u32 vidtv_mux_poll_encoders(struct vidtv_mux *m)
{}

static u32 vidtv_mux_pad_with_nulls(struct vidtv_mux *m, u32 npkts)
{}

static void vidtv_mux_clear(struct vidtv_mux *m)
{}

#define ERR_RATE
static void vidtv_mux_tick(struct work_struct *work)
{}

void vidtv_mux_start_thread(struct vidtv_mux *m)
{}

void vidtv_mux_stop_thread(struct vidtv_mux *m)
{}

struct vidtv_mux *vidtv_mux_init(struct dvb_frontend *fe,
				 struct device *dev,
				 struct vidtv_mux_init_args *args)
{}

void vidtv_mux_destroy(struct vidtv_mux *m)
{}