bilibili / ijkplayer

Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
GNU General Public License v2.0
32.46k stars 8.12k forks source link

IJKSDLGLView: setupDisplay not ready #2225

Closed destinyxxl closed 7 years ago

destinyxxl commented 7 years ago

how can i solve the problem, thanks!

destinyxxl commented 7 years ago

===== custom modules begin ===== register protocol: async register protocol: ijkhttphook register protocol: ijkinject register protocol: ijklongurl register protocol: ijksegment register protocol: ijktcphook register demuxer : ijklivehook ===== custom modules end ===== av_version_info: ff3.0--ijk0.4.5.1--dev0.4.5--rc10 ijkmp_set_inject_opaque(0x7ff25b46f220) ijkmp_set_inject_opaque()=void 2016-11-07 16:13:42.251 xx[15269:2022389] OK setup GL ijkmp_ios_set_view(glView=0x7ff25b7354a0) ijkmp_ios_set_view(glView=0x7ff25b7354a0)=void 2016-11-07 16:13:42.255 xx[15269:2022389] invalidateRenderBuffer 2016-11-07 16:13:42.257 xx[15269:2022502] IJKSDLGLView: setupDisplay not ready 2016-11-07 16:13:42.283 xx[15269:2022389] invalidateRenderBuffer 2016-11-07 16:13:42.283 xx[15269:2022502] IJKSDLGLView: setupDisplay not ready

seanLee commented 7 years ago

The same problem.With the same usage with before,but now can't play correctly

seanLee commented 7 years ago
===== custom modules begin =====
register demuxer : ijklivehook
===== custom modules end =====
av_version_info: ff3.1--ijk0.6.1--20160824--001
ijkmp_set_inject_opaque(0x10fe98fe0)
ijkmp_set_inject_opaque()=void
2016-11-18 18:22:56.006366 Sports[4223:1327334] OK setup GL

ijkmp_ios_set_view(glView=0x111a6f750)
ijkmp_ios_set_view(glView=0x111a6f750)=void
2016-11-18 18:22:56.029349 Sports[4223:1327334] invalidateRenderBuffer

2016-11-18 18:22:56.030221 Sports[4223:1327619] IJKSDLGLView: setupDisplay not ready

2016-11-18 18:22:56.155483 Sports[4223:1327334] invalidateRenderBuffer

2016-11-18 18:22:56.155822 Sports[4223:1327619] IJKSDLGLView:display: unable to 

this is my console

seanLee commented 7 years ago

replace the ijkplayer version and the same console.

2016-11-18 18:37:07.556131 Sports[4237:1331026]  | JPUSH | I - [JPUSHDeviceTokenReport] upload device token success
===== custom modules begin =====
register demuxer : ijklivehook
===== custom modules end =====
av_version_info: ff3.1--ijk0.6.2--20160926--001
ijk_version_info: k0.6.2-11-gb358420
ijkmp_set_inject_opaque(0x10c8e4c60)
ijkmp_set_inject_opaque()=void
2016-11-18 18:37:15.839539 Sports[4237:1330912] OK setup GL

ijkmp_ios_set_view(glView=0x10c9b6bc0)
ijkmp_ios_set_view(glView=0x10c9b6bc0)=void
2016-11-18 18:37:15.861234 Sports[4237:1330912] invalidateRenderBuffer

2016-11-18 18:37:15.865258 Sports[4237:1331021] IJKSDLGLView: setupDisplay not ready

2016-11-18 18:37:16.003300 Sports[4237:1330912] invalidateRenderBuffer

2016-11-18 18:37:16.003880 Sports[4237:1331066] IJKSDLGLView: setupDisplay not ready

I run the demo in simulator ,it worked.But in the real phone,this problem occured.

seanLee commented 7 years ago

@sumlitLin . Do U make a framework library?I found the same problem that someone package the ijkplayer and met the same problem

seanLee commented 7 years ago

solve this problem.So stupid am I.Just forget some method to run.

akerdi commented 7 years ago

@seanLee can u help with the "some method",i meet the question recently,,,with appreciate

seanLee commented 7 years ago

@shaohung001 prepareToPlay.According to demo,i add this method and everything be OK.

bbcallen commented 7 years ago

Mostly because the player.view was not added to your view hierarchy. Nothing more I can tell, without knowing how do you use ijkplayer.

akerdi commented 7 years ago

2305 I solved it.I attach the view which holds the ijkpreview to a tableCell,when it prepareForReuse,i remove the view by mistake.Have a see in the reveal to find whether the view still there,which may help.thx @bbcallen

mxw2 commented 7 years ago

i have the same quetion,but i found this question is created by at once use "[self.player play]" when we create self.player(maybe player needs to load some resource) , if you user [self.player play] after 2 sections create player ,it works successfully; or you can register Notication for "IJKMPMoviePlayerLoadStateDidChangeNotification",and look at it , selector to play is OK,i suggest the Noticafition ,it good

libercata commented 7 years ago

I assume you copy the demo code just like me,It happened because of "presentViewController". It solve after I changed it to "pushViewController". I guess the problem is cause by "Landscape Orientation"

mrhyh commented 7 years ago

I have the same quetion when my device is "Landscape Orientation".

SenJiang commented 6 years ago

err = avformat_open_input(&ic, is->filename, is->iformat, &ffp->format_opts) reslut err = -1094995529, who can tell me why ,thanks

meiruchen commented 5 years ago

===== custom modules begin ===== register demuxer : ijklivehook ===== custom modules end ===== av_version_info: ff3.1--ijk0.6.1--20160824--001 ijkmp_set_inject_opaque(0x1055b8440) ijkmp_set_inject_opaque()=void 2018-12-24 13:57:59.367309+0800 com.HospitalStr.hin[14620:2937350] Metal GPU Frame Capture Enabled 2018-12-24 13:57:59.368031+0800 com.HospitalStr.hin[14620:2937350] Metal API Validation Enabled 2018-12-24 13:57:59.493682+0800 com.HospitalStr.hin[14620:2937350] OK setup GL ijkmp_ios_set_view(glView=0x10579d440) ijkmp_ios_set_view(glView=0x10579d440)=void 2018-12-24 13:57:59.519631+0800 com.HospitalStr.hin[14620:2937350] invalidateRenderBuffer 2018-12-24 13:57:59.519829+0800 com.HospitalStr.hin[14620:2937497] IJKSDLGLView: setupDisplay not ready

meiruchen commented 5 years ago

这个 IJKMediaFramework 之前能使用,但是没有动这部分的代码,现在突然不能使用了,请问是因为什么?

coderchou commented 5 years ago

这个 IJKMediaFramework 之前能使用,但是没有动这部分的代码,现在突然不能使用了,请问是因为什么?

解决了吗,我也遇到这个问题

yangshiliang commented 5 years ago

Another issue is the video streaming url.

For example, when I am using the url "http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/gear0/prog_index.m3u8", this error message appears. When checking this url with the VLC software on MAC OS, audio works but there is no video.

Then I try another url "http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/gear5/prog_index.m3u8". Although this error message still appears, both audio and video are working correctly.

So make sure that the video streaming url is good.