Alexandre Janniaux
0c86c8dab3
mediacodec: use size_t where suited
2 years ago
Martin Finkel
a1aaa257e2
mediacodec: fix up log message category
this is not an error but it lights up red in various log viewers, might be confusing.
2 years ago
Mangal Kushwah
8c1a92c7cf
mediacodec: fix wrong expression in switch statement for color_range
2 years ago
Mangal Kushwah
d0fc525c56
mediacodec: free format returned by getOutputFormat
2 years ago
Mangal Kushwah
55e0779f98
mediacodec: set color keys in media format explicitly
Fixes issues where by default mediacodec sets wrong keys for video.
See #26948
2 years ago
Steve Lhomme
eab6de4d92
omxil: disable video encoder if sout is disabled
2 years ago
Steve Lhomme
bc8308fd6e
codec: fix i_level -1 detected as VPx with alpha
2 years ago
Steve Lhomme
27350e784c
codec: add a pseudo-decoder for VP8/VP9 with alpha
It uses 2 decoders in parallel and then merges the planes on output.
Only software decoders are supported for now.
3 years ago
Steve Lhomme
6205634926
omxil: pass the whole es_format when looking for a video codec.
2 years ago
Johannes Kauffmann
4aa0c2f3f4
modules: add missing void parameters to functions
Caught by -Wstrict-prototypes.
2 years ago
Alaric Senat
b752a90359
encoders: fill missing input format video chroma
If an encoder requires a specific input chroma, it needs to be specified
in both the codec and the chroma field of the input format. The encoder
creators currently fix the input format themselves when an encoder does
not provide any chroma.
This input format fix was legitimately removed from VLC core's image API
which was causing regressions with the chroma converter attachment.
2 years ago
Steve Lhomme
97e504e0e9
omxil: pass a es_format_t to GetOmxRole()
3 years ago
Steve Lhomme
9679c98db2
omxil: don't store a dummy element at the end of audio format table
3 years ago
Steve Lhomme
8c96fc2d14
omxil: don't store a dummy element at the end of video format table
3 years ago
Steve Lhomme
0da00a272c
omxil: don't store a dummy element at the end of chroma table
And return an error early the codec is not known.
3 years ago
Steve Lhomme
f7498dac50
omxil: return the OMX_COLOR_FORMATTYPE directly in GetOmxChromaFormat()
Or OMX_COLOR_FormatUnused.
3 years ago
Steve Lhomme
9f0482ebc3
omxil: return the OMX_AUDIO_CODINGTYPE directly in GetOmxAudioFormat()
Or OMX_AUDIO_CodingUnused.
3 years ago
Steve Lhomme
bdc100f053
omxil: return the OMX_VIDEO_CODINGTYPE directly in GetOmxVideoFormat()
Or OMX_VIDEO_CodingUnused.
3 years ago
Steve Lhomme
1d24386de1
omxil: return the VLC FourCC directly in OmxToVlcAudioFormat()
3 years ago
Steve Lhomme
5f404c90ec
omxil: return the VLC FourCC directly in GetVlcVideoFormat()
3 years ago
Steve Lhomme
8923aded17
omxil: return the VLC FourCC directly in GetVlcChromaFormat()
3 years ago
Steve Lhomme
7b3a793185
omxil: remove always NULL parameter in GetVlcChromaFormat()
3 years ago
Steve Lhomme
2537c6e9ce
omxil: get the codec name locally in Video_ProcessOutput()
3 years ago
Steve Lhomme
707e3946f5
omxil: remove always NULL parameter in GetVlcVideoFormat()
3 years ago
Steve Lhomme
04f2688cf3
omxil: remove always NULL parameter in OmxToVlcAudioFormat()
3 years ago
Steve Lhomme
efc95a4b74
omxil: get the codec name locally in PrintOmx()
3 years ago
Steve Lhomme
9b41902136
omxil: remove always NULL parameter in GetOmxAudioFormat()
3 years ago
Steve Lhomme
d7278126db
omxil: remove always NULL parameter in GetOmxVideoFormat()
3 years ago
Steve Lhomme
1b615f2e64
omxil: remove always NULL parameter in GetOmxChromaFormat()
3 years ago
Steve Lhomme
0ef14bde4d
omxil: use plane_CopyPixels() to copy planes in CopyVlcPicture()
The shifting of i_visible_lines between planes seems suspicious but it
was working like that so far...
3 years ago
Steve Lhomme
a8c3f24939
omxil: use plane_CopyPixels() to copy planes in CopyOmxPicture()
3 years ago
Steve Lhomme
3ec62e80d3
omxil: remove dead code
Now that OMX_COLOR_FormatYUV420SemiPlanar is mapped to NV12, we don't need to
transform it into YUV12.
3 years ago
Steve Lhomme
5abb10ffe0
omxil: remove always NULL parameter in CopyOmxPicture()
3 years ago
Francois Cartegnie
7923ce4e00
hxxx_helper: provide picture left/top crop info
3 years ago
Thomas Guillem
a70e0b30f4
mediacodec: enable direct rendering without a subtitle surface
The most important check is `AWindowHandler_canSetVideoLayout()` that
assure that the LibVLC user set up callbacks to handle crop/scale.
3 years ago
Steve Lhomme
cd48d706ed
modules: include vlc_threads.h when vlc_mutex_t is used
3 years ago
Thomas Guillem
4b8cc4971d
omxil: handle mpeg2 in convert_omx_to_profile_idc()
Fixes #20873
3 years ago
Thomas Guillem
eb0e5fb4f1
mediacodec: use convert_omx_to_profile_idc() for all codecs
Refs #20873
3 years ago
Thomas Guillem
275a1bcb2c
omxil: handle hevc in convert_omx_to_profile_idc()
Refs #20873
3 years ago
Thomas Guillem
5bec0a0d47
mediacodec: also pass vlc_foucc_t to MediaCodec_GetName()
Alongside the codec mimetype.
Refs #20873
3 years ago
Thomas Guillem
19bdb73319
omxil: prepare convert_omx_to_profile_idc() to handle more codecs
Refs #20873
3 years ago
Thomas Guillem
0d4830504f
omxil: remove unused function
3 years ago
Thomas Guillem
3f3b98b651
mediacodec: set low-latency in case of "low-delay"
Available since API level 30.
This won't have any effects before API level 30.
3 years ago
Alexandre Janniaux
c65493d689
modules: split android_env from android_utils
android_utils depends on GLES2_LIBS and EGL_LIBS, but it isn't forwarded
correctly from the convenience library. In particlar, it contains mostly
video-related code, and some helpers for the android environment state,
which is why the non-video code is using the utils library.
Move the code in a separate convenience library so that it can be
imported without constraints.
5 years ago
Thomas Guillem
1f7f400ff7
mediacodec: release timestamp_fifo with video context
`CleanInputVideo()` is linked to the input side of the decoder
(.pf_decode) but `video.timestamp_fifo` can be used from the output side
(threads from mediacodec) and is actually also tied to the life cycle of
the video context, as visible in the destructor `CloseDecoder`. Since
the life cycle of the video context is at least the one from the input
side, destroy the timestamp_fifo there.
Fixes a use-after-free when the video context is not released from
CloseDestructor() while mediacodec is still running (not joined yet).
Regression from cdff503ed2 and
57323ddadb
3 years ago
Thomas Guillem
560dde16fc
mediacodec_ndk: use NdkMediaCodec.h
For defines, enums and types, but we still have to declare our own
function prototypes since we use fonctin via dlsym.
3 years ago
Francois Cartegnie
84f13e3a85
codec: mediacodec: set crop offset
3 years ago
Francois Cartegnie
7aa62d7a7e
codec: mediacodec: apply visible size from CSD
3 years ago
Francois Cartegnie
2d701ece19
codec: mediacodec: check helper return code
3 years ago
Steve Lhomme
007e5d910c
codec/packtizer: rename p_fmt_in to fmt_in
We don't need to know it's a pointer and can save 2 characters.
No functional changes. This is simply renaming "dec->p_fmt_in",
"decoder->p_fmt_in", "dec.p_fmt_in" and "packetizer->p_fmt_in"
3 years ago