GNOME Bugzilla – Bug 760963
ahcsrc: Add an example using the android hardware camera
Last modified: 2018-11-03 11:08:32 UTC
Working example code can be found here, though it requires a lot of cleanup. Ideally we can add this back in gst-bad as a single commit. https://git.collabora.com/cgit/user/joykim/gst-camera-test.git/
Can I be a volunteer of this task if anyone hasn't started yet? Btw, I found some of files in the url above were declared as Apache License 2.0. As I understand, this license cannot be compatible with LGPL. Actually there are two files; one is Android.mk, another is a java file. In this case, can we change the license, or am I misinformed about the license?
Created attachment 319672 [details] [review] an example app I made all of the codes under LGPL.
Review of attachment 319672 [details] [review]: It's nice, though it would be cool if we could add some sliders and knobs so we can exercise some of the features. This element implement a lot of the Photography interface. ::: tests/examples/androidcamera/jni/camera_test.c @@ +202,3 @@ + data->pipeline = + gst_parse_launch + ("ahcsrc ! video/x-raw,format=(string)NV21 ! glimagesink name=vsink sync=false", Can we let it negotiate ? And I tested already, sync=false is not required. Note that on my Nexus 5, we get 1080p stream, which in the current state, does not work well. So maybe we could reuse the caps filter, remove the format file and set a width and height range that make sure it does not go over 720p ?
Review of attachment 319672 [details] [review]: ::: tests/examples/androidcamera/jni/camera_test.c @@ +202,3 @@ + data->pipeline = + gst_parse_launch + ("ahcsrc ! video/x-raw,format=(string)NV21 ! glimagesink name=vsink sync=false", Okay, we can use the pipeline without caps filter. However regarding sync property, it may show different results on different devices. On my LG V410 pad, flicker in every few seconds happens if sync is true. About resolution, we can set resolution via caps filter currently because there's no property for resolution in ahcsrc. The pipeline might be "ahcsrc ! video/x-raw,width=(int)320,height=(int)240 ! glimagesink". Regarding to resolution, I don't think we make sure the resolution is supported in ahcsrc as a gstreamer element because this is for android and there are easier way to gather the information in java side. Before building a pipeline, the android UI application should set the resolution properly based on gathered information. In addition, although android-hardware-camera.c has a function to set resolution, it is used internally. In my opinion, it's good to write comments here or in README about restrictions, then make android app UI more abundant. What do you think?
Created attachment 319800 [details] [review] add comment because of my test result about 'sync' property, I didn't change the value. Instead, I added some comments there.
We keep fighting when explaining how wrong it is to use sync to false in general, I'm not going to merge an example that encourage that.
Created attachment 319888 [details] [review] remove sync=false Oh, no. I wanna make it merge. Here's a patch to ask for a ceasefire. :) About flickering issue on my android pad, I'll create another issue if I get any concrete clue.
Created attachment 356254 [details] [review] Add more UIs Hello. It's been an age to update. I moved my personal repository to github because of screenshot. Please refer to the below URL for screenshot. https://github.com/justinjoy/gst-android-camera With controlling knobs, it becomes little more complex than the first patch. So I am wondering `gst-plugins-bad` is a proper repository for this example. If not, please suggest a good place and also let me know whether GStreamer community is still interested in having this example. Thanks.
That other option would be in gst-examples repository. It already contains few UI.
Created attachment 356327 [details] [review] Move from 'bad' to 'examples' Thanks for replying. I moved the patch to gst-examples.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-examples/issues/1.