Skip to content

Conversation

@youn9k
Copy link
Member

@youn9k youn9k commented Dec 1, 2024

🤔 배경

사진 편집화면부턴 서로의 영상을 보지 않기 때문에 불필요한 리소스였고, CPU와 메모리를 많이 사용하는 앱인 만큼 최적화가 필요했습니다.

📃 작업 내역

  • StopVideoCaptureUseCase / StopVideoCaptureUseCaseImpl 추가
private func startTimer() {
        output.send(.timer(count: timerCount))
        
        let _ = Timer.scheduledTimer(
            withTimeInterval: 1,
            repeats: true
        ) { [weak self] timer in
            guard let self else { return }
            
            self.timerCount -= 1
            self.output.send(.timer(count: self.timerCount))
            
            if self.timerCount == 0 {
                self.timerCount = 3
                
                let images = self.captureVideosUseCase.execute()
                let result = Output.timerCompleted(images: images)
                self.stopVideoCaptureUseCase.execute() // <-- 추가
                
                self.output.send(result)
                timer.invalidate()
            }
        }
    }

✅ 리뷰 노트

PhotoRoomViewController 와 EditPhotoRoomViewController 간에 연결이 되어있지 않아 동작은 확인하지 못했습니다..!

@youn9k youn9k added the ✨ feat 새로운 기능 추가 label Dec 1, 2024
@youn9k youn9k self-assigned this Dec 1, 2024
@youn9k youn9k changed the base branch from develop to feat/#155-core-module December 1, 2024 16:10
모듈 맵은 헤더 파일을 가져오는 데 걸리는 시간을 단축하여 소스 컴파일 시간을 향상시킵니다.
모듈 맵은 컴파일러에게 프레임워크에 포함된 헤더 목록을 제공합니다.
하지만 저희 프레임워크들을 모듈 맵이 따로 없어 전부 NO로 설정했습니다.
Copy link
Collaborator

@hsw1920 hsw1920 left a comment

Choose a reason for hiding this comment

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

👍 이제 EditPhoto에서 아이폰이 불타지 않겠군요..!

Comment on lines +88 to +94

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

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
Collaborator

@0Hooni 0Hooni left a comment

Choose a reason for hiding this comment

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

이제 내 폰 안뜨거워진다 ㅠㅠ

수고 많으셨습니다 👍

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로 설정했습니다.

Copy link
Member

@Kiyoung-Kim-57 Kiyoung-Kim-57 left a comment

Choose a reason for hiding this comment

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

빠른 적용 감사함다!

Base automatically changed from feat/#155-core-module to develop December 2, 2024 01:11
@youn9k youn9k merged commit 7a34996 into develop Dec 2, 2024
@youn9k youn9k deleted the feat/#157-stop-capture branch December 2, 2024 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feat 새로운 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

사진 편집화면으로 이동 시 비디오 데이터 전송을 중단해 성능을 개선합니다.

5 participants