Page 9 of 30
Re: Record TV over USB
Posted: Thu Mar 18, 2010 11:26 am
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..

), 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..
Re: Record TV over USB
Posted: Fri Mar 19, 2010 1:43 pm
by erdem_ua
Actually there is 42 register, yes

I don't count R0 :p
I will try to look in it next month.
Re: Record TV over USB
Posted: Mon Mar 22, 2010 3:37 pm
by erdem_ua
but we needed to have proper record, play function first

Re: Record TV over USB
Posted: Mon Mar 22, 2010 11:46 pm
by doodlecz
Hey, it's not "too early", it's just science fiction now
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

Re: Record TV over USB
Posted: Tue Mar 23, 2010 12:20 pm
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)
Re: Record TV over USB
Posted: Tue Mar 23, 2010 3:16 pm
by erdem_ua
At my TV, I mount NFS directory to those location. Will test this with fixed stack on april.
Re: Record TV over USB
Posted: Sun Mar 28, 2010 1:34 pm
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???
Re: Record TV over USB
Posted: Sun Mar 28, 2010 2:44 pm
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.