drivers/media/test-drivers/vidtv/vidtv_ts.h
Source file repositories/reference/linux-study-clean/drivers/media/test-drivers/vidtv/vidtv_ts.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/test-drivers/vidtv/vidtv_ts.h- Extension
.h- Size
- 2753 bytes
- Lines
- 107
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.h
Detected Declarations
struct vidtv_mpeg_ts_adaptionstruct vidtv_mpeg_tsstruct pcr_write_argsstruct null_packet_write_args
Annotated Snippet
struct vidtv_mpeg_ts_adaption {
u8 length;
struct {
u8 extension:1;
u8 private_data:1;
u8 splicing_point:1;
u8 OPCR:1;
u8 PCR:1;
u8 priority:1;
u8 random_access:1;
u8 discontinued:1;
} __packed;
u8 data[];
} __packed;
struct vidtv_mpeg_ts {
u8 sync_byte;
__be16 bitfield; /* tei: 1, payload_start:1 priority: 1, pid:13 */
struct {
u8 continuity_counter:4;
u8 payload:1;
u8 adaptation_field:1;
u8 scrambling:2;
} __packed;
} __packed;
/**
* struct pcr_write_args - Arguments for the pcr_write_into function.
* @dest_buf: The buffer to write into.
* @dest_offset: The byte offset into the buffer.
* @pid: The TS PID for the PCR packets.
* @buf_sz: The size of the buffer in bytes.
* @continuity_counter: The TS continuity_counter.
* @pcr: A sample from the system clock.
*/
struct pcr_write_args {
void *dest_buf;
u32 dest_offset;
u16 pid;
u32 buf_sz;
u8 *continuity_counter;
u64 pcr;
};
/**
* struct null_packet_write_args - Arguments for the null_write_into function
* @dest_buf: The buffer to write into.
* @dest_offset: The byte offset into the buffer.
* @buf_sz: The size of the buffer in bytes.
* @continuity_counter: The TS continuity_counter.
*/
struct null_packet_write_args {
void *dest_buf;
u32 dest_offset;
u32 buf_sz;
u8 *continuity_counter;
};
/* Increment the continuity counter */
void vidtv_ts_inc_cc(u8 *continuity_counter);
/**
* vidtv_ts_null_write_into - Write a TS null packet into a buffer.
* @args: the arguments to use when writing.
*
* This function will write a null packet into a buffer. This is usually used to
* pad TS streams.
*
* Return: The number of bytes written into the buffer.
*/
u32 vidtv_ts_null_write_into(const struct null_packet_write_args *args);
/**
* vidtv_ts_pcr_write_into - Write a PCR packet into a buffer.
* @args: the arguments to use when writing.
*
* This function will write a PCR packet into a buffer. This is used to
* synchronize the clocks between encoders and decoders.
*
* Return: The number of bytes written into the buffer.
*/
u32 vidtv_ts_pcr_write_into(const struct pcr_write_args *args);
#endif //VIDTV_TS_H
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct vidtv_mpeg_ts_adaption`, `struct vidtv_mpeg_ts`, `struct pcr_write_args`, `struct null_packet_write_args`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.