Merging gst-plugins-bad
[platform/upstream/gstreamer.git] / gst / mpegtsmux / gstbasetsmuxjpeg2000.h
1 /* GStreamer JPEG 2000 Parser
2  *
3  * Copyright (C) <2016> Milos Seleceni
4  *  @author Milos Seleceni <milos.seleceni@comprimato.com>
5  *
6  * Copyright (C) <2016-2017> Grok Image Compression Inc.
7  *  @author Aaron Boxer <boxerab@gmail.com>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Library General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Library General Public License for more details.
18  *
19  * You should have received a copy of the GNU Library General Public
20  * License along with this library; if not, write to the
21  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  *
24  * SPDX-License-Identifier: LGPL-2.0-or-later
25  */
26
27 #ifndef __BASETSMUX_JPEG2000_H__
28 #define __BASETSMUX_JPEG2000_H__
29
30 #include "gstbasetsmux.h"
31
32 /* color specifications for JPEG 2000 stream over MPEG TS */
33 typedef enum
34 {
35   GST_MPEGTS_JPEG2000_COLORSPEC_UNKNOWN,
36   GST_MPEGTS_JPEG2000_COLORSPEC_SRGB,
37   GST_MPEGTS_JPEG2000_COLORSPEC_REC601,
38   GST_MPEGTS_JPEG2000_COLORSPEC_REC709,
39   GST_MPEGTS_JPEG2000_COLORSPEC_CIELUV,
40   GST_MPEGTS_JPEG2000_COLORSPEC_CIEXYZ,
41   GST_MPEGTS_JPEG2000_COLORSPEC_REC2020,
42   GST_MPEGTS_JPEG2000_COLORSPEC_SMPTE2084
43 } GstGstBaseTsJpeg2000ColorSpec;
44
45
46 typedef struct j2k_private_data
47 {
48   gboolean interlace;
49   guint16 den;
50   guint16 num;
51   /* Maximum bitrate box */
52   guint32 max_bitrate;
53   /* Field Coding Box */
54   guint8 Fic;
55   guint8 Fio;
56   /* Broadcast color box */
57   guint8 color_spec;
58 } j2k_private_data;
59
60 GstBuffer *gst_base_ts_mux_prepare_jpeg2000 (GstBuffer * buf, GstBaseTsMuxPad * pad,
61     GstBaseTsMux * mux);
62
63 void gst_base_ts_mux_free_jpeg2000 (gpointer prepare_data);
64
65 #endif /* __BASETSMUX_JPEG2000_H__ */