[英]G711Codec.h:44:1: error build: unknown type name 'class'; did you mean 'Class'?
want to add some Camera SDK in my swift project.. but cant solve this error..想在我的 swift 项目中添加一些 Camera SDK.. 但无法解决此错误..
libAndHeaders/MediaPlayer/G711Codec.h:42:1: error build: unknown type name 'class'; libAndHeaders/MediaPlayer/G711Codec.h:42:1: 构建错误:未知类型名称“类”; did you mean 'Class'?您指的是 'Class' 吗?
maybe this is cpp header file or some other file.也许这是 cpp header 文件或其他文件。 when i include this in my Objectice-c header file then it gives me this err..当我将它包含在我的 Objectice-c header 文件中时,它给了我这个错误..
/*
G711解码库
*/
#ifndef _G711_CODEC_H_
#define _G711_CODEC_H_
#define word16 short
#define word32 int
#define Word16 short
#define Word32 int
#define HI_VOICE_MAX_FRAME_SIZE (480+1) /* dont change it */
#define BIAS (0x84) /* Bias for linear code. */
#define CLIP 8159
#define SIGN_BIT (0x80) /* Sign bit for a A-law byte. */
#define QUANT_MASK (0xf) /* Quantization field mask. */
#define NSEGS (8) /* Number of A-law segments. */
#define SEG_SHIFT (4) /* Left shift for segment number. */
#define SEG_MASK (0x70) /* Segment field mask. */
static int seg_aend[8] = {0x1F, 0x3F, 0x7F, 0xFF,
0x1FF, 0x3FF, 0x7FF, 0xFFF};
static int seg_uend[8] = {0x3F, 0x7F, 0xFF, 0x1FF,
0x3FF, 0x7FF, 0xFFF, 0x1FFF};
/* HISI_VOICE codec type */
/* Real-time transport protocol(RTP) */
#define G711_A 0x01 /* 64kbps G.711 A, see RFC3551.txt 4.5.14 PCMA */
#define G711_U 0x02 /* 64kbps G.711 U, see RFC3551.txt 4.5.14 PCMU */
#define G711_ORG_A 0x41 /* original version 64kbps G.711 A */
#define G711_ORG_U 0x42 /* original version 64kbps G.711 U */
typedef int (*G711_Decoder)(int sample);
class G711Codec
{
check this screenshot检查这个截图
Yes, it´sa c++ header. You can mix obj-c and c++ if you need to (such source files need to have.mm extension, so that the compiler recognizes them), but probably you can choose another (obj-c) framework for what you need.是的,它是 c++ header。如果需要,您可以混合使用 obj-c 和 c++(此类源文件需要具有 .mm 扩展名,以便编译器识别它们),但您可能可以选择另一个 (obj-c)您需要的框架。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.