Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
onevoisses
Visitor

Re: Parts of a code I cannot Understand.It works though

So is it saying that my posterscreen is the problem ? line 47

Request Time: 33
rsp:
^CCurrent Function:
034: Function showPosterScreen(screen As Object, category As Object) As Integer
035:
036: if validateParam(screen, "roPosterScreen", "showPosterScreen") = false return -1
037: if validateParam(category, "roAssociativeArray", "showPosterScreen") = false return -1
038:
039: m.curCategory = 0
040: m.curShow = 0
041:
042: screen.SetListNames(getCategoryList(category))
043: screen.SetContentList(getShowsForCategoryItem(category, m.curCategory))
044: screen.Show()
045:
046: while true
047: msg = wait(0, screen.GetMessagePort())
048: if type(msg) = "roPosterScreenEvent" then
049: print "showPosterScreen | msg = "; msg.GetMessage() " | index = "; msg.GetIndex()
050: if msg.isListFocused() then
051: m.curCategory = msg.GetIndex()
052: m.curShow = 0
053: screen.SetFocusedListItem(m.curShow)
054: screen.SetContentList(getShowsForCategoryItem(category, m.curCategory))
055: print "list focused | current category = "; m.curCategory
056: else if msg.isListItemSelected() then
057: m.curShow = msg.GetIndex()
058: print "list item selected | current show = "; m.curShow
059: m.curShow = displayShowDetailScreen(category, m.curShow)
060: screen.SetFocusedListItem(m.curShow)
061: print "list item updated | new show = "; m.curShow
062: else if msg.isScreenClosed() then
063: return -1
064: end if
065: end If
066: end while
067:
068:
069: End Function
Break in 47
047: msg = wait(0, screen.GetMessagePort())
Backtrace:
Function showposterscreen(screen As <uninitialized>, category As <uninitialized>) As Integer
file/line: /tmp/plugin/PCAAAABs49ef/pkg:/source/appPosterScreen.brs(47)
Function displaycategoryposterscreen(category As <uninitialized>) As
file/line: /tmp/plugin/PCAAAABs49ef/pkg:/source/appHomeScreen.brs(79)
Function showhomescreen(screen As ) As Integer
file/line: /tmp/plugin/PCAAAABs49ef/pkg:/source/appHomeScreen.brs(56)
Function main() As
file/line: /tmp/plugin/PCAAAABs49ef/pkg:/source/appMain.brs(20)

Local Variables:
screen &h0010 bsc:roPosterScreen, refcnt=2
category &h4010 bsc:roAssociativeArray, refcnt=6
global &h0020 rotINTERFACE:ifGlobal
m &h0010 bsc:roAssociativeArray, refcnt=5
msg &h0000 <uninitialized> val:Uninitialized
BrightScript Debugger>
Channel: Goaheadmission
O/S : Linux
Home media: MYTHROKUPLAYER With Homerun
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: Parts of a code I cannot Understand.It works though

"onevoisses" wrote:
So is it saying that my posterscreen is the problem ? line 47

Request Time: 33
rsp:
^CCurrent Function:


No, it's just saying that that's where it was when you hit the interrupt. It was sitting in the event loop waiting for the next event. But before that, it looks like you printed rsp and it was empty. If so, you need to figure out why that variable is not getting a value.
0 Kudos
onevoisses
Visitor

Re: Parts of a code I cannot Understand.It works though

Well,I think I deserve a Vitamin Water now,not a beer yet because I am up to
- got the feeds to parse
- but oops! just flash retrieving back to homescreen
- i am tinkering with the bitrates,streamformat etc.

created feed connection for http://xxx.xxx.xxx.xxx/xml/live.xml
url: http://xxx.xxx.xxx.xxx/xml/live.xml
Request Time: 11
Show Feed Parse Took : 19
ButtonPressed
ButtonPressed
showHomeScreen | msg = Stream started. | index = 0
Unexpected event type: 20
showHomeScreen | msg = Content contains no playable tracks. | index = 0
Video status: 0 0
showHomeScreen | msg = | index = -5
Video request failure: -5 1
showHomeScreen | msg = | index = 0
Screen closed
Button pressed: 2 0
Channel: Goaheadmission
O/S : Linux
Home media: MYTHROKUPLAYER With Homerun
0 Kudos
onevoisses
Visitor

Re: Parts of a code I cannot Understand.It works though

So its beer time now and let me impart what I did.

- For testing I configure a local server with apache based on a popular linux distribution
For development I am using a Roku 2 XD
For Playback I am using a Roku 2 XS (optional)
Remotely I have a few friends that I Introduce to Roku looking at my Private Channel (optional)
I have a PC with Linux desktop install (try mint if you are a beginner)
My Router is a 54g

First I went in the in appVideo.brs and turn on the print statement at this line

Step 1.
'Uncomment his line to dump the contents of the episode to be played

' PrintAA(episode)


Use it to Troubleshoot your stream.,I would say turn it back off (comment it back) when you have locate the problem.

Mine was that I had network problem. It worked fine for the simple Videoplayer and Custom Videoplayer.

My thoughts is that if you are going to test hls, you need the bandwidth its time to ditch the 54g routers and upgrade go for 300N.They are design for streaming.

I would suggest invest in a private personal server with webhosting for testing.Use the cloud for production.


Step 2. turn on the debug logs.I found I had an uninitialised variable.This was caused by my reading of this

viewtopic.php?f=34&t=27612 and using this statement

episode.StreamFormat = episode.StreamFormats[0] in the appVideoplayer

the streamsformat have being fixed in the development kit ,it was only a fixed,it will brick your development.

I placed an elseif statement in the appshowfeed.brs to parse the feed formats for deciding wether its mp4 or hls

Step 3. follow your streams path

RokuMarkn suggest that “First thing would be to print rsp to make sure it contains what you think it contains.” this is in the appshowfeeds.brs
it what help me to find out the problem in Step 2.

Step 4. Do not be afraid to start over but made sure you have the latest development kit relevant to the environment you are developing with I am Using 2.9 there is a beta but not yet for me a beginner.

Step 5 .Grab some coffee, put the beer on Ice and read about the “snake” at the bottom of the
brightscript manual. and Read read read read.( I never read the manuals I just want the product to play).Not so Here

Best of luck and thanks to

RokuMarkn,RokuChris and destruk and of course Customer Service,I am getting my player that was never delivered.I am making it an early christmas present.Do not be cynical I am getting it for sure.Fedex told me.
Channel: Goaheadmission
O/S : Linux
Home media: MYTHROKUPLAYER With Homerun
0 Kudos