qt: add device preferences for mmdevice
[vlc.git] / modules / packetizer / hxxx_sei.h
blob6691fb8b67110b80fd7fd3ddb2ee60ef9debfadf
1 /*****************************************************************************
2 * hxxx_sei.h: AVC/HEVC packetizers SEI handling
3 *****************************************************************************
4 * Copyright (C) 2001-2016 VLC authors and VideoLAN
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 *****************************************************************************/
20 #ifndef HXXX_SEI_H
21 #define HXXX_SEI_H
23 /* Defined in H.264/H.265 annex D */
24 enum hxxx_sei_type_e
26 HXXX_SEI_PIC_TIMING = 1,
27 HXXX_SEI_USER_DATA_REGISTERED_ITU_T_T35 = 4,
28 HXXX_SEI_RECOVERY_POINT = 6,
29 HXXX_SEI_FRAME_PACKING_ARRANGEMENT = 45,
30 HXXX_SEI_MASTERING_DISPLAY_COLOUR_VOLUME = 137, /* SMPTE ST 2086 */
31 HXXX_SEI_CONTENT_LIGHT_LEVEL = 144,
34 enum hxxx_sei_t35_type_e
36 HXXX_ITU_T35_TYPE_CC,
39 typedef struct
41 unsigned i_type;
42 union
44 bs_t *p_bs; /* for raw/unhandled in common code callbacks */
45 struct
47 enum hxxx_sei_t35_type_e type;
48 union
50 struct
52 const uint8_t *p_data;
53 size_t i_data;
54 } cc;
55 } u;
56 } itu_t35;
57 struct
59 enum
61 FRAME_PACKING_CANCEL = -1,
62 FRAME_PACKING_INTERLEAVED_CHECKERBOARD = 0,
63 FRAME_PACKING_INTERLEAVED_COLUMN,
64 FRAME_PACKING_INTERLEAVED_ROW,
65 FRAME_PACKING_SIDE_BY_SIDE,
66 FRAME_PACKING_TOP_BOTTOM,
67 FRAME_PACKING_TEMPORAL,
68 FRAME_PACKING_NONE_2D,
69 FRAME_PACKING_TILED,
70 } type;
71 bool b_flipped;
72 bool b_left_first;
73 bool b_fields;
74 bool b_frame0;
75 } frame_packing;
76 struct
78 int i_frames;
79 } recovery;
80 struct
82 uint16_t primaries[3*2]; /* G,B,R / x,y */
83 uint16_t white_point[2]; /* x,y */
84 uint32_t max_luminance;
85 uint32_t min_luminance;
86 } colour_volume; /* SMPTE ST 2086 */
87 struct
89 uint16_t MaxCLL;
90 uint16_t MaxFALL;
91 } content_light_lvl; /* CTA-861.3 */
93 } hxxx_sei_data_t;
95 typedef bool (*pf_hxxx_sei_callback)(const hxxx_sei_data_t *, void *);
96 void HxxxParseSEI(const uint8_t *, size_t, uint8_t, pf_hxxx_sei_callback, void *);
97 void HxxxParse_AnnexB_SEI(const uint8_t *, size_t, uint8_t, pf_hxxx_sei_callback, void *);
99 #endif