Thomas Guillem
08e519a420
android: AWindowHandler_releaseSurface now release the ANativeWindow
11 years ago
Thomas Guillem
52e2e90f91
Revert "android: rework AWindowHandler interface"
This reverts commit 159a6f1eb0 .
This is finally not needed by a future patch, and it's less obvious.
11 years ago
Thomas Guillem
159a6f1eb0
android: rework AWindowHandler interface
Use the jsurface instead of the id for AWindowHandler_getANativeWindow and
AWindowHandler_setBuffersGeometry.
AWindowHandler_releaseSurface now release the jsurface and the ANativeWindow.
11 years ago
Thomas Guillem
4a8dc0f008
h264_nal: fix confusion between NAL size and NAL length size.
11 years ago
Felix Paul Kühne
d962b8260d
omxil: split timestamp helper to re-useable header
11 years ago
Thomas Guillem
c3dec45d9b
h264_nal: remove unused H264ConvertState
11 years ago
Thomas Guillem
0706192dad
mediacodec: fix psz_name set to NULL
It's allocated and freed from Open/Close now.
11 years ago
Thomas Guillem
94bd3e7f39
mediacodec: only some decoders assert if there is no channels
For now, only Marvell decoders seem to assert if channels count is 0.
11 years ago
Thomas Guillem
3e224b10ad
mediacodec: fetch codec name at Open
And don't do a late opening if there is no decoder available.
11 years ago
Thomas Guillem
f56a649598
mediacodec: use p_sys in OpenDecoder
11 years ago
Thomas Guillem
dd873cc234
mediacodec: add audio decoder
Disabled by default. Enable it with the "mediacodec-audio" option.
11 years ago
Thomas Guillem
8c5e501690
mediacodec: refactor StartMediaCodec
Add ParseVideoExtra that parse video extra data for h264/hevc.
Leave room for a possible ParseAudioExtra.
11 years ago
Thomas Guillem
935db7d617
mediacodec: refactor DecodeVideo
Rename DecodeVideo to DecodeCommon.
DecodeCommon use 2 callbacks to put Video and Audio specific code. These
callbacks are called when a new block is processed and when it try to get an
output buffer.
11 years ago
Thomas Guillem
8665dd328d
mediacodec: refactor video specific code in Open/Close
11 years ago
Thomas Guillem
d29b6ccefe
mediacodec: put video arguments in a struct
Add an union for future audio arguments.
11 years ago
Thomas Guillem
5bba18bc19
mediacodec: refactor block check
11 years ago
Thomas Guillem
b11cd7d1ca
mediacodec: jni: fix GET_INTEGER crashes
It happens when fetching the "channel-mask" property.
11 years ago
Thomas Guillem
c82f52485f
mediacodec: add audio support in mc_api
11 years ago
Thomas Guillem
286d215c73
mediacodec: add a bool to know when decoder is configured
11 years ago
Thomas Guillem
b425c1b219
mediacodec: add disabled mpeg2
Disabled since it's not tested enough.
11 years ago
Thomas Guillem
4f0e689245
mediacodec: jni: add missing exception check
11 years ago
Thomas Guillem
c78f1106ae
mediacodec: ndk: use AMediaCodecBufferInfo size
The buffer size can be bigger than valid data size.
11 years ago
Thomas Guillem
e4385dbb40
mediacodec: fix interlaced support detection
We need to know it before MediaCodec is started.
11 years ago
Thomas Guillem
47fa89f2a4
mediacodec: fix typo
Try a delayed opening only if csd changed.
11 years ago
Rémi Denis-Courmont
6b19e71195
omx: fix timeout handling
11 years ago
Thomas Guillem
e29f8ecf6a
android: add AWindowHandler and android_getEnv
android_getEnv: get a JNIEnv* from the Java VM passed via the "android-jvm"
option.
AWindowHandler: utility class that provide a way to get the Video / Subtitles
Java Surface or ANativeWindow.
11 years ago
Thomas Guillem
e12376a1cc
mediacodec: specify NDK or JNI in description
11 years ago
Thomas Guillem
4aa9e1ce4a
mediacodec: ndk: fix undefined behavior with Hi10P profile
Even the latest android version (Nexus 10 5.1.1) have an undefined behavior
when playing a H264 Hi10P video
As there is no public API in NDK to get the MediaCodecList in order to list the
supported profiles, use the API from JNI.
11 years ago
Thomas Guillem
3c1cf08e76
mediacodec_ndk: set a config flag for config buffers
11 years ago
Thomas Guillem
286fa11d50
mediacodec: add NDK module
The JNI module is now a submodule.
11 years ago
Thomas Guillem
cae9e8d893
mediacodec: add JNI module
Add the mc_api struct, used by Decoder to access a MediaCodec API.
11 years ago
Thomas Guillem
ac4a4aee64
mediacodec: GetOutput: separate JNI part from Decoder part
11 years ago
Thomas Guillem
ebb8fafb14
mediacodec: PutInput: separate JNI part from Decoder part
11 years ago
Thomas Guillem
d6d6f3013c
mediacodec: Open/Close: separate JNI part from Decoder part
Rename OpenMediaCodec to StartMediaCodec and CloseMediaCodec to StopMediaCodec.
11 years ago
Thomas Guillem
5a79bd418c
rename android_mediacodec to mediacodec.c
11 years ago
Thomas Guillem
0d92b77532
mediacodec: more verbose in case of error
11 years ago
Thomas Guillem
adc305b6e6
mediacodec: flush if SPS/PPS change but not the video size
11 years ago
Thomas Guillem
fb43d75f9b
mediacodec: move restart handling in DecodeVideo
11 years ago
Thomas Guillem
44b3215080
mediacodec: change the way to send codec specific data
The CSD is now split into several ones, therefore there is one CSD per H264
Parameter Sets (SPS and PPS).
There is now only one way to send a CSD. It's sent via PutInput with the
BUFFER_FLAG_CODEC_CONFIG flag.
11 years ago
Thomas Guillem
d0506d71df
mediacodec: convert to Annex B when we got a nal size
11 years ago
Thomas Guillem
7e498d6fe1
mediacodec: refactor PutInput
Do only MediaCodec specific in PutInput.
11 years ago
Daniel Winzen
687db1064b
Prefer prefix operators for non-primitive types
Signed-off-by: Francois Cartegnie <fcvlcdev@free.fr>
11 years ago
Thomas Guillem
2ce0d5826c
mediacodec: add decoder_UpdateVideoFormat call
A failing decoder_UpdateVideoFormat is critical, unlike a failing
decoder_NewPicture.
11 years ago
Thomas Guillem
61949af475
mediacodec: allow interlaced picture only after API 21
11 years ago
Thomas Guillem
ccfcd3ff24
mediacodec: factor GetMediaCodecName
11 years ago
Thomas Guillem
d5248dbb0c
mediacodec: fix LocalRef leaks
Now that we can open and close MediaCodec from the same thread, we can reach
quickly the limit of 512 LocalRefs.
11 years ago
Thomas Guillem
c3694bf84a
mediacodec: parse SPS/PPS, fix H264 via live streaming
Don't abort if H264 fmt doesn't have any valid size or extra. The SPS/PPS will
be parsed from DecodeVideo, MediaCodec will be (re)started if video size changes
and valid SPS/PPS will be sent via BUFFER_FLAG_CODEC_CONFIG flag.
11 years ago
Thomas Guillem
88c6f34a70
mediacodec: add a second way to send codec specific data
Via PutInput with the BUFFER_FLAG_CODEC_CONFIG flag. It allows to send codec
specific data during playback without restarting MediaCodec. If you choose to
configure codec via this flags, you shouldn't set the "csd-0" buffer during
MediaCodec initialization.
11 years ago
Thomas Guillem
d149b6c011
mediacodec: renome p_extra_buffer to p_csd0_buffer
Since it's the buffer containing the "csd-0" configuration buffer.
11 years ago
Thomas Guillem
6ea9e51b6b
move h264/hevc nal helper code to packetizer
11 years ago