jpegparser: GStreamer Bad Plugins 1.0 Library Reference Manual

## jpegparser jpegparser |

## Functions

gboolean | gst_jpeg_parse ()
gboolean | gst_jpeg_segment_parse_frame_header ()
gboolean | gst_jpeg_segment_parse_scan_header ()
gboolean | gst_jpeg_segment_parse_huffman_table ()
gboolean | gst_jpeg_segment_parse_quantization_table ()
gboolean | gst_jpeg_segment_parse_restart_interval ()
void | gst_jpeg_get_default_quantization_tables ()
void | gst_jpeg_get_default_huffman_tables ()

## Types and Values

#define | GST_JPEG_MAX_FRAME_COMPONENTS
#define | GST_JPEG_MAX_SCAN_COMPONENTS
#define | GST_JPEG_MAX_QUANT_ELEMENTS
#define | GST_JPEG_MARKER_SOF_MIN
#define | GST_JPEG_MARKER_SOF_MAX
#define | GST_JPEG_MARKER_APP_MIN
#define | GST_JPEG_MARKER_APP_MAX
#define | GST_JPEG_MARKER_RST_MIN
#define | GST_JPEG_MARKER_RST_MAX
enum | GstJpegEntropyCodingMode
enum | GstJpegProfile
struct | GstJpegSegment
struct | GstJpegFrameHdr
struct | GstJpegFrameComponent
struct | GstJpegScanHdr
struct | GstJpegScanComponent
struct | GstJpegHuffmanTables
struct | GstJpegHuffmanTable
struct | GstJpegQuantTable

## Includes

    #include <gst/codecparsers/gstjpegparser.h>

## Description

## Functions

### gst_jpeg_parse ()

    gboolean
    gst_jpeg_parse (GstJpegSegment *seg,
                    const guint8 *data,
                    gsize size,
                    guint offset);

### gst_jpeg_segment_parse_frame_header ()

    gboolean
    gst_jpeg_segment_parse_frame_header (const GstJpegSegment *segment,
                                         GstJpegFrameHdr *frame_hdr);

### gst_jpeg_segment_parse_scan_header ()

    gboolean
    gst_jpeg_segment_parse_scan_header (const GstJpegSegment *segment,
                                        GstJpegScanHdr *scan_hdr);

### gst_jpeg_segment_parse_huffman_table ()

    gboolean
    gst_jpeg_segment_parse_huffman_table (const GstJpegSegment *segment,
                                          GstJpegHuffmanTables *huff_tables);

### gst_jpeg_segment_parse_quantization_table ()

    gboolean
    gst_jpeg_segment_parse_quantization_table
                                   (const GstJpegSegment *segment,
                                    GstJpegQuantTables *quant_tables);

### gst_jpeg_segment_parse_restart_interval ()

    gboolean
    gst_jpeg_segment_parse_restart_interval
                                   (const GstJpegSegment *segment,
                                    guint *interval);

### gst_jpeg_get_default_quantization_tables ()

    void
    gst_jpeg_get_default_quantization_tables
                                   (GstJpegQuantTables *quant_tables);

### gst_jpeg_get_default_huffman_tables ()

    void
    gst_jpeg_get_default_huffman_tables (GstJpegHuffmanTables *huff_tables);

## Types and Values

### GST_JPEG_MAX_FRAME_COMPONENTS

    #define GST_JPEG_MAX_FRAME_COMPONENTS   256

### GST_JPEG_MAX_SCAN_COMPONENTS

    #define GST_JPEG_MAX_SCAN_COMPONENTS    4

### GST_JPEG_MAX_QUANT_ELEMENTS

    #define GST_JPEG_MAX_QUANT_ELEMENTS     64

### GST_JPEG_MARKER_SOF_MIN

    #define GST_JPEG_MARKER_SOF_MIN GST_JPEG_MARKER_SOF0

### GST_JPEG_MARKER_SOF_MAX

    #define GST_JPEG_MARKER_SOF_MAX GST_JPEG_MARKER_SOF15

### GST_JPEG_MARKER_APP_MIN

    #define GST_JPEG_MARKER_APP_MIN GST_JPEG_MARKER_APP0

### GST_JPEG_MARKER_APP_MAX

    #define GST_JPEG_MARKER_APP_MAX GST_JPEG_MARKER_APP15

### GST_JPEG_MARKER_RST_MIN

    #define GST_JPEG_MARKER_RST_MIN GST_JPEG_MARKER_RST0

### GST_JPEG_MARKER_RST_MAX

    #define GST_JPEG_MARKER_RST_MAX GST_JPEG_MARKER_RST7

### enum GstJpegEntropyCodingMode

#### Members

GST_JPEG_ENTROPY_CODING_HUFFMAN |  |
GST_JPEG_ENTROPY_CODING_ARITHMETIC |  |

### enum GstJpegProfile

#### Members

GST_JPEG_PROFILE_BASELINE |  |
GST_JPEG_PROFILE_EXTENDED |  |
GST_JPEG_PROFILE_PROGRESSIVE |  |
GST_JPEG_PROFILE_LOSSLESS |  |

### struct GstJpegSegment

    struct GstJpegSegment {
      GstJpegMarker marker;
      const guint8 *data;
      guint offset;
      gssize size;
    };

### struct GstJpegFrameHdr

    struct GstJpegFrameHdr {
      guint8 sample_precision;              /* 2 .. 16      */
      guint16 width;                        /* 1 .. 65535   */
      guint16 height;                       /* 0 .. 65535   */
      guint8 num_components;                /* 1 .. 255     */
      GstJpegFrameComponent components[GST_JPEG_MAX_FRAME_COMPONENTS];
    };

### struct GstJpegFrameComponent

    struct GstJpegFrameComponent {
      guint8 identifier;                    /* 0 .. 255     */
      guint8 horizontal_factor;             /* 1 .. 4       */
      guint8 vertical_factor;               /* 1 .. 4       */
      guint8 quant_table_selector;          /* 0 .. 3       */
    };

### struct GstJpegScanHdr

    struct GstJpegScanHdr {
      guint8 num_components;                /* 1 .. 4       */
      GstJpegScanComponent components[GST_JPEG_MAX_SCAN_COMPONENTS];
    };

### struct GstJpegScanComponent

    struct GstJpegScanComponent {
        guint8 component_selector;          /* 0 .. 255     */
        guint8 dc_selector;                 /* 0 .. 3       */
        guint8 ac_selector;                 /* 0 .. 3       */
    };

### struct GstJpegHuffmanTables

    struct GstJpegHuffmanTables {
      GstJpegHuffmanTable dc_tables[GST_JPEG_MAX_SCAN_COMPONENTS];
      GstJpegHuffmanTable ac_tables[GST_JPEG_MAX_SCAN_COMPONENTS];
    };

### struct GstJpegHuffmanTable

    struct GstJpegHuffmanTable {
      guint8 huf_bits[16];
      guint8 huf_values[256];
      gboolean valid;
    };

### struct GstJpegQuantTable

    struct GstJpegQuantTable {
      guint8 quant_precision;
      guint16 quant_table[GST_JPEG_MAX_QUANT_ELEMENTS];
      gboolean valid;
    };