Mercurial > mplayer.hg
annotate my_profile.h @ 8843:c70444c5b516
I have seen problems where DVD subtitles don't display
at the right time and sometimes they don't appear at
all. The problem stems from the fact that subtitle
command packets are being applied as soon as they are
read and assembled from the input stream. Sometimes,
a fully assembled subtitle packet arrives at the
spudec_assemble function before the previous subtitle
appears onscreen and thus the viewer only sees the
second subtitle. So I created a patch that queues
assembled subtitle packets and applies them at the
appropriate time within the heartbeat function. The
reset function clears the packet queue when seeking
through the video.
Tomasz Farkas <tomasz_farkas@yahoo.co.uk>
author | arpi |
---|---|
date | Wed, 08 Jan 2003 18:36:36 +0000 |
parents | e9bd97d5c5cc |
children |
rev | line source |
---|---|
2832 | 1 /* |
2 * my_profile.h | |
3 * | |
4 * Copyright (C) Nick Kurshev <nickols_k@mail.ru> - Oct 2001 | |
5 * | |
6 * You can redistribute this file under terms and conditions | |
7 * of GNU General Public licence v2. | |
8 */ | |
9 #ifndef MY_PROFILE_INC | |
10 #define MY_PROFILE_INC | |
11 | |
2834 | 12 extern volatile unsigned long long int my_profile_start,my_profile_end,my_profile_total; |
2832 | 13 |
14 #if defined ( ENABLE_PROFILE ) && defined ( ARCH_X86 ) | |
15 static inline unsigned long long int read_tsc( void ) | |
16 { | |
17 unsigned long long int retval; | |
18 __asm __volatile ("rdtsc":"=A"(retval)::"memory"); | |
19 return retval; | |
20 } | |
21 | |
2834 | 22 #define PROFILE_RESET() (my_profile_total=0ULL) |
23 #define PROFILE_START() { static int inited=0; if(!inited) { inited=1; my_profile_total=0ULL; } my_profile_start=read_tsc(); } | |
24 #define PROFILE_END(your_message) { my_profile_end=read_tsc(); my_profile_total+=(my_profile_end-my_profile_start); printf(your_message" current=%llu total=%llu\n\t",(my_profile_end-my_profile_start),my_profile_total); } | |
2832 | 25 #else |
2834 | 26 #define PROFILE_RESET() |
2832 | 27 #define PROFILE_START() |
28 #define PROFILE_END(your_message) | |
29 #endif | |
30 | |
31 | |
32 | |
6335
e9bd97d5c5cc
warning & newline fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
2834
diff
changeset
|
33 #endif |