endif
+# ##############################################################################
+# MMAL
+#
+
+ifeq (yes,$(CONFIG_MMAL))
+
+EXTLIBS += mmal
+HWACCELS += h264_mmal mpeg2_mmal
+DECODERS += h264_mmal
+
+endif
+
+
# ##############################################################################
# OMX
#
#include "internals.h"
+#include "../codec/internals.h"
/* TVHStream ================================================================ */
streaming_component_type2txt(ssc->ssc_type));
return -1;
}
- if (!(icodec = avcodec_find_decoder(icodec_id))) {
+#if ENABLE_MMAL
+ if (idnode_is_instance(&profile->idnode,
+ (idclass_t *)&codec_profile_video_class)) {
+ if (tvh_codec_profile_video_get_hwaccel(profile) > 0) {
+ if (icodec_id == AV_CODEC_ID_H264) {
+ icodec = avcodec_find_decoder_by_id("h264_mmal");
+ } else if (icodec_id == AV_CODEC_ID_MPEG2VIDEO) {
+ icodec = avcodec_find_decoder_by_id("mpeg2_mmal");
+ }
+ }
+ }
+#endif
+ if (!icodec && !(icodec = avcodec_find_decoder(icodec_id))) {
tvh_stream_log(self, LOG_ERR, "failed to find decoder for '%s'",
streaming_component_type2txt(ssc->ssc_type));
return -1;