From 4650ec0450f97e92f9c6fa25d0e24a5518b0f3b9 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Thu, 29 Oct 2020 14:27:47 +0000 Subject: gstreamer1.0-plugins-base: upgrade to version 1.18.0 * 0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch * 0002-meson-Add-variables-for-gir-files.patch Removed since these are included in 1.18.0 License-Update: remove file://common/coverage/coverage-report.pl Upstream dont have it any more. API and plugin documentation are no longer built with gtk_doc. The gtk_doc documentation has been removed in favour of a new unified documentation module built with hotdoc. Distributors should use the documentation release tarball instead of trying to package hotdoc and building the documentation from scratch. (From OE-Core rev: 5485ecd65987f5a2c0824cf6f691ccb3f529c86e) Signed-off-by: Jose Quaresma Signed-off-by: Richard Purdie --- ...515-get-caps-from-src-pad-when-query-caps.patch | 44 ++++ ...-gir-even-when-cross-compiling-if-introsp.patch | 36 ---- .../0002-meson-Add-variables-for-gir-files.patch | 235 --------------------- ...2-ssaparse-enhance-SSA-text-lines-parsing.patch | 229 ++++++++++++++++++++ ...3-ssaparse-enhance-SSA-text-lines-parsing.patch | 227 -------------------- ...003-viv-fb-Make-sure-config.h-is-included.patch | 32 +++ .../0004-glimagesink-Downrank-to-marginal.patch | 32 +++ ...005-viv-fb-Make-sure-config.h-is-included.patch | 32 --- .../0009-glimagesink-Downrank-to-marginal.patch | 32 --- .../get-caps-from-src-pad-when-query-caps.patch | 42 ---- .../gstreamer/gstreamer1.0-plugins-base_1.16.2.bb | 99 --------- .../gstreamer/gstreamer1.0-plugins-base_1.18.0.bb | 92 ++++++++ 12 files changed, 429 insertions(+), 703 deletions(-) create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch delete mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch delete mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch delete mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch delete mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch delete mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch delete mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch delete mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.bb create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.0.bb diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch new file mode 100644 index 0000000000..d5d9838372 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch @@ -0,0 +1,44 @@ +From f9d48cd85ee68207733b1b91a00453462c33524a Mon Sep 17 00:00:00 2001 +From: zhouming +Date: Wed, 14 May 2014 10:16:20 +0800 +Subject: [PATCH 1/4] ENGR00312515: get caps from src pad when query caps + +https://bugzilla.gnome.org/show_bug.cgi?id=728312 + +Upstream-Status: Pending + +Signed-off-by: zhouming +--- + gst-libs/gst/tag/gsttagdemux.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + mode change 100644 => 100755 gst-libs/gst/tag/gsttagdemux.c + +diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c +old mode 100644 +new mode 100755 +index f545857..62d10ef +--- a/gst-libs/gst/tag/gsttagdemux.c ++++ b/gst-libs/gst/tag/gsttagdemux.c +@@ -1777,6 +1777,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query) + } + break; + } ++ case GST_QUERY_CAPS: ++ { ++ ++ /* We can hijack caps query if we typefind already */ ++ if (demux->priv->src_caps) { ++ gst_query_set_caps_result (query, demux->priv->src_caps); ++ res = TRUE; ++ } else { ++ res = gst_pad_query_default (pad, parent, query); ++ } ++ break; ++ } ++ + default: + res = gst_pad_query_default (pad, parent, query); + break; +-- +2.28.0 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch deleted file mode 100644 index 49ab471414..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 30672ba7d134553e59935ddc875104adba26f25c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= -Date: Thu, 17 Oct 2019 20:06:24 +0100 -Subject: [PATCH] meson: build gir even when cross-compiling if introspection - was enabled explicitly - -This can be made to work in certain circumstances when -cross-compiling, so default to not building g-i stuff -when cross-compiling, but allow it if introspection was -enabled explicitly via -Dintrospection=enabled. - -See gstreamer/gstreamer#454 and gstreamer/gstreamer#381. - -Upstream-Status: Backport [30672ba7d134553e59935ddc875104adba26f25c] - -Signed-off-by: Carlos Rafael Giani ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 264d84c9e..c8147c224 100644 ---- a/meson.build -+++ b/meson.build -@@ -372,7 +372,7 @@ endif - - gir = find_program('g-ir-scanner', required : get_option('introspection')) - gnome = import('gnome') --build_gir = gir.found() and not meson.is_cross_build() -+build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) - gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \ - 'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \ - 'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \ --- -2.17.1 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch deleted file mode 100644 index ca85744c19..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch +++ /dev/null @@ -1,235 +0,0 @@ -From 685731e989dc074a4b0d48b6c8062e2738f09719 Mon Sep 17 00:00:00 2001 -From: Thibault Saunier -Date: Mon, 22 Oct 2018 11:44:37 +0200 -Subject: [PATCH] meson: Add variables for gir files - -And flatten list of sources for dependencies - -Upstream-Status: Backport [685731e989dc074a4b0d48b6c8062e2738f09719] - -Signed-off-by: Carlos Rafael Giani ---- - gst-libs/gst/allocators/meson.build | 5 +++-- - gst-libs/gst/app/meson.build | 6 ++++-- - gst-libs/gst/audio/meson.build | 5 +++-- - gst-libs/gst/pbutils/meson.build | 5 +++-- - gst-libs/gst/rtp/meson.build | 6 ++++-- - gst-libs/gst/rtsp/meson.build | 5 +++-- - gst-libs/gst/sdp/meson.build | 6 ++++-- - gst-libs/gst/tag/meson.build | 5 +++-- - gst-libs/gst/video/meson.build | 5 +++-- - 9 files changed, 30 insertions(+), 18 deletions(-) - -diff --git a/gst-libs/gst/allocators/meson.build b/gst-libs/gst/allocators/meson.build -index 364baeebf..56f156dc3 100644 ---- a/gst-libs/gst/allocators/meson.build -+++ b/gst-libs/gst/allocators/meson.build -@@ -22,7 +22,7 @@ gstallocators = library('gstallocators-@0@'.format(api_version), - allocators_gen_sources = [] - if build_gir - gst_gir_extra_args = gir_init_section + [ '--c-include=gst/allocators/allocators.h' ] -- allocators_gen_sources += [gnome.generate_gir(gstallocators, -+ allocators_gir = gnome.generate_gir(gstallocators, - sources : gst_allocators_sources + gst_allocators_headers, - namespace : 'GstAllocators', - nsversion : api_version, -@@ -33,7 +33,8 @@ if build_gir - install : true, - extra_args : gst_gir_extra_args, - dependencies : [gst_dep] -- )] -+ ) -+ allocators_gen_sources += allocators_gir - endif - - allocators_dep = declare_dependency(link_with: gstallocators, -diff --git a/gst-libs/gst/app/meson.build b/gst-libs/gst/app/meson.build -index 81dd0f42c..7a90f5e10 100644 ---- a/gst-libs/gst/app/meson.build -+++ b/gst-libs/gst/app/meson.build -@@ -32,7 +32,7 @@ gstapp = library('gstapp-@0@'.format(api_version), - - if build_gir - gst_gir_extra_args = gir_init_section + [ '--c-include=gst/app/app.h' ] -- app_gen_sources += [gnome.generate_gir(gstapp, -+ app_gir = gnome.generate_gir(gstapp, - sources : app_sources + app_headers + [gstapp_c] + [gstapp_h], - namespace : 'GstApp', - nsversion : api_version, -@@ -43,7 +43,9 @@ if build_gir - install : true, - extra_args : gst_gir_extra_args, - dependencies : [gst_dep, gst_base_dep] -- )] -+ ) -+ -+ app_gen_sources += app_gir - endif - - app_dep = declare_dependency(link_with: gstapp, -diff --git a/gst-libs/gst/audio/meson.build b/gst-libs/gst/audio/meson.build -index 0e4efab2e..2a449d4bf 100644 ---- a/gst-libs/gst/audio/meson.build -+++ b/gst-libs/gst/audio/meson.build -@@ -153,7 +153,7 @@ gstaudio = library('gstaudio-@0@'.format(api_version), - - if build_gir - gst_gir_extra_args = gir_init_section + [ '--c-include=gst/audio/audio.h' ] -- audio_gen_sources += [gnome.generate_gir(gstaudio, -+ audio_gir = gnome.generate_gir(gstaudio, - sources : audio_src + audio_headers + [gstaudio_c] + [gstaudio_h], - namespace : 'GstAudio', - nsversion : api_version, -@@ -164,7 +164,8 @@ if build_gir - install : true, - extra_args : gst_gir_extra_args, - dependencies : gstaudio_deps -- )] -+ ) -+ audio_gen_sources += [audio_gir] - endif - - audio_dep = declare_dependency(link_with : gstaudio, -diff --git a/gst-libs/gst/pbutils/meson.build b/gst-libs/gst/pbutils/meson.build -index 2faf62622..0e96722fd 100644 ---- a/gst-libs/gst/pbutils/meson.build -+++ b/gst-libs/gst/pbutils/meson.build -@@ -63,7 +63,7 @@ pbutils = library('gstpbutils-@0@'.format(api_version), - pbutils_gen_sources = [gstpbutils_h, gst_pbutils_version_h] - if build_gir - gst_gir_extra_args = gir_init_section + [ '--c-include=gst/pbutils/pbutils.h' ] -- pbutils_gen_sources += [gnome.generate_gir(pbutils, -+ pbutils_gir = gnome.generate_gir(pbutils, - sources : pbutils_sources + pbutils_headers + [gstpbutils_h, gst_pbutils_version_h], - namespace : 'GstPbutils', - nsversion : api_version, -@@ -74,7 +74,8 @@ if build_gir - install : true, - extra_args : gst_gir_extra_args, - dependencies : gstpbutils_deps -- )] -+ ) -+ pbutils_gen_sources += [pbutils_gir] - endif - - pbutils_dep = declare_dependency(link_with : pbutils, -diff --git a/gst-libs/gst/rtp/meson.build b/gst-libs/gst/rtp/meson.build -index f47ec6592..7ea6658d5 100644 ---- a/gst-libs/gst/rtp/meson.build -+++ b/gst-libs/gst/rtp/meson.build -@@ -49,7 +49,7 @@ gst_rtp = library('gstrtp-@0@'.format(api_version), - rtp_gen_sources = [gstrtp_enum_h] - if build_gir - gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtp/rtp.h' ] -- rtp_gen_sources += [gnome.generate_gir(gst_rtp, -+ rtp_gir = gnome.generate_gir(gst_rtp, - sources : rtp_sources + rtp_headers + [gstrtp_enum_c] + [gstrtp_enum_h], - namespace : 'GstRtp', - nsversion : api_version, -@@ -60,7 +60,9 @@ if build_gir - install : true, - extra_args : gst_gir_extra_args, - dependencies : gstrtp_deps -- )] -+ ) -+ -+ rtp_gen_sources += [rtp_gir] - endif - - -diff --git a/gst-libs/gst/rtsp/meson.build b/gst-libs/gst/rtsp/meson.build -index 27e309d5a..3632adceb 100644 ---- a/gst-libs/gst/rtsp/meson.build -+++ b/gst-libs/gst/rtsp/meson.build -@@ -54,7 +54,7 @@ gst_rtsp = library('gstrtsp-@0@'.format(api_version), - rtsp_gen_sources = [gstrtsp_h] - if build_gir - gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtsp/rtsp.h' ] -- rtsp_gen_sources += [gnome.generate_gir(gst_rtsp, -+ rtsp_gir = gnome.generate_gir(gst_rtsp, - sources : rtsp_sources + rtsp_headers + [gstrtsp_c] + [gstrtsp_h], - namespace : 'GstRtsp', - nsversion : api_version, -@@ -65,7 +65,8 @@ if build_gir - install : true, - extra_args : gst_gir_extra_args, - dependencies : gstrtsp_deps + [sdp_dep] -- )] -+ ) -+ rtsp_gen_sources += [rtsp_gir] - endif - - rtsp_dep = declare_dependency(link_with : gst_rtsp, -diff --git a/gst-libs/gst/sdp/meson.build b/gst-libs/gst/sdp/meson.build -index 62c18b732..24cdb5293 100644 ---- a/gst-libs/gst/sdp/meson.build -+++ b/gst-libs/gst/sdp/meson.build -@@ -23,7 +23,7 @@ gstsdp = library('gstsdp-@0@'.format(api_version), - sdp_gen_sources = [] - if build_gir - gst_gir_extra_args = gir_init_section + [ '--c-include=gst/sdp/sdp.h' ] -- sdp_gen_sources += [gnome.generate_gir(gstsdp, -+ sdp_gir = gnome.generate_gir(gstsdp, - sources : gst_sdp_sources + gst_sdp_headers, - namespace : 'GstSdp', - nsversion : api_version, -@@ -34,7 +34,9 @@ if build_gir - install : true, - extra_args : gst_gir_extra_args, - dependencies : rtsp_deps -- )] -+ ) -+ -+ sdp_gen_sources += [sdp_gir] - endif - - sdp_dep = declare_dependency(link_with: gstsdp, -diff --git a/gst-libs/gst/tag/meson.build b/gst-libs/gst/tag/meson.build -index 27e66fd63..5ec37392a 100644 ---- a/gst-libs/gst/tag/meson.build -+++ b/gst-libs/gst/tag/meson.build -@@ -93,7 +93,7 @@ gsttag = library('gsttag-@0@'.format(api_version), - - if build_gir - gst_gir_extra_args = gir_init_section + [ '--c-include=gst/tag/tag.h' ] -- tag_gen_sources += [gnome.generate_gir(gsttag, -+ tag_gir = gnome.generate_gir(gsttag, - sources : tag_sources + tag_headers + [gsttag_h] + [gsttag_c], - namespace : 'GstTag', - nsversion : api_version, -@@ -104,7 +104,8 @@ if build_gir - install : true, - extra_args : gst_gir_extra_args, - dependencies : tag_deps -- )] -+ ) -+ tag_gen_sources += [tag_gir] - endif - - tag_dep = declare_dependency(link_with: gsttag, -diff --git a/gst-libs/gst/video/meson.build b/gst-libs/gst/video/meson.build -index 5b35e1943..bf77aa157 100644 ---- a/gst-libs/gst/video/meson.build -+++ b/gst-libs/gst/video/meson.build -@@ -138,7 +138,7 @@ gstvideo = library('gstvideo-@0@'.format(api_version), - - if build_gir - gst_gir_extra_args = gir_init_section + [ '--c-include=gst/video/video.h' ] -- video_gen_sources += [gnome.generate_gir(gstvideo, -+ video_gir = gnome.generate_gir(gstvideo, - sources : video_sources + video_headers + [gstvideo_c] + [gstvideo_h], - namespace : 'GstVideo', - nsversion : api_version, -@@ -149,7 +149,8 @@ if build_gir - install : true, - extra_args : gst_gir_extra_args, - dependencies : gstvideo_deps -- )] -+ ) -+ video_gen_sources += [video_gir] - endif - - video_dep = declare_dependency(link_with : gstvideo, --- -2.17.1 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch new file mode 100644 index 0000000000..e453a500c9 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch @@ -0,0 +1,229 @@ +From f587861bbe12ad0b10370f835592746aafedbf56 Mon Sep 17 00:00:00 2001 +From: Mingke Wang +Date: Thu, 19 Mar 2015 14:17:10 +0800 +Subject: [PATCH 2/4] ssaparse: enhance SSA text lines parsing. + +some parser will pass in the original ssa text line which starts with "Dialog:" +and there's are maybe multiple Dialog lines in one input buffer. + +Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747496] + +Signed-off-by: Mingke Wang +--- + gst/subparse/gstssaparse.c | 150 +++++++++++++++++++++++++++++++++---- + 1 file changed, 134 insertions(+), 16 deletions(-) + mode change 100644 => 100755 gst/subparse/gstssaparse.c + +diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c +old mode 100644 +new mode 100755 +index c849c08..4b9636c +--- a/gst/subparse/gstssaparse.c ++++ b/gst/subparse/gstssaparse.c +@@ -262,6 +262,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) + * gst_ssa_parse_push_line: + * @parse: caller element + * @txt: text to push ++ * @size: text size need to be parse + * @start: timestamp for the buffer + * @duration: duration for the buffer + * +@@ -271,27 +272,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) + * Returns: result of the push of the created buffer + */ + static GstFlowReturn +-gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, ++gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, gint size, + GstClockTime start, GstClockTime duration) + { + GstFlowReturn ret; + GstBuffer *buf; +- gchar *t, *escaped; ++ gchar *t, *text, *p, *escaped, *p_start, *p_end; + gint num, i, len; ++ GstClockTime start_time = G_MAXUINT64, end_time = 0; + +- num = atoi (txt); +- GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT, +- num, GST_TIME_ARGS (start)); +- +- /* skip all non-text fields before the actual text */ ++ p = text = g_malloc(size + 1); ++ *p = '\0'; + t = txt; +- for (i = 0; i < 8; ++i) { +- t = strchr (t, ','); ++ ++ /* there are may have multiple dialogue lines at a time */ ++ while (*t) { ++ /* ignore leading white space characters */ ++ while (isspace(*t)) ++ t++; ++ ++ /* ignore Format: and Style: lines */ ++ if (strncmp(t, "Format:", 7) == 0 || strncmp(t, "Style:", 6) == 0) { ++ while (*t != '\0' && *t != '\n') { ++ t++; ++ } ++ } ++ ++ if (*t == '\0') ++ break; ++ ++ /* continue with next line */ ++ if (*t == '\n') { ++ t++; ++ continue; ++ } ++ ++ if(strncmp(t, "Dialogue:", 9) != 0) { ++ /* not started with "Dialogue:", it must be a line trimmed by demuxer */ ++ num = atoi (t); ++ GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT, ++ num, GST_TIME_ARGS (start)); ++ ++ /* skip all non-text fields before the actual text */ ++ for (i = 0; i < 8; ++i) { ++ t = strchr (t, ','); ++ if (t == NULL) ++ break; ++ ++t; ++ } ++ } else { ++ /* started with "Dialogue:", update timestamp and duration */ ++ /* time format are like Dialog:Mark,0:00:01.02,0:00:03.04,xx,xxx,... */ ++ guint hour, min, sec, msec, len; ++ GstClockTime tmp; ++ gchar t_str[12] = {0}; ++ ++ /* find the first ',' */ ++ p_start = strchr (t, ','); ++ if (p_start) ++ p_end = strchr (++p_start, ','); ++ ++ if (p_start && p_end) { ++ /* copy text between first ',' and second ',' */ ++ strncpy(t_str, p_start, p_end - p_start); ++ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) { ++ tmp = ((hour*3600) + (min*60) + sec) * GST_SECOND + msec*GST_MSECOND; ++ GST_DEBUG_OBJECT (parse, "Get start time:%02d:%02d:%02d:%03d\n", ++ hour, min, sec, msec); ++ if (start_time > tmp) ++ start_time = tmp; ++ } else { ++ GST_WARNING_OBJECT (parse, ++ "failed to parse ssa start timestamp string :%s", t_str); ++ } ++ ++ p_start = p_end; ++ p_end = strchr (++p_start, ','); ++ if (p_end) { ++ /* copy text between second ',' and third ',' */ ++ strncpy(t_str, p_start, p_end - p_start); ++ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) { ++ tmp = ((hour*3600) + (min*60) + sec)*GST_SECOND + msec*GST_MSECOND; ++ GST_DEBUG_OBJECT(parse, "Get end time:%02d:%02d:%02d:%03d\n", ++ hour, min, sec, msec); ++ if (end_time < tmp) ++ end_time = tmp; ++ } else { ++ GST_WARNING_OBJECT (parse, ++ "failed to parse ssa end timestamp string :%s", t_str); ++ } ++ } ++ } ++ ++ /* now skip all non-text fields before the actual text */ ++ for (i = 0; i <= 8; ++i) { ++ t = strchr (t, ','); ++ if (t == NULL) ++ break; ++ ++t; ++ } ++ } ++ ++ /* line end before expected number of ',', not a Dialogue line */ + if (t == NULL) +- return GST_FLOW_ERROR; +- ++t; ++ break; ++ ++ /* if not the first line, and the last character of previous line is '\0', ++ * then replace it with '\N' */ ++ if (p != text && *p == '\0') { ++ *p++ = '\\'; ++ *p++ = 'N'; ++ } ++ ++ /* copy all actual text of this line */ ++ while ((*t != '\0') && (*t != '\n')) ++ *p++ = *t++; ++ ++ /* add a terminator at the end */ ++ *p = '\0'; ++ } ++ ++ /* not valid text found in this buffer return OK to let caller unref buffer */ ++ if (strlen(text) <= 0) { ++ GST_WARNING_OBJECT (parse, "Not valid text found in this buffer\n"); ++ return GST_FLOW_ERROR; + } + ++ t = text; + GST_LOG_OBJECT (parse, "Text : %s", t); + + if (gst_ssa_parse_remove_override_codes (parse, t)) { +@@ -309,13 +416,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, + gst_buffer_fill (buf, 0, escaped, len + 1); + gst_buffer_set_size (buf, len); + g_free (escaped); ++ g_free(t); ++ ++ if (start_time != G_MAXUINT64) ++ GST_BUFFER_TIMESTAMP (buf) = start_time; ++ else ++ GST_BUFFER_TIMESTAMP (buf) = start; + +- GST_BUFFER_TIMESTAMP (buf) = start; +- GST_BUFFER_DURATION (buf) = duration; ++ if (end_time > start_time) ++ GST_BUFFER_DURATION (buf) = end_time - start_time; ++ else ++ GST_BUFFER_DURATION (buf) = duration; + + GST_LOG_OBJECT (parse, "Pushing buffer with timestamp %" GST_TIME_FORMAT +- " and duration %" GST_TIME_FORMAT, GST_TIME_ARGS (start), +- GST_TIME_ARGS (duration)); ++ " and duration %" GST_TIME_FORMAT, ++ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), ++ GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); + + ret = gst_pad_push (parse->srcpad, buf); + +@@ -335,6 +451,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) + GstClockTime ts; + gchar *txt; + GstMapInfo map; ++ gint size; + + if (G_UNLIKELY (!parse->framed)) + goto not_framed; +@@ -352,13 +469,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) + /* make double-sure it's 0-terminated and all */ + gst_buffer_map (buf, &map, GST_MAP_READ); + txt = g_strndup ((gchar *) map.data, map.size); ++ size = map.size; + gst_buffer_unmap (buf, &map); + + if (txt == NULL) + goto empty_text; + + ts = GST_BUFFER_TIMESTAMP (buf); +- ret = gst_ssa_parse_push_line (parse, txt, ts, GST_BUFFER_DURATION (buf)); ++ ret = gst_ssa_parse_push_line (parse, txt, size, ts, GST_BUFFER_DURATION (buf)); + + if (ret != GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (ts)) { + GstSegment segment; +-- +2.28.0 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch deleted file mode 100644 index 9e95524057..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch +++ /dev/null @@ -1,227 +0,0 @@ -From 918c96b24d10f61b7455b4cef3bab490849d0d77 Mon Sep 17 00:00:00 2001 -From: Mingke Wang -Date: Thu, 19 Mar 2015 14:17:10 +0800 -Subject: [PATCH] ssaparse: enhance SSA text lines parsing. - -some parser will pass in the original ssa text line which starts with "Dialog:" -and there's are maybe multiple Dialog lines in one input buffer. - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747496] - -Signed-off-by: Mingke Wang - ---- - gst/subparse/gstssaparse.c | 150 ++++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 134 insertions(+), 16 deletions(-) - mode change 100644 => 100755 gst/subparse/gstssaparse.c - -diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c -old mode 100644 -new mode 100755 -index c849c08..4b9636c ---- a/gst/subparse/gstssaparse.c -+++ b/gst/subparse/gstssaparse.c -@@ -262,6 +262,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) - * gst_ssa_parse_push_line: - * @parse: caller element - * @txt: text to push -+ * @size: text size need to be parse - * @start: timestamp for the buffer - * @duration: duration for the buffer - * -@@ -271,27 +272,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) - * Returns: result of the push of the created buffer - */ - static GstFlowReturn --gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, -+gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, gint size, - GstClockTime start, GstClockTime duration) - { - GstFlowReturn ret; - GstBuffer *buf; -- gchar *t, *escaped; -+ gchar *t, *text, *p, *escaped, *p_start, *p_end; - gint num, i, len; -+ GstClockTime start_time = G_MAXUINT64, end_time = 0; - -- num = atoi (txt); -- GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT, -- num, GST_TIME_ARGS (start)); -- -- /* skip all non-text fields before the actual text */ -+ p = text = g_malloc(size + 1); -+ *p = '\0'; - t = txt; -- for (i = 0; i < 8; ++i) { -- t = strchr (t, ','); -+ -+ /* there are may have multiple dialogue lines at a time */ -+ while (*t) { -+ /* ignore leading white space characters */ -+ while (isspace(*t)) -+ t++; -+ -+ /* ignore Format: and Style: lines */ -+ if (strncmp(t, "Format:", 7) == 0 || strncmp(t, "Style:", 6) == 0) { -+ while (*t != '\0' && *t != '\n') { -+ t++; -+ } -+ } -+ -+ if (*t == '\0') -+ break; -+ -+ /* continue with next line */ -+ if (*t == '\n') { -+ t++; -+ continue; -+ } -+ -+ if(strncmp(t, "Dialogue:", 9) != 0) { -+ /* not started with "Dialogue:", it must be a line trimmed by demuxer */ -+ num = atoi (t); -+ GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT, -+ num, GST_TIME_ARGS (start)); -+ -+ /* skip all non-text fields before the actual text */ -+ for (i = 0; i < 8; ++i) { -+ t = strchr (t, ','); -+ if (t == NULL) -+ break; -+ ++t; -+ } -+ } else { -+ /* started with "Dialogue:", update timestamp and duration */ -+ /* time format are like Dialog:Mark,0:00:01.02,0:00:03.04,xx,xxx,... */ -+ guint hour, min, sec, msec, len; -+ GstClockTime tmp; -+ gchar t_str[12] = {0}; -+ -+ /* find the first ',' */ -+ p_start = strchr (t, ','); -+ if (p_start) -+ p_end = strchr (++p_start, ','); -+ -+ if (p_start && p_end) { -+ /* copy text between first ',' and second ',' */ -+ strncpy(t_str, p_start, p_end - p_start); -+ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) { -+ tmp = ((hour*3600) + (min*60) + sec) * GST_SECOND + msec*GST_MSECOND; -+ GST_DEBUG_OBJECT (parse, "Get start time:%02d:%02d:%02d:%03d\n", -+ hour, min, sec, msec); -+ if (start_time > tmp) -+ start_time = tmp; -+ } else { -+ GST_WARNING_OBJECT (parse, -+ "failed to parse ssa start timestamp string :%s", t_str); -+ } -+ -+ p_start = p_end; -+ p_end = strchr (++p_start, ','); -+ if (p_end) { -+ /* copy text between second ',' and third ',' */ -+ strncpy(t_str, p_start, p_end - p_start); -+ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) { -+ tmp = ((hour*3600) + (min*60) + sec)*GST_SECOND + msec*GST_MSECOND; -+ GST_DEBUG_OBJECT(parse, "Get end time:%02d:%02d:%02d:%03d\n", -+ hour, min, sec, msec); -+ if (end_time < tmp) -+ end_time = tmp; -+ } else { -+ GST_WARNING_OBJECT (parse, -+ "failed to parse ssa end timestamp string :%s", t_str); -+ } -+ } -+ } -+ -+ /* now skip all non-text fields before the actual text */ -+ for (i = 0; i <= 8; ++i) { -+ t = strchr (t, ','); -+ if (t == NULL) -+ break; -+ ++t; -+ } -+ } -+ -+ /* line end before expected number of ',', not a Dialogue line */ - if (t == NULL) -- return GST_FLOW_ERROR; -- ++t; -+ break; -+ -+ /* if not the first line, and the last character of previous line is '\0', -+ * then replace it with '\N' */ -+ if (p != text && *p == '\0') { -+ *p++ = '\\'; -+ *p++ = 'N'; -+ } -+ -+ /* copy all actual text of this line */ -+ while ((*t != '\0') && (*t != '\n')) -+ *p++ = *t++; -+ -+ /* add a terminator at the end */ -+ *p = '\0'; -+ } -+ -+ /* not valid text found in this buffer return OK to let caller unref buffer */ -+ if (strlen(text) <= 0) { -+ GST_WARNING_OBJECT (parse, "Not valid text found in this buffer\n"); -+ return GST_FLOW_ERROR; - } - -+ t = text; - GST_LOG_OBJECT (parse, "Text : %s", t); - - if (gst_ssa_parse_remove_override_codes (parse, t)) { -@@ -309,13 +416,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, - gst_buffer_fill (buf, 0, escaped, len + 1); - gst_buffer_set_size (buf, len); - g_free (escaped); -+ g_free(t); -+ -+ if (start_time != G_MAXUINT64) -+ GST_BUFFER_TIMESTAMP (buf) = start_time; -+ else -+ GST_BUFFER_TIMESTAMP (buf) = start; - -- GST_BUFFER_TIMESTAMP (buf) = start; -- GST_BUFFER_DURATION (buf) = duration; -+ if (end_time > start_time) -+ GST_BUFFER_DURATION (buf) = end_time - start_time; -+ else -+ GST_BUFFER_DURATION (buf) = duration; - - GST_LOG_OBJECT (parse, "Pushing buffer with timestamp %" GST_TIME_FORMAT -- " and duration %" GST_TIME_FORMAT, GST_TIME_ARGS (start), -- GST_TIME_ARGS (duration)); -+ " and duration %" GST_TIME_FORMAT, -+ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), -+ GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); - - ret = gst_pad_push (parse->srcpad, buf); - -@@ -335,6 +451,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) - GstClockTime ts; - gchar *txt; - GstMapInfo map; -+ gint size; - - if (G_UNLIKELY (!parse->framed)) - goto not_framed; -@@ -352,13 +469,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) - /* make double-sure it's 0-terminated and all */ - gst_buffer_map (buf, &map, GST_MAP_READ); - txt = g_strndup ((gchar *) map.data, map.size); -+ size = map.size; - gst_buffer_unmap (buf, &map); - - if (txt == NULL) - goto empty_text; - - ts = GST_BUFFER_TIMESTAMP (buf); -- ret = gst_ssa_parse_push_line (parse, txt, ts, GST_BUFFER_DURATION (buf)); -+ ret = gst_ssa_parse_push_line (parse, txt, size, ts, GST_BUFFER_DURATION (buf)); - - if (ret != GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (ts)) { - GstSegment segment; diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch new file mode 100644 index 0000000000..2af83ff8b9 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch @@ -0,0 +1,32 @@ +From 153f3b83a3fed77785bd1420bed8bbafa2d791b3 Mon Sep 17 00:00:00 2001 +From: Carlos Rafael Giani +Date: Tue, 21 May 2019 14:01:11 +0200 +Subject: [PATCH 3/4] viv-fb: Make sure config.h is included + +This prevents build errors due to missing GST_API_* symbols + +Upstream-Status: Pending + +Signed-off-by: Carlos Rafael Giani +--- + gst-libs/gst/gl/gl-prelude.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/gst-libs/gst/gl/gl-prelude.h b/gst-libs/gst/gl/gl-prelude.h +index 05e1f62..96ce5e6 100644 +--- a/gst-libs/gst/gl/gl-prelude.h ++++ b/gst-libs/gst/gl/gl-prelude.h +@@ -22,6 +22,10 @@ + #ifndef __GST_GL_PRELUDE_H__ + #define __GST_GL_PRELUDE_H__ + ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ + #include + + #ifdef BUILDING_GST_GL +-- +2.28.0 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch new file mode 100644 index 0000000000..f45ea65ef3 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch @@ -0,0 +1,32 @@ +From 79841a02ee754eba736cb32aaf2ed2b2fc0483d4 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 24 Sep 2015 19:47:32 +0300 +Subject: [PATCH 4/4] glimagesink: Downrank to marginal + +On desktop, where there is good OpenGL, xvimagesink will come up first, +on other platforms, OpenGL can't be trusted because it's either software (like +in a VM) or broken (like on embedded)., so let ximagesink come above. + +Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=751684] + +Signed-off-by: Alexander Kanavin +--- + ext/gl/gstopengl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c +index 302e845..463be9c 100644 +--- a/ext/gl/gstopengl.c ++++ b/ext/gl/gstopengl.c +@@ -127,7 +127,7 @@ plugin_init (GstPlugin * plugin) + #endif + + if (!gst_element_register (plugin, "glimagesink", +- GST_RANK_SECONDARY, gst_gl_image_sink_bin_get_type ())) { ++ GST_RANK_MARGINAL, gst_gl_image_sink_bin_get_type ())) { + return FALSE; + } + +-- +2.28.0 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch deleted file mode 100644 index 6e53d2e8b5..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch +++ /dev/null @@ -1,32 +0,0 @@ -From bec38a0c2e2958927c42b2f9ae939969b7c4a326 Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani -Date: Tue, 21 May 2019 14:01:11 +0200 -Subject: [PATCH] viv-fb: Make sure config.h is included - -This prevents build errors due to missing GST_API_* symbols - -Upstream-Status: Pending - -Signed-off-by: Carlos Rafael Giani ---- - gst-libs/gst/gl/gl-prelude.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/gst-libs/gst/gl/gl-prelude.h b/gst-libs/gst/gl/gl-prelude.h -index 05e1f6229..96ce5e685 100644 ---- a/gst-libs/gst/gl/gl-prelude.h -+++ b/gst-libs/gst/gl/gl-prelude.h -@@ -22,6 +22,10 @@ - #ifndef __GST_GL_PRELUDE_H__ - #define __GST_GL_PRELUDE_H__ - -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ - #include - - #ifdef BUILDING_GST_GL --- -2.17.1 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch deleted file mode 100644 index e8094f459e..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch +++ /dev/null @@ -1,32 +0,0 @@ -From c6b37a80806f9128de47f1ccc3f2354f8d436bb6 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 24 Sep 2015 19:47:32 +0300 -Subject: [PATCH] glimagesink: Downrank to marginal - -On desktop, where there is good OpenGL, xvimagesink will come up first, -on other platforms, OpenGL can't be trusted because it's either software (like -in a VM) or broken (like on embedded)., so let ximagesink come above. - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=751684] - -Signed-off-by: Alexander Kanavin ---- - ext/gl/gstopengl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c -index a4b2540..0ccaacd 100644 ---- a/ext/gl/gstopengl.c -+++ b/ext/gl/gstopengl.c -@@ -127,7 +127,7 @@ plugin_init (GstPlugin * plugin) - #endif - - if (!gst_element_register (plugin, "glimagesink", -- GST_RANK_SECONDARY, gst_gl_image_sink_bin_get_type ())) { -+ GST_RANK_MARGINAL, gst_gl_image_sink_bin_get_type ())) { - return FALSE; - } - --- -2.1.4 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch deleted file mode 100644 index a4727e23ea..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 41de2ec64ab06bb58c82c1659adaa3811bc5bcf8 Mon Sep 17 00:00:00 2001 -From: zhouming -Date: Wed, 14 May 2014 10:16:20 +0800 -Subject: [PATCH] ENGR00312515: get caps from src pad when query caps - -https://bugzilla.gnome.org/show_bug.cgi?id=728312 - -Upstream-Status: Pending - -Signed-off-by: zhouming - ---- - gst-libs/gst/tag/gsttagdemux.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - mode change 100644 => 100755 gst-libs/gst/tag/gsttagdemux.c - -diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c -old mode 100644 -new mode 100755 -index 8a127c8..71c5d78 ---- a/gst-libs/gst/tag/gsttagdemux.c -+++ b/gst-libs/gst/tag/gsttagdemux.c -@@ -1759,6 +1759,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query) - } - break; - } -+ case GST_QUERY_CAPS: -+ { -+ -+ /* We can hijack caps query if we typefind already */ -+ if (demux->priv->src_caps) { -+ gst_query_set_caps_result (query, demux->priv->src_caps); -+ res = TRUE; -+ } else { -+ res = gst_pad_query_default (pad, parent, query); -+ } -+ break; -+ } -+ - default: - res = gst_pad_query_default (pad, parent, query); - break; diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.bb deleted file mode 100644 index 6563b6f738..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.bb +++ /dev/null @@ -1,99 +0,0 @@ -require gstreamer1.0-plugins-common.inc - -LICENSE = "GPLv2+ & LGPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ - file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607" - -SRC_URI = " \ - https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \ - file://get-caps-from-src-pad-when-query-caps.patch \ - file://0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch \ - file://0002-meson-Add-variables-for-gir-files.patch \ - file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \ - file://0005-viv-fb-Make-sure-config.h-is-included.patch \ - file://0009-glimagesink-Downrank-to-marginal.patch \ - " -SRC_URI[md5sum] = "3fdb32823535799a748c1fc14f978e2c" -SRC_URI[sha256sum] = "b13e73e2fe74a4166552f9577c3dcb24bed077021b9c7fa600d910ec6987816a" - -S = "${WORKDIR}/gst-plugins-base-${PV}" - -DEPENDS += "iso-codes util-linux zlib" - -inherit gobject-introspection gtk-doc - -PACKAGES_DYNAMIC =+ "^libgst.*" - -# opengl packageconfig factored out to make it easy for distros -# and BSP layers to choose OpenGL APIs/platforms/window systems -PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" - -PACKAGECONFIG ??= " \ - ${GSTREAMER_ORC} \ - ${PACKAGECONFIG_GL} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \ - jpeg ogg pango png theora vorbis \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \ -" - -OPENGL_APIS = 'opengl gles2' -OPENGL_PLATFORMS = 'egl' - -X11DEPENDS = "virtual/libx11 libsm libxrender libxv" -X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled" -X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled" - -PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib" -PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia" -PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg" -PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg" -PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus" -PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango" -PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng" -PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora" -PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor" -PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual" -PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis" -PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" - -# OpenGL API packageconfigs -PACKAGECONFIG[opengl] = ",,virtual/libgl libglu" -PACKAGECONFIG[gles2] = ",,virtual/libgles2" - -# OpenGL platform packageconfigs -PACKAGECONFIG[egl] = ",,virtual/egl" - -# OpenGL window systems (except for X11) -PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm" -PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm" -PACKAGECONFIG[dispmanx] = ",,virtual/libomxil" - -OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'x11', ' x11', '', d)}" -OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gbm', ' gbm', '', d)}" -OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'wayland', ' wayland', '', d)}" -OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'dispmanx', ' dispmanx', '', d)}" - -EXTRA_OEMESON += " \ - -Dgl-graphene=disabled \ - ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \ - ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \ - ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \ -" - -GTKDOC_MESON_OPTION = "gtk_doc" -GTKDOC_MESON_ENABLE_FLAG = "enabled" -GTKDOC_MESON_DISABLE_FLAG = "disabled" - -FILES_${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h" -FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict" - -def get_opengl_cmdline_list(switch_name, options, d): - selected_options = [] - if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d): - for option in options.split(): - if bb.utils.contains('PACKAGECONFIG', option, True, False, d): - selected_options += [option] - if selected_options: - return '-D' + switch_name + '=' + ','.join(selected_options) - else: - return '' diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.0.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.0.bb new file mode 100644 index 0000000000..7fe5a480d4 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.0.bb @@ -0,0 +1,92 @@ +require gstreamer1.0-plugins-common.inc + +LICENSE = "GPLv2+ & LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d" + +SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \ + file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \ + file://0003-viv-fb-Make-sure-config.h-is-included.patch \ + file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \ + file://0004-glimagesink-Downrank-to-marginal.patch \ + " +SRC_URI[md5sum] = "5ea9dc2692335e03170c3639901c2d83" +SRC_URI[sha256sum] = "762abdd1a950809a1cea62fff7f86b5f7d6bd5f6841e3e585c700b823cdb7897" + +S = "${WORKDIR}/gst-plugins-base-${PV}" + +DEPENDS += "iso-codes util-linux zlib" + +inherit gobject-introspection + +PACKAGES_DYNAMIC =+ "^libgst.*" + +# opengl packageconfig factored out to make it easy for distros +# and BSP layers to choose OpenGL APIs/platforms/window systems +PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" + +PACKAGECONFIG ??= " \ + ${GSTREAMER_ORC} \ + ${PACKAGECONFIG_GL} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \ + jpeg ogg pango png theora vorbis \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \ +" + +OPENGL_APIS = 'opengl gles2' +OPENGL_PLATFORMS = 'egl' + +X11DEPENDS = "virtual/libx11 libsm libxrender libxv" +X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled" +X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled" + +PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib" +PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia" +PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg" +PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg" +PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus" +PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango" +PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng" +PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora" +PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor" +PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual" +PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis" +PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" + +# OpenGL API packageconfigs +PACKAGECONFIG[opengl] = ",,virtual/libgl libglu" +PACKAGECONFIG[gles2] = ",,virtual/libgles2" + +# OpenGL platform packageconfigs +PACKAGECONFIG[egl] = ",,virtual/egl" + +# OpenGL window systems (except for X11) +PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm" +PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm" +PACKAGECONFIG[dispmanx] = ",,virtual/libomxil" + +OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'x11', ' x11', '', d)}" +OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gbm', ' gbm', '', d)}" +OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'wayland', ' wayland', '', d)}" +OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'dispmanx', ' dispmanx', '', d)}" + +EXTRA_OEMESON += " \ + -Ddoc=disabled \ + -Dgl-graphene=disabled \ + ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \ + ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \ + ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \ +" + +FILES_${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h" +FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict" + +def get_opengl_cmdline_list(switch_name, options, d): + selected_options = [] + if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d): + for option in options.split(): + if bb.utils.contains('PACKAGECONFIG', option, True, False, d): + selected_options += [option] + if selected_options: + return '-D' + switch_name + '=' + ','.join(selected_options) + else: + return '' -- cgit v1.2.3-54-g00ecf