|
Compy 0.2.0
A lightweight RTSP 1.0 server library for embedded systems
|
An RTP/JPEG data transport. More...
#include <compy/droppable.h>#include <compy/rtp_transport.h>#include <stdbool.h>#include <stddef.h>#include <slice99.h>#include <compy/priv/compiler_attrs.h>

Go to the source code of this file.
Data Structures | |
| struct | Compy_JpegTransportConfig |
| The configuration structure for Compy_JpegTransport. More... | |
Macros | |
| #define | COMPY_JPEG_DEFAULT_MAX_FRAGMENT_SIZE 1200 |
| The default value for Compy_JpegTransportConfig.max_fragment_size. | |
Typedefs | |
| typedef struct Compy_JpegTransport | Compy_JpegTransport |
| An RTP/JPEG data transport. | |
Functions | |
| Compy_JpegTransportConfig | Compy_JpegTransportConfig_default (void) COMPY_PRIV_MUST_USE |
| Returns the default Compy_JpegTransportConfig. | |
| Compy_JpegTransport * | Compy_JpegTransport_new (Compy_RtpTransport *t) COMPY_PRIV_MUST_USE |
| Creates a new RTP/JPEG transport with the default configuration. | |
| Compy_JpegTransport * | Compy_JpegTransport_new_with_config (Compy_RtpTransport *t, Compy_JpegTransportConfig config) COMPY_PRIV_MUST_USE |
| Creates a new RTP/JPEG transport with a custom configuration. | |
| int | Compy_JpegTransport_send_frame (Compy_JpegTransport *self, Compy_RtpTimestamp ts, U8Slice99 jpeg_frame) COMPY_PRIV_MUST_USE |
| Sends a complete JPEG frame as one or more RTP packets. | |
| bool | Compy_JpegTransport_is_full (Compy_JpegTransport *self) |
| Returns whether the underlying transport's send buffer is full. | |
| declImplExtern99 (Compy_Droppable, Compy_JpegTransport) | |
| Implements Compy_Droppable_IFACE for Compy_JpegTransport. | |
An RTP/JPEG data transport.
Packetizes baseline JPEG frames into RTP packets per RFC 2435. Supports YUV 4:2:0 and 4:2:2 subsampling, custom quantization tables (Q=255), and restart marker intervals (DRI).
| bool Compy_JpegTransport_is_full | ( | Compy_JpegTransport * | self | ) |
Returns whether the underlying transport's send buffer is full.
self != NULL | Compy_JpegTransport * Compy_JpegTransport_new | ( | Compy_RtpTransport * | t | ) |
Creates a new RTP/JPEG transport with the default configuration.
| [in] | t | The underlying RTP transport (payload type 26, clock 90000 Hz). |
t != NULL | Compy_JpegTransport * Compy_JpegTransport_new_with_config | ( | Compy_RtpTransport * | t, |
| Compy_JpegTransportConfig | config | ||
| ) |
Creates a new RTP/JPEG transport with a custom configuration.
| [in] | t | The underlying RTP transport (payload type 26, clock 90000 Hz). |
| [in] | config | The transmission configuration structure. |
t != NULL | int Compy_JpegTransport_send_frame | ( | Compy_JpegTransport * | self, |
| Compy_RtpTimestamp | ts, | ||
| U8Slice99 | jpeg_frame | ||
| ) |
Sends a complete JPEG frame as one or more RTP packets.
The frame is parsed to extract dimensions, quantization tables, and scan data. Scan data is fragmented according to the configured max_fragment_size. The RTP marker bit is set on the last fragment.
Only baseline DCT JPEG (SOF0) is supported. Custom quantization tables are always sent in-band (Q=255 per RFC 2435 Section 3.1.8).
| [out] | self | The RTP/JPEG transport. |
| [in] | ts | The RTP timestamp for this frame. |
| [in] | jpeg_frame | The complete JPEG frame (SOI through EOI). |
self != NULL| Compy_JpegTransportConfig Compy_JpegTransportConfig_default | ( | void | ) |
Returns the default Compy_JpegTransportConfig.
The default values are:
max_fragment_size is COMPY_JPEG_DEFAULT_MAX_FRAGMENT_SIZE. | declImplExtern99 | ( | Compy_Droppable | , |
| Compy_JpegTransport | |||
| ) |
Implements Compy_Droppable_IFACE for Compy_JpegTransport.
See Interface99 for the macro usage.