Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions FrameWork/LFLiveKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1998,6 +1998,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 84D8B3861D7574D600752B56;
Expand Down Expand Up @@ -2643,6 +2644,8 @@
HEADER_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../samples/LFLiveKitDemo/Pods\"/**",
"${PODS_ROOT}/Headers/Private/OpenSSL_Universal/**",
"${PODS_ROOT}/Headers/Public/OpenSSL_Universal/**",
);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -2667,6 +2670,8 @@
HEADER_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../samples/LFLiveKitDemo/Pods\"/**",
"${PODS_ROOT}/Headers/Private/OpenSSL_Universal/**",
"${PODS_ROOT}/Headers/Public/OpenSSL_Universal/**",
);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down
4 changes: 4 additions & 0 deletions LFLiveKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ Pod::Spec.new do |s|
s.frameworks = "VideoToolbox", "AudioToolbox","AVFoundation","Foundation","UIKit"
s.libraries = "c++", "z"

s.pod_target_xcconfig = { 'HEADER_SEARCH_PATHS' => '${PODS_ROOT}/Headers/Private/OpenSSL_Universal/** ${PODS_ROOT}/Headers/Public/OpenSSL_Universal/**' }

s.dependency 'OpenSSL-Universal', '1.0.2.17'
s.static_framework = true
s.requires_arc = true
end
88 changes: 42 additions & 46 deletions LFLiveKit/Vendor/GPUImage/iOS/GPUImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -230,54 +230,50 @@ - (void)presentFramebuffer;
#pragma mark -
#pragma mark Handling fill mode

- (void)recalculateViewGeometry;
{
runSynchronouslyOnVideoProcessingQueue(^{
CGFloat heightScaling, widthScaling;

CGSize currentViewSize = self.bounds.size;

// CGFloat imageAspectRatio = inputImageSize.width / inputImageSize.height;
// CGFloat viewAspectRatio = currentViewSize.width / currentViewSize.height;

CGRect insetRect = AVMakeRectWithAspectRatioInsideRect(inputImageSize, self.bounds);

switch(_fillMode)
{
case kGPUImageFillModeStretch:
{
widthScaling = 1.0;
heightScaling = 1.0;
}; break;
case kGPUImageFillModePreserveAspectRatio:
{
widthScaling = insetRect.size.width / currentViewSize.width;
heightScaling = insetRect.size.height / currentViewSize.height;
}; break;
case kGPUImageFillModePreserveAspectRatioAndFill:
- (void)recalculateViewGeometry{
__block CGRect currentBounds;

dispatch_async(dispatch_get_main_queue(), ^(void){
//Run UI Updates
currentBounds = self.bounds;
runSynchronouslyOnVideoProcessingQueue(^{
CGFloat heightScaling, widthScaling;

// CGFloat imageAspectRatio = inputImageSize.width / inputImageSize.height;
// CGFloat viewAspectRatio = currentViewSize.width / currentViewSize.height;

CGRect insetRect = AVMakeRectWithAspectRatioInsideRect(inputImageSize, currentBounds);

switch(_fillMode)
{
// CGFloat widthHolder = insetRect.size.width / currentViewSize.width;
widthScaling = currentViewSize.height / insetRect.size.height;
heightScaling = currentViewSize.width / insetRect.size.width;
}; break;
}

imageVertices[0] = -widthScaling;
imageVertices[1] = -heightScaling;
imageVertices[2] = widthScaling;
imageVertices[3] = -heightScaling;
imageVertices[4] = -widthScaling;
imageVertices[5] = heightScaling;
imageVertices[6] = widthScaling;
imageVertices[7] = heightScaling;
case kGPUImageFillModeStretch:
{
widthScaling = 1.0;
heightScaling = 1.0;
}; break;
case kGPUImageFillModePreserveAspectRatio:
{
widthScaling = insetRect.size.width / currentBounds.size.width;
heightScaling = insetRect.size.height / currentBounds.size.height;
}; break;
case kGPUImageFillModePreserveAspectRatioAndFill:
{
// CGFloat widthHolder = insetRect.size.width / currentBounds.size.width;
widthScaling = currentBounds.size.height / insetRect.size.height;
heightScaling = currentBounds.size.width / insetRect.size.width;
}; break;
}

imageVertices[0] = -widthScaling;
imageVertices[1] = -heightScaling;
imageVertices[2] = widthScaling;
imageVertices[3] = -heightScaling;
imageVertices[4] = -widthScaling;
imageVertices[5] = heightScaling;
imageVertices[6] = widthScaling;
imageVertices[7] = heightScaling;
});
});

// static const GLfloat imageVertices[] = {
// -1.0f, -1.0f,
// 1.0f, -1.0f,
// -1.0f, 1.0f,
// 1.0f, 1.0f,
// };
}

- (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent;
Expand Down
Loading