]> git.pld-linux.org Git - SPECS.git/blob - qtav.spec
SPECS updated Sun 1 Aug 20:13:02 CEST 2021
[SPECS.git] / qtav.spec
1 Summary:        A media playback framework based on Qt and FFmpeg
2 Name:           qtav
3 Version:        1.12.0
4 Release:        6
5 License:        LGPLv2+ and GPLv3+ and BSD
6 Group:          Development/Libraries
7 URL:            http://www.qtav.org/
8 Source0:        https://github.com/wang-bin/QtAV/archive/v%{version}.tar.gz
9 # Source0-md5:  9a28d4e5061569f709be6eb649e51499
10 Patch0:         %{name}-ffmpeg.patch
11 BuildRequires:  OpenAL-devel
12 BuildRequires:  Qt5Core-devel
13 BuildRequires:  Qt5Declarative-devel
14 BuildRequires:  Qt5OpenGL-devel
15 BuildRequires:  Qt5Quick-devel
16 BuildRequires:  Qt5Svg-devel
17 BuildRequires:  desktop-file-utils
18 BuildRequires:  dos2unix
19 BuildRequires:  ffmpeg-devel
20 BuildRequires:  libass-devel
21 BuildRequires:  libva-devel
22 BuildRequires:  pulseaudio-devel
23 BuildRequires:  qt5-build
24 BuildRequires:  uchardet-devel
25 BuildRequires:  xorg-lib-libXv-devel
26 Requires:       hicolor-icon-theme
27
28 %description
29 QtAV is a multimedia playback library based on Qt and FFmpeg. It can
30 help you to write a player with less effort than ever before.
31
32 Features include:
33   - Hardware decoding suppprt: DXVA2, VAAPI, VDA, CedarX, CUDA.
34   - OpenGL and ES2 support for Hi10P and other 16-bit YUV videos.
35   - Video capture in rgb and yuv format.
36   - OSD and custom filters.
37   - filters in libavfilter, for example stero3d, blur.
38   - Subtitle.
39   - Transform video using GraphicsItemRenderer. (rotate, shear, etc)
40   - Playing frame by frame (currently support forward playing).
41   - Playback speed control. At any speed.
42   - Variant streams: locale file, http, rtsp, etc.
43   - Choose audio channel.
44   - Choose media stream, e.g. play a desired audio track.
45   - Multiple render engine support. Currently supports QPainter, GDI+,
46     Direct2D, XV and OpenGL(and ES2).
47   - Dynamically change render engine when playing.
48   - Multiple video outputs for 1 player.
49   - Region of interest(ROI), i.e. video cropping.
50   - Video eq: brightness, contrast, saturation, hue.
51   - QML support as a plugin. Most playback APIs are compatible with
52     QtMultiMedia module.
53
54 %package -n libqtav
55 Summary:        QtAV library
56 Group:          Libraries
57 Requires:       ffmpeg
58
59 %description -n libqtav
60 QtAV is a multimedia playback library based on Qt and FFmpeg. It can
61 help you to write a player with less effort than ever before.
62
63 This package contains the QtAV library.
64
65 %package widgets
66 Summary:        QtAV Widgets module
67 Group:          Applications/Multimedia
68 Requires:       %{name} = %{version}-%{release}
69
70 %description widgets
71 QtAV is a multimedia playback library based on Qt and FFmpeg. It can
72 help you to write a player with less effort than ever before.
73
74 This package contains a set of widgets to play media.
75
76 %package devel
77 Summary:        QtAV development files
78 Group:          Development/Libraries
79 Requires:       %{name} = %{version}-%{release}
80 Requires:       %{name}-widgets = %{version}-%{release}
81
82 %description devel
83 QtAV is a multimedia playback library based on Qt and FFmpeg. It can
84 help you to write a player with less effort than ever before.
85
86 This package contains the header development files for building some
87 QtAV applications using QtAV headers.
88
89 %package qml-module
90 Summary:        QtAV QML module
91 Group:          Development/Libraries
92
93 %description qml-module
94 QtAV is a multimedia playback library based on Qt and FFmpeg. It can
95 help you to write a player with less effort than ever before.
96
97 This package contains the QtAV QML module for Qt declarative.
98
99 %package players
100 Summary:        QtAV/QML players
101 Group:          Applications/Multimedia
102 License:        GPL v3
103 Requires:       %{name} = %{version}-%{release}
104 Requires:       %{name}-widgets = %{version}-%{release}
105 Requires:       %{name}-qml-module = %{version}-%{release}
106
107 %description players
108 QtAV is a multimedia playback framework based on Qt and FFmpeg. High
109 performance. User & developer friendly.
110
111 This package contains the QtAV based players.
112
113 %prep
114 %setup -q -n QtAV-%{version}
115 %patch0 -p0
116
117 %build
118 install -d build
119 cd build
120 export CPATH="`pkg-config --variable=includedir libavformat`"
121 qmake-qt5 \
122   QMAKE_CFLAGS="%{rpmcppflags} %{rpmcflags}" \
123   QMAKE_CXXFLAGS="%{rpmcxxflags}"                                  \
124   QMAKE_LFLAGS="%{rpmldflags}"    \
125   QMAKE_STRIP=""                                                                          \
126   CONFIG+="no_rpath recheck config_libass_link release" \
127   ..
128 %{__make}
129
130 %install
131 rm -rf $RPM_BUILD_ROOT
132
133 %{__make} -C build install \
134         DESTDIR=$RPM_BUILD_ROOT \
135         INSTALL_ROOT=$RPM_BUILD_ROOT
136
137 install -d $RPM_BUILD_ROOT%{_bindir}
138 ln -sfv %{_libdir}/qt5/bin/Player $RPM_BUILD_ROOT%{_bindir}
139 ln -sfv %{_libdir}/qt5/bin/QMLPlayer $RPM_BUILD_ROOT%{_bindir}
140 install -D src/QtAV.svg $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/QtAV.svg
141
142 # library links
143 ln -sfv %{_libdir}/libQtAV.so $RPM_BUILD_ROOT%{_libdir}/libQt5AV.so
144 ln -sfv %{_libdir}/libQtAVWidgets.so $RPM_BUILD_ROOT%{_libdir}/libQt5AVWidgets.so
145
146 %clean
147 rm -rf $RPM_BUILD_ROOT
148
149 %post -p /sbin/ldconfig
150 %post widgets -p /sbin/ldconfig
151
152 %post players
153 %{_bindir}/%update_desktop_database
154 %update_icon_cache_post hicolor &>/dev/null ||:
155
156 %postun -p /sbin/ldconfig
157 %postun widgets -p /sbin/ldconfig
158
159 %postun players
160 %{_bindir}/%update_desktop_database
161 if [ $1 -eq 0 ]; then
162     %update_icon_cache_post hicolor &>/dev/null ||:
163     %{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
164 fi
165
166 %posttrans players
167 %{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
168
169 %files
170 %defattr(644,root,root,755)
171 %doc README.md Changelog
172 %attr(755,root,root) %ghost %{_libdir}/libQtAV.so.1
173 %attr(755,root,root) %{_libdir}/libQtAV.so.*.*
174
175 %files widgets
176 %defattr(644,root,root,755)
177 %attr(755,root,root) %ghost %{_libdir}/libQtAVWidgets.so.1
178 %attr(755,root,root) %{_libdir}/libQtAVWidgets.so.*.*
179
180 %files devel
181 %defattr(644,root,root,755)
182 %{_includedir}/qt5/QtAV
183 %{_includedir}/qt5/QtAVWidgets
184 %attr(755,root,root) %{_libdir}/libQtAV.so
185 %{_libdir}/libQtAV.prl
186 %attr(755,root,root) %{_libdir}/libQt5AV.so
187 %attr(755,root,root) %{_libdir}/libQtAVWidgets.so
188 %{_libdir}/libQtAVWidgets.prl
189 %attr(755,root,root) %{_libdir}/libQt5AVWidgets.so
190 %{_libdir}/qt5/mkspecs/features/av.prf
191 %{_libdir}/qt5/mkspecs/features/avwidgets.prf
192 %{_libdir}/qt5/mkspecs/modules/qt_lib_av.pri
193 %{_libdir}/qt5/mkspecs/modules/qt_lib_av_private.pri
194 %{_libdir}/qt5/mkspecs/modules/qt_lib_avwidgets.pri
195 %{_libdir}/qt5/mkspecs/modules/qt_lib_avwidgets_private.pri
196
197 %files qml-module
198 %defattr(644,root,root,755)
199 %doc README.md Changelog
200 %dir %{_libdir}/qt5/qml/QtAV
201 %{_libdir}/qt5/qml/QtAV/Video.qml
202 %{_libdir}/qt5/qml/QtAV/libQmlAV.so
203 %{_libdir}/qt5/qml/QtAV/plugins.qmltypes
204 %{_libdir}/qt5/qml/QtAV/qmldir
205
206 %files players
207 %defattr(644,root,root,755)
208 %doc README.md Changelog
209 %attr(755,root,root) %{_libdir}/qt5/bin/Player
210 %attr(755,root,root) %{_libdir}/qt5/bin/QMLPlayer
211 %attr(755,root,root) %{_bindir}/Player
212 %attr(755,root,root) %{_bindir}/QMLPlayer
213 %{_iconsdir}/hicolor/*/apps/QtAV.svg
214 %{_desktopdir}/Player.desktop
215 %{_desktopdir}/QMLPlayer.desktop
This page took 0.432079 seconds and 3 git commands to generate.