Mercurial > mplayer.hg
annotate stream/stream_dvd_common.c @ 27794:0f7e7c21548e
configure: Set CONFIG_MDCT and CONFIG_GOLOMB for libavcodec
After the latest FFmpeg changes these must be set if certain codecs
are enabled.
author | uau |
---|---|
date | Sun, 26 Oct 2008 02:21:55 +0000 |
parents | ea01824701a5 |
children | 83266d299072 |
rev | line source |
---|---|
26907 | 1 #include "config.h" |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
23993
diff
changeset
|
2 #include <inttypes.h> |
27341
e7c989f7a7c9
Start unifying names of internal preprocessor directives.
diego
parents:
26907
diff
changeset
|
3 #ifdef CONFIG_DVDREAD_INTERNAL |
27466
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
27341
diff
changeset
|
4 #include "libdvdread/ifo_types.h" |
26906
bae68d1afda2
adapted to the dvdread->libdvdread transition in dvdnav's repository
nicodvb
parents:
24047
diff
changeset
|
5 #else |
27466
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
27341
diff
changeset
|
6 #include <dvdread/ifo_types.h> |
26906
bae68d1afda2
adapted to the dvdread->libdvdread transition in dvdnav's repository
nicodvb
parents:
24047
diff
changeset
|
7 #endif |
23993 | 8 #include "stream_dvd_common.h" |
15518 | 9 |
16544
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
10 /** |
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
11 \brief Converts DVD time structure to milliseconds. |
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
12 \param *dev the DVD time structure to convert |
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
13 \return returns the time in milliseconds |
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
14 */ |
23993 | 15 int mp_dvdtimetomsec(dvd_time_t *dt) |
16544
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
16 { |
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
17 static int framerates[4] = {0, 2500, 0, 2997}; |
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
18 int framerate = framerates[(dt->frame_u & 0xc0) >> 6]; |
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
19 int msec = (((dt->hour & 0xf0) >> 3) * 5 + (dt->hour & 0x0f)) * 3600000; |
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
20 msec += (((dt->minute & 0xf0) >> 3) * 5 + (dt->minute & 0x0f)) * 60000; |
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
21 msec += (((dt->second & 0xf0) >> 3) * 5 + (dt->second & 0x0f)) * 1000; |
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
22 if(framerate > 0) |
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
23 msec += (((dt->frame_u & 0x30) >> 3) * 5 + (dt->frame_u & 0x0f)) * 100000 / framerate; |
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
24 return msec; |
a10adcba312f
Prints the number of titles, DVD disk ID, the numbers of chapters and
gpoirier
parents:
15551
diff
changeset
|
25 } |