[MPlayer-dev-eng] [PATCH] dvdnav part 2 - still frames

Nico Sabbi nsabbi at email.it
Fri Aug 3 23:22:40 CEST 2007


Benjamin Zores wrote:

>Carl Eugen Hoyos a écrit :
>  
>
>>Hi Nico!
>>
>>Nico Sabbi <nsabbi <at> email.it> writes:
>>
>>    
>>
>>>>>+//
>>>>>+// convert dvd time to millisec
>>>>>+//
>>>>>+static int dvdtimetomsec(dvd_time_t *dt)
>>>>>          
>>>>>
>>>btw, an identical function is already in stream_dvd.c, so just export it
>>>      
>>>
>>By creating new files stream_dvd_common.h and stream_dvd_common.c, or what would
>>you suggest?
>>    
>>
>
>dvd_common.[hc] then, i'd say the stream_ prefix is for "main" stream 
>file only (otherwise all files from dir would be prefixed by dirname).
>
>Ben
>
>  
>
Index: stream_dvd.c
===================================================================
--- stream_dvd.c        (revisione 23866)
+++ stream_dvd.c        (copia locale)
@@ -517,7 +517,7 @@
 \param *dev the DVD time structure to convert
 \return returns the time in milliseconds
 */
-static int dvdtimetomsec(dvd_time_t *dt)
+int mp_dvdtimetomsec(dvd_time_t *dt)
 {
   static int framerates[4] = {0, 2500, 0, 2997};
   int framerate = framerates[(dt->frame_u & 0xc0) >> 6];
@@ -528,6 +528,7 @@
     msec += (((dt->frame_u & 0x30) >> 3) * 5 + (dt->frame_u & 0x0f)) * 
100000 / framerate;
   return msec;
 }
+#define dvdtimetomsec mp_dvdtimetomsec

 static int mp_get_titleset_length(ifo_handle_t *vts_file, tt_srpt_t 
*tt_srpt, int title_no)
 {





More information about the MPlayer-dev-eng mailing list