Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H264 issues #170

Closed
saghul opened this issue May 2, 2016 · 14 comments
Closed

H264 issues #170

saghul opened this issue May 2, 2016 · 14 comments
Assignees
Milestone

Comments

@saghul
Copy link
Collaborator

saghul commented May 2, 2016

Sooo, I have some sad news :-(

(lldb) bt
* thread #1: tid = 0x18f0d, 0x208a6926 libsystem_platform.dylib`_platform_memmove + 38, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x208a6926 libsystem_platform.dylib`_platform_memmove + 38
    frame #1: 0x0020bce0 Blink`-[RTCOpenGLVideoRenderer uploadPlane:sampler:offset:width:height:stride:] + 188
    frame #2: 0x0020be28 Blink`-[RTCOpenGLVideoRenderer updateTextureDataForFrame:] + 264
    frame #3: 0x0020b4da Blink`-[RTCOpenGLVideoRenderer drawFrame:] + 214
    frame #4: 0x0021764a Blink`-[RTCEAGLVideoView glkView:drawInRect:] + 62
    frame #5: 0x2817254e GLKit`-[GLKView _display:] + 278
    frame #6: 0x00217812 Blink`-[RTCEAGLVideoView displayLinkTimerDidFire] + 200
    frame #7: 0x00217426 Blink`__29-[RTCEAGLVideoView configure]_block_invoke + 30
    frame #8: 0x2320b966 QuartzCore`CA::Display::DisplayLinkItem::dispatch() + 106
    frame #9: 0x2320b7b6 QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 594
    frame #10: 0x228ea512 IOMobileFramebuffer`IOMobileFramebufferVsyncNotifyFunc + 86
    frame #11: 0x20dcb5e4 IOKit`IODispatchCalloutFromCFMessage + 256
    frame #12: 0x20b27f3c CoreFoundation`__CFMachPortPerform + 132
    frame #13: 0x20b3c21a CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
    frame #14: 0x20b3b92e CoreFoundation`__CFRunLoopDoSource1 + 342
    frame #15: 0x20b39d40 CoreFoundation`__CFRunLoopRun + 1704
    frame #16: 0x20a88288 CoreFoundation`CFRunLoopRunSpecific + 516
    frame #17: 0x20a8807c CoreFoundation`CFRunLoopRunInMode + 108
    frame #18: 0x220a4af8 GraphicsServices`GSEventRunModal + 160
    frame #19: 0x251ad2c4 UIKit`UIApplicationMain + 144
  * frame #20: 0x0008cd52 Blink`main(argc=1, argv=0x0088bc8c) + 50 at main.m:32
(lldb) 

It only happens when using H264, so there is that. Did anyone run into the same thing after the last update?

@saghul
Copy link
Collaborator Author

saghul commented May 2, 2016

Maybe building the 51 branch is worth it, I see it also includes the H264 fixes, and maybe it's more stable? https://chromium.googlesource.com/external/webrtc/+log/branch-heads/51/

@MaartenPI
Copy link

I gave it a try too and get a green screen but I don't see those debug statements.

Did you use cordova or taco (the cordova wrapper with livereload?), if so, let me know. I'll try and replicate it with Cordova as well.

@saghul
Copy link
Collaborator Author

saghul commented May 2, 2016

Hi @MaartenPI, I use Cordova directly.

@MaartenPI
Copy link

I gave Cordova and Xcode a try, both give the same result as taco, without any problematic debug messages. Not really sure on how to debug this further.

@hasbean
Copy link

hasbean commented May 22, 2016

h264 is a no-go for me here too, even without Cordova entirely. I tried rebuilding the library on the latest release 12799 as well.

Apparently the EAGLView calls a number of functions like stride, uv, etc. CoreVideoFrameBuffer does not implement these functions so it calls the parent NativeFrameBuffer implementation, which is basically this:

`
const uint8_t* NativeHandleBuffer::DataY() const {
RTC_NOTREACHED(); // Should not be called.
return nullptr;
}
const uint8_t* NativeHandleBuffer::DataU() const {
RTC_NOTREACHED(); // Should not be called.
return nullptr;
}
const uint8_t* NativeHandleBuffer::DataV() const {
RTC_NOTREACHED(); // Should not be called.
return nullptr;
}

int NativeHandleBuffer::StrideY() const {
RTC_NOTREACHED(); // Should not be called.
return 0;
}
int NativeHandleBuffer::StrideU() const {
RTC_NOTREACHED(); // Should not be called.
return 0;
}
int NativeHandleBuffer::StrideV() const {
RTC_NOTREACHED(); // Should not be called.
return 0;
}
`

It crashes in the debug build when it hits RTC_NOTREACHED(). On release build, it shows a green screen since they simply return zeros.

I'm not sure if this is an oversight or simply the fact that h264 isn't ready for iOS :(

@saghul
Copy link
Collaborator Author

saghul commented May 22, 2016

@hasbean Interesting find! The weird part is that with previous releases we got some really bizarre quality (~10fps) whereas now we get a crash. So, in some way it looked ready-ish, but I haven't dug deep enough. It's surprising that you end up there, while we used to get H264 video before, albeit with ~10fps.

@ibc ibc closed this as completed Jun 15, 2016
@ibc
Copy link
Collaborator

ibc commented Jun 15, 2016

Closed by error. Reopening.

@saghul
Copy link
Collaborator Author

saghul commented Sep 19, 2016

Potentially relevant: #193 (comment)

@saghul
Copy link
Collaborator Author

saghul commented Sep 22, 2016

@saghul saghul changed the title Crash with latest libWebRTC when using H264 H264 issues Sep 22, 2016
@BellesoftConsulting
Copy link

Has any of you been able to solve the green screen issue by recompiling the plugin with the latest libraries ? before going through the exercise, wanted to make sure is worth while ;)

@eivindml
Copy link

@BellesoftConsulting Did you try this? I have the same issue.

@BellesoftConsulting
Copy link

BellesoftConsulting commented May 27, 2018 via email

@hthetiot hthetiot added this to the 6.0.x milestone Sep 13, 2019
@hthetiot hthetiot self-assigned this Sep 13, 2019
@hthetiot hthetiot modified the milestones: 6.0.x, 5.0.4, 5.1.x Oct 4, 2019
@hthetiot
Copy link
Contributor

hthetiot commented Oct 5, 2019

No sure but should be fixed by M69 PR #399

@hthetiot hthetiot closed this as completed Oct 5, 2019
@hthetiot
Copy link
Contributor

hthetiot commented Oct 7, 2019

Confirmed H264 support on #399 via FreeSwitch and jssip

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

No branches or pull requests

7 participants