Record TV over USB

Here for general support for B series TVs, request and problem solve area.

doodlecz
Official SamyGO Developer
Posts: 98
Joined: Wed Mar 17, 2010 9:12 am

Re: Record TV over USB

Post by doodlecz »

is it possible to display the serial console _output_ without ex-link cable?
if not, could anyone set print level (menu 5) to max (i think 0xFFF00000) and post the console output from the recording started by console and the recording started by remote?
there should be some more logs displayed and based on this we could better understand the program flow and possibly find the difference..

EDIT: btw, i noticed following lines in pvr.c:
"STMFD SP!, {R0-R11}\n" //Put all General Purpose registers to Stack
"SUB SP, SP, #44\n" );//Reserving 44 byte for 11 registers.
is it correct? shoudln't be 48 bytes for 12 registers?

I have also checked current output - the second (Error open pvr Rec device(85221ff6) error is result of previously opened some recording structure - it is rather clear in IDA - so it doesn't seem to be interesting.. regarding the first error, it is result of checking certain variable (what a surprise.. :D), but i can find only the initial setting of this variable. Maybe... in the worst case, we could make patch to log / print content of this variable to find out some details..
User avatar
erdem_ua
SamyGO Admin
Posts: 3126
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey
Contact:

Re: Record TV over USB

Post by erdem_ua »

Actually there is 42 register, yes :)
I don't count R0 :p

I will try to look in it next month.
User avatar
erdem_ua
SamyGO Admin
Posts: 3126
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey
Contact:

Re: Record TV over USB

Post by erdem_ua »

but we needed to have proper record, play function first :)
doodlecz
Official SamyGO Developer
Posts: 98
Joined: Wed Mar 17, 2010 9:12 am

Re: Record TV over USB

Post by doodlecz »

Hey, it's not "too early", it's just science fiction now :D

However, I was able to create cross compiling toolchain on vbox during weekend (no linux experience, lol, so still having some problems with glibc, but nvm now) and recompiled pvr.c / loader.c with the stack fix mentioned above. Also I changed the path to /mtd_ram/movie00.ts. And simply.. it works for me. REC button starts recording, STOP button stops recording.
Anyway the recorded movie has problem with sound - I can hear just some hissing noise from VLC - am I missing something?

*EDIT: lol, sound is ok on different computer :)
nbd
Posts: 161
Joined: Wed Jan 13, 2010 12:02 pm

Re: Record TV over USB

Post by nbd »

Cool! What is your firmware and TV model? Because I tried the same stack fix:

Code: Select all

"SUB     SP,  SP, #48\n" );//Reserving 48 byte for 12 registers.
and later:

Code: Select all

"ADD     SP, SP, #48\n"
"LDMFD   SP!, {R0-R11}\n"// Restore all GP registers from Stack
with 3000.g and UE40B7070, but didn't get it working.

Edit: I got it working". The magic was the path: /mtd_ram/movie00.ts (The original was /mtd_ram/movie/movie00.ts and since the directory was not existent, it failed)
User avatar
erdem_ua
SamyGO Admin
Posts: 3126
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey
Contact:

Re: Record TV over USB

Post by erdem_ua »

At my TV, I mount NFS directory to those location. Will test this with fixed stack on april.
doodlecz
Official SamyGO Developer
Posts: 98
Joined: Wed Mar 17, 2010 9:12 am

Re: Record TV over USB

Post by doodlecz »

Ok, meanwhile I'll try to check other functions for the PVR app.

Already checked/tested:
- passing destination dir from the cfg file to the proc during injection
- recordings saved to files with different filenames
- stop key consumed when stopping the recording (so that annoying message is not displayed)
- creation of "scheduler" thread to allow scheduled recordings (should be possible to specify times or program name in future for scheduled recordings)

To be checked (if possible - imo should be):
- use actual datetime, channel (or maybe the program name) as part of destination filename
- display some REC information when recording (trying to call PreRecord/PostRecord functions which seem to be only about displaying/hiding such dialog)

There might be many other possible enhancements (especially some GUI when starting the PVR app), however i think, mentioned two would be nice before publishing app to ppl

By the way, was anyone trying to modify the pvr_injection proc? It seems still a magic to me, because certain standard code INSIDE the RECORD key branch can result in crash when EXIT key is pressed to exit the content manager. I think it is somehow related to the size of the injected code, but I don't understand why???
sbav1
Official SamyGO Developer
Posts: 374
Joined: Fri Jan 15, 2010 10:20 am

Re: Record TV over USB

Post by sbav1 »

doodlecz wrote: By the way, was anyone trying to modify the pvr_injection proc? It seems still a magic to me, because certain standard code INSIDE the RECORD key branch can result in crash when EXIT key is pressed to exit the content manager. I think it is somehow related to the size of the injected code, but I don't understand why???
I encountered similar problems when trying to extend the code inside pvr_injection(), so I decided to use a little bit different approach, ie: move the actual code to external functions completely.

Modified source example in attached file (it's a simple RC remapper application, not finished - it should read key mappings from config etc). I used some (AFAIK not implemented in B650's) keycodes to indicate record start/stop on the screen.
It seems to be working..

NOTE: This is experimental and possibly dangerous code, only for LE*B650T2W with T-CHL7DEUC 2005.0 (and maybe 2004.0) firmware.
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “[B] Support”