• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1video_sources = files([
2  'colorbalance.c',
3  'colorbalancechannel.c',
4  'convertframe.c',
5  'gstvideoaffinetransformationmeta.c',
6  'gstvideocodecalphameta.c',
7  'gstvideoaggregator.c',
8  'gstvideodecoder.c',
9  'gstvideoencoder.c',
10  'gstvideofilter.c',
11  'gstvideometa.c',
12  'gstvideopool.c',
13  'gstvideosink.c',
14  'gstvideotimecode.c',
15  'gstvideoutils.c',
16  'gstvideoutilsprivate.c',
17  'navigation.c',
18  'video.c',
19  'video-anc.c',
20  'video-blend.c',
21  'video-chroma.c',
22  'video-color.c',
23  'video-converter.c',
24  'video-dither.c',
25  'video-event.c',
26  'video-format.c',
27  'video-frame.c',
28  'video-hdr.c',
29  'video-info.c',
30  'video-multiview.c',
31  'video-resampler.c',
32  'video-scaler.c',
33  'video-tile.c',
34  'video-overlay-composition.c',
35  'videodirection.c',
36  'videoorientation.c',
37  'videooverlay.c',
38])
39
40video_headers = files([
41  'colorbalance.h',
42  'colorbalancechannel.h',
43  'gstvideoaffinetransformationmeta.h',
44  'gstvideocodecalphameta.h',
45  'gstvideoaggregator.h',
46  'gstvideodecoder.h',
47  'gstvideoencoder.h',
48  'gstvideofilter.h',
49  'gstvideometa.h',
50  'gstvideopool.h',
51  'gstvideosink.h',
52  'gstvideotimecode.h',
53  'gstvideoutils.h',
54  'navigation.h',
55  'video.h',
56  'video-anc.h',
57  'video-event.h',
58  'video-format.h',
59  'video-chroma.h',
60  'video-color.h',
61  'video-converter.h',
62  'video-dither.h',
63  'video-hdr.h',
64  'video-info.h',
65  'video-frame.h',
66  'video-prelude.h',
67  'video-scaler.h',
68  'video-tile.h',
69  'videodirection.h',
70  'videoorientation.h',
71  'videooverlay.h',
72  'video-resampler.h',
73  'video-blend.h',
74  'video-overlay-composition.h',
75  'video-multiview.h',
76])
77install_headers(video_headers, subdir : 'gstreamer-1.0/gst/video/')
78
79video_mkenum_headers = [
80  'video.h',
81  'video-anc.h',
82  'video-format.h',
83  'video-frame.h',
84  'video-chroma.h',
85  'video-color.h',
86  'video-converter.h',
87  'video-dither.h',
88  'video-info.h',
89  'video-overlay-composition.h',
90  'video-resampler.h',
91  'video-scaler.h',
92  'video-tile.h',
93  'gstvideometa.h',
94  'gstvideotimecode.h',
95  'gstvideoutils.h',
96  'gstvideoencoder.h',
97  'gstvideodecoder.h',
98  'colorbalance.h',
99  'navigation.h',
100]
101
102video_enums = gnome.mkenums_simple('video-enumtypes',
103  sources : video_mkenum_headers,
104  body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
105  header_prefix : '#include <gst/video/video-prelude.h>',
106  decorator : 'GST_VIDEO_API',
107  install_header: true,
108  install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/video'))
109gstvideo_c = video_enums[0]
110gstvideo_h = video_enums[1]
111video_gen_sources = [gstvideo_h]
112
113orcsrc = 'video-orc'
114gstvideo_deps = [gst_base_dep, libm]
115if have_orcc
116  gstvideo_deps += [orc_dep]
117  orc_h = custom_target(orcsrc + '.h',
118    input : orcsrc + '.orc',
119    output : orcsrc + '.h',
120    command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@'])
121  orc_c = custom_target(orcsrc + '.c',
122    input : orcsrc + '.orc',
123    output : orcsrc + '.c',
124    command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@'])
125  orc_targets += {'name': orcsrc, 'orc-source': files(orcsrc + '.orc'), 'header': orc_h, 'source': orc_c}
126else
127  orc_h = configure_file(input : orcsrc + '-dist.h',
128    output : orcsrc + '.h',
129    copy : true)
130  orc_c = configure_file(input : orcsrc + '-dist.c',
131    output : orcsrc + '.c',
132    copy : true)
133endif
134
135gstvideo = library('gstvideo-@0@'.format(api_version),
136  video_sources, gstvideo_h, gstvideo_c, orc_c, orc_h,
137  c_args : gst_plugins_base_args + ['-DBUILDING_GST_VIDEO', '-DG_LOG_DOMAIN="GStreamer-Video"'],
138  include_directories: [configinc, libsinc],
139  version : libversion,
140  soversion : soversion,
141  darwin_versions : osxversion,
142  install : true,
143  dependencies : gstvideo_deps,
144)
145
146library_def = {'lib': gstvideo}
147pkg_name = 'gstreamer-video-1.0'
148pkgconfig.generate(gstvideo,
149  libraries : [gst_dep, gst_base_dep],
150  variables : pkgconfig_variables,
151  subdirs : pkgconfig_subdirs,
152  name : pkg_name,
153  description : 'Video base classes and helper functions',
154)
155
156if build_gir
157  gst_gir_extra_args = gir_init_section + [ '--c-include=gst/video/video.h' ]
158  gir = {
159    'sources' : video_sources + video_headers + [gstvideo_c] + [gstvideo_h],
160    'namespace' : 'GstVideo',
161    'nsversion' : api_version,
162    'identifier_prefix' : 'Gst',
163    'symbol_prefix' : 'gst',
164    'export_packages' : pkg_name,
165    'includes' : ['Gst-1.0','GstBase-1.0'],
166    'install' : true,
167    'extra_args' : gst_gir_extra_args,
168    'dependencies' : gstvideo_deps
169  }
170  library_def += {'gir': [gir]}
171  if not static_build
172    video_gir = gnome.generate_gir(gstvideo, kwargs: gir)
173    video_gen_sources += [video_gir]
174  endif
175endif
176libraries += [[pkg_name, library_def]]
177
178video_dep = declare_dependency(link_with : gstvideo,
179  include_directories : [libsinc],
180  dependencies : gstvideo_deps,
181  sources : video_gen_sources)
182
183meson.override_dependency(pkg_name, video_dep)
184