WITH_OMX_ENCODER -> WITH_OMX

This commit is contained in:
Devaev Maxim
2019-07-10 02:20:46 +03:00
parent e6dfe3d2b7
commit c3c15b16bf
7 changed files with 14 additions and 14 deletions

View File

@@ -35,7 +35,7 @@
#include "encoders/cpu/encoder.h"
#include "encoders/hw/encoder.h"
#ifdef WITH_OMX_ENCODER
#ifdef WITH_OMX
# include "encoders/omx/encoder.h"
#endif
@@ -46,7 +46,7 @@ static const struct {
} _ENCODER_TYPES[] = {
{"CPU", ENCODER_TYPE_CPU},
{"HW", ENCODER_TYPE_HW},
# ifdef WITH_OMX_ENCODER
# ifdef WITH_OMX
{"OMX", ENCODER_TYPE_OMX},
# endif
};
@@ -69,7 +69,7 @@ struct encoder_t *encoder_init(void) {
}
void encoder_destroy(struct encoder_t *encoder) {
# ifdef WITH_OMX_ENCODER
# ifdef WITH_OMX
if (encoder->run->omxs) {
for (unsigned index = 0; index < encoder->run->n_omxs; ++index) {
if (encoder->run->omxs[index]) {
@@ -124,7 +124,7 @@ void encoder_prepare(struct encoder_t *encoder, struct device_t *dev) {
dev->run->n_workers = 1;
}
# ifdef WITH_OMX_ENCODER
# ifdef WITH_OMX
else if (type == ENCODER_TYPE_OMX) {
LOG_DEBUG("Preparing OMX JPEG encoder ...");
@@ -196,7 +196,7 @@ int encoder_compress_buffer(struct encoder_t *encoder, struct device_t *dev, uns
} else if (encoder->run->type == ENCODER_TYPE_HW) {
hw_encoder_compress_buffer(dev, buf_index);
}
# ifdef WITH_OMX_ENCODER
# ifdef WITH_OMX
else if (encoder->run->type == ENCODER_TYPE_OMX) {
if (omx_encoder_compress_buffer(encoder->run->omxs[worker_number], dev, buf_index) < 0) {
goto error;

View File

@@ -29,7 +29,7 @@
#include "tools.h"
#include "device.h"
#ifdef WITH_OMX_ENCODER
#ifdef WITH_OMX
# include "encoders/omx/encoder.h"
# define ENCODER_TYPES_OMX_HINT ", OMX"
#else
@@ -45,7 +45,7 @@ enum encoder_type_t {
ENCODER_TYPE_UNKNOWN, // Only for encoder_parse_type() and main()
ENCODER_TYPE_CPU,
ENCODER_TYPE_HW,
# ifdef WITH_OMX_ENCODER
# ifdef WITH_OMX
ENCODER_TYPE_OMX,
# endif
};
@@ -56,7 +56,7 @@ struct encoder_runtime_t {
bool cpu_forced;
pthread_mutex_t mutex;
# ifdef WITH_OMX_ENCODER
# ifdef WITH_OMX
unsigned n_omxs;
struct omx_encoder_t **omxs;
# endif

View File

@@ -110,7 +110,7 @@ static const struct option _LONG_OPTS[] = {
static void _version(bool nl) {
printf(VERSION);
# ifdef WITH_OMX_ENCODER
# ifdef WITH_OMX
printf(" + OMX");
# endif
if (nl) {