Commit graph

298 commits

Author SHA1 Message Date
Javier Celaya
f267adeb4a Fix releasing local refs 2019-10-16 06:42:37 +00:00
Javier Celaya
3f0d60515a Fix names of MediaCodecInfo inner classes 2019-10-16 06:42:37 +00:00
Javier Celaya
26ea6d7fbb Fix getting MediaCodecList static methods 2019-10-16 06:42:37 +00:00
Tim-Philipp Müller
f218ec2794 Remove autotools build system 2019-10-14 13:54:27 +01:00
Matthew Waters
c941db0c2e ahcsrc: #define GST_USE_UNSTABLE_API for phtography inteface
Fixes werror build:

In file included from ../sys/androidmedia/gstahcsrc.c:70:
../gst-libs/gst/interfaces/photography.h:27:2: error: "The GstPhotography interface is unstable API and may change in future." [-Werror,-W#warnings]
#warning "The GstPhotography interface is unstable API and may change in future."
 ^
../gst-libs/gst/interfaces/photography.h:28:2: error: "You can define GST_USE_UNSTABLE_API to avoid this warning."  [-Werror,-W#warnings]
#warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
 ^
2019-08-28 16:12:11 +10:00
Xavier Claessens
121711e4ac amc: Do not skip decoders that have no profile levels 2019-08-27 02:23:41 +00:00
Xavier Claessens
83883718ee amc: Print error when failing to register listener 2019-08-20 08:53:55 -04:00
Xavier Claessens
9ab76c73ea amc: Do not use g_log() for criticals 2019-08-20 08:53:55 -04:00
Xavier Claessens
06fc7880bb amc: crop values are not mandatory in format
Android documentation has example code how to compute width and height
when crop values are present.
https://developer.android.com/reference/android/media/MediaCodec#accessing-raw-video-bytebuffers-on-older-devices
2019-08-20 08:53:55 -04:00
Xavier Claessens
a604796c41 amc: Remove unused gst_amc_surface_texture_set_default_buffer_size() 2019-08-20 08:53:55 -04:00
Xavier Claessens
50cdaf1036 amc: Fix matrix constness in _get_transform_matrix() 2019-08-20 08:53:55 -04:00
Xavier Claessens
ad7c4f5f27 amc: Select between encoder/decoder at GstAmcCodec construct time
Magical 0/1 values where passed to gst_amc_codec_configure() flags
argument. It's more natural to have a boolean is gst_amc_codec_new().
2019-08-20 08:53:55 -04:00
Xavier Claessens
0fe0270244 amc: Remove gst_amc_format_contains_key()
It is not needed, we can just try to get the key and ignore error.
NdkMediaFormat doesn't have that method.
2019-08-20 08:53:55 -04:00
Xavier Claessens
7fcf3ebf07 amc: Turn GstAmcSurfaceTexture into a base class with JNI implementation 2019-08-20 08:53:55 -04:00
Xavier Claessens
29ef89983c amc: Create JNI wrapper for MediaCodecList
There is no NdkMediaCodecList API yet, but it is still better to isolate
JNI code. This will facilitate porting to a native API if Google ever
release one.
2019-08-20 08:53:55 -04:00
Xavier Claessens
515398a9ff amc: Move MediaCodec JNI wrapper into its own module
This will facilitate adding another implementation based on
NdkMediaCodec instead of JNI.
2019-08-20 08:53:55 -04:00
Xavier Claessens
9b9e39be24 amc: Fix crash when a sync_meta survives its sink
_amc_gl_free() could be called after the GstAmcVideoDec has been
finalized, in the case downstream still has a ref to a buffer.
2019-08-14 16:37:19 +00:00
Tim-Philipp Müller
7853700b50 meson: add more plugins to plugins list
Makes sure their path gets added to the uninstalled environment
and makes sure they get included in the docs.
2019-05-30 20:41:57 +02:00
Roman Shpuntov
1465a7ecdd androidmedia: added path /system/vendor/etc to dependency 2019-05-03 19:10:22 +07:00
Tim-Philipp Müller
c39fd4d898 androidmedia: add Hardware tag to element metadata 2019-02-19 23:45:34 +00:00
Matthew Waters
b907187ade androidmedia: also install java sources
As needed by our ndk-build integration
2018-12-07 07:46:27 +00:00
Jordan Petridis
1f562870ee Run gst-indent through the files
This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
2018-11-28 14:18:26 +00:00
Matthew Waters
7dc7607475 androidmedia/meson: we also depend on gmodule and orc 2018-08-31 18:08:55 +10:00
Nirbheek Chauhan
4af7637012 meson: Add build files for androidmedia and opensles
Note that androidmedia requires Android gstgl
2018-08-29 14:58:19 +05:30
Jan Schmidt
39365948ff androidmedia: Invert the transform matrix from the decoder
The transform from mediacodec applies to the texture coords, but
GStreamer affine meta applies to the video geometry, which is the
opposite - so invert it to get display correct for decoders
that require transforming
2018-06-15 05:01:20 +10:00
Justin Kim
297f7e4f04 ahc: enable autofocus callback
It should be enabled to set autofocus properly, but
it seems to be commented out mistakenly from the first commit.

https://bugzilla.gnome.org/show_bug.cgi?id=790945
2018-01-26 10:13:00 +00:00
Tim-Philipp Müller
06e4403fdb gl: update plugins to use GstGL from -base 2017-12-19 12:02:31 +00:00
Ursula Maplehurst
236398ee3f androidmedia: when flushing, better handle IllegalStateException received from getOutputBuffer
1. Similar to 880f3d8, don't consider not getting an output buffer as
   an error during flushing. I've seen the following sometimes when
   encoding:

   W GStreamer+amcvideoenc: java.lang.IllegalStateException
   W GStreamer+amcvideoenc:         at android.media.MediaCodec.getBuffer(Native Method)
   W GStreamer+amcvideoenc:         at android.media.MediaCodec.getOutputBuffer(MediaCodec.java:2886)

2. For amcvideodec/enc, call _find_nearest_frame (which grabs a fresh
   reference on a GstVideoCodecFrame) after we have an output buffer,
   so as to not leak the reference, in case getting an output buffer
   fails.

   Otherwise, if we get an error grabbing the output buffer, we leak
   the reference to the frame. This can cause issues with a
   v4l2bufferpool feeding the encoder not being able to clean itself
   up properly due to buffers still being marked as in-use.

https://bugzilla.gnome.org/show_bug.cgi?id=791258
2017-12-06 10:32:02 +02:00
Matthew Waters
4d2382fb27 amc: actually use the provided application class loader
For the camera and sensor

Fixes a couple of ClassNotFound java exceptions when initializing GStreamer
off the main thread.
2017-09-05 21:16:33 +10:00
Sebastian Dröge
732012a78e amcvideodec: Unref downstream caps after usage
https://bugzilla.gnome.org/show_bug.cgi?id=782771
2017-05-18 14:34:46 +03:00
Nicolas Dufresne
4261692187 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:05:52 -04:00
shakin chou
febbaaddcf amcvideodec/enc: Correctly check for no PTS on input buffers
MediaCodec gives us a presentation timestamp of 0 if it does not know
anything, but GStreamer gives us GST_CLOCK_TIME_NONE. Don't mix up these
two.

https://bugzilla.gnome.org/show_bug.cgi?id=780190
2017-04-26 13:40:28 +03:00
Thibault Saunier
78022a6e0c docs: Port all docstring to gtk-doc markdown 2017-04-12 12:57:57 -03:00
Matthew Waters
956c4d0bde gl/format: use our own GL format enum's instead of gstvideo's
They can describe in more detail (such as component sizes) the requested format.
2017-03-13 21:10:58 +11:00
Sebastian Dröge
aca89aeeaa amcvideoenc: Encoder output is generally not properly parsed
Don't claim it is and let h264parse and other parsers do their job.

https://bugzilla.gnome.org/show_bug.cgi?id=774772
2017-02-08 00:05:47 +02:00
Sebastian Dröge
7817f85759 amcvideoenc: Set timestamps on header buffers too
https://bugzilla.gnome.org/show_bug.cgi?id=774772
2017-02-08 00:05:47 +02:00
Sebastian Dröge
c27091d67f amcvideoenc: Encoded H264 is generally not AU aligned
Claiming that it is, can cause h264parse to skip some parsing steps and
the output stays unaligned.

https://bugzilla.gnome.org/show_bug.cgi?id=774772
2017-02-08 00:05:47 +02:00
Edward Hervey
e99e69843a androidmedia: Use proper instance name 2017-01-13 14:46:36 +01:00
Matthew Waters
ed03fd6d3f amcvideodec: fix build error from change in libgstgl
gstamcvideodec.c: In function 'gst_amc_video_dec_src_query':
gstamcvideodec.c:2412:55: error: 'self' undeclared (first use in this function)
       if (gst_gl_handle_context_query ((GstElement *) self, query,
2017-01-13 21:17:33 +11:00
Matthew Waters
03b539bdfc gl: update sys dependants for function removals
4315a4b54d forgot to change the androidmedia/videotoolbox/caopengllayer
sources as required.
2017-01-13 13:01:28 +11:00
Sebastian Dröge
9988ad9c42 androidmedia: Add support for Opus in the decoder 2017-01-05 15:05:42 +02:00
Sebastian Dröge
8b46e1b95a androidmedia: Silently skip COLOR_FormatAndroidOpaque when converting to caps
This is special and handled in the decoder when doing rendering to a
surface. Printing a warning for this is just unnecessary noise
2017-01-05 15:05:42 +02:00
Sebastian Dröge
5619690ae1 androidmedia: Add support for VP9 2017-01-04 20:59:39 +02:00
Sebastian Dröge
eca6c35601 androidmedia: Actively request the Java VM from the application
This is more consistent with how we already request the application
class loader and other application resources elsewhere.
2017-01-03 18:53:39 +02:00
Ursula Maplehurst
d741c9ecc3 androidmedia: some files are missing in the release tarball
https://bugzilla.gnome.org/show_bug.cgi?id=776591
2016-12-30 07:37:23 +01:00
Sebastian Dröge
3357ddb0e1 amcaudiodec: Set "is-adts" to 1 for ADTS AAC
Otherwise it fails to decode.

https://bugzilla.gnome.org/show_bug.cgi?id=740101
2016-12-15 14:09:25 +02:00
Sebastian Dröge
e6651a733b amc: Allow registering codecs, camera or sensors if any of the others failed
https://bugzilla.gnome.org/show_bug.cgi?id=774048
2016-11-08 13:52:17 +02:00
Sebastian Dröge
56ee6c4cee ahs: Don't assert on deinit if initialization failed before
Initialization failure is handled correctly by just not registering the
ahssrc element.

https://bugzilla.gnome.org/show_bug.cgi?id=774048
2016-11-08 13:45:17 +02:00
Matthew Waters
41a6448918 gl: GST_GL_TYPE -> GST_TYPE_GL
Some deprecated symbols are kept for backwards compatibility
2016-11-03 16:16:12 +11:00
Thibault Saunier
2fb716409c Use the new API to post flow ERROR messages on the bus
https://bugzilla.gnome.org/show_bug.cgi?id=770158
2016-08-26 19:23:31 -03:00