bookmark.db
5 participantes
Página 3 de 8.
Página 3 de 8. • 1, 2, 3, 4, 5, 6, 7, 8
testing of modified DvdPlayer - bad luck :-(
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
Re: bookmark.db
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.
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- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: bookmark.db
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
Re: bookmark.db
I can confirm it is NOT working.
The modified firmware installed well, but accesing directly REC folder only shows .ts files.
But if I go to the REC folder via media, then it appears my movie.avi file.
The modified firmware installed well, but accesing directly REC folder only shows .ts files.
But if I go to the REC folder via media, then it appears my movie.avi file.
vic1972- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: bookmark.db
vic1972 escribió:I can confirm it is NOT working.
The modified firmware installed well, but accesing directly REC folder only shows .ts files.
But if I go to the REC folder via media, then it appears my movie.avi file.
Oops, it is a bad information
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
Re: bookmark.db
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.
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- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: bookmark.db
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
Re: bookmark.db
Hey man, I have compiled the sqlite.so for us months ago but as I wrote in THIS MESSAGE apparently, anyone of you read it :-Dvic1972 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.
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.
Re: bookmark.db
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 ....?
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- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: bookmark.db
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
Re: bookmark.db
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.
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- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: bookmark.db
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
Re: bookmark.db
Hello
Yes, we are fine
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
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
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, we are fine
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
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
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- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: bookmark.db
vic1972 escribió:Hello
Yes, we are fine
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
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
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 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 ...
George2005- Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic
Re: bookmark.db
Good morning George
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?
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- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: bookmark.db
vic1972 escribió:Good morning George
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?
Well, that is a good question, but I have to say that I don't know actually ...
This teeout listing is not new, it was created a couple of days ago but I returned to study it again just after the publishing your teeout2 in that forum. I remember that I tried to change values in bookmark.db and copy it to /tmp/ramfs/ for many times so that the complete tParameter dump could be a result of overwriting the db file in a "bad moment" so something like "recovery process" could take place to recover /tmp/ramfs/bookmark.db from /usr/local/etc/dvdplayer/bookmark.db (it could be connected with the fact, that 29 files have the same "candidate_time") ... but it is my guess only
In fact, this complete dump appeared for a once only. In normal situation there is a single line there (ie about the just current file whose playing was stopped/interrupted).
George2005- Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic
Re: bookmark.db
ok
I new idea
is the use of triggers in the bookmark.db
In our current solution, the restart point is lost when looking for key the original filename.
Right now, i do not know how powerfull the triggers can be, and if they have string solutions,
but it will be very nice that the triggers do automatically two things:
1. duplicate the entry, so original file is not lost.
2. do the string replace from original to 0_RecentFile____.ts
I new idea
is the use of triggers in the bookmark.db
In our current solution, the restart point is lost when looking for key the original filename.
Right now, i do not know how powerfull the triggers can be, and if they have string solutions,
but it will be very nice that the triggers do automatically two things:
1. duplicate the entry, so original file is not lost.
2. do the string replace from original to 0_RecentFile____.ts
vic1972- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: bookmark.db
vic1972 escribió:ok
I new idea
is the use of triggers in the bookmark.db
In our current solution, the restart point is lost when looking for key the original filename.
Right now, i do not know how powerfull the triggers can be, and if they have string solutions,
but it will be very nice that the triggers do automatically two things:
1. duplicate the entry, so original file is not lost.
2. do the string replace from original to 0_RecentFile____.ts
Wow! It sounds great !!!
I fact, I was not thinking about using database features like triggers for bookmark.db yet. But if it would work, it would be a very smart and clever solution. So I will try to find some information about triggering in sqlite ...
George2005- Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic
Re: bookmark.db
Look at scheduling db. There is also a trigger to move ending of recording from EPG.George2005 escribió:
I fact, I was not thinking about using database features like triggers for bookmark.db yet. But if it would work, it would be a very smart and clever solution. So I will try to find some information about triggering in sqlite ...
Re: bookmark.db
Hello,
I have finished a very alpha development.
If you will like to test, do the habitual procedure.
bookmark.db is growing with the different 0_RecentFiles ....
I think we need a solution.
sqlite> select id,fKey from tParameter;
1|DB_VERSION
2|DB_DEVELOP_VERSION
3|SETUP_INIT
4|RESTORE_DEFAULT_FROM_DB
5|0m
6|0k
7|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/0_RecentFile________________________.ts
8|1m
9|1k
10|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/0_RecentFile________________________.ts
11|2m
12|2k
13|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Telediario 2º EdiciÓn 2011_20110114_2149.ts
14|3m
15|3k
16|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Vive La Via_20110113_1925.ts
sqlite>
I have finished a very alpha development.
If you will like to test, do the habitual procedure.
bookmark.db is growing with the different 0_RecentFiles ....
I think we need a solution.
sqlite> select id,fKey from tParameter;
1|DB_VERSION
2|DB_DEVELOP_VERSION
3|SETUP_INIT
4|RESTORE_DEFAULT_FROM_DB
5|0m
6|0k
7|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/0_RecentFile________________________.ts
8|1m
9|1k
10|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/0_RecentFile________________________.ts
11|2m
12|2k
13|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Telediario 2º EdiciÓn 2011_20110114_2149.ts
14|3m
15|3k
16|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Vive La Via_20110113_1925.ts
sqlite>
vic1972- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: bookmark.db
vic1972 escribió:Hello,
I have finished a very alpha development.
If you will like to test, do the habitual procedure.
bookmark.db is growing with the different 0_RecentFiles ....
I think we need a solution.
sqlite> select id,fKey from tParameter;
1|DB_VERSION
2|DB_DEVELOP_VERSION
3|SETUP_INIT
4|RESTORE_DEFAULT_FROM_DB
5|0m
6|0k
7|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/0_RecentFile________________________.ts
8|1m
9|1k
10|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/0_RecentFile________________________.ts
11|2m
12|2k
13|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Telediario 2º EdiciÓn 2011_20110114_2149.ts
14|3m
15|3k
16|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Vive La Via_20110113_1925.ts
sqlite>
So I tested to use triggers and it seems that it works, actually Triggers update 1st row and 3rd row of RecentFile.ts by values from records of last played file just in the moment of its stopping/interrupting.
As the sqlite doesn't support variables, constants and regular expressions, the trigger codes seem quite weird As recursive triggers are not also supported, I learned that there is not needed to exclude triggering at the records of RecentFile.ts itself.
Btw: In this testing conditions I presume that the record for 0_RecentFile.ts already exists in the database but of course in real conditions it will be treated.
I was also thinking to create a new table (eg tHarmony) which could be used to store RecentFilePattern ('fileset%RecentFile.ts') or the IDs for RecentFile.ts records to avoid the necessity to use unsure constructions like "WHERE id = (SELECT id FROM tParameter WHERE fKey LIKE 'fileset%RecentFile.ts') - 2". The LastFullname record could also be placed into tHarmony table so the triggers could update it so it wouldn't be needed to parse DVDPlayer stdout to get the current last filename which we need to create a hardlink. And if we add the quite unique string (eg #&$HarmonyLastFullname$&#) to such filename you can find it in bookmark.db in binary form so you needn't use any sqlite tool ...
The mentioned triggers follow:
- Código:
CREATE TRIGGER "main"."Upd3rdRowByUPDATE" AFTER UPDATE ON tParameter WHEN old.fKey LIKE 'fileset%' BEGIN UPDATE tParameter SET fValue = new.fValue WHERE fKey LIKE 'fileset%RecentFile.ts'; END ;
CREATE TRIGGER "main"."Upd3rdRowByINSERT" AFTER INSERT ON tParameter WHEN new.fKey LIKE 'fileset%' BEGIN UPDATE tParameter SET fValue = new.fValue WHERE fKey LIKE 'fileset%RecentFile.ts'; END ;
CREATE TRIGGER "main"."Upd1stRowByUPDATE" AFTER UPDATE ON tParameter WHEN old.fKey LIKE '_m' OR old.fKey LIKE '__m' OR old.fKey LIKE '___m' BEGIN UPDATE tParameter SET fValue = new.fValue WHERE id = (SELECT id FROM tParameter WHERE fKey LIKE 'fileset%RecentFile.ts') - 2; END ;
CREATE TRIGGER "main"."Upd1stRowByINSERT" AFTER INSERT ON tParameter WHEN new.fKey LIKE '_m' OR new.fKey LIKE '__m' OR new.fKey LIKE '___m' BEGIN UPDATE tParameter SET fValue = new.fValue WHERE id = (SELECT id FROM tParameter WHERE fKey LIKE 'fileset%RecentFile.ts') - 2; END ;
George2005- Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic
Re: bookmark.db
very good.
It seems we are approaching to the final solution.
For the moment, I think we have clear, that we want a unique resume file: 0_RecentFile.ts
We do not want different files 0_RecentFiles________.ts
It seems also clear, that we need an initial DB with record for 0_RecentFile.ts, already done:
http://dl.dropbox.com/u/684543/varios/ms450h/RePlay/bookmark.db_0_RecentFile
Your triggers seems nice, I will need to fully check.
Meanwhile I have also a brand new idea, with a question for you.
You know we have these 3 records per file( xxm, xxk, URI_filename with resume_blob):
which rows are compulsory to modify for the resume? only the third one (URI_filename)?
or we need second and third records to be modified?
I ask this because I think it might be also solved with a unique sql statement:
/tmp/hdd/root/custom/bin/sqlite3 query.sql
where query.sql in this file:
update tParameter set fValue=(select hex(fValue) from tParameter where fKey like '%Bob Esponja_20101128_1454.ts%') where fKey like '%0_RecentFile%';
Basically this will leave untouched the original played file, and update the blob with the right value for 0_RecentFile.ts
It seems we are approaching to the final solution.
For the moment, I think we have clear, that we want a unique resume file: 0_RecentFile.ts
We do not want different files 0_RecentFiles________.ts
It seems also clear, that we need an initial DB with record for 0_RecentFile.ts, already done:
http://dl.dropbox.com/u/684543/varios/ms450h/RePlay/bookmark.db_0_RecentFile
Your triggers seems nice, I will need to fully check.
Meanwhile I have also a brand new idea, with a question for you.
You know we have these 3 records per file( xxm, xxk, URI_filename with resume_blob):
which rows are compulsory to modify for the resume? only the third one (URI_filename)?
or we need second and third records to be modified?
I ask this because I think it might be also solved with a unique sql statement:
/tmp/hdd/root/custom/bin/sqlite3 query.sql
where query.sql in this file:
update tParameter set fValue=(select hex(fValue) from tParameter where fKey like '%Bob Esponja_20101128_1454.ts%') where fKey like '%0_RecentFile%';
Basically this will leave untouched the original played file, and update the blob with the right value for 0_RecentFile.ts
vic1972- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: bookmark.db
vic1972 escribió: very good.
It seems we are approaching to the final solution.
For the moment, I think we have clear, that we want a unique resume file: 0_RecentFile.ts
We do not want different files 0_RecentFiles________.ts
It seems also clear, that we need an initial DB with record for 0_RecentFile.ts, already done:
http://dl.dropbox.com/u/684543/varios/ms450h/RePlay/bookmark.db_0_RecentFile
Your triggers seems nice, I will need to fully check.
Meanwhile I have also a brand new idea, with a question for you.
You know we have these 3 records per file( xxm, xxk, URI_filename with resume_blob):
which rows are compulsory to modify for the resume? only the third one (URI_filename)?
or we need second and third records to be modified?
I ask this because I think it might be also solved with a unique sql statement:
/tmp/hdd/root/custom/bin/sqlite3 query.sql
where query.sql in this file:
update tParameter set fValue=(select hex(fValue) from tParameter where fKey like '%Bob Esponja_20101128_1454.ts%') where fKey like '%0_RecentFile%';
Basically this will leave untouched the original played file, and update the blob with the right value for 0_RecentFile.ts
Well, for the resume playing it is compulsory to modify the BLOB in the 3rd row, actually.
But my triggers also modify the 1st row BLOB, as it is a date & time of modificaton of original file, which is displayed on screen in REC menu just below the Movie Preview Windows. It is about not to confuse user with the wrong date & time of playing interruption.
Of course it is possible to perform an sql statement like "sqlite3 query.sql", it does the same as triggers, but I think that you want to avoid using any sql tool.
About initial database with record for 0_RecentFile.ts etc.: I was thinking about the writing sql statement to create it from "regular" bookmark.db (it could also be something like "recovery" process)
A) Delete all records except the first four (which contain DB_VERSION etc.)
B) Create 3 rows for 0_RecentFile.ts, so this file was just "0" record:
id -> fKey -> fValue
5 -> 0m -> X'00000000'
6 -> 0k -> BLOB with filename
7 -> fileset:/// ... 0_RecentFile.ts -> X'00000000000000000000000000000000'
There also would be a "initial" trigger which check if these 3 rows exists and if not, it perform this recovery sql statement. So in triggers mentioned in the previous post we could use clauses "WHERE id = 7" instead of "WHERE fKey LIKE 'fileset%0_RecentFile.ts' and "WHERE id = 5" instead of "WHERE id = (SELECT id FROM tParameter WHERE fKey LIKE 'fileset%0_RecentFile.ts') - 2"
George2005- Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic
Re: bookmark.db
Congratulations George, your triggers worked fine at first attemp with no modifications
The resume facility is working now
Please do some testing, you just need:
the modified db with the initial entry and triggers: http://dl.dropbox.com/u/684543/varios/ms450h/RePlay/bookmark_0_RecentFile_con_triggers.db
and last version of PM, which you know the place
- Código:
6|0k|66696C657365743A2F2F2F746D702F72616D66732F766F6C756D65732F484444202820496E7465726E616C20292F5245432F305F526563656E7446696C652E7473
7|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/0_RecentFile.ts|0D0000001E0C000012DC45CA00000000
8|1m|DF27344D
9|1k|66696C657365743A2F2F2F746D702F72616D66732F766F6C756D65732F484444202820496E7465726E616C20292F5245432F426F62204573706F6E6A6120457370656369616C204E6176696461642E7473
10|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Bob Esponja Especial Navidad.ts|1F0000002D1F0000B50EE2BB01000000
11|2m|0827344D
12|2k|66696C657365743A2F2F2F746D702F72616D66732F766F6C756D65732F484444202820496E7465726E616C20292F5245432F43696E655F204A61636B2048756E746572207920656C207465736F726F207065726469646F20646520556761726974695F32303131303131335F323135382E7473
13|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Cine_ Jack Hunter y el tesoro perdido de Ugariti_20110113_2158.ts|0E000000A0110000120635E200000000
14|3m|9A28344D
15|3k|66696C657365743A2F2F2F746D702F72616D66732F766F6C756D65732F484444202820496E7465726E616C20292F5245432F42454E20313020414C49454E20464F5243455F32303131303131365F323032352E7473
16|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/BEN 10 ALIEN FORCE_20110116_2025.ts|0D0000001E0C000012DC45CA00000000
sqlite>
The resume facility is working now
Please do some testing, you just need:
the modified db with the initial entry and triggers: http://dl.dropbox.com/u/684543/varios/ms450h/RePlay/bookmark_0_RecentFile_con_triggers.db
and last version of PM, which you know the place
vic1972- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: bookmark.db
vic1972 escribió:Congratulations George, your triggers worked fine at first attemp with no modifications
- Código:
6|0k|66696C657365743A2F2F2F746D702F72616D66732F766F6C756D65732F484444202820496E7465726E616C20292F5245432F305F526563656E7446696C652E7473
7|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/0_RecentFile.ts|0D0000001E0C000012DC45CA00000000
8|1m|DF27344D
9|1k|66696C657365743A2F2F2F746D702F72616D66732F766F6C756D65732F484444202820496E7465726E616C20292F5245432F426F62204573706F6E6A6120457370656369616C204E6176696461642E7473
10|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Bob Esponja Especial Navidad.ts|1F0000002D1F0000B50EE2BB01000000
11|2m|0827344D
12|2k|66696C657365743A2F2F2F746D702F72616D66732F766F6C756D65732F484444202820496E7465726E616C20292F5245432F43696E655F204A61636B2048756E746572207920656C207465736F726F207065726469646F20646520556761726974695F32303131303131335F323135382E7473
13|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/Cine_ Jack Hunter y el tesoro perdido de Ugariti_20110113_2158.ts|0E000000A0110000120635E200000000
14|3m|9A28344D
15|3k|66696C657365743A2F2F2F746D702F72616D66732F766F6C756D65732F484444202820496E7465726E616C20292F5245432F42454E20313020414C49454E20464F5243455F32303131303131365F323032352E7473
16|fileset:///tmp/ramfs/volumes/HDD ( Internal )/REC/BEN 10 ALIEN FORCE_20110116_2025.ts|0D0000001E0C000012DC45CA00000000
sqlite>
The resume facility is working now
Please do some testing, you just need:
the modified db with the initial entry and triggers: http://dl.dropbox.com/u/684543/varios/ms450h/RePlay/bookmark_0_RecentFile_con_triggers.db
and last version of PM, which you know the place
Hi Victor, thanks for your appreciation! I would also like to congratulate you, because your code works great !!! It is fantastic to see that Red Button is able to resume playing the last recording
I encountered only two problems:
1. As I wrote before there is a problem with creating symbolic links targeted to files with "strange" characters (eg eastern-european characters like "ěščřžýáíé ...") which are unfortunately widely used by our EPGs (and maybe in other countries, too)
2. When the playing of "0_RecentFile.ts" just starts, the resume playing window is still displayed waiting for select "Yes" or "No" to continue playing. So it seems that in command sequence the last OK (' ') command is missing to confirm the "Yes" option.
Btw: At the first moment I was quite surprised that the new PipeManagement has only 94 KB in comparion with previous versions which were about 225 KB long so I thought that the download failed in a half
George2005- Mensajes : 112
Fecha de inscripción : 26/10/2010
Edad : 49
Localización : Olomouc - Czech Republic
Página 3 de 8. • 1, 2, 3, 4, 5, 6, 7, 8
Página 3 de 8.
Permisos de este foro:
No puedes responder a temas en este foro.