LG MS450H MS400H
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

bookmark.db

5 participantes

Página 3 de 8. Precedente  1, 2, 3, 4, 5, 6, 7, 8  Siguiente

Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  vic1972 Sáb Ene 08, 2011 11:27 am

George2005 escribió:

So this symbolic link could always point to the current/most recent played file. The symbolic link could be located in the directory eg. /tmp/hdd/volumes/HDD1/!Recent - the exclamation mark as the first character could assure that the directory would always be at the first position in alphabetical order. So the Red Button task would be quite easy and always the same: go to Media -> HDD -> go to the first directory (ie !Recent) and play the first file (ie symbolic link - it's name could also start with an exclamation mark due the alphabetical order).


I am re-reading the thread.
It will be very nice if a in-command exist to direct to the media menu page.
But afaik, we only have the $ commands which directs to the REC media menu page.
vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  vic1972 Sáb Ene 08, 2011 11:56 am

step by step, when i have the time...
i am preparing first post to be a summary of all info.
vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: PM 3.5: RedButton RePlay

Mensaje  George2005 Sáb Ene 08, 2011 12:34 pm

vic1972 escribió:step by step, when i have the time...
i am preparing first post to be a summary of all info.

OK!

Some idea about the rest of bytes (from 5th byte to end) in the 3rd row's BLOB:

As I have written before I encountered the problem with changing the resume playing time in .ts file - although the playing resumed at the correct time, there was a black screen only. I had to jump ahead by right arrow to fix it - I think that it could be caused by something like "desynchronization" of transport stream. As these additional bytes exist only for .ts records (media files like mpeg, avi etc don't have such bytes - they have only 4 bytes in all just storing the resume playing time), I think that those additional bytes are specific for transport stream for purposes something like audio/video synchronization, audio track selection, subtitles displaying etc.

So the result is: for RecentFile record in bookmark.db we should copy WHOLE BLOB in the 3rd row from the original file db record (not only change the resume playing time) to ensure the identical conditions for correct file resume playing.

About filetypes, folders etc.: Well, as I have written before that I copied the mpeg file to RecentFile.ts and then it was played correctly in REC folder, I think that it was caused by using the same MPEG codec. It could be quite logical because you wrote that playing avi file as the RecentFile.ts file failed with codec error. I don't know actually how to workaround it in case that the LG shows .ts files only in the REC folder and we have only the $ command to just go to the REC folder Crying or Very sad


George2005

Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  Keltek Sáb Ene 08, 2011 2:58 pm

George2005 escribió:
Keltek escribió:As I remember, this do some old version PipeManagement. Check it and get the latest one Smile
Jo a taky mě naštvali u LG, že ten poslední firmware 101027A už zase má problém s malými českými znaky s diakritikou v teletextu, když to v předchozí verzí už bylo OK. V /usr/local/bin/Resource/TT_Font/ jsem našel soubor 01_G0_Latin_cze_slo_double_12x20_1bits.raw, ale nevím, jestli to je ten problematický font ... sorry, už se mi to ani nechtělo překládat Mad
Smile
Taky sem to čet na fóru. Myslíš, že je to tím fontem? Já jsem totiž od poslední verze neměnil nic jiného, než DvdPlayer.
Keltek
Keltek

Mensajes : 291
Fecha de inscripción : 10/03/2010
Edad : 47
Localización : Praha - Czech Republic

http://www.fozona.cz/

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  George2005 Sáb Ene 08, 2011 5:15 pm

Keltek escribió:
George2005 escribió:
Keltek escribió:As I remember, this do some old version PipeManagement. Check it and get the latest one Smile
Jo a taky mě naštvali u LG, že ten poslední firmware 101027A už zase má problém s malými českými znaky s diakritikou v teletextu, když to v předchozí verzí už bylo OK. V /usr/local/bin/Resource/TT_Font/ jsem našel soubor 01_G0_Latin_cze_slo_double_12x20_1bits.raw, ale nevím, jestli to je ten problematický font ... sorry, už se mi to ani nechtělo překládat Mad
Smile
Taky sem to čet na fóru. Myslíš, že je to tím fontem? Já jsem totiž od poslední verze neměnil nic jiného, než DvdPlayer.

Jo vlastně, to máš pravdu ... tak je to podrbané přímo v DVDPlayeru. No, co se dá dělat. Díky za info.

--------------
I am very sorry to all others for czech language conversation in this thread.

George2005

Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Suggested solutions for non .ts files resume playing

Mensaje  George2005 Lun Ene 10, 2011 1:15 am

I did some tests of resume playing the non .ts (mpeg) files: .avi (video codec: DIV3/audio codec: MP3), .mp4 (H264/AAC), .flv (H263/MPEG), .divx (DX50/PCM) and .asf (VC1/WMA). I changed the extension to .ts for each file, moved them into REC folder and I tried to play them, but the "unsupported audio codec" warning message appeared actually to ask to continue playing. When I confirmed it the playing started with correct audio, but at 0:00:00, so resume playing wasn't working Sad Another problem is with the subtitles which are not displayed at all even the subtitle file was located in the REC folder and has the same basename as the played file.
I also checked to play the media files mentioned above but with extension changed to .ts under the HDD option. They were played correctly without any warning messages, with fully functional time resuming and even with subtlitles! The Preview Window and Info button also work correctly. So the machine selects codecs etc. by the the file content, not by file extension. Btw: It was quite funny to see that the divx movie with "movie.ts" filename was played correctly even with subtitles using "subtitle.srt" file Very Happy

So I was thinking how to show non .ts file in REC folder to avoid the file extension changing. I tried to look for the place, where the REC folder's allowed file extension list could be stored. Unfortunately I found nothing in db and ini files so I tried to search it inside the DVDPlayer (opening in the hex editor) and I think that I found it starting at this byte: 0x009A8E90. There are 3 null terminated strings: ".ts", ".trp", ".tp". So I tried to change the .ts extension of some recordings to .trp and .tp and these files were shown in REC folder actually.
It could be quite interesting to try to edit DVDPlayer in binary form to replace eg ".trp" string to ".*" + nullchar and check if it will solve to show all files in REC folder. Unfortunately I couldn't test it because the DVDPlayer can't be changed directly but as the firmware update only. Well, it's a quite "brute force" hack, so the DVDPlayer could crash or it may not solve the problem due the problems mentioned above (and it could violate the LG copyright, of course...)

I am also thinking about the different solution:
1. Go to the REC folder:
"$" command
2. Return to the MEDIA menu:
"," command
3. Go to the HDD option (right arrow 3 times and then OK, not use left arrow as the USB option might be skipped):
"D" & "D" & "D" & " " commands
Note: as this whole process should be a reaction to interrupting the movie playing I suppose that media type remains unchanged, ie selected to movie (neither music, nor image)
4. Go to the first folder (which was created initially and named like "_Recent" to ensure its first position in alphabetical order):
" " command
5. Play the first movie file, which would be a hardlink to the original movie file with basename like "_Recent" to ensure its first position in alphabetical order and the same file extension as the original movie file (but it seems that the file extension could be the always same, eg .ts - see above). Of course it is needed to create or modify db records for "_Recent" file. If some subtitle file exists (ie file with the same basename as original movie file and file extensions like .srt, .txt, .smi, .ssa or .sub), it should be prior needed to create the hardlink to subtitle file with the basename like "_Recent" and appropriate subtitle file extension:
" " or "S" command
6. Confirm the resume playing message:
" " command

So the whole command sequence is "$ , D D D _ _ _ _" or " $ , D D D _ _ S _" ("_" stands for space). Well, there are 9 commands which take 9 seconds (for SecondsInterleave=1), but I don't know how to short it ...
Of course for native DTV recordings (ie files from REC folder with .ts extension) we should use the straight and shorter sequence: "$ _ _" or "$ S _" with using the "_Recent.ts" hardlink located in REC folder !!!


George2005

Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  vic1972 Lun Ene 10, 2011 9:44 am

WOWWWWW Smile George, you did your homework!!!
Very nice investigation, thanks.

Lets go part by part, because there are lot of interesting things in your message.



George2005 escribió:I did some tests of resume playing the non .ts (mpeg) files: .avi (video codec: DIV3/audio codec: MP3), .mp4 (H264/AAC), .flv (H263/MPEG), .divx (DX50/PCM) and .asf (VC1/WMA). I changed the extension to .ts for each file, moved them into REC folder and I tried to play them, but the "unsupported audio codec" warning message appeared actually to ask to continue playing. When I confirmed it the playing started with correct audio, but at 0:00:00, so resume playing wasn't working Sad Another problem is with the subtitles which are not displayed at all even the subtitle file was located in the REC folder and has the same basename as the played file.
I see. Yes, we were expecting something similar to this.
But of course we needed this testing!! well done Smile


George2005 escribió:
I also checked to play the media files mentioned above but with extension changed to .ts under the HDD option. They were played correctly without any warning messages, with fully functional time resuming and even with subtlitles! The Preview Window and Info button also work correctly. So the machine selects codecs etc. by the the file content, not by file extension. Btw: It was quite funny to see that the divx movie with "movie.ts" filename was played correctly even with subtitles using "subtitle.srt" file Very Happy
wow, interesting results!!



George2005 escribió:
So I was thinking how to show non .ts file in REC folder to avoid the file extension changing. I tried to look for the place, where the REC folder's allowed file extension list could be stored. Unfortunately I found nothing in db and ini files so I tried to search it inside the DVDPlayer (opening in the hex editor) and I think that I found it starting at this byte: 0x009A8E90. There are 3 null terminated strings: ".ts", ".trp", ".tp". So I tried to change the .ts extension of some recordings to .trp and .tp and these files were shown in REC folder actually.
It could be quite interesting to try to edit DVDPlayer in binary form to replace eg ".trp" string to ".*" + nullchar and check if it will solve to show all files in REC folder. Unfortunately I couldn't test it because the DVDPlayer can't be changed directly but as the firmware update only. Well, it's a quite "brute force" hack, so the DVDPlayer could crash or it may not solve the problem due the problems mentioned above (and it could violate the LG copyright, of course...)
WOWW, no words!!!
Yes you right, extensions are there:
bookmark.db - Página 3 Extensions

I have bin modified DvdPlayer, and changed .tp<NULL> by .*<NULL><NULL>
(Take into account we cannot modify any length within the binary..)
This file is here:
http://dl.dropbox.com/u/684543/varios/ms450h/RePlay/DvdPlayer

Right now, I cannot test, as I am away, but i think anyone can test using this trick:
https://ms450.forosactivos.net/t319-pruebas-con-dvdplayer



George2005 escribió:
I am also thinking about the different solution:
1. Go to the REC folder:
"$" command
2. Return to the MEDIA menu:
"," command
3. Go to the HDD option (right arrow 3 times and then OK, not use left arrow as the USB option might be skipped):
"D" & "D" & "D" & " " commands
Note: as this whole process should be a reaction to interrupting the movie playing I suppose that media type remains unchanged, ie selected to movie (neither music, nor image)
4. Go to the first folder (which was created initially and named like "_Recent" to ensure its first position in alphabetical order):
" " command
5. Play the first movie file, which would be a hardlink to the original movie file with basename like "_Recent" to ensure its first position in alphabetical order and the same file extension as the original movie file (but it seems that the file extension could be the always same, eg .ts - see above). Of course it is needed to create or modify db records for "_Recent" file. If some subtitle file exists (ie file with the same basename as original movie file and file extensions like .srt, .txt, .smi, .ssa or .sub), it should be prior needed to create the hardlink to subtitle file with the basename like "_Recent" and appropriate subtitle file extension:
" " or "S" command
6. Confirm the resume playing message:
" " command

So the whole command sequence is "$ , D D D _ _ _ _" or " $ , D D D _ _ S _" ("_" stands for space). Well, there are 9 commands which take 9 seconds (for SecondsInterleave=1), but I don't know how to short it ...
Of course for native DTV recordings (ie files from REC folder with .ts extension) we should use the straight and shorter sequence: "$ _ _" or "$ S _" with using the "_Recent.ts" hardlink located in REC folder !!!

WOW nice idea also!!!
Now it is time to take a decision,
or lets wait a bit, to test if the hacked DvdPlayer can read now all files within REC folder.


vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  George2005 Lun Ene 10, 2011 10:41 am

vic1972 escribió:WOWWWWW Smile George, you did your homework!!!
Very nice investigation, thanks.

Lets go part by part, because there are lot of interesting things in your message.



George2005 escribió:I did some tests of resume playing the non .ts (mpeg) files: .avi (video codec: DIV3/audio codec: MP3), .mp4 (H264/AAC), .flv (H263/MPEG), .divx (DX50/PCM) and .asf (VC1/WMA). I changed the extension to .ts for each file, moved them into REC folder and I tried to play them, but the "unsupported audio codec" warning message appeared actually to ask to continue playing. When I confirmed it the playing started with correct audio, but at 0:00:00, so resume playing wasn't working Sad Another problem is with the subtitles which are not displayed at all even the subtitle file was located in the REC folder and has the same basename as the played file.
I see. Yes, we were expecting something similar to this.
But of course we needed this testing!! well done Smile


George2005 escribió:
I also checked to play the media files mentioned above but with extension changed to .ts under the HDD option. They were played correctly without any warning messages, with fully functional time resuming and even with subtlitles! The Preview Window and Info button also work correctly. So the machine selects codecs etc. by the the file content, not by file extension. Btw: It was quite funny to see that the divx movie with "movie.ts" filename was played correctly even with subtitles using "subtitle.srt" file Very Happy
wow, interesting results!!



George2005 escribió:
So I was thinking how to show non .ts file in REC folder to avoid the file extension changing. I tried to look for the place, where the REC folder's allowed file extension list could be stored. Unfortunately I found nothing in db and ini files so I tried to search it inside the DVDPlayer (opening in the hex editor) and I think that I found it starting at this byte: 0x009A8E90. There are 3 null terminated strings: ".ts", ".trp", ".tp". So I tried to change the .ts extension of some recordings to .trp and .tp and these files were shown in REC folder actually.
It could be quite interesting to try to edit DVDPlayer in binary form to replace eg ".trp" string to ".*" + nullchar and check if it will solve to show all files in REC folder. Unfortunately I couldn't test it because the DVDPlayer can't be changed directly but as the firmware update only. Well, it's a quite "brute force" hack, so the DVDPlayer could crash or it may not solve the problem due the problems mentioned above (and it could violate the LG copyright, of course...)
WOWW, no words!!!
Yes you right, extensions are there:
bookmark.db - Página 3 Extensions

I have bin modified DvdPlayer, and changed .tp<NULL> by .*<NULL><NULL>
(Take into account we cannot modify any length within the binary..)
This file is here:
http://dl.dropbox.com/u/684543/varios/ms450h/RePlay/DvdPlayer

Right now, I cannot test, as I am away, but i think anyone can test using this trick:
https://ms450.forosactivos.net/t319-pruebas-con-dvdplayer



George2005 escribió:
I am also thinking about the different solution:
1. Go to the REC folder:
"$" command
2. Return to the MEDIA menu:
"," command
3. Go to the HDD option (right arrow 3 times and then OK, not use left arrow as the USB option might be skipped):
"D" & "D" & "D" & " " commands
Note: as this whole process should be a reaction to interrupting the movie playing I suppose that media type remains unchanged, ie selected to movie (neither music, nor image)
4. Go to the first folder (which was created initially and named like "_Recent" to ensure its first position in alphabetical order):
" " command
5. Play the first movie file, which would be a hardlink to the original movie file with basename like "_Recent" to ensure its first position in alphabetical order and the same file extension as the original movie file (but it seems that the file extension could be the always same, eg .ts - see above). Of course it is needed to create or modify db records for "_Recent" file. If some subtitle file exists (ie file with the same basename as original movie file and file extensions like .srt, .txt, .smi, .ssa or .sub), it should be prior needed to create the hardlink to subtitle file with the basename like "_Recent" and appropriate subtitle file extension:
" " or "S" command
6. Confirm the resume playing message:
" " command

So the whole command sequence is "$ , D D D _ _ _ _" or " $ , D D D _ _ S _" ("_" stands for space). Well, there are 9 commands which take 9 seconds (for SecondsInterleave=1), but I don't know how to short it ...
Of course for native DTV recordings (ie files from REC folder with .ts extension) we should use the straight and shorter sequence: "$ _ _" or "$ S _" with using the "_Recent.ts" hardlink located in REC folder !!!

WOW nice idea also!!!
Now it is time to take a decision,
or lets wait a bit, to test if the hacked DvdPlayer can read now all files within REC folder.


Hi Victor, thanks a lot for your appreciation!

It's an excellent idea to test the DVDPlayer by using the trick you mentioned! I will test it in the evening!

Btw: I am sorry for my bad formulation, it's definitely clear that it's not possible to change the length of binary file, I just meant to replace string by ".*" + <NULL> and leave other byte unchanged (".trp" => ".*" + <NULL> + "p"), which should work as it's the correct null terminated string ...



George2005

Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  vic1972 Lun Ene 10, 2011 11:56 am

I cannot wait till this afternoon Smile,
this would be our first direct hack to main app.

Now the DvdPlayer is changed into:
bookmark.db - Página 3 Extensions2

I also think this trick should work,
and so all types of file should appear in the select window.
Now, I different thing is that those files (.avi,.mp4, ..) plays correctly Smile
vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

bookmark.db - Página 3 Empty bookmark.db (Additional information)

Mensaje  George2005 Lun Ene 10, 2011 12:41 pm

vic1972 escribió:I cannot wait till this afternoon Smile,
this would be our first direct hack to main app.

Now the DvdPlayer is changed into:
bookmark.db - Página 3 Extensions2

I also think this trick should work,
and so all types of file should appear in the select window.
Now, I different thing is that those files (.avi,.mp4, ..) plays correctly Smile

You are definitely right! So we should check, if non .ts files are played correctly without "unsupported audio codec" warnings, with working resume playing and with subtitles ... I am sorry, I am away so I will able to test it in the evening, actually Sad

Btw: Thanks a lot for bookmark.db description summary! I would like to complete it:

I. BLOB in the 1st row definitely stores the date & time of last playing (ie the moment of the playing interruption). It is in format of Unix Epoch Time (ie the 32 bit number representing the number of seconds elapsed from January 1, 1970). The nice online converter for Unix Time is here: http://www.epochconverter.com/. So the "m" char in fkey value (xxm) means "modify time", actually.

II. BLOB in the 3rd row: first 4 bytes stored resume playing and because it is also 32 bit number I am almost sure that it is also the Unix Time format (but I cannot verified it because I haven't any recording/movie file which will be a couple of days long Very Happy). For .ts recordings there are some additional bytes there which could represent specific information of transport stream format (audio/video synchronization, audio track selection, subtitles displaying etc.). So it is important to copy the COMPLETE 3rd row's BLOB in database from the original file db record (not only the first 4 bytes storing resume playing time) to ensure the identical conditions for correct file resume playing! (see https://ms450.forosactivos.net/t567p40-bookmarkdb#5281 for details)


George2005

Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic

Volver arriba Ir abajo

bookmark.db - Página 3 Empty testing of modified DvdPlayer - bad luck :-(

Mensaje  George2005 Mar Ene 11, 2011 3:43 am

I tried to test the modified DvdPlayer but without success :-( I tried to use a trick described in https://ms450.forosactivos.net/t319-pruebas-con-dvdplayer, but when I killed the DdvPlayer instances by killall then machine always went do restart (maybe there is a problem with piped PM). In rcS I also tried to change DEFAULT_AP_DIR directly to /tmp/hdd/root/usr/local/bin (where I had copied the content of /usr/local/bin before and placed the modified DdvPlayer according to trick mentioned above) but then machine always hung on start so I had to re-flash FW. Maybe it is needed to temporary disable PM by using modified rcS which could allow kill all instances of DvdPlayer then but as it was quite late night I have not tested it yet ...


George2005

Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  vic1972 Mar Ene 11, 2011 10:41 am

Hi,
yesterday was a very complicated day for me, and was not able to test.
I will test this tonight, creating a firmware with this modified DvdPlayer.
vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  George2005 Mar Ene 11, 2011 10:45 am

vic1972 escribió:Hi,
yesterday was a very complicated day for me, and was not able to test.
I will test this tonight, creating a firmware with this modified DvdPlayer.

Ok, I will wait for your results ...


George2005

Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  vic1972 Mar Ene 11, 2011 8:09 pm

I can confirm it is NOT working.
The modified firmware installed well, but accesing directly REC folder only shows .ts files. Sad

But if I go to the REC folder via media, then it appears my movie.avi file.
vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  George2005 Mar Ene 11, 2011 10:25 pm

vic1972 escribió:I can confirm it is NOT working.
The modified firmware installed well, but accesing directly REC folder only shows .ts files. Sad

But if I go to the REC folder via media, then it appears my movie.avi file.

Oops, it is a bad information Sad

However I think that even if the machine would show the non .ts files those files couldn't be played correctly anyway. It is based on my previous tests with the avi, flv, divx and asf files with file extensions changed to .ts - under the Recordings menu option they had problems but under the HDD menu option it were be played correctly even with the changed file extension and with subtitles.

So, what about to try suggested command sequence "$ , D D D _ _ _ _" (" $ , D D D _ _ S _") for non .ts files and $ _ _" ("$ S _") for native .ts DTV recordings in REC folder (of course with creation the hardlinks to movie file and subtitles if possible + modification in database file)?



George2005

Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  vic1972 Miér Ene 12, 2011 9:22 am

Hello,
yes, that is the next step.
I think I will focus first in the .ts, as i guess this represent aprox. 80% of the files use to play.
But now, next problem, is the interface with sqlite, I have seen the examples provided by keltek, and they
are fine, but now, i need the library for sqlite-client compiled for mipsel32; i do not know if this even exist...
(Any help regarding this ...)

As a work around for this, I am thinking in doing a preliminary test with binary replace in bookmar.db, with exact length,
Eg: replace hormiguero.ts by RecentFile.ts
Lets see how this test goes.
vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  George2005 Miér Ene 12, 2011 12:01 pm

vic1972 escribió:Hello,
yes, that is the next step.
I think I will focus first in the .ts, as i guess this represent aprox. 80% of the files use to play.
But now, next problem, is the interface with sqlite, I have seen the examples provided by keltek, and they
are fine, but now, i need the library for sqlite-client compiled for mipsel32; i do not know if this even exist...
(Any help regarding this ...)

As a work around for this, I am thinking in doing a preliminary test with binary replace in bookmar.db, with exact length,
Eg: replace hormiguero.ts by RecentFile.ts
Lets see how this test goes.

Exactly, I must say that almost all the time I also use the machine as PVR recorder, ie recording from DTV and playing .ts files ...

I tried to google any info about sqlite for MIPS, I found eg this: http://www.crosscompile.org/static/pages/SQLite.html

Binary replace sounds interesting!
I was also thinking about the creating "special" bookmark.db file with just one record for RecentFile.ts, so the place of bytes for the 3rd row's BLOB would be well known, ie easy for changing in binary form. Just before the starting of playing the RecentFile.ts the PipeManagement would backup original bookmark.db (in /tmp/ramfs/) and replace it by our "special" bookmark.db with the appropriate 3rd row's BLOB and also set some flag (eg create RecentFile.flag file). After detecting the stop of playing the PM would replace "special" bookmark.db by original file and delete RecentFile.flag. Well, it could be quite dangerous in case of some "disaster", eg. hang the machine, so it should be created some mechanism of recovering - eg if the PM would detect that RecentFile.flag exists during the startup then makes the "recovery", ie copies previously backuped bookmark.db to /usr/local/etc/dvdplayer/ and delete RecentFile.flag (and maybe some button in LGMenu could exist to perform a bookmark.db "recovery" manually - in this case the backuped bookmark.db should be copied both to /usr/local/etc/dvdplayer/ and /tmp/ramfs/)


George2005

Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  Keltek Miér Ene 12, 2011 1:44 pm

vic1972 escribió:Hello,
yes, that is the next step.
I think I will focus first in the .ts, as i guess this represent aprox. 80% of the files use to play.
But now, next problem, is the interface with sqlite, I have seen the examples provided by keltek, and they
are fine, but now, i need the library for sqlite-client compiled for mipsel32; i do not know if this even exist...
(Any help regarding this ...)

As a work around for this, I am thinking in doing a preliminary test with binary replace in bookmar.db, with exact length,
Eg: replace hormiguero.ts by RecentFile.ts
Lets see how this test goes.
Hey man, I have compiled the sqlite.so for us months ago Smile but as I wrote in THIS MESSAGE apparently, anyone of you read it :-D
sqlite library is used in PHP and we can use it anytime with sqlite3 command. But as I said, it is big. It is coz the engine of DB is in this database.
Keltek
Keltek

Mensajes : 291
Fecha de inscripción : 10/03/2010
Edad : 47
Localización : Praha - Czech Republic

http://www.fozona.cz/

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  vic1972 Jue Ene 13, 2011 9:38 pm

More things,
I have started some little implementations,
Right now when a .ts is reproduced a link is created with exactly the same filename length,
for instance:
ElHormiguero_FinSemana.ts
0_RecentFile___________.ts

Yes, same filename lenght, so binary replace in bookmard.db take place.

Now, I think that this change in the database cannot be applied exactly when reproduction starts,
but should be done when the reproduction stop,...
or when does dvdplayer updates the bookmark.db, at the end of it keeps updating every x seconds ....?







vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  George2005 Jue Ene 13, 2011 11:53 pm

vic1972 escribió:More things,
I have started some little implementations,
Right now when a .ts is reproduced a link is created with exactly the same filename length,
for instance:
ElHormiguero_FinSemana.ts
0_RecentFile___________.ts

Yes, same filename lenght, so binary replace in bookmard.db take place.

Now, I think that this change in the database cannot be applied exactly when reproduction starts,
but should be done when the reproduction stop,...
or when does dvdplayer updates the bookmark.db, at the end of it keeps updating every x seconds ....?

DVDPlayer updates the record of original file (eg ElHormiguero_FinSemana.ts) in bookmark.db (ie the 3rd row's BLOB) in the moment of interruption/stopping the playing of that file (the date & time of this moment is stored in the 1st row's BLOB). So the change (ie binary replacing of a string) of filename from eg ElHormiguero_FinSemana.ts to 0_RecentFile___________.ts in bookmark.db could be made just before starting the playing of 0_RecentFile___________.ts.



George2005

Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  vic1972 Vie Ene 14, 2011 10:27 am

OK,
I have the event when plays start, that is for eg. for disabling subtitles, etc,
but i am afraid this is too late for committing the changes to bookmark.db

So, I will have to parse the log of DvdPlayer to find this interruption moment.
vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  George2005 Vie Ene 14, 2011 12:17 pm

vic1972 escribió:OK,
I have the event when plays start, that is for eg. for disabling subtitles, etc,
but i am afraid this is too late for committing the changes to bookmark.db

So, I will have to parse the log of DvdPlayer to find this interruption moment.

Maybe I am not right but I think that there wouldn't be any problem. I am not sure if we think of the same concept so I try to give its description:

1. I start the playing of the some recording (eg StarWars_2010-13-01_16:00.ts) on the 14 January, 7:55:00

2. There is a scheduled record for every day at 8:00, so at 7:59:15 the message appears about the schedule record ... "do you want to record it" etc.).

3. As PipeManagent hasn't any information about this event due the MOVIE mode, the playing of "StarWars_2010-13-01_16:00.ts" is interrupted => It is the moment when resume playing time is stored to bookmark.db. We are in the TDT mode now so PipeManagement knows now that some recording started (based on evita_popup_start_recording() information) & playing interruption occured (according to mode changing from MOVIE to TDT) & the filename of last played file (StarWars_2010-13-01_16:00.ts)

4. I want to resume playing the StarWars so Pipemanagement performs the following process:
It replaces StarWars_2010-13-01_16:00.ts to _RecentFile______________.ts in bookmark.db, creates a hardlink for StarWars_2010-13-01_16:00.ts to _RecentFile______________.ts and sends the command sequence to play the recentfile ("$S "). The original filename (StarWars_2010-13-01_16:00.ts) backups to a file (eg RecentFile.flag) which could also be used as a flag of RecentFile playing.

5. If another scheduled recording starts during the recentfile playing (ie the last playing filename matches _RecentFile*.ts & RecentFile.flag exists) then PipeManagement needn't replace the filenames in bookmark.db and it needn't create RecentFile.flag - so it sends the command sequence ("$S ") only.

6. StarWars playing continues. Four scenarios (A, B, C or D) can occur now:

A) I want to stop watching StartWars, so I push the "Stop" button. LG saves the new resume playing time to bookmark.db. I return to the TDT mode so PipeManagement is able to detect that the playing was stopped (ie by changing from MOVIE to TDT) but also evaluates that no scheduled recording take place from the moment of the previous playing stopping/interruption and evaluates that the last playing file was _RecentFile______________.ts So it replaces _RecentFile______________.ts to StarWars_2010-13-01_16:00.ts in bookmark.db, deletes RecentFile.flag and removes hardlink.

B) I want to stop watching StartWars, so I push the "Stop" button. LG saves the new resume playing time to bookmark.db. BUT I want to watch another recording (eg Matrix_2010-12-01_19:00.ts) or non .ts movie file (eg divX file called Jaws.avi). So I play it, enjoyed it and then stop the playing. I return to the TDT mode - PipeManagement is able to detect that the playing was stopped (ie by changing from MOVIE to TDT) BUT also evaluates that no scheduled recording take place from the moment of the previous playing stopping/interruption and evaluates that the last playing file was either Matrix_2010-12-01_19:00.ts or Jaws.avi. But no problem with it now, it replaces _RecentFile______________.ts to StarWars_2010-13-01_16:00.ts in bookmark.db, deletes RecentFile.flag and removes hardlink.

C) I want to stop watching StartWars, so I push the "Stop" button. LG saves the new resume playing time to bookmark.db. BUT I want to watch another recording (eg Matrix_2010-12-01_19:00.ts). So I play it (note: PipeManagement doesn't know about the change of movie in this moment!). Now the scheduled recording starts -> we are in the TDT mode now so PipeManagement knows now that some recording started (based on evita_popup_start_recording() information) & playing interruption occured (according to mode changing from MOVIE to TDT) BUT the filename of last played file (ie Matrix_2010-12-01_19:00.ts) DOESN'T MATCH the filename stored in RecentFile.flag. So in bookmark.db it replaces _RecentFile______________.ts to StarWars_2010-13-01_16:00.ts & replaces Matrix_2010-12-01_19:00.ts to _RecentFile____________.ts and saves the Matrix_2010-12-01_19:00.ts filename to RecentFile.flag. It creates a hardlink for Matrix_2010-12-01_19:00.ts and sends the command sequence to play the recentfile ("$S ").

D) I want to stop watching StartWars, so I push the "Stop" button. LG saves the new resume playing time to bookmark.db. BUT I want to watch DivX movie, NOT .ts recording (eg Jaws.avi). So I play it (note: PipeManagement doesn't know about the change of movie in this moment!). Now the scheduled recording starts -> we are in the TDT mode now so PipeManagement knows now that some recording started (based on evita_popup_start_recording() information) & playing interruption occured (according to mode changing from MOVIE to TDT) BUT the filename of last played file (ie Matrix_2010-12-01_19:00.ts) DOESN'T MATCH the filename stored in RecentFile.flag and EVEN it is not a .ts recording. So it replaces _RecentFile______________.ts to StarWars_2010-13-01_16:00.ts in bookmark.db, deletes RecentFile.flag and removes hardlink. So if I want to resume playing the Jaws, I have to manually go to MEDIA mode => HDD option and resume the playing Jaws.avi manually (later we can also implement the support for not .ts files ...).

Oops, I see that the above description is quite long! I am sorry about it. I hope that it doesn't sound quite confusing ...






George2005

Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  vic1972 Vie Ene 14, 2011 1:38 pm

Hello
Yes, we are fine Smile
The first six points, is what i am planning to implement.
Now for the last cases A,B,C and D, I will need a second reading later on Wink

OK,
what it is clear is that we must hook at the end of the playings,
I have find very interesting stuff sniffering LG outputs Smile

http://dl.dropbox.com/u/684543/varios/ms450h/RePlay/teeout2

It seems a good hook moment is when the following is detected:
candidate=0 key = fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Noticias fin de semana_20110108_2101.ts

vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  George2005 Sáb Ene 15, 2011 3:09 am

vic1972 escribió:Hello
Yes, we are fine Smile
The first six points, is what i am planning to implement.
Now for the last cases A,B,C and D, I will need a second reading later on Wink

OK,
what it is clear is that we must hook at the end of the playings,
I have find very interesting stuff sniffering LG outputs Smile

http://dl.dropbox.com/u/684543/varios/ms450h/RePlay/teeout2

It seems a good hook moment is when the following is detected:
candidate=0 key = fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Noticias fin de semana_20110108_2101.ts


Yes, I think you are right. The moment you mentioned it is just a moment of updating the database. I studied my own teeout and I found quite interesting part (see just below) so I continued with the investigation of LG behaviour:

Código:
m_numOfBookmarks = 256 , candidate_time = 1294355895
0 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Santa má bráchu_20101221_2000.ts , modify_time = 1293150781 , candidate_time = 1293150781 ,candidate=0
1 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Za mláďaty do zoo (8)_20101221_0900.ts , modify_time = 1294008040 , candidate_time = 1293150781 ,candidate=0
2 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Dr. House IV (15)_20101217_1825.ts , modify_time = 1293150689 , candidate_time = 1293150689 ,candidate=2
3 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Dr. House IV (14)_20101216_1825.ts , modify_time = 1292977240 , candidate_time = 1292977240 ,candidate=3
4 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Odložené případy (2)_20101222_1825.ts , modify_time = 1293150401 , candidate_time = 1292977240 ,candidate=3
5 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Vánoce naruby_20101223_1825.ts , modify_time = 1293143378 , candidate_time = 1292977240 ,candidate=3
6 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Odložené případy (1)_20101221_1825.ts , modify_time = 1293143426 , candidate_time = 1292977240 ,candidate=3
7 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Zlatý kanár_20101222_0016.ts , modify_time = 1293150606 , candidate_time = 1292977240 ,candidate=3
8 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Auto Moto Revue_20101210_1959.ts , modify_time = 1293150485 , candidate_time = 1292977240 ,candidate=3
9 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Kosmani zakrslí_20101218_1535.ts , modify_time = 1293150509 , candidate_time = 1292977240 ,candidate=3
10 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Návrat nosorožců do Mkomazi_20101217_2000.ts , modify_time = 1293150651 , candidate_time = 1292977240 ,candidate=3
11 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/V množství je síla aneb Nekonečné zvířecí armády_20101210_2000.ts , modify_time = 1294183352 , candidate_time = 1292977240 ,candidate=3
12 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Dr. House IV (11)_20101213_1825.ts , modify_time = 1293150888 , candidate_time = 1292977240 ,candidate=3
13 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Ordinace v růžové zahradě 2 (225)_20101104_2000.ts , modify_time = 1293150913 , candidate_time = 1292977240 ,candidate=3
14 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Ulice (1868)_20101103_1825.ts , modify_time = 1293150972 , candidate_time = 1292977240 ,candidate=3
15 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/src1.ts , modify_time = 1294008625 , candidate_time = 1292977240 ,candidate=3
16 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/srccpy.ts , modify_time = 1293202596 , candidate_time = 1292977240 ,candidate=3
17 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Peklo s princeznou_20101224_1900.ts , modify_time = 1293986257 , candidate_time = 1292977240 ,candidate=3
18 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Retro_20101224_2010.ts , modify_time = 1294352584 , candidate_time = 1292977240 ,candidate=3
19 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Simpsonovi ve filmu -W_20101226_2000.ts , modify_time = 1294014632 , candidate_time = 1292977240 ,candidate=3
20 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/StarDance IV ...když hvězdy tančí_20101120_2000.ts , modify_time = 1293986302 , candidate_time = 1292977240 ,candidate=3
21 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Sestřičky_20101227_1835.ts , modify_time = 1294270160 , candidate_time = 1292977240 ,candidate=3
22 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Aladdinova kouzelná lampa_20101120_0805.ts , modify_time = 1294006590 , candidate_time = 1292977240 ,candidate=3
23 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Chcete me__20101022_1740.ts , modify_time = 1294004777 , candidate_time = 1292977240 ,candidate=3
24 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/RecentFile.ts , modify_time = 1294184653 , candidate_time = 1292977240 ,candidate=3
25 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Comeback_20101231_2150.ts , modify_time = 1294008742 , candidate_time = 1292977240 ,candidate=3
26 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Čas sluhů_20110104_2239.ts , modify_time = 1294184301 , candidate_time = 1292977240 ,candidate=3
27 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/ANIMÁČEK_20101227_1852.ts , modify_time = 1294270170 , candidate_time = 1292977240 ,candidate=3
28 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Šifra mistra Leonarda_20101211_2000.ts , modify_time = 1294352496 , candidate_time = 1292977240 ,candidate=3
29 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/movie/testmovie.mpg , modify_time = 1294352631 , candidate_time = 1292977240 ,candidate=3
30 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Inventura Febia, První kroky_20110104_2236.ts , modify_time = 1294184194 , candidate_time = 1292977240 ,candidate=3
31 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Retro_20101224_2005.ts , modify_time = 1294352561 , candidate_time = 1292977240 ,candidate=3
candidate=32 key = fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/testmovie.ts
key ====== 0x4eb108f7

This part quite matches the tParameter table in bookmark.db: actually, there were records for 33 files (ie 3 rows for each of them). For example the first record (2 rows only):

fKey  fValue
0m    3DEA134D => reverse bytes: 0x4D13EA3D => in DEC: 1293150781 => convert from Unix Epoch: 24 Dec 2010 00:33:01
0k     fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Santa má bráchu_20101221_2000.ts

compare with a line from teeout:

Código:
0 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Santa má bráchu_20101221_2000.ts , modify_time = 1293150781 , candidate_time = 1293150781 ,candidate=0

So there is a clarification for the tParameter table description (xx = the number of file):
1st row: xxm => "m" means "modify_time" definitely
2nd row: xxk => "k" means "key" definitely

Well, it was a formal definition, which could be useless for us Very Happy But there are also "candidate" & "candidate_time" values, which are quite strange - "candidate_time" value represents date & time in Unix Epoch format but "candidate" is a just single number.

It is interesting that many files have the same "candidate_time" (eg files from number 3 to number 31) and in this case such files have also the same "candidate" value = 3. The first file with number 3 has "modify_time" and "candidate_time" the same, ie 1292977240. The similar situation is in the cases of file number 0 and file number 2:

Código:
0 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Santa má bráchu_20101221_2000.ts , modify_time = 1293150781 , candidate_time = 1293150781 ,candidate=0
1 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Za mláďaty do zoo (8)_20101221_0900.ts , modify_time = 1294008040 , candidate_time = 1293150781 ,candidate=0
2 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Dr. House IV (15)_20101217_1825.ts , modify_time = 1293150689 , candidate_time = 1293150689 ,candidate=2
3 key =fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Dr. House IV (14)_20101216_1825.ts , modify_time = 1292977240 , candidate_time = 1292977240 ,candidate=3

So it seems that the "candidate" value represents the number of file, which has the "modify_time" and "candidate_time" the same, so it is something like a "link"

So the moment when we hook the code is just a moment of updating the database for the appropritate file:

candidate=32 key = fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/testmovie.ts

In this case it will be created record number 32, with "candidate" = 32 and "candidate_time" = 1294355895 (see the first line) and of course with modify_time, however I don't know it here.

So the question is: what does "candidate_time" value represent actually? It seems to me that it represents the date & time of inserting the record for appropriate file into database. Well, but why do 29 files have the same "candidate_time"? I don't know actually, maybe it is a moment of updating database just before moving the bookmark.db from /tmp/ramfs/ to /usr/local/etc/dvdplayer/bookmark.db. Who knows ... scratch


George2005

Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  vic1972 Sáb Ene 15, 2011 10:00 am

Good morning George Smile
Yes, very interesting.

One question, about that listing you get with what to seems to be like a dump of tParameter;
when do you exactly get?

Because i have this dump from a long time ago trace, but i have not been able to reproduce this dump;
do you always get this full dump after the interruption of a playing media?
vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

bookmark.db - Página 3 Empty Re: bookmark.db

Mensaje  Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Página 3 de 8. Precedente  1, 2, 3, 4, 5, 6, 7, 8  Siguiente

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.