* dvdtime2msec *********************************************************************** * From lsdvd **********************************************************************/
| 2024 | * From lsdvd |
| 2025 | **********************************************************************/ |
| 2026 | static int dvdtime2msec(dvd_time_t * dt) |
| 2027 | { |
| 2028 | double frames_per_s[4] = {-1.0, 25.00, -1.0, 29.97}; |
| 2029 | double fps = frames_per_s[(dt->frame_u & 0xc0) >> 6]; |
| 2030 | long ms; |
| 2031 | ms = (((dt->hour & 0xf0) >> 3) * 5 + (dt->hour & 0x0f)) * 3600000; |
| 2032 | ms += (((dt->minute & 0xf0) >> 3) * 5 + (dt->minute & 0x0f)) * 60000; |
| 2033 | ms += (((dt->second & 0xf0) >> 3) * 5 + (dt->second & 0x0f)) * 1000; |
| 2034 | |
| 2035 | if( fps > 0 ) |
| 2036 | { |
| 2037 | ms += (((dt->frame_u & 0x30) >> 3) * 5 + |
| 2038 | (dt->frame_u & 0x0f)) * 1000.0 / fps; |
| 2039 | } |
| 2040 | |
| 2041 | return ms; |
| 2042 | } |
| 2043 | |
| 2044 | static int TitleOpenIfo(hb_dvdnav_t * d, int t) |
| 2045 | { |
no outgoing calls
no test coverage detected