linux/drivers/media/test-drivers/vidtv/vidtv_pes.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 logic to translate the ES data for one access unit
 * from an encoder into MPEG TS packets. It does so by first encapsulating it
 * with a PES header and then splitting it into TS packets.
 *
 * Copyright (C) 2020 Daniel W. S. Almeida
 */

#define pr_fmt(fmt)

#include <linux/types.h>
#include <linux/math64.h>
#include <linux/printk.h>
#include <linux/ratelimit.h>

#include "vidtv_pes.h"
#include "vidtv_common.h"
#include "vidtv_encoder.h"
#include "vidtv_ts.h"

#define PRIVATE_STREAM_1_ID
#define PES_HEADER_MAX_STUFFING_BYTES
#define PES_TS_HEADER_MAX_STUFFING_BYTES

static u32 vidtv_pes_op_get_len(bool send_pts, bool send_dts)
{}

#define SIZE_PCR

static u32 vidtv_pes_h_get_len(bool send_pts, bool send_dts)
{}

static u32 vidtv_pes_write_header_stuffing(struct pes_header_write_args *args)
{}

static u32 vidtv_pes_write_pts_dts(struct pes_header_write_args *args)
{}

static u32 vidtv_pes_write_h(struct pes_header_write_args *args)
{}

static u32 vidtv_pes_write_pcr_bits(u8 *to, u32 to_offset, u64 pcr)
{}

static u32 vidtv_pes_write_stuffing(struct pes_ts_header_write_args *args,
				    u32 dest_offset, bool need_pcr,
				    u64 *last_pcr)
{}

static u32 vidtv_pes_write_ts_h(struct pes_ts_header_write_args args,
				bool need_pcr, u64 *last_pcr)
{}

u32 vidtv_pes_write_into(struct pes_write_args *args)
{}