diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-11-21 11:44:01 -0800 |
---|---|---|
committer | Andrei Gherzan <andrei@gherzan.ro> | 2018-11-22 11:49:36 +0200 |
commit | 10cee099bc6f1f805367e866598af6bf44e8f1b7 (patch) | |
tree | 6b8e3aca9fe8acc40ad264feefb42143e87615b1 /recipes-multimedia/omxplayer | |
parent | 7c94afee2b12a1cdef2f8c3c743c555af17a560b (diff) | |
download | meta-raspberrypi-10cee099bc6f1f805367e866598af6bf44e8f1b7.tar.gz |
omxplaye: Fix build with userland graphic driver
- Upgrade to latest omxplayer with ffmpeg 4.x
- drop backported patches which are not needed
- Make vc4 support patch conditionally apply only when vc4graphics is used
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-multimedia/omxplayer')
4 files changed, 7 insertions, 539 deletions
diff --git a/recipes-multimedia/omxplayer/omxplayer/0001-openssl-Support-version-1.1.0.patch b/recipes-multimedia/omxplayer/omxplayer/0001-openssl-Support-version-1.1.0.patch deleted file mode 100644 index 950d3fe..0000000 --- a/recipes-multimedia/omxplayer/omxplayer/0001-openssl-Support-version-1.1.0.patch +++ /dev/null | |||
@@ -1,233 +0,0 @@ | |||
1 | From 3e085f3e5ff4b45672ccb43b4556ddf86f805c1f Mon Sep 17 00:00:00 2001 | ||
2 | From: Matt Oliver <protogonoi@gmail.com> | ||
3 | Date: Wed, 12 Sep 2018 22:47:20 -0700 | ||
4 | Subject: [PATCH] openssl: Support version 1.1.0 | ||
5 | |||
6 | Fixes #5675 | ||
7 | |||
8 | Upstream-Status: Backport | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | configure | 3 +- | ||
13 | libavformat/tls_openssl.c | 163 +++++++++++++++++++++++--------------- | ||
14 | 2 files changed, 102 insertions(+), 64 deletions(-) | ||
15 | |||
16 | diff --git a/configure b/configure | ||
17 | index 592df195ac..cc5c8e70fc 100755 | ||
18 | --- a/configure | ||
19 | +++ b/configure | ||
20 | @@ -5788,7 +5788,8 @@ enabled omx && { check_header OMX_Core.h || | ||
21 | add_cflags -isystem/opt/vc/include/IL ; } | ||
22 | check_header OMX_Core.h ; } || | ||
23 | die "ERROR: OpenMAX IL headers not found"; } | ||
24 | -enabled openssl && { use_pkg_config openssl openssl/ssl.h SSL_library_init || | ||
25 | +enabled openssl && { use_pkg_config openssl openssl/ssl.h OPENSSL_init_ssl || | ||
26 | + use_pkg_config openssl openssl/ssl.h SSL_library_init || | ||
27 | check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || | ||
28 | check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 || | ||
29 | check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || | ||
30 | diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c | ||
31 | index 46eb3e68c7..c551ac74e2 100644 | ||
32 | --- a/libavformat/tls_openssl.c | ||
33 | +++ b/libavformat/tls_openssl.c | ||
34 | @@ -43,6 +43,9 @@ typedef struct TLSContext { | ||
35 | TLSShared tls_shared; | ||
36 | SSL_CTX *ctx; | ||
37 | SSL *ssl; | ||
38 | +#if OPENSSL_VERSION_NUMBER >= 0x1010000fL | ||
39 | + BIO_METHOD* url_bio_method; | ||
40 | +#endif | ||
41 | } TLSContext; | ||
42 | |||
43 | #if HAVE_THREADS | ||
44 | @@ -63,6 +66,87 @@ static unsigned long openssl_thread_id(void) | ||
45 | #endif | ||
46 | #endif | ||
47 | |||
48 | +static int url_bio_create(BIO *b) | ||
49 | +{ | ||
50 | +#if OPENSSL_VERSION_NUMBER >= 0x1010000fL | ||
51 | + BIO_set_init(b, 1); | ||
52 | + BIO_set_data(b, NULL); | ||
53 | + BIO_set_flags(b, 0); | ||
54 | +#else | ||
55 | + b->init = 1; | ||
56 | + b->ptr = NULL; | ||
57 | + b->flags = 0; | ||
58 | +#endif | ||
59 | + return 1; | ||
60 | +} | ||
61 | + | ||
62 | +static int url_bio_destroy(BIO *b) | ||
63 | +{ | ||
64 | + return 1; | ||
65 | +} | ||
66 | + | ||
67 | +#if OPENSSL_VERSION_NUMBER >= 0x1010000fL | ||
68 | +#define GET_BIO_DATA(x) BIO_get_data(x); | ||
69 | +#else | ||
70 | +#define GET_BIO_DATA(x) (x)->ptr; | ||
71 | +#endif | ||
72 | + | ||
73 | +static int url_bio_bread(BIO *b, char *buf, int len) | ||
74 | +{ | ||
75 | + URLContext *h; | ||
76 | + int ret; | ||
77 | + h = GET_BIO_DATA(b); | ||
78 | + ret = ffurl_read(h, buf, len); | ||
79 | + if (ret >= 0) | ||
80 | + return ret; | ||
81 | + BIO_clear_retry_flags(b); | ||
82 | + if (ret == AVERROR_EXIT) | ||
83 | + return 0; | ||
84 | + return -1; | ||
85 | +} | ||
86 | + | ||
87 | +static int url_bio_bwrite(BIO *b, const char *buf, int len) | ||
88 | +{ | ||
89 | + URLContext *h; | ||
90 | + int ret; | ||
91 | + h = GET_BIO_DATA(b); | ||
92 | + ret = ffurl_write(h, buf, len); | ||
93 | + if (ret >= 0) | ||
94 | + return ret; | ||
95 | + BIO_clear_retry_flags(b); | ||
96 | + if (ret == AVERROR_EXIT) | ||
97 | + return 0; | ||
98 | + return -1; | ||
99 | +} | ||
100 | + | ||
101 | +static long url_bio_ctrl(BIO *b, int cmd, long num, void *ptr) | ||
102 | +{ | ||
103 | + if (cmd == BIO_CTRL_FLUSH) { | ||
104 | + BIO_clear_retry_flags(b); | ||
105 | + return 1; | ||
106 | + } | ||
107 | + return 0; | ||
108 | +} | ||
109 | + | ||
110 | +static int url_bio_bputs(BIO *b, const char *str) | ||
111 | +{ | ||
112 | + return url_bio_bwrite(b, str, strlen(str)); | ||
113 | +} | ||
114 | + | ||
115 | +#if OPENSSL_VERSION_NUMBER < 0x1010000fL | ||
116 | +static BIO_METHOD url_bio_method = { | ||
117 | + .type = BIO_TYPE_SOURCE_SINK, | ||
118 | + .name = "urlprotocol bio", | ||
119 | + .bwrite = url_bio_bwrite, | ||
120 | + .bread = url_bio_bread, | ||
121 | + .bputs = url_bio_bputs, | ||
122 | + .bgets = NULL, | ||
123 | + .ctrl = url_bio_ctrl, | ||
124 | + .create = url_bio_create, | ||
125 | + .destroy = url_bio_destroy, | ||
126 | +}; | ||
127 | +#endif | ||
128 | + | ||
129 | int ff_openssl_init(void) | ||
130 | { | ||
131 | avpriv_lock_avformat(); | ||
132 | @@ -128,73 +212,14 @@ static int tls_close(URLContext *h) | ||
133 | SSL_CTX_free(c->ctx); | ||
134 | if (c->tls_shared.tcp) | ||
135 | ffurl_close(c->tls_shared.tcp); | ||
136 | +#if OPENSSL_VERSION_NUMBER >= 0x1010000fL | ||
137 | + if (c->url_bio_method) | ||
138 | + BIO_meth_free(c->url_bio_method); | ||
139 | +#endif | ||
140 | ff_openssl_deinit(); | ||
141 | return 0; | ||
142 | } | ||
143 | |||
144 | -static int url_bio_create(BIO *b) | ||
145 | -{ | ||
146 | - b->init = 1; | ||
147 | - b->ptr = NULL; | ||
148 | - b->flags = 0; | ||
149 | - return 1; | ||
150 | -} | ||
151 | - | ||
152 | -static int url_bio_destroy(BIO *b) | ||
153 | -{ | ||
154 | - return 1; | ||
155 | -} | ||
156 | - | ||
157 | -static int url_bio_bread(BIO *b, char *buf, int len) | ||
158 | -{ | ||
159 | - URLContext *h = b->ptr; | ||
160 | - int ret = ffurl_read(h, buf, len); | ||
161 | - if (ret >= 0) | ||
162 | - return ret; | ||
163 | - BIO_clear_retry_flags(b); | ||
164 | - if (ret == AVERROR_EXIT) | ||
165 | - return 0; | ||
166 | - return -1; | ||
167 | -} | ||
168 | - | ||
169 | -static int url_bio_bwrite(BIO *b, const char *buf, int len) | ||
170 | -{ | ||
171 | - URLContext *h = b->ptr; | ||
172 | - int ret = ffurl_write(h, buf, len); | ||
173 | - if (ret >= 0) | ||
174 | - return ret; | ||
175 | - BIO_clear_retry_flags(b); | ||
176 | - if (ret == AVERROR_EXIT) | ||
177 | - return 0; | ||
178 | - return -1; | ||
179 | -} | ||
180 | - | ||
181 | -static long url_bio_ctrl(BIO *b, int cmd, long num, void *ptr) | ||
182 | -{ | ||
183 | - if (cmd == BIO_CTRL_FLUSH) { | ||
184 | - BIO_clear_retry_flags(b); | ||
185 | - return 1; | ||
186 | - } | ||
187 | - return 0; | ||
188 | -} | ||
189 | - | ||
190 | -static int url_bio_bputs(BIO *b, const char *str) | ||
191 | -{ | ||
192 | - return url_bio_bwrite(b, str, strlen(str)); | ||
193 | -} | ||
194 | - | ||
195 | -static BIO_METHOD url_bio_method = { | ||
196 | - .type = BIO_TYPE_SOURCE_SINK, | ||
197 | - .name = "urlprotocol bio", | ||
198 | - .bwrite = url_bio_bwrite, | ||
199 | - .bread = url_bio_bread, | ||
200 | - .bputs = url_bio_bputs, | ||
201 | - .bgets = NULL, | ||
202 | - .ctrl = url_bio_ctrl, | ||
203 | - .create = url_bio_create, | ||
204 | - .destroy = url_bio_destroy, | ||
205 | -}; | ||
206 | - | ||
207 | static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **options) | ||
208 | { | ||
209 | TLSContext *p = h->priv_data; | ||
210 | @@ -240,8 +265,20 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op | ||
211 | ret = AVERROR(EIO); | ||
212 | goto fail; | ||
213 | } | ||
214 | +#if OPENSSL_VERSION_NUMBER >= 0x1010000fL | ||
215 | + p->url_bio_method = BIO_meth_new(BIO_TYPE_SOURCE_SINK, "urlprotocol bio"); | ||
216 | + BIO_meth_set_write(p->url_bio_method, url_bio_bwrite); | ||
217 | + BIO_meth_set_read(p->url_bio_method, url_bio_bread); | ||
218 | + BIO_meth_set_puts(p->url_bio_method, url_bio_bputs); | ||
219 | + BIO_meth_set_ctrl(p->url_bio_method, url_bio_ctrl); | ||
220 | + BIO_meth_set_create(p->url_bio_method, url_bio_create); | ||
221 | + BIO_meth_set_destroy(p->url_bio_method, url_bio_destroy); | ||
222 | + bio = BIO_new(p->url_bio_method); | ||
223 | + BIO_set_data(bio, c->tcp); | ||
224 | +#else | ||
225 | bio = BIO_new(&url_bio_method); | ||
226 | bio->ptr = c->tcp; | ||
227 | +#endif | ||
228 | SSL_set_bio(p->ssl, bio, bio); | ||
229 | if (!c->listen && !c->numerichost) | ||
230 | SSL_set_tlsext_host_name(p->ssl, c->host); | ||
231 | -- | ||
232 | 2.19.0 | ||
233 | |||
diff --git a/recipes-multimedia/omxplayer/omxplayer/0001-rtmpdh-Stop-using-OpenSSL-provided-DH-functions-to-s.patch b/recipes-multimedia/omxplayer/omxplayer/0001-rtmpdh-Stop-using-OpenSSL-provided-DH-functions-to-s.patch deleted file mode 100644 index 3328f4b..0000000 --- a/recipes-multimedia/omxplayer/omxplayer/0001-rtmpdh-Stop-using-OpenSSL-provided-DH-functions-to-s.patch +++ /dev/null | |||
@@ -1,223 +0,0 @@ | |||
1 | From db251a3d71020ef15094158ccd69d2c32ddd194d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 12 Sep 2018 23:55:42 -0700 | ||
4 | Subject: [PATCH] rtmpdh: Stop using OpenSSL-provided DH functions to support | ||
5 | 1.1.0 | ||
6 | |||
7 | DH (struct dh_st) was made private in the 1.1 series, instead | ||
8 | DH is now done the same way as with gcrypt / libgmp. | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | libavformat/rtmpdh.c | 95 +++++++++++++++++++++----------------------- | ||
13 | libavformat/rtmpdh.h | 14 +++---- | ||
14 | 2 files changed, 52 insertions(+), 57 deletions(-) | ||
15 | |||
16 | diff --git a/libavformat/rtmpdh.c b/libavformat/rtmpdh.c | ||
17 | index 1876fd44f9..8eb088237b 100644 | ||
18 | --- a/libavformat/rtmpdh.c | ||
19 | +++ b/libavformat/rtmpdh.c | ||
20 | @@ -54,7 +54,6 @@ | ||
21 | "F71C35FDAD44CFD2D74F9208BE258FF324943328F67329C0" \ | ||
22 | "FFFFFFFFFFFFFFFF" | ||
23 | |||
24 | -#if CONFIG_GMP || CONFIG_GCRYPT | ||
25 | #if CONFIG_GMP | ||
26 | #define bn_new(bn) \ | ||
27 | do { \ | ||
28 | @@ -93,7 +92,6 @@ | ||
29 | else \ | ||
30 | ret = 1; \ | ||
31 | } while (0) | ||
32 | -#define bn_modexp(bn, y, q, p) mpz_powm(bn, y, q, p) | ||
33 | #define bn_random(bn, num_bits) \ | ||
34 | do { \ | ||
35 | int bits = num_bits; \ | ||
36 | @@ -104,6 +102,11 @@ | ||
37 | } \ | ||
38 | mpz_fdiv_r_2exp(bn, bn, num_bits); \ | ||
39 | } while (0) | ||
40 | +static int bn_modexp(FFBigNum bn, FFBigNum y, FFBigNum q, FFBigNum p) | ||
41 | +{ | ||
42 | + mpz_powm(bn, y, q, p); | ||
43 | + return 0; | ||
44 | +} | ||
45 | #elif CONFIG_GCRYPT | ||
46 | #define bn_new(bn) \ | ||
47 | do { \ | ||
48 | @@ -125,13 +128,42 @@ | ||
49 | #define bn_bn2bin(bn, buf, len) gcry_mpi_print(GCRYMPI_FMT_USG, buf, len, NULL, bn) | ||
50 | #define bn_bin2bn(bn, buf, len) gcry_mpi_scan(&bn, GCRYMPI_FMT_USG, buf, len, NULL) | ||
51 | #define bn_hex2bn(bn, buf, ret) ret = (gcry_mpi_scan(&bn, GCRYMPI_FMT_HEX, buf, 0, 0) == 0) | ||
52 | -#define bn_modexp(bn, y, q, p) gcry_mpi_powm(bn, y, q, p) | ||
53 | #define bn_random(bn, num_bits) gcry_mpi_randomize(bn, num_bits, GCRY_WEAK_RANDOM) | ||
54 | +static int bn_modexp(FFBigNum bn, FFBigNum y, FFBigNum q, FFBigNum p) | ||
55 | +{ | ||
56 | + gcry_mpi_powm(bn, y, q, p); | ||
57 | + return 0; | ||
58 | +} | ||
59 | +#elif CONFIG_OPENSSL | ||
60 | +#define bn_new(bn) bn = BN_new() | ||
61 | +#define bn_free(bn) BN_free(bn) | ||
62 | +#define bn_set_word(bn, w) BN_set_word(bn, w) | ||
63 | +#define bn_cmp(a, b) BN_cmp(a, b) | ||
64 | +#define bn_copy(to, from) BN_copy(to, from) | ||
65 | +#define bn_sub_word(bn, w) BN_sub_word(bn, w) | ||
66 | +#define bn_cmp_1(bn) BN_cmp(bn, BN_value_one()) | ||
67 | +#define bn_num_bytes(bn) BN_num_bytes(bn) | ||
68 | +#define bn_bn2bin(bn, buf, len) BN_bn2bin(bn, buf) | ||
69 | +#define bn_bin2bn(bn, buf, len) bn = BN_bin2bn(buf, len, 0) | ||
70 | +#define bn_hex2bn(bn, buf, ret) ret = BN_hex2bn(&bn, buf) | ||
71 | +#define bn_random(bn, num_bits) BN_rand(bn, num_bits, 0, 0) | ||
72 | +static int bn_modexp(FFBigNum bn, FFBigNum y, FFBigNum q, FFBigNum p) | ||
73 | +{ | ||
74 | + BN_CTX *ctx = BN_CTX_new(); | ||
75 | + if (!ctx) | ||
76 | + return AVERROR(ENOMEM); | ||
77 | + if (!BN_mod_exp(bn, y, q, p, ctx)) { | ||
78 | + BN_CTX_free(ctx); | ||
79 | + return AVERROR(EINVAL); | ||
80 | + } | ||
81 | + BN_CTX_free(ctx); | ||
82 | + return 0; | ||
83 | +} | ||
84 | #endif | ||
85 | |||
86 | #define MAX_BYTES 18000 | ||
87 | |||
88 | -#define dh_new() av_malloc(sizeof(FF_DH)) | ||
89 | +#define dh_new() av_mallocz(sizeof(FF_DH)) | ||
90 | |||
91 | static FFBigNum dh_generate_key(FF_DH *dh) | ||
92 | { | ||
93 | @@ -152,7 +184,8 @@ static FFBigNum dh_generate_key(FF_DH *dh) | ||
94 | return NULL; | ||
95 | } | ||
96 | |||
97 | - bn_modexp(dh->pub_key, dh->g, dh->priv_key, dh->p); | ||
98 | + if (bn_modexp(dh->pub_key, dh->g, dh->priv_key, dh->p) < 0) | ||
99 | + return NULL; | ||
100 | |||
101 | return dh->pub_key; | ||
102 | } | ||
103 | @@ -161,12 +194,16 @@ static int dh_compute_key(FF_DH *dh, FFBigNum pub_key_bn, | ||
104 | uint32_t secret_key_len, uint8_t *secret_key) | ||
105 | { | ||
106 | FFBigNum k; | ||
107 | + int ret; | ||
108 | |||
109 | bn_new(k); | ||
110 | if (!k) | ||
111 | return -1; | ||
112 | |||
113 | - bn_modexp(k, pub_key_bn, dh->priv_key, dh->p); | ||
114 | + if ((ret = bn_modexp(k, pub_key_bn, dh->priv_key, dh->p)) < 0) { | ||
115 | + bn_free(k); | ||
116 | + return ret; | ||
117 | + } | ||
118 | bn_bn2bin(k, secret_key, secret_key_len); | ||
119 | bn_free(k); | ||
120 | |||
121 | @@ -184,48 +221,6 @@ void ff_dh_free(FF_DH *dh) | ||
122 | bn_free(dh->priv_key); | ||
123 | av_free(dh); | ||
124 | } | ||
125 | -#elif CONFIG_OPENSSL | ||
126 | -#define bn_new(bn) bn = BN_new() | ||
127 | -#define bn_free(bn) BN_free(bn) | ||
128 | -#define bn_set_word(bn, w) BN_set_word(bn, w) | ||
129 | -#define bn_cmp(a, b) BN_cmp(a, b) | ||
130 | -#define bn_copy(to, from) BN_copy(to, from) | ||
131 | -#define bn_sub_word(bn, w) BN_sub_word(bn, w) | ||
132 | -#define bn_cmp_1(bn) BN_cmp(bn, BN_value_one()) | ||
133 | -#define bn_num_bytes(bn) BN_num_bytes(bn) | ||
134 | -#define bn_bn2bin(bn, buf, len) BN_bn2bin(bn, buf) | ||
135 | -#define bn_bin2bn(bn, buf, len) bn = BN_bin2bn(buf, len, 0) | ||
136 | -#define bn_hex2bn(bn, buf, ret) ret = BN_hex2bn(&bn, buf) | ||
137 | -#define bn_modexp(bn, y, q, p) \ | ||
138 | - do { \ | ||
139 | - BN_CTX *ctx = BN_CTX_new(); \ | ||
140 | - if (!ctx) \ | ||
141 | - return AVERROR(ENOMEM); \ | ||
142 | - if (!BN_mod_exp(bn, y, q, p, ctx)) { \ | ||
143 | - BN_CTX_free(ctx); \ | ||
144 | - return AVERROR(EINVAL); \ | ||
145 | - } \ | ||
146 | - BN_CTX_free(ctx); \ | ||
147 | - } while (0) | ||
148 | - | ||
149 | -#define dh_new() DH_new() | ||
150 | -#define dh_generate_key(dh) DH_generate_key(dh) | ||
151 | - | ||
152 | -static int dh_compute_key(FF_DH *dh, FFBigNum pub_key_bn, | ||
153 | - uint32_t secret_key_len, uint8_t *secret_key) | ||
154 | -{ | ||
155 | - if (secret_key_len < DH_size(dh)) | ||
156 | - return AVERROR(EINVAL); | ||
157 | - return DH_compute_key(secret_key, pub_key_bn, dh); | ||
158 | -} | ||
159 | - | ||
160 | -void ff_dh_free(FF_DH *dh) | ||
161 | -{ | ||
162 | - if (!dh) | ||
163 | - return; | ||
164 | - DH_free(dh); | ||
165 | -} | ||
166 | -#endif | ||
167 | |||
168 | static int dh_is_valid_public_key(FFBigNum y, FFBigNum p, FFBigNum q) | ||
169 | { | ||
170 | @@ -254,8 +249,10 @@ static int dh_is_valid_public_key(FFBigNum y, FFBigNum p, FFBigNum q) | ||
171 | * random data. | ||
172 | */ | ||
173 | /* y must fulfill y^q mod p = 1 */ | ||
174 | - bn_modexp(bn, y, q, p); | ||
175 | + if ((ret = bn_modexp(bn, y, q, p)) < 0) | ||
176 | + goto fail; | ||
177 | |||
178 | + ret = AVERROR(EINVAL); | ||
179 | if (bn_cmp_1(bn)) | ||
180 | goto fail; | ||
181 | |||
182 | diff --git a/libavformat/rtmpdh.h b/libavformat/rtmpdh.h | ||
183 | index 2b250f595d..188aad7a45 100644 | ||
184 | --- a/libavformat/rtmpdh.h | ||
185 | +++ b/libavformat/rtmpdh.h | ||
186 | @@ -26,7 +26,6 @@ | ||
187 | |||
188 | #include "config.h" | ||
189 | |||
190 | -#if CONFIG_GMP || CONFIG_GCRYPT | ||
191 | #if CONFIG_GMP | ||
192 | #include <gmp.h> | ||
193 | |||
194 | @@ -35,6 +34,12 @@ typedef mpz_ptr FFBigNum; | ||
195 | #include <gcrypt.h> | ||
196 | |||
197 | typedef gcry_mpi_t FFBigNum; | ||
198 | + | ||
199 | +#elif CONFIG_OPENSSL | ||
200 | +#include <openssl/bn.h> | ||
201 | +#include <openssl/dh.h> | ||
202 | + | ||
203 | +typedef BIGNUM *FFBigNum; | ||
204 | #endif | ||
205 | |||
206 | typedef struct FF_DH { | ||
207 | @@ -45,13 +50,6 @@ typedef struct FF_DH { | ||
208 | long length; | ||
209 | } FF_DH; | ||
210 | |||
211 | -#elif CONFIG_OPENSSL | ||
212 | -#include <openssl/bn.h> | ||
213 | -#include <openssl/dh.h> | ||
214 | - | ||
215 | -typedef BIGNUM *FFBigNum; | ||
216 | -typedef DH FF_DH; | ||
217 | -#endif | ||
218 | |||
219 | /** | ||
220 | * Initialize a Diffie-Hellmann context. | ||
221 | -- | ||
222 | 2.19.0 | ||
223 | |||
diff --git a/recipes-multimedia/omxplayer/omxplayer/0001-swresample-arm-avoid-conditional-branch-to-PLT-in-TH.patch b/recipes-multimedia/omxplayer/omxplayer/0001-swresample-arm-avoid-conditional-branch-to-PLT-in-TH.patch deleted file mode 100644 index 6b2664f..0000000 --- a/recipes-multimedia/omxplayer/omxplayer/0001-swresample-arm-avoid-conditional-branch-to-PLT-in-TH.patch +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | From 6616f39fec0aa6270a707c8d0eb0f78c4b616eb9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rahul Chaudhry <rahulchaudhry@chromium.org> | ||
3 | Date: Wed, 18 Apr 2018 16:40:28 -0700 | ||
4 | Subject: [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2. | ||
5 | |||
6 | On Wed, Apr 18, 2018 at 3:46 PM, Michael Niedermayer | ||
7 | <michael@niedermayer.cc> wrote: | ||
8 | > please make sure this works on apple based arm (unless you know it works) | ||
9 | > (ive tested qemu linux based) | ||
10 | > | ||
11 | > Also please add a commit message | ||
12 | |||
13 | If by 'apple based arm' you mean llvm/clang assembler, then yes, I've verified | ||
14 | that the assembly works with armv7a-cros-linux-gnueabi-clang (version 7.0.0). | ||
15 | |||
16 | Updated patch with new commit message is attached. | ||
17 | |||
18 | Thanks, | ||
19 | Rahul | ||
20 | >From 2e3318acf266b519e98b680102a07196d6ddbf93 Mon Sep 17 00:00:00 2001 | ||
21 | From: Rahul Chaudhry <rahulchaudhry@chromium.org> | ||
22 | Date: Wed, 18 Apr 2018 16:29:39 -0700 | ||
23 | Subject: [PATCH] swresample/arm: remove unintentional relocation. | ||
24 | |||
25 | Branch to global symbol results in reference to PLT, and when compiling | ||
26 | for THUMB-2 - in a R_ARM_THM_JUMP19 relocation. Some linkers don't | ||
27 | support this relocation (ld.gold), while others can end up truncating | ||
28 | the relocation to fit (ld.bfd). | ||
29 | |||
30 | Convert this branch through PLT into a direct branch that the assembler | ||
31 | can resolve locally. | ||
32 | |||
33 | See https://github.com/android-ndk/ndk/issues/337 for background. | ||
34 | |||
35 | The current workaround is to disable neon during gstreamer build, | ||
36 | which is not optimal and can be reverted after this patch: | ||
37 | https://github.com/freedesktop/gstreamer-cerbero/commit/41556c415739fbc3a72c7eaee7e70a565b719b2f | ||
38 | --- | ||
39 | libswresample/arm/audio_convert_neon.S | 6 ++++-- | ||
40 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
41 | |||
42 | diff --git a/libswresample/arm/audio_convert_neon.S b/libswresample/arm/audio_convert_neon.S | ||
43 | index 1f88316dde..7729514701 100644 | ||
44 | --- a/libswresample/arm/audio_convert_neon.S | ||
45 | +++ b/libswresample/arm/audio_convert_neon.S | ||
46 | @@ -22,6 +22,7 @@ | ||
47 | #include "libavutil/arm/asm.S" | ||
48 | |||
49 | function swri_oldapi_conv_flt_to_s16_neon, export=1 | ||
50 | +_swri_oldapi_conv_flt_to_s16_neon: | ||
51 | subs r2, r2, #8 | ||
52 | vld1.32 {q0}, [r1,:128]! | ||
53 | vcvt.s32.f32 q8, q0, #31 | ||
54 | @@ -66,6 +67,7 @@ function swri_oldapi_conv_flt_to_s16_neon, export=1 | ||
55 | endfunc | ||
56 | |||
57 | function swri_oldapi_conv_fltp_to_s16_2ch_neon, export=1 | ||
58 | +_swri_oldapi_conv_fltp_to_s16_2ch_neon: | ||
59 | ldm r1, {r1, r3} | ||
60 | subs r2, r2, #8 | ||
61 | vld1.32 {q0}, [r1,:128]! | ||
62 | @@ -133,8 +135,8 @@ function swri_oldapi_conv_fltp_to_s16_nch_neon, export=1 | ||
63 | cmp r3, #2 | ||
64 | itt lt | ||
65 | ldrlt r1, [r1] | ||
66 | - blt X(swri_oldapi_conv_flt_to_s16_neon) | ||
67 | - beq X(swri_oldapi_conv_fltp_to_s16_2ch_neon) | ||
68 | + blt _swri_oldapi_conv_flt_to_s16_neon | ||
69 | + beq _swri_oldapi_conv_fltp_to_s16_2ch_neon | ||
70 | |||
71 | push {r4-r8, lr} | ||
72 | cmp r3, #4 | ||
73 | -- | ||
74 | 2.19.0 | ||
75 | |||
diff --git a/recipes-multimedia/omxplayer/omxplayer_git.bb b/recipes-multimedia/omxplayer/omxplayer_git.bb index f557207..aad2fed 100644 --- a/recipes-multimedia/omxplayer/omxplayer_git.bb +++ b/recipes-multimedia/omxplayer/omxplayer_git.bb | |||
@@ -11,7 +11,7 @@ DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl libssh libomxil | |||
11 | 11 | ||
12 | PR = "r4" | 12 | PR = "r4" |
13 | 13 | ||
14 | SRCREV_default = "7f3faf6cadac913013248de759462bcff92f0102" | 14 | SRCREV_default = "b4bbef8fac5e8c2ddafa895f98456ba715b39c6b" |
15 | 15 | ||
16 | # omxplayer builds its own copy of ffmpeg from source instead of using the | 16 | # omxplayer builds its own copy of ffmpeg from source instead of using the |
17 | # system's ffmpeg library. This isn't ideal but it's ok for now. We do however | 17 | # system's ffmpeg library. This isn't ideal but it's ok for now. We do however |
@@ -19,11 +19,11 @@ SRCREV_default = "7f3faf6cadac913013248de759462bcff92f0102" | |||
19 | # fetching the latest commit on a release branch (which is what the checkout job | 19 | # fetching the latest commit on a release branch (which is what the checkout job |
20 | # in Makefile.ffmpeg in the omxplayer source tree does). | 20 | # in Makefile.ffmpeg in the omxplayer source tree does). |
21 | # | 21 | # |
22 | # This SRCREV corresponds to the v3.1.10 release of ffmpeg. | 22 | # This SRCREV corresponds to the v4.0.3 release of ffmpeg. |
23 | SRCREV_ffmpeg = "afa34cb36edca0ff809b7e58474bbce12271ecba" | 23 | SRCREV_ffmpeg = "fcbd117df3077bad495e99e20f01cf93737bce76" |
24 | 24 | ||
25 | SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master \ | 25 | SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master \ |
26 | git://source.ffmpeg.org/ffmpeg;branch=release/3.1;protocol=git;depth=1;name=ffmpeg;destsuffix=git/ffmpeg \ | 26 | git://github.com/FFmpeg/FFmpeg;branch=release/4.0;protocol=git;depth=1;name=ffmpeg;destsuffix=git/ffmpeg \ |
27 | file://0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch \ | 27 | file://0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch \ |
28 | file://0003-Remove-strip-step-in-Makefile.patch \ | 28 | file://0003-Remove-strip-step-in-Makefile.patch \ |
29 | file://0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch \ | 29 | file://0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch \ |
@@ -32,12 +32,11 @@ SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master | |||
32 | file://0005-Don-t-require-internet-connection-during-build.patch \ | 32 | file://0005-Don-t-require-internet-connection-during-build.patch \ |
33 | file://0006-Prevent-ffmpeg-configure-compile-race-condition.patch \ | 33 | file://0006-Prevent-ffmpeg-configure-compile-race-condition.patch \ |
34 | file://0001-Specify-cc-cxx-and-ld-variables-from-environment.patch \ | 34 | file://0001-Specify-cc-cxx-and-ld-variables-from-environment.patch \ |
35 | file://0001-openssl-Support-version-1.1.0.patch;patchdir=ffmpeg \ | ||
36 | file://0001-swresample-arm-avoid-conditional-branch-to-PLT-in-TH.patch;patchdir=ffmpeg \ | ||
37 | file://0001-rtmpdh-Stop-using-OpenSSL-provided-DH-functions-to-s.patch;patchdir=ffmpeg \ | ||
38 | file://cross-crompile-ffmpeg.patch \ | 35 | file://cross-crompile-ffmpeg.patch \ |
39 | file://0001-Fix-build-with-vc4-driver.patch \ | ||
40 | " | 36 | " |
37 | |||
38 | SRC_URI_append = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " file://0001-Fix-build-with-vc4-driver.patch ", "", d)}" | ||
39 | |||
41 | S = "${WORKDIR}/git" | 40 | S = "${WORKDIR}/git" |
42 | 41 | ||
43 | COMPATIBLE_MACHINE = "^rpi$" | 42 | COMPATIBLE_MACHINE = "^rpi$" |