Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -178,7 +178,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

무슨 수정인걸까요 궁금궁금

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 궁금합니다!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

프레임워크를 외부에 배포할 때 헤더를 제공하기 위해 모듈 맵이라는 걸 사용하는데, 이 모듈맵을 사용할건지를 체크하는 옵션이라고 해요. 저희 프레임워크들은 전부 내부 모듈이라 모듈 맵이 따로 없어 전부 NO로 설정했습니다.

DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -224,7 +224,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ public final class ConnectionRepositoryImpl: ConnectionRepository {
fps: Int(fps.maxFrameRate)
)
}

public func stopCaptureLocalVideo() -> Bool {
guard let capturer = self.videoCapturer as? RTCCameraVideoCapturer else { return false }
capturer.stopCapture()
return true
}

Comment on lines +88 to +94
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

캬 바로 반영해주셨네요!

private func bindLocalVideo() {
self.clients.forEach { $0.bindLocalVideo(videoSource: self.videoSource, _localVideoView) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -200,7 +200,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -652,7 +652,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Foundation
import Combine
import PhotoGetherDomainInterface

public final class StopVideoCaptureUseCaseImpl: StopVideoCaptureUseCase {
@discardableResult
public func execute() -> Bool {
connectionRepository.stopCaptureLocalVideo()
}

private let connectionRepository: ConnectionRepository

public init(connectionRepository: ConnectionRepository) {
self.connectionRepository = connectionRepository
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ public protocol ConnectionRepository {
func createRoom() -> AnyPublisher<RoomOwnerEntity, Error>
func joinRoom(to roomID: String, hostID: String) -> AnyPublisher<Bool, Error>
func sendOffer() async throws
func stopCaptureLocalVideo() -> Bool
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Foundation

public protocol StopVideoCaptureUseCase {
@discardableResult
func execute() -> Bool
}
7 changes: 6 additions & 1 deletion PhotoGether/PhotoGether/App/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,13 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
connectionRepository: connectionRepository
)

let stopVideoCaptureUseCase: StopVideoCaptureUseCase = StopVideoCaptureUseCaseImpl(
connectionRepository: connectionRepository
)

let photoRoomViewModel: PhotoRoomViewModel = PhotoRoomViewModel(
captureVideosUseCase: captureVideosUseCase
captureVideosUseCase: captureVideosUseCase,
stopVideoCaptureUseCase: stopVideoCaptureUseCase
)

let photoRoomViewController: PhotoRoomViewController = PhotoRoomViewController(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -210,7 +210,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -234,7 +234,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -391,7 +391,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -367,7 +367,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ public final class PhotoRoomViewModel {
private var output = PassthroughSubject<Output, Never>()

private let captureVideosUseCase: CaptureVideosUseCase
private let stopVideoCaptureUseCase: StopVideoCaptureUseCase

public init(captureVideosUseCase: CaptureVideosUseCase) {
public init(
captureVideosUseCase: CaptureVideosUseCase,
stopVideoCaptureUseCase: StopVideoCaptureUseCase
) {
self.captureVideosUseCase = captureVideosUseCase
self.stopVideoCaptureUseCase = stopVideoCaptureUseCase
}

func transform(input: AnyPublisher<Input, Never>) -> AnyPublisher<Output, Never> {
Expand Down Expand Up @@ -53,6 +58,7 @@ public final class PhotoRoomViewModel {

let images = self.captureVideosUseCase.execute()
let result = Output.timerCompleted(images: images)
self.stopVideoCaptureUseCase.execute()

self.output.send(result)
timer.invalidate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -351,7 +351,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -369,7 +369,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = B3PWYBKFUK;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down