Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand tab to spaces and remove $Id$ #3292

Merged
merged 1 commit into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

# properties
[*.{h,c,hpp,cpp,m,java}]
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
112 changes: 56 additions & 56 deletions build.mak.in
Original file line number Diff line number Diff line change
Expand Up @@ -223,48 +223,48 @@ OBOE_CFLAGS = @ac_oboe_cflags@

# PJMEDIA features exclusion
PJ_VIDEO_CFLAGS += $(SDL_CFLAGS) $(FFMPEG_CFLAGS) $(V4L2_CFLAGS) $(DSHOW_CFLAGS) $(QT_CFLAGS) \
$(OPENH264_CFLAGS) $(VPX_CFLAGS) $(DARWIN_CFLAGS)
$(OPENH264_CFLAGS) $(VPX_CFLAGS) $(DARWIN_CFLAGS)
PJ_VIDEO_LDFLAGS += $(SDL_LDFLAGS) $(FFMPEG_LDFLAGS) $(V4L2_LDFLAGS) $(DSHOW_LDFLAGS) \
$(OPENH264_LDFLAGS) $(VPX_LDFLAGS)

# CFLAGS, LDFLAGS, and LIBS to be used by applications
export APP_CC := @CC@
export APP_CXX := @CXX@
export APP_CFLAGS := -DPJ_AUTOCONF=1\
@CFLAGS@\
$(PJ_VIDEO_CFLAGS) \
-I$(PJDIR)/pjlib/include\
-I$(PJDIR)/pjlib-util/include\
-I$(PJDIR)/pjnath/include\
-I$(PJDIR)/pjmedia/include\
-I$(PJDIR)/pjsip/include
@CFLAGS@\
$(PJ_VIDEO_CFLAGS) \
-I$(PJDIR)/pjlib/include\
-I$(PJDIR)/pjlib-util/include\
-I$(PJDIR)/pjnath/include\
-I$(PJDIR)/pjmedia/include\
-I$(PJDIR)/pjsip/include
export APP_CXXFLAGS := @CXXFLAGS@ $(APP_CFLAGS)
export APP_LDFLAGS := -L$(PJDIR)/pjlib/lib\
-L$(PJDIR)/pjlib-util/lib\
-L$(PJDIR)/pjnath/lib\
-L$(PJDIR)/pjmedia/lib\
-L$(PJDIR)/pjsip/lib\
-L$(PJDIR)/third_party/lib\
$(PJ_VIDEO_LDFLAGS) \
@LDFLAGS@
-L$(PJDIR)/pjlib-util/lib\
-L$(PJDIR)/pjnath/lib\
-L$(PJDIR)/pjmedia/lib\
-L$(PJDIR)/pjsip/lib\
-L$(PJDIR)/third_party/lib\
$(PJ_VIDEO_LDFLAGS) \
@LDFLAGS@
export APP_LDXXFLAGS := $(APP_LDFLAGS)

export APP_LIB_FILES := \
$(PJ_DIR)/pjsip/lib/libpjsua-$(LIB_SUFFIX) \
$(PJ_DIR)/pjsip/lib/libpjsip-ua-$(LIB_SUFFIX) \
$(PJ_DIR)/pjsip/lib/libpjsip-simple-$(LIB_SUFFIX) \
$(PJ_DIR)/pjsip/lib/libpjsip-$(LIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia-codec-$(LIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia-videodev-$(LIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia-$(LIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia-audiodev-$(LIB_SUFFIX) \
$(PJ_DIR)/pjnath/lib/libpjnath-$(LIB_SUFFIX) \
$(PJ_DIR)/pjlib-util/lib/libpjlib-util-$(LIB_SUFFIX) \
$(APP_THIRD_PARTY_LIB_FILES) \
$(PJ_DIR)/pjlib/lib/libpj-$(LIB_SUFFIX)
$(PJ_DIR)/pjsip/lib/libpjsua-$(LIB_SUFFIX) \
$(PJ_DIR)/pjsip/lib/libpjsip-ua-$(LIB_SUFFIX) \
$(PJ_DIR)/pjsip/lib/libpjsip-simple-$(LIB_SUFFIX) \
$(PJ_DIR)/pjsip/lib/libpjsip-$(LIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia-codec-$(LIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia-videodev-$(LIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia-$(LIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia-audiodev-$(LIB_SUFFIX) \
$(PJ_DIR)/pjnath/lib/libpjnath-$(LIB_SUFFIX) \
$(PJ_DIR)/pjlib-util/lib/libpjlib-util-$(LIB_SUFFIX) \
$(APP_THIRD_PARTY_LIB_FILES) \
$(PJ_DIR)/pjlib/lib/libpj-$(LIB_SUFFIX)
export APP_LIBXX_FILES := \
$(PJ_DIR)/pjsip/lib/libpjsua2-$(LIB_SUFFIX) \
$(APP_LIB_FILES)
$(PJ_DIR)/pjsip/lib/libpjsua2-$(LIB_SUFFIX) \
$(APP_LIB_FILES)

ifeq ($(PJ_SHARED_LIBRARIES),)
export PJLIB_LDLIB := -lpj-$(TARGET_NAME)
Expand Down Expand Up @@ -294,45 +294,45 @@ export PJSUA_LIB_LDLIB := -lpjsua
export PJSUA2_LIB_LDLIB := -lpjsua2

export ADD_LIB_FILES := $(PJ_DIR)/pjsip/lib/libpjsua.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjsip/lib/libpjsua.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjsip/lib/libpjsip-ua.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjsip/lib/libpjsip-ua.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjsip/lib/libpjsip-simple.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjsip/lib/libpjsip-simple.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjsip/lib/libpjsip.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjsip/lib/libpjsip.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia-codec.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjmedia/lib/libpjmedia-codec.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia-videodev.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjmedia/lib/libpjmedia-videodev.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjmedia/lib/libpjmedia.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia-audiodev.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjmedia/lib/libpjmedia-audiodev.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjnath/lib/libpjnath.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjnath/lib/libpjnath.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjlib-util/lib/libpjlib-util.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjlib-util/lib/libpjlib-util.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjlib/lib/libpj.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjlib/lib/libpj.$(SHLIB_SUFFIX)
$(PJ_DIR)/pjsip/lib/libpjsip-ua.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjsip/lib/libpjsip-ua.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjsip/lib/libpjsip-simple.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjsip/lib/libpjsip-simple.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjsip/lib/libpjsip.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjsip/lib/libpjsip.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia-codec.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjmedia/lib/libpjmedia-codec.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia-videodev.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjmedia/lib/libpjmedia-videodev.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjmedia/lib/libpjmedia.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjmedia/lib/libpjmedia-audiodev.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjmedia/lib/libpjmedia-audiodev.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjnath/lib/libpjnath.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjnath/lib/libpjnath.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjlib-util/lib/libpjlib-util.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjlib-util/lib/libpjlib-util.$(SHLIB_SUFFIX) \
$(PJ_DIR)/pjlib/lib/libpj.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjlib/lib/libpj.$(SHLIB_SUFFIX)

APP_LIB_FILES += $(ADD_LIB_FILES)

APP_LIBXX_FILES += $(PJ_DIR)/pjsip/lib/libpjsua2.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/pjsip/lib/libpjsua2.$(SHLIB_SUFFIX) \
$(ADD_LIB_FILES)
$(ADD_LIB_FILES)
endif

ifeq ($(PJ_EXCLUDE_PJSUA2),1)
export PJSUA2_LIB_LDLIB :=
endif

export APP_LDLIBS := $(PJSUA_LIB_LDLIB) \
$(PJSIP_UA_LDLIB) \
$(PJSIP_SIMPLE_LDLIB) \
$(PJSIP_LDLIB) \
$(PJMEDIA_CODEC_LDLIB) \
$(PJMEDIA_LDLIB) \
$(PJMEDIA_VIDEODEV_LDLIB) \
$(PJMEDIA_AUDIODEV_LDLIB) \
$(PJMEDIA_LDLIB) \
$(PJNATH_LDLIB) \
$(PJLIB_UTIL_LDLIB) \
$(APP_THIRD_PARTY_LIBS)\
$(APP_THIRD_PARTY_EXT)\
$(PJLIB_LDLIB) \
@LIBS@
$(PJSIP_UA_LDLIB) \
$(PJSIP_SIMPLE_LDLIB) \
$(PJSIP_LDLIB) \
$(PJMEDIA_CODEC_LDLIB) \
$(PJMEDIA_LDLIB) \
$(PJMEDIA_VIDEODEV_LDLIB) \
$(PJMEDIA_AUDIODEV_LDLIB) \
$(PJMEDIA_LDLIB) \
$(PJNATH_LDLIB) \
$(PJLIB_UTIL_LDLIB) \
$(APP_THIRD_PARTY_LIBS)\
$(APP_THIRD_PARTY_EXT)\
$(PJLIB_LDLIB) \
@LIBS@
export APP_LDXXLIBS := $(PJSUA2_LIB_LDLIB) \
-lstdc++ \
$(APP_LDLIBS)
-lstdc++ \
$(APP_LDLIBS)

# Here are the variables to use if application is using the library
# from within the source distribution
Expand Down
3 changes: 1 addition & 2 deletions pjlib-util/include/pjlib-util.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* $Id$ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
Expand Down Expand Up @@ -72,5 +71,5 @@
#include <pjlib-util/cli_console.h>
#include <pjlib-util/cli_telnet.h>

#endif /* __PJLIB_UTIL_H__ */
#endif /* __PJLIB_UTIL_H__ */

31 changes: 15 additions & 16 deletions pjlib-util/include/pjlib-util/base64.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* $Id$ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
Expand Down Expand Up @@ -40,44 +39,44 @@ PJ_BEGIN_DECL
* Helper macro to calculate the approximate length required for base256 to
* base64 conversion.
*/
#define PJ_BASE256_TO_BASE64_LEN(len) (len * 4 / 3 + 3)
#define PJ_BASE256_TO_BASE64_LEN(len) (len * 4 / 3 + 3)

/**
* Helper macro to calculate the approximage length required for base64 to
* base256 conversion.
*/
#define PJ_BASE64_TO_BASE256_LEN(len) (len * 3 / 4)
#define PJ_BASE64_TO_BASE256_LEN(len) (len * 3 / 4)


/**
* Encode a buffer into base64 encoding.
*
* @param input The input buffer.
* @param input The input buffer.
* @param in_len Size of the input buffer.
* @param output Output buffer. Caller must allocate this buffer with
* the appropriate size.
* the appropriate size.
* @param out_len On entry, it specifies the length of the output buffer.
* Upon return, this will be filled with the actual
* length of the output buffer.
* Upon return, this will be filled with the actual
* length of the output buffer.
*
* @return PJ_SUCCESS on success.
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pj_base64_encode(const pj_uint8_t *input, int in_len,
char *output, int *out_len);
char *output, int *out_len);


/**
* Decode base64 string.
*
* @param input Input string.
* @param out Buffer to store the output. Caller must allocate
* this buffer with the appropriate size.
* @param input Input string.
* @param out Buffer to store the output. Caller must allocate
* this buffer with the appropriate size.
* @param out_len On entry, it specifies the length of the output buffer.
* Upon return, this will be filled with the actual
* length of the output.
* Upon return, this will be filled with the actual
* length of the output.
*/
PJ_DECL(pj_status_t) pj_base64_decode(const pj_str_t *input,
pj_uint8_t *out, int *out_len);
pj_uint8_t *out, int *out_len);



Expand All @@ -88,5 +87,5 @@ PJ_DECL(pj_status_t) pj_base64_decode(const pj_str_t *input,
PJ_END_DECL


#endif /* __PJLIB_UTIL_BASE64_H__ */
#endif /* __PJLIB_UTIL_BASE64_H__ */

Loading