community/guvcview to 2.0.8-1

This commit is contained in:
Kevin Mihelich 2022-06-18 17:56:00 +00:00
parent c3934068d6
commit 61a297b8ce
3 changed files with 8 additions and 209 deletions

View file

@ -1,71 +0,0 @@
From ee2a783223fc9be7135505535f67ade84d984940 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
Date: Fri, 28 Dec 2018 21:35:06 +0100
Subject: [PATCH] Update AppStream metadata to a newer version
---
data/Makefile.am | 2 +-
data/guvcview.appdata.xml.in.in | 29 ++++++++++++++++++++---------
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/data/Makefile.am b/data/Makefile.am
index 22055f0..ad14d10 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -28,7 +28,7 @@ desktop_DATA = $(DESKTOP_FILES)
APPDATA_IN_FILES= guvcview.appdata.xml.in
APPDATA_FILES= $(APPDATA_IN_FILES:.xml.in=.xml)
-appdatadir = $(datadir)/appdata
+appdatadir = $(datadir)/metainfo
appdata_DATA = $(APPDATA_FILES)
endif
diff --git a/data/guvcview.appdata.xml.in.in b/data/guvcview.appdata.xml.in.in
index 61ba8c3..de934f7 100644
--- a/data/guvcview.appdata.xml.in.in
+++ b/data/guvcview.appdata.xml.in.in
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2014 Paulo Assis <pj.assis@gmail.com> -->
-<application>
- <id type="desktop">guvcview.desktop</id>
+<component type="desktop-application">
+ <id>net.sourceforge.guvcview</id>
+ <launchable type="desktop-id">guvcview.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<name>Simple UVC Viewer</name>
@@ -16,12 +17,22 @@
that is compatible with any other v4l2 app.</_p>
</description>
<screenshots>
- <screenshot>https://sourceforge.net/p/guvcview/screenshot/guvcview_image_tab.png</screenshot>
- <screenshot>https://sourceforge.net/p/guvcview/screenshot/guvcview_h264_tab.png</screenshot>
- <screenshot>https://sourceforge.net/p/guvcview/screenshot/guvcview_video_tab.png</screenshot>
- <screenshot>https://sourceforge.net/p/guvcview/screenshot/guvcview_audio_tab.png</screenshot>
- <screenshot>https://a.fsdn.com/con/app/proj/guvcview/screenshots/guvcview_video_preview.png</screenshot>
+ <screenshot>
+ <image>https://sourceforge.net/p/guvcview/screenshot/guvcview_image_tab.png</image>
+ </screenshot>
+ <screenshot>
+ <image>https://sourceforge.net/p/guvcview/screenshot/guvcview_h264_tab.png</image>
+ </screenshot>
+ <screenshot>
+ <image>https://sourceforge.net/p/guvcview/screenshot/guvcview_video_tab.png</image>
+ </screenshot>
+ <screenshot>
+ <image>https://sourceforge.net/p/guvcview/screenshot/guvcview_audio_tab.png</image>
+ </screenshot>
+ <screenshot>
+ <image>https://a.fsdn.com/con/app/proj/guvcview/screenshots/guvcview_video_preview.png</image>
+ </screenshot>
</screenshots>
<url type="homepage">http://guvcview.sourceforge.net/</url>
- <updatecontact>assisp@gmail.com</updatecontact>
-</application>
+ <update_contact>assisp@gmail.com</update_contact>
+</component>
--
2.20.1

View file

