integrate permissive patch of openh264

This commit is contained in:
Simon Morlat 2014-04-16 11:25:20 +02:00
parent 15fb9cac57
commit 02afae59eb
7 changed files with 73 additions and 27 deletions

View file

@ -63,27 +63,17 @@ NSString *const kLinphoneConfiguringStateUpdate = @"LinphoneConfiguringStateUpda
NSString *const kLinphoneGlobalStateUpdate = @"LinphoneGlobalStateUpdate";
extern void libmsilbc_init();
#ifdef HAVE_AMR
extern void libmsamr_init();
#endif
extern void libmsilbc_init(void);
extern void libmsamr_init(void);
extern void libmsx264_init(void);
extern void libmsopenh264_init(void);
extern void libmssilk_init(void);
extern void libmsbcg729_init(void);
#ifdef HAVE_X264
extern void libmsx264_init();
#endif
#ifdef HAVE_OPENH264
extern void libmsopenh264_init();
#endif
#define FRONT_CAM_NAME "AV Capture: com.apple.avfoundation.avcapturedevice.built-in_video:1" /*"AV Capture: Front Camera"*/
#define BACK_CAM_NAME "AV Capture: com.apple.avfoundation.avcapturedevice.built-in_video:0" /*"AV Capture: Back Camera"*/
#if defined (HAVE_SILK)
extern void libmssilk_init();
#endif
#if HAVE_G729
extern void libmsbcg729_init();
#endif
@implementation LinphoneCallAppData
- (id)init {
if ((self = [super init])) {

4
README
View file

@ -71,8 +71,8 @@ After the SDK is built, just open the linphone xcode project with Xcode, and pre
* Note regarding third party components subject to license
The liblinphone-sdk is compiled with third parties code that are subject to patent license, specially: AMR, SILK G729 and X264 codecs.
Linphone controls the embedding of these codecs thanks to the preprocessor macros HAVE_SILK, HAVE_AMR, HAVE_G729 HAVE_X264 positioned in xcode project.
The liblinphone-sdk is compiled with third parties code that are subject to patent license, specially: AMR, SILK G729 and H264 codecs.
Linphone controls the embedding of these codecs thanks to the preprocessor macros HAVE_SILK, HAVE_AMR, HAVE_G729 HAVE_OPENH264 positioned in xcode project.
Before embeding these 4 codecs in the final application, make sure to have the right to do so.
LIMITATIONS, KNOWN BUGS

View file

@ -30,10 +30,6 @@ enable_debug=no
# check that the selected options are correct
CHECKOPT_MSG := ""
ifeq ($(enable_gpl_third_parties)$(enable_zrtp),noyes)
CHECKOPT_MSG += "ZRTP is not available in non-gpl build. disabling\n"
enable_zrtp=no
endif
ifeq ($(enable_gpl_third_parties)$(enable_ffmpeg),noyes)
# ffmpeg is not compatible with no GPL.

View file

@ -0,0 +1,53 @@
commit 6b3de978d928b6c0baec3305c9803c21a4367d0c
Author: Simon Morlat <simon.morlat@linphone.org>
Date: Tue Apr 15 15:19:37 2014 +0200
permissive mode: allow reference frames to be used even if there were lost slices.
diff --git a/codec/decoder/core/src/decoder_core.cpp b/codec/decoder/core/src/decoder_core.cpp
index c19f501..a14e971 100644
--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -58,7 +58,7 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t
WelsLog (pCtx, WELS_LOG_WARNING,
"DecodeFrameConstruction():::iTotalNumMbRec:%d, total_num_mb_sps:%d, cur_layer_mb_width:%d, cur_layer_mb_height:%d --\n",
pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight);
- return -1;
+ //return -1;
}
#ifdef NO_WAITING_AU
pCtx->iTotalNumMbRec = 0;
diff --git a/codec/decoder/core/src/manage_dec_ref.cpp b/codec/decoder/core/src/manage_dec_ref.cpp
index dcf61ca..5582ec9 100644
--- a/codec/decoder/core/src/manage_dec_ref.cpp
+++ b/codec/decoder/core/src/manage_dec_ref.cpp
@@ -165,6 +165,7 @@ int32_t WelsReorderRefList (PWelsDecoderContext pCtx) {
&& (pSliceHeader->iSpsId != ppRefList[i]->iSpsId)) { //check;
WelsLog (pCtx, WELS_LOG_WARNING, "WelsReorderRefList()-1::::BASE LAYER::::iSpsId:%d, ref_sps_id:%d\n",
pSliceHeader->iSpsId, ppRefList[i]->iSpsId);
+ return ERR_NONE;
pCtx->iErrorCode = dsNoParamSets; //cross-IDR reference frame selection, SHOULD request IDR.--
return ERR_INFO_REFERENCE_PIC_LOST;
} else {
commit a1f3b95ad18d0788c2c803fac80e78d6365673ce
Author: Simon Morlat <simon.morlat@linphone.org>
Date: Tue Apr 15 17:54:58 2014 +0200
permissive mode (2)
diff --git a/codec/decoder/core/src/decoder_core.cpp b/codec/decoder/core/src/decoder_core.cpp
index a14e971..e742dbf 100644
--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -1738,8 +1738,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3
if ((iLastIdD < 0) || //case 1: first layer
(iLastIdD == iCurrIdD)) { //case 2: same uiDId
InitDqLayerInfo (dq_cur, &pLayerInfo, pNalCur, pCtx->pDec);
-
- if (!dq_cur->sLayerInfo.pSps->bGapsInFrameNumValueAllowedFlag) {
+ if (0){
+ //if (!dq_cur->sLayerInfo.pSps->bGapsInFrameNumValueAllowedFlag) {
const bool kbIdrFlag = dq_cur->sLayerInfo.sNalHeaderExt.bIdrFlag
|| (dq_cur->sLayerInfo.sNalHeaderExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_CODED_SLICE_IDR);
// Subclause 8.2.5.2 Decoding process for gaps in frame_num

View file

@ -32,12 +32,19 @@ endif
openh264_dir?=externals/openh264
$(BUILDER_BUILD_DIR)/$(openh264_dir)/Makefile:
$(BUILDER_SRC_DIR)/$(openh264_dir)/openh264-permissive.patch.stamp:
cd $(BUILDER_SRC_DIR)/$(openh264_dir) \
&& patch -p1 < $(BUILDER_SRC_DIR)/build/builders.d/openh264-permissive.patch
touch $(BUILDER_SRC_DIR)/$(openh264_dir)/openh264-permissive.patch.stamp
patch-openh264: $(BUILDER_SRC_DIR)/$(openh264_dir)/openh264-permissive.patch.stamp
update-openh264: patch-openh264
mkdir -p $(BUILDER_BUILD_DIR)/$(openh264_dir) \
&& cd $(BUILDER_BUILD_DIR)/$(openh264_dir)/ \
&& rsync -rvLpgoc --exclude ".git" $(BUILDER_SRC_DIR)/$(openh264_dir)/* .
&& rsync -rvLpgoc --exclude ".git" $(BUILDER_SRC_DIR)/$(openh264_dir)/* .
build-openh264: $(BUILDER_BUILD_DIR)/$(openh264_dir)/Makefile
build-openh264: update-openh264
cd $(BUILDER_BUILD_DIR)/$(openh264_dir) \
&& make libraries OS=ios ARCH=$(ARCH) PREFIX=$(prefix)\
&& make install OS=ios ARCH=$(ARCH) PREFIX=$(prefix)

@ -1 +1 @@
Subproject commit fb5700bd5cc18dd33c120ce9dd5f79b8f1f35f3a
Subproject commit b2f7191fa7e213f5b63b8e31936b962bae6adc2f

@ -1 +1 @@
Subproject commit 863889de427c70806d6bda87e2f95c3f38662c23
Subproject commit 1dc44eb5b824d104f96562e4b5bd28a1ac461525