Skip to content

Feature - Add class ECCameraPreviewView#71

Open
allenlinli wants to merge 6 commits into
zevarito:masterfrom
allenlinli:feature/ECCameraPreviewView
Open

Feature - Add class ECCameraPreviewView#71
allenlinli wants to merge 6 commits into
zevarito:masterfrom
allenlinli:feature/ECCameraPreviewView

Conversation

@allenlinli

Copy link
Copy Markdown
Contributor

Hi zevarito,

I add a new class ECCameraPreviewView to provide a mirror stream view.
It's based on RTCCameraPreviewView, which is used in demo code "APP RTC Mobile iOS"

Please feel free to suggest it on code review, or open a pull request on this pull request to modify it :)


Notes:

  • I considered using "mirror" property on ECPlayerView by making RTCEAGLVideoView or its layer mirrored. I may give another PR for its implementation later.
  • I didn't provide RTCEAGLVideoViewDelegate now since I don't know how to connect it so far.
  • It's interesting that we have class RTCCameraPreviewView, which is based on AVCaptureVideoPreviewLayer (https://goo.gl/Vw355f). I wonder why do we need a capture session especially, and why do WebRTC provide RTCCameraPreviewView, not a mirror property on RTCEAGLVideoView (https://goo.gl/84u6To)? I ask for a feature request on WebRTC already (https://bugs.chromium.org/p/webrtc/issues/detail?id=9164), but I think our PR goes faster.

Cheers.

@zevarito

zevarito commented May 2, 2018

Copy link
Copy Markdown
Owner

@allenlinli sounds promising! give me a few days to review this, thank you for your support.

@zevarito

zevarito commented May 2, 2018

Copy link
Copy Markdown
Owner

Hi @allenlinli, just a few comments before actually review it.

Please keep the header paragraph, license and copyright as any other files in the project.

It's interesting that we have class RTCCameraPreviewView, which is based on AVCaptureVideoPreviewLayer(https://goo.gl/Vw355f). I wonder why do we need a capture session especially, and why do WebRTC provide RTCCameraPreviewView, not a mirror property on RTCEAGLVideoView (https://goo.gl/84u6To)? I ask for a feature request on WebRTC already (https://bugs.chromium.org/p/webrtc/issues/detail?id=9164), but I think our PR goes faster.

Well, if I understand your question the reason is that the class didn't existed before.

@allenlinli

allenlinli commented May 3, 2018

Copy link
Copy Markdown
Contributor Author

Thanks zevarito :) , I will add the header paragraph.
I found I don't know how to get video size like ECPlayerView does from RTCEAGLVideoViewDelegate, so I can not give it a scaling mode so far. You can have a look about it when you do code review.

@allenlinli

Copy link
Copy Markdown
Contributor Author

Sorry about not keep license and copyright correctly, I will learn about copyright later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants