-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
451 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
project pkg { | ||
rpm { | ||
spec = "openh264.spec" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,201 @@ | ||
#!/bin/sh | ||
|
||
# Process a gst-plugins-bad tarball to remove | ||
# unwanted GStreamer plugins. | ||
# | ||
# This script here is taken from Fedora gstreamer1-plugins-bad-free repo, with | ||
# only change being openh264 addition. | ||
# | ||
# See https://bugzilla.redhat.com/show_bug.cgi?id=532470 | ||
# for details | ||
# | ||
# Bastien Nocera <[email protected]> - 2010 | ||
# | ||
|
||
SOURCE="$1" | ||
NEW_SOURCE=`echo $SOURCE | sed 's/bad-/bad-openh264-/'` | ||
DIRECTORY=`echo $SOURCE | sed 's/\.tar\.xz//'` | ||
|
||
ALLOWED=" | ||
aacparse | ||
accurip | ||
adpcmdec | ||
adpcmenc | ||
aiff | ||
aiffparse | ||
amrparse | ||
asfmux | ||
audiobuffersplit | ||
audiofxbad | ||
audiolatency | ||
audiomixer | ||
audiomixmatrix | ||
audioparsers | ||
audiovisualizers | ||
autoconvert | ||
bayer | ||
camerabin | ||
camerabin2 | ||
cdxaparse | ||
codecalpha | ||
codectimestamper | ||
coloreffects | ||
colorspace | ||
compositor | ||
dataurisrc | ||
dccp | ||
debugutils | ||
dtmf | ||
dvbsubenc | ||
faceoverlay | ||
festival | ||
fieldanalysis | ||
freeverb | ||
freeze | ||
frei0r | ||
gaudieffects | ||
gdp | ||
geometrictransform | ||
h264parse | ||
hdvparse | ||
hls | ||
id3tag | ||
inter | ||
interlace | ||
invtelecine | ||
ivfparse | ||
ivtc | ||
jpegformat | ||
jp2kdecimator | ||
legacyresample | ||
librfb | ||
liveadder | ||
midi | ||
mve | ||
mpegdemux | ||
mpeg4videoparse | ||
mpegpsmux | ||
mpegtsdemux | ||
mpegtsmux | ||
mpegvideoparse | ||
mxf | ||
netsim | ||
nsf | ||
nuvdemux | ||
onvif | ||
openh264 | ||
patchdetect | ||
pcapparse | ||
pnm | ||
proxy | ||
qtmux | ||
rawparse | ||
removesilence | ||
rist | ||
rtmp2 | ||
rtp | ||
rtpmux | ||
rtpvp8 | ||
scaletempo | ||
sdi | ||
sdp | ||
segmentclip | ||
selector | ||
smooth | ||
speed | ||
stereo | ||
subenc | ||
switchbin | ||
timecode | ||
transcode | ||
tta | ||
valve | ||
videofilters | ||
videoframe_audiolevel | ||
videomaxrate | ||
videomeasure | ||
videoparsers | ||
videosignal | ||
vmnc | ||
yadif | ||
y4m | ||
" | ||
|
||
NOT_ALLOWED=" | ||
dvbsuboverlay | ||
dvdspu | ||
real | ||
siren | ||
" | ||
|
||
error() | ||
{ | ||
MESSAGE=$1 | ||
echo $MESSAGE | ||
exit 1 | ||
} | ||
|
||
check_allowed() | ||
{ | ||
MODULE=$1 | ||
for i in $ALLOWED ; do | ||
if test x$MODULE = x$i ; then | ||
return 0; | ||
fi | ||
done | ||
# Ignore errors coming from ext/ directory | ||
# they require external libraries so are ineffective anyway | ||
return 1; | ||
} | ||
|
||
check_not_allowed() | ||
{ | ||
MODULE=$1 | ||
for i in $NOT_ALLOWED ; do | ||
if test x$MODULE = x$i ; then | ||
return 0; | ||
fi | ||
done | ||
return 1; | ||
} | ||
|
||
rm -rf $DIRECTORY | ||
tar xJf $SOURCE || error "Cannot unpack $SOURCE" | ||
pushd $DIRECTORY > /dev/null || error "Cannot open directory \"$DIRECTORY\"" | ||
|
||
unknown="" | ||
for subdir in gst ext sys; do | ||
for dir in $subdir/* ; do | ||
# Don't touch non-directories | ||
if ! [ -d $dir ] ; then | ||
continue; | ||
fi | ||
MODULE=`basename $dir` | ||
if ( check_not_allowed $MODULE ) ; then | ||
echo "**** Removing $MODULE ****" | ||
echo "Removing directory $dir" | ||
rm -r $dir || error "Cannot remove $dir" | ||
echo | ||
elif test $subdir = ext || test $subdir = sys; then | ||
# Ignore library or system non-blacklisted plugins | ||
continue; | ||
elif ! ( check_allowed $MODULE ) ; then | ||
echo "Unknown module in $dir" | ||
unknown="$unknown $dir" | ||
fi | ||
done | ||
done | ||
|
||
echo | ||
|
||
if test "x$unknown" != "x"; then | ||
echo -n "Aborting due to unkown modules: " | ||
echo "$unknown" | sed "s/ /\n /g" | ||
exit 1 | ||
fi | ||
|
||
popd > /dev/null | ||
|
||
tar cJf $NEW_SOURCE $DIRECTORY | ||
echo "$NEW_SOURCE is ready to use" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff -up gst-plugins-bad-1.18.2/ext/openh264/meson.build.orig gst-plugins-bad-1.18.2/ext/openh264/meson.build | ||
--- gst-plugins-bad-1.18.2/ext/openh264/meson.build.orig 2020-12-06 14:24:13.000000000 +0100 | ||
+++ gst-plugins-bad-1.18.2/ext/openh264/meson.build 2021-02-11 11:48:58.660450319 +0100 | ||
@@ -4,9 +4,7 @@ openh264_sources = [ | ||
'gstopenh264plugin.c', | ||
] | ||
|
||
-openh264_dep = dependency('openh264', version : '>= 1.3.0', | ||
- required : get_option('openh264'), | ||
- fallback: ['openh264', 'openh264_dep']) | ||
+openh264_dep = cc.find_library('openh264') | ||
|
||
if openh264_dep.found() | ||
gstopenh264 = library('gstopenh264', |
Oops, something went wrong.