• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
25 #ifndef __MPEGTSMUX_JPEG2000_H__
26 #define __MPEGTSMUX_JPEG2000_H__
27 
28 #include "mpegtsmux.h"
29 
30 /* color specifications for JPEG 2000 stream over MPEG TS */
31 typedef enum
32 {
33   GST_MPEGTS_JPEG2000_COLORSPEC_UNKNOWN,
34   GST_MPEGTS_JPEG2000_COLORSPEC_SRGB,
35   GST_MPEGTS_JPEG2000_COLORSPEC_REC601,
36   GST_MPEGTS_JPEG2000_COLORSPEC_REC709,
37   GST_MPEGTS_JPEG2000_COLORSPEC_CIELUV,
38   GST_MPEGTS_JPEG2000_COLORSPEC_CIEXYZ,
39   GST_MPEGTS_JPEG2000_COLORSPEC_REC2020,
40   GST_MPEGTS_JPEG2000_COLORSPEC_SMPTE2084
41 } GstMpegTsJpeg2000ColorSpec;
42 
43 
44 typedef struct j2k_private_data
45 {
46   gboolean interlace;
47   guint16 den;
48   guint16 num;
49   /* Maximum bitrate box */
50   guint32 max_bitrate;
51   /* Field Coding Box */
52   guint8 Fic;
53   guint8 Fio;
54   /* Broadcast color box */
55   guint8 color_spec;
56 } j2k_private_data;
57 
58 GstBuffer *mpegtsmux_prepare_jpeg2000 (GstBuffer * buf, MpegTsPadData * data,
59     MpegTsMux * mux);
60 
61 void mpegtsmux_free_jpeg2000 (gpointer prepare_data);
62 
63 #endif /* __MPEGTSMUX_JPEG2000_H__ */
64