SmolRTSP 0.2.0
A small, portable, extensible RTSP 1.0 implementation in C99
Loading...
Searching...
No Matches
jpeg_transport.h
Go to the documentation of this file.
1
9#pragma once
10
11#include <smolrtsp/droppable.h>
12#include <smolrtsp/jpeg.h>
14
15#include <stdbool.h>
16#include <stddef.h>
17#include <stdint.h>
18
19#include <slice99.h>
20
21#include <smolrtsp/priv/compiler_attrs.h>
22
37
43SmolRTSP_JpegTransportConfig_default(void) SMOLRTSP_PRIV_MUST_USE;
44
49
65typedef struct {
76 U8Slice99 qt0;
81 U8Slice99 qt1;
87 U8Slice99 scan_data;
89
99
111 SmolRTSP_JpegTransportConfig config) SMOLRTSP_PRIV_MUST_USE;
112
140 SmolRTSP_JpegTransport *self, SmolRTSP_RtpTimestamp ts,
141 SmolRTSP_JpegFrame frame) SMOLRTSP_PRIV_MUST_USE;
142
150
151bool SmolRTSP_JpegTransport_is_full(SmolRTSP_JpegTransport *self);
Droppable types support.
JPEG / Motion JPEG RTP payload-header types and serialization.
SmolRTSP_JpegTransport * SmolRTSP_JpegTransport_new(SmolRTSP_RtpTransport *t) SMOLRTSP_PRIV_MUST_USE
Creates a new RTP/JPEG transport with the default configuration.
int SmolRTSP_JpegTransport_send_frame(SmolRTSP_JpegTransport *self, SmolRTSP_RtpTimestamp ts, SmolRTSP_JpegFrame frame) SMOLRTSP_PRIV_MUST_USE
Sends one Motion-JPEG frame as a sequence of RTP packets.
SmolRTSP_JpegTransportConfig SmolRTSP_JpegTransportConfig_default(void) SMOLRTSP_PRIV_MUST_USE
Returns the default SmolRTSP_JpegTransportConfig (SMOLRTSP_MAX_JPEG_PACKET_SIZE).
SmolRTSP_JpegTransport * SmolRTSP_JpegTransport_new_with_config(SmolRTSP_RtpTransport *t, SmolRTSP_JpegTransportConfig config) SMOLRTSP_PRIV_MUST_USE
Creates a new RTP/JPEG transport with a custom configuration.
declImplExtern99(SmolRTSP_Droppable, SmolRTSP_JpegTransport)
Implements SmolRTSP_Droppable_IFACE for SmolRTSP_JpegTransport.
struct SmolRTSP_JpegTransport SmolRTSP_JpegTransport
An RTP/JPEG data transport.
Definition jpeg_transport.h:48
An RTP data transport.
struct SmolRTSP_RtpTransport SmolRTSP_RtpTransport
An RTP data transport.
Definition rtp_transport.h:22
One Motion-JPEG frame, ready to packetize per RFC 2435.
Definition jpeg_transport.h:65
U8Slice99 qt1
Second quantization table, typically 64 bytes.
Definition jpeg_transport.h:81
U8Slice99 scan_data
JPEG entropy-coded scan data (the bytes after the SOS marker, not including the trailing EOI).
Definition jpeg_transport.h:87
SmolRTSP_JpegPayloadHeader hdr
Per-frame fields of the RFC 2435 main header: type, q, width_blocks, height_blocks,...
Definition jpeg_transport.h:71
U8Slice99 qt0
First quantization table, typically 64 bytes (8-bit baseline).
Definition jpeg_transport.h:76
An RFC 2435 main JPEG header (ยง3.1).
Definition jpeg.h:71
The configuration structure for SmolRTSP_JpegTransport.
Definition jpeg_transport.h:26
size_t max_packet_size
Maximum size in bytes of the RTP payload (i.e.
Definition jpeg_transport.h:35