Re: [FFmpeg-devel] [PATCH] jni, mediacodec: Return ENOSYS on unsupported platforms
On Tue, Aug 2, 2016 at 8:42 PM Timothy Guwrote: > On Tue, Aug 2, 2016 at 6:30 PM James Almer wrote: > >> On 8/2/2016 7:28 PM, Timothy Gu wrote: >> > --- >> > libavcodec/jni.c| 9 - >> > libavcodec/mediacodec.c | 6 -- >> > 2 files changed, 8 insertions(+), 7 deletions(-) >> > >> >> I'd say split this in two patches, so you can easily cherry-pick >> the jni part for release branches 3.0 and 3.1. >> > > Done locally. Thanks for noticing. > Split up and pushed. Timothy ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] jni, mediacodec: Return ENOSYS on unsupported platforms
On Tue, Aug 2, 2016 at 6:30 PM James Almerwrote: > On 8/2/2016 7:28 PM, Timothy Gu wrote: > > --- > > libavcodec/jni.c| 9 - > > libavcodec/mediacodec.c | 6 -- > > 2 files changed, 8 insertions(+), 7 deletions(-) > > > > I'd say split this in two patches, so you can easily cherry-pick > the jni part for release branches 3.0 and 3.1. > Done locally. Thanks for noticing. Timothy ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] jni, mediacodec: Return ENOSYS on unsupported platforms
On 8/2/2016 7:28 PM, Timothy Gu wrote: > --- > libavcodec/jni.c| 9 - > libavcodec/mediacodec.c | 6 -- > 2 files changed, 8 insertions(+), 7 deletions(-) > I'd say split this in two patches, so you can easily cherry-pick the jni part for release branches 3.0 and 3.1. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] jni, mediacodec: Return ENOSYS on unsupported platforms
On Tue, Aug 02, 2016 at 03:28:10PM -0700, Timothy Gu wrote: > --- > libavcodec/jni.c| 9 - > libavcodec/mediacodec.c | 6 -- > 2 files changed, 8 insertions(+), 7 deletions(-) builds on all systems that are easy testable here [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Avoid a single point of failure, be that a person or equipment. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] jni, mediacodec: Return ENOSYS on unsupported platforms
--- libavcodec/jni.c| 9 - libavcodec/mediacodec.c | 6 -- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/libavcodec/jni.c b/libavcodec/jni.c index 32456f5..85dcf2a 100644 --- a/libavcodec/jni.c +++ b/libavcodec/jni.c @@ -20,19 +20,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" + #include -#include "config.h" +#include "libavutil/error.h" #include "jni.h" #if CONFIG_JNI - -#include #include #include #include "libavutil/log.h" -#include "libavutil/error.h" #include "ffjni.h" void *java_vm; @@ -69,7 +68,7 @@ void *av_jni_get_java_vm(void *log_ctx) int av_jni_set_java_vm(void *vm, void *log_ctx) { -return 0; +return AVERROR(ENOSYS); } void *av_jni_get_java_vm(void *log_ctx) diff --git a/libavcodec/mediacodec.c b/libavcodec/mediacodec.c index cd8766f..a658f0e 100644 --- a/libavcodec/mediacodec.c +++ b/libavcodec/mediacodec.c @@ -22,6 +22,8 @@ #include "config.h" +#include "libavutil/error.h" + #if CONFIG_H264_MEDIACODEC_HWACCEL #include @@ -108,7 +110,7 @@ AVMediaCodecContext *av_mediacodec_alloc_context(void) int av_mediacodec_default_init(AVCodecContext *avctx, AVMediaCodecContext *ctx, void *surface) { -return 0; +return AVERROR(ENOSYS); } void av_mediacodec_default_free(AVCodecContext *avctx) @@ -117,7 +119,7 @@ void av_mediacodec_default_free(AVCodecContext *avctx) int av_mediacodec_release_buffer(AVMediaCodecBuffer *buffer, int render) { -return 0; +return AVERROR(ENOSYS); } #endif -- 2.1.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] jni, mediacodec: Return ENOSYS on unsupported platforms
On Tue, Aug 02, 2016 at 01:38:40PM -0700, Timothy Gu wrote: > --- > libavcodec/jni.c| 2 +- > libavcodec/mediacodec.c | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libavcodec/jni.c b/libavcodec/jni.c > index 32456f5..e08a185 100644 > --- a/libavcodec/jni.c > +++ b/libavcodec/jni.c > @@ -69,7 +69,7 @@ void *av_jni_get_java_vm(void *log_ctx) > > int av_jni_set_java_vm(void *vm, void *log_ctx) > { > -return 0; > +return AVERROR(ENOSYS); > } libavcodec/jni.c: In function ‘av_jni_set_java_vm’: libavcodec/jni.c:72:5: error: implicit declaration of function ‘AVERROR’ [-Werror=implicit-function-declaration] libavcodec/jni.c:72:20: error: ‘ENOSYS’ undeclared (first use in this function) libavcodec/jni.c:72:20: note: each undeclared identifier is reported only once for each function it appears in libavcodec/jni.c:73:1: error: control reaches end of non-void function [-Werror=return-type] [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] jni, mediacodec: Return ENOSYS on unsupported platforms
--- libavcodec/jni.c| 2 +- libavcodec/mediacodec.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/jni.c b/libavcodec/jni.c index 32456f5..e08a185 100644 --- a/libavcodec/jni.c +++ b/libavcodec/jni.c @@ -69,7 +69,7 @@ void *av_jni_get_java_vm(void *log_ctx) int av_jni_set_java_vm(void *vm, void *log_ctx) { -return 0; +return AVERROR(ENOSYS); } void *av_jni_get_java_vm(void *log_ctx) diff --git a/libavcodec/mediacodec.c b/libavcodec/mediacodec.c index cd8766f..25b3dd0 100644 --- a/libavcodec/mediacodec.c +++ b/libavcodec/mediacodec.c @@ -108,7 +108,7 @@ AVMediaCodecContext *av_mediacodec_alloc_context(void) int av_mediacodec_default_init(AVCodecContext *avctx, AVMediaCodecContext *ctx, void *surface) { -return 0; +return AVERROR(ENOSYS); } void av_mediacodec_default_free(AVCodecContext *avctx) @@ -117,7 +117,7 @@ void av_mediacodec_default_free(AVCodecContext *avctx) int av_mediacodec_release_buffer(AVMediaCodecBuffer *buffer, int render) { -return 0; +return AVERROR(ENOSYS); } #endif -- 2.1.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel