FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
rtpdec_jpeg.c File Reference
#include "avformat.h"
#include "avio_internal.h"
#include "rtpdec.h"
#include "rtpdec_formats.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/jpegtables.h"
#include "libavcodec/mjpeg.h"
#include "libavcodec/bytestream.h"

Go to the source code of this file.

Data Structures

struct  PayloadContext
 RTP/JPEG specific private data. More...
 

Functions

static void jpeg_close_context (PayloadContext *jpeg)
 
static int jpeg_create_huffman_table (PutByteContext *p, int table_class, int table_id, const uint8_t *bits_table, const uint8_t *value_table)
 
static void jpeg_put_marker (PutByteContext *pbc, int code)
 
static int jpeg_create_header (uint8_t *buf, int size, uint32_t type, uint32_t w, uint32_t h, const uint8_t *qtable, int nb_qtable, int dri)
 
static void create_default_qtables (uint8_t *qtables, uint8_t q)
 
static int jpeg_parse_packet (AVFormatContext *ctx, PayloadContext *jpeg, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
 

Variables

static const uint8_t default_quantizers [128]
 
RTPDynamicProtocolHandler ff_jpeg_dynamic_handler
 

Function Documentation

static void jpeg_close_context ( PayloadContext jpeg)
static

Definition at line 64 of file rtpdec_jpeg.c.

static int jpeg_create_huffman_table ( PutByteContext p,
int  table_class,
int  table_id,
const uint8_t bits_table,
const uint8_t value_table 
)
static

Definition at line 69 of file rtpdec_jpeg.c.

Referenced by jpeg_create_header().

static void jpeg_put_marker ( PutByteContext pbc,
int  code 
)
static

Definition at line 88 of file rtpdec_jpeg.c.

Referenced by jpeg_create_header().

static int jpeg_create_header ( uint8_t buf,
int  size,
uint32_t  type,
uint32_t  w,
uint32_t  h,
const uint8_t qtable,
int  nb_qtable,
int  dri 
)
static

Definition at line 94 of file rtpdec_jpeg.c.

Referenced by jpeg_parse_packet().

static void create_default_qtables ( uint8_t qtables,
uint8_t  q 
)
static

Definition at line 192 of file rtpdec_jpeg.c.

Referenced by jpeg_parse_packet().

static int jpeg_parse_packet ( AVFormatContext ctx,
PayloadContext jpeg,
AVStream st,
AVPacket pkt,
uint32_t *  timestamp,
const uint8_t buf,
int  len,
uint16_t  seq,
int  flags 
)
static

Definition at line 214 of file rtpdec_jpeg.c.

Variable Documentation

const uint8_t default_quantizers[128]
static
Initial value:
= {
16, 11, 12, 14, 12, 10, 16, 14,
13, 14, 18, 17, 16, 19, 24, 40,
26, 24, 22, 22, 24, 49, 35, 37,
29, 40, 58, 51, 61, 60, 57, 51,
56, 55, 64, 72, 92, 78, 64, 68,
87, 69, 55, 56, 80, 109, 81, 87,
95, 98, 103, 104, 103, 62, 77, 113,
121, 112, 100, 120, 92, 101, 103, 99,
17, 18, 18, 24, 21, 24, 47, 26,
26, 47, 99, 66, 56, 66, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99
}

Definition at line 42 of file rtpdec_jpeg.c.

Referenced by create_default_qtables().

RTPDynamicProtocolHandler ff_jpeg_dynamic_handler
Initial value:
= {
.enc_name = "JPEG",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_MJPEG,
.priv_data_size = sizeof(PayloadContext),
.static_payload_id = 26,
}
RTP/JPEG specific private data.
Definition: rdt.c:83
static void jpeg_close_context(PayloadContext *jpeg)
Definition: rtpdec_jpeg.c:64
static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
Definition: rtpdec_jpeg.c:214
static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index)
Parse a packet, add all split parts to parse_queue.
Definition: utils.c:1392

Definition at line 382 of file rtpdec_jpeg.c.

Referenced by ff_register_rtp_dynamic_payload_handlers().