# @configure_input@

# Define the desired video device backend
# Valid values are:
#   - mac_os
#   - iphone_os
#   - android_os
AC_PJMEDIA_VIDEO = @ac_pjmedia_video@

# FFMPEG dlags
FFMPEG_CFLAGS = @ac_ffmpeg_cflags@ 
FFMPEG_LDFLAGS =  @ac_ffmpeg_ldflags@

# VPX flags
VPX_CFLAGS = @ac_vpx_cflags@
VPX_LDFLAGS =  @ac_vpx_ldflags@

# Video4Linux2
V4L2_CFLAGS = @ac_v4l2_cflags@
V4L2_LDFLAGS = @ac_v4l2_ldflags@

# AVF
AC_PJMEDIA_VIDEO_HAS_AVF = @ac_pjmedia_video_has_avf@
AVF_CFLAGS = @ac_avf_cflags@

# iOS
IOS_CFLAGS = @ac_ios_cflags@

# Dshow
AC_PJMEDIA_VIDEO_HAS_DSHOW = @ac_pjmedia_video_has_dshow@
DSHOW_CFLAGS = @ac_dshow_cflags@
DSHOW_LDFLAGS = @ac_dshow_ldflags@

# libyuv
LIBYUV_CFLAGS = @ac_libyuv_cflags@
LIBYUV_LDFLAGS = @ac_libyuv_ldflags@

# openh264
OPENH264_CFLAGS = @ac_openh264_cflags@
OPENH264_LDFLAGS = @ac_openh264_ldflags@

# PJMEDIA features exclusion
export CFLAGS += @ac_no_small_filter@ @ac_no_large_filter@ @ac_no_speex_aec@ \
		 $(FFMPEG_CFLAGS) $(V4L2_CFLAGS) $(AVF_CFLAGS) \
		 $(IOS_CFLAGS) $(DSHOW_CFLAGS) $(LIBYUV_CFLAGS) $(OPENH264_CFLAGS) \
		 $(VPX_CFLAGS)
export LDFLAGS += $(FFMPEG_LDFLAGS) $(V4L2_LDFLAGS) $(DSHOW_LDFLAGS) \
    		  $(LIBYUV_LDFLAGS) $(OPENH264_LDFLAGS) $(VPX_LDFLAGS)


#
# Codecs
#
AC_NO_G7221_CODEC=@ac_no_g7221_codec@

export CODEC_OBJS=

export PJMEDIA_AUDIODEV_OBJS += @ac_pjmedia_audiodev_objs@

export CODEC_OBJS += gsm.o

export CFLAGS += -I$(THIRD_PARTY)/build/speex -I$(THIRD_PARTY)/speex/include
export CODEC_OBJS += speex_codec.o

ifneq (@ac_no_speex_aec@,1)
export PJMEDIA_OBJS += echo_speex.o
endif

export CFLAGS += -I$(THIRD_PARTY)/webrtc/src
export PJMEDIA_OBJS += echo_webrtc_aec.o

export CODEC_OBJS += ilbc.o

export CODEC_OBJS += g722.o g722/g722_enc.o g722/g722_dec.o

ifeq ($(AC_NO_G7221_CODEC),1)
export CFLAGS += -DPJMEDIA_HAS_G7221_CODEC=0
else
export CODEC_OBJS += g7221.o
export G7221_CFLAGS += -I$(THIRD_PARTY)
endif

export CODEC_OBJS += opus.o

#
# Dshow video device
#
ifeq ($(AC_PJMEDIA_VIDEO_HAS_DSHOW),yes)
export PJMEDIA_VIDEODEV_OBJS += dshow_dev.o dshow_filter.o
endif

#
# AVF video device
#
ifeq ($(AC_PJMEDIA_VIDEO_HAS_AVF),yes)
export PJMEDIA_VIDEODEV_OBJS += avf_dev.o
endif