@ -7,8 +7,8 @@
pkgbase=guvcview
pkgname=(guvcview guvcview-common guvcview-qt)
pkgver=2.0.7
pkgrel=4
pkgver=2.0.8
pkgrel=1
pkgdesc='Simple interface for capturing and viewing video from v4l2 devices'
arch=('x86_64')
url='http://guvcview.sourceforge.net/'
@ -16,34 +16,17 @@ license=('GPL3')
depends=('ffmpeg' 'gsl' 'gtk3' 'qt5-base' 'portaudio')
makedepends=('intltool')
options=('!emptydirs' '!distcc')
source=("https://downloads.sourceforge.net/$pkgbase/$pkgbase-src-$pkgver-2.tar.bz2"
'0001-Update-AppStream-metadata-to-a-newer-version.patch'
'ffmpeg5.patch')
sha256sums=('f0d1d7814597d42fddf1655f3654f74efd9f27e35bbe39ee4f0d42683de85c98'
'd9c65a9bf53eb28c48f9a9126035f5ebe520923124eae507d1cb2994e2a0d08f'
'dbd24333d2a2ff02759e5bc21c0088382d093065a485376e8ee037809e066001')
source=("https://downloads.sourceforge.net/$pkgbase/$pkgbase-src-$pkgver.tar.bz2")
sha256sums=('a21f4e448286666cf27bafef5290cc953a0a1796b752e5bbe521266dc1230c81')
noextract=($pkgbase-src-$pkgver-2.tar.bz2) # missing root dir
prepare() {
mkdir $pkgbase
tar xjf $pkgbase-src-$pkgver-2.tar.bz2 -C $pkgbase
cd $pkgbase
# Update AppStream metadata to a newer version
patch -Np1 -i ../0001-Update-AppStream-metadata-to-a-newer-version.patch
# Fix build with FFmpeg 5
patch -p1 -i ../ffmpeg5.patch
autoreconf -fi
cd ..
cp -a $pkgbase{,-qt}
cp -a $pkgbase{-src-$pkgver,-qt}
}
build() {
# GTK+ version
cd $pkgbase
cd $pkgbase-src-$pkgver
./configure --prefix=/usr --disable-debian-menu
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
@ -59,7 +42,7 @@ package_guvcview-common() {
pkgdesc="Common files for guvcview"
depends=('ffmpeg' 'gsl' 'libusb' 'portaudio')
cd $pkgbase
cd $pkgbase-src-$pkgver
make DESTDIR="$pkgdir" install
make -C guvcview DESTDIR="$pkgdir" uninstall
make -C data DESTDIR="$pkgdir" uninstall-man1 uninstall-appdataDATA uninstall-desktopDATA
@ -70,7 +53,7 @@ package_guvcview() {
pkgdesc="Simple GTK+ interface for capturing and viewing video from v4l2 devices"
depends=('guvcview-common' 'gtk3')
cd $pkgbase
cd $pkgbase-src-$pkgver
make -C guvcview DESTDIR="$pkgdir" install
make -C data DESTDIR="$pkgdir" install-man1 install-appdataDATA install-desktopDATA
sed -i 's/^Icon=.*/Icon=guvcview/' "$pkgdir"/usr/share/applications/guvcview.desktop

View file

@ -1,113 +0,0 @@
diff --git a/gview_encoder/audio_codecs.c b/gview_encoder/audio_codecs.c
index 9050ac9..12f5850 100644
--- a/gview_encoder/audio_codecs.c
+++ b/gview_encoder/audio_codecs.c
@@ -409,7 +409,7 @@ int encoder_set_valid_audio_codec_list ()
int num_codecs = 0;
for ( ind = 0; ind < encoder_get_audio_codec_list_size(); ++ind)
{
- AVCodec *codec = avcodec_find_encoder(listSupCodecs[ind].codec_id);
+ const AVCodec *codec = avcodec_find_encoder(listSupCodecs[ind].codec_id);
if (!codec)
{
printf("ENCODER: no audio codec detected for %s\n", listSupCodecs[ind].description);
diff --git a/gview_encoder/encoder.c b/gview_encoder/encoder.c
index 8179bf0..fa10a89 100644
--- a/gview_encoder/encoder.c
+++ b/gview_encoder/encoder.c
@@ -223,7 +223,7 @@ void __attribute__ ((destructor)) gviewencoder_fini()
*
* returns: 1 - sample format is supported; 0 - is not supported
*/
-static int encoder_check_audio_sample_fmt(AVCodec *codec, enum AVSampleFormat sample_fmt)
+static int encoder_check_audio_sample_fmt(const AVCodec *codec, enum AVSampleFormat sample_fmt)
{
const enum AVSampleFormat *p = codec->sample_fmts;
@@ -446,10 +446,6 @@ static encoder_video_context_t *encoder_video_init(encoder_context_t *encoder_ct
video_codec_data->codec_context = avcodec_alloc_context3(video_codec_data->codec);
- avcodec_get_context_defaults3 (
- video_codec_data->codec_context,
- video_codec_data->codec);
-
if(video_codec_data->codec_context == NULL)
{
fprintf(stderr, "ENCODER: FATAL memory allocation failure (encoder_video_init): %s\n", strerror(errno));
@@ -712,7 +708,6 @@ static encoder_audio_context_t *encoder_audio_init(encoder_context_t *encoder_ct
}
audio_codec_data->codec_context = avcodec_alloc_context3(audio_codec_data->codec);
- avcodec_get_context_defaults3 (audio_codec_data->codec_context, audio_codec_data->codec);
if(audio_codec_data->codec_context == NULL)
{
diff --git a/gview_encoder/encoder.h b/gview_encoder/encoder.h
index 11c9522..a5697c1 100644
--- a/gview_encoder/encoder.h
+++ b/gview_encoder/encoder.h
@@ -130,7 +130,7 @@
*/
typedef struct _encoder_codec_data_t
{
- AVCodec *codec;
+ const AVCodec *codec;
AVDictionary *private_options;
AVCodecContext *codec_context;
AVFrame *frame;
diff --git a/gview_encoder/video_codecs.c b/gview_encoder/video_codecs.c
index ae86c3f..30e757b 100644
--- a/gview_encoder/video_codecs.c
+++ b/gview_encoder/video_codecs.c
@@ -974,7 +974,7 @@ int encoder_set_valid_video_codec_list ()
int num_codecs = 1; /*raw codec (no encoding) is always valid*/
for ( ind = 1; ind < encoder_get_video_codec_list_size(); ++ind)
{
- AVCodec *codec = avcodec_find_encoder(listSupCodecs[ind].codec_id);
+ const AVCodec *codec = avcodec_find_encoder(listSupCodecs[ind].codec_id);
if (!codec)
{
printf("ENCODER: no video codec detected for %s\n", listSupCodecs[ind].description);
diff --git a/gview_v4l2core/jpeg_decoder.c b/gview_v4l2core/jpeg_decoder.c
index 8e9cf6b..82ff633 100644
--- a/gview_v4l2core/jpeg_decoder.c
+++ b/gview_v4l2core/jpeg_decoder.c
@@ -1350,7 +1350,7 @@ void jpeg_close_decoder()
typedef struct _codec_data_t
{
- AVCodec *codec;
+ const AVCodec *codec;
AVCodecContext *context;
AVFrame *picture;
} codec_data_t;
@@ -1409,7 +1409,6 @@ int jpeg_init_decoder(int width, int height)
#if LIBAVCODEC_VER_AT_LEAST(53,6)
codec_data->context = avcodec_alloc_context3(codec_data->codec);
- avcodec_get_context_defaults3 (codec_data->context, codec_data->codec);
#else
codec_data->context = avcodec_alloc_context();
avcodec_get_context_defaults(codec_data->context);
diff --git a/gview_v4l2core/uvc_h264.c b/gview_v4l2core/uvc_h264.c
index f526b1e..e3ff5f1 100644
--- a/gview_v4l2core/uvc_h264.c
+++ b/gview_v4l2core/uvc_h264.c
@@ -47,7 +47,7 @@ extern int verbosity;
typedef struct _h264_decoder_context_t
{
- AVCodec *codec;
+ const AVCodec *codec;
AVCodecContext *context;
AVFrame *picture;
@@ -1004,7 +1004,6 @@ int h264_init_decoder(int width, int height)
#if LIBAVCODEC_VER_AT_LEAST(53,6)
h264_ctx->context = avcodec_alloc_context3(h264_ctx->codec);
- avcodec_get_context_defaults3 (h264_ctx->context, h264_ctx->codec);
#else
h264_ctx->context = avcodec_alloc_context();
avcodec_get_context_defaults(h264_ctx->context);