1 /*
2 * GStreamer
3 *
4 * Copyright (C) 2012 Cisco Systems, Inc.
5 * Author: Youness Alaoui <youness.alaoui@collabora.co.uk>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 */
22
23
24 #ifdef HAVE_CONFIG_H
25 # include <config.h>
26 #endif
27
28 #include "uvc_h264.h"
29
30 GType
uvc_h264_slicemode_get_type(void)31 uvc_h264_slicemode_get_type (void)
32 {
33 static GType type = 0;
34
35 static const GEnumValue types[] = {
36 {UVC_H264_SLICEMODE_IGNORED, "Ignored", "ignored"},
37 {UVC_H264_SLICEMODE_BITSPERSLICE, "Bits per slice", "bits/slice"},
38 {UVC_H264_SLICEMODE_MBSPERSLICE, "MBs per Slice", "MBs/slice"},
39 {UVC_H264_SLICEMODE_SLICEPERFRAME, "Slice Per Frame", "slice/frame"},
40 {0, NULL, NULL}
41 };
42
43 if (!type) {
44 type = g_enum_register_static ("UvcH264SliceMode", types);
45 }
46 return type;
47 }
48
49 GType
uvc_h264_usagetype_get_type(void)50 uvc_h264_usagetype_get_type (void)
51 {
52 static GType type = 0;
53
54 static const GEnumValue types[] = {
55 {UVC_H264_USAGETYPE_REALTIME, "Realtime (video conferencing)", "realtime"},
56 {UVC_H264_USAGETYPE_BROADCAST, "Broadcast", "broadcast"},
57 {UVC_H264_USAGETYPE_STORAGE, "Storage", "storage"},
58 {UVC_H264_USAGETYPE_UCCONFIG_0, "UCConfig 0", "ucconfig0"},
59 {UVC_H264_USAGETYPE_UCCONFIG_1, "UCConfig 1", "ucconfig1"},
60 {UVC_H264_USAGETYPE_UCCONFIG_2Q, "UCConfig 2Q", "ucconfig2q"},
61 {UVC_H264_USAGETYPE_UCCONFIG_2S, "UCConfig 2S", "ucconfig2s"},
62 {UVC_H264_USAGETYPE_UCCONFIG_3, "UCConfig 3", "ucconfig3"},
63 {0, NULL, NULL}
64 };
65
66 if (!type) {
67 type = g_enum_register_static ("UvcH264UsageType", types);
68 }
69 return type;
70 }
71
72 GType
uvc_h264_ratecontrol_get_type(void)73 uvc_h264_ratecontrol_get_type (void)
74 {
75 static GType type = 0;
76
77 static const GEnumValue types[] = {
78 {UVC_H264_RATECONTROL_CBR, "Constant bit rate", "cbr"},
79 {UVC_H264_RATECONTROL_VBR, "Variable bit rate", "vbr"},
80 {UVC_H264_RATECONTROL_CONST_QP, "Constant QP", "qp"},
81 {0, NULL, NULL}
82 };
83
84 if (!type) {
85 type = g_enum_register_static ("UvcH264RateControl", types);
86 }
87 return type;
88 }
89
90 GType
uvc_h264_streamformat_get_type(void)91 uvc_h264_streamformat_get_type (void)
92 {
93 static GType type = 0;
94
95 static const GEnumValue types[] = {
96 {UVC_H264_STREAMFORMAT_ANNEXB, "Byte stream format (Annex B)", "byte"},
97 {UVC_H264_STREAMFORMAT_NAL, "NAL stream format", "nal"},
98 {0, NULL, NULL}
99 };
100
101 if (!type) {
102 type = g_enum_register_static ("UvcH264StreamFormat", types);
103 }
104 return type;
105 }
106
107 GType
uvc_h264_entropy_get_type(void)108 uvc_h264_entropy_get_type (void)
109 {
110 static GType type = 0;
111
112 static const GEnumValue types[] = {
113 {UVC_H264_ENTROPY_CAVLC, "CAVLC", "cavlc"},
114 {UVC_H264_ENTROPY_CABAC, "CABAC", "cabac"},
115 {0, NULL, NULL}
116 };
117
118 if (!type) {
119 type = g_enum_register_static ("UvcH264Entropy", types);
120 }
121 return type;
122 }
123