Mercurial > mplayer.hg
annotate stream/cdd.h @ 32860:77dd2bb3fd02
Make sure we don't store the same stats twice by nulling the first byte of the stats_out string once we have written it.
I've verified that this is necessary, without it at normally at least the last stats line is duplicated, it could also happen when we call encode_video more often due to encoder delay as Reimar noted.
Sample encode was with default -ovc lavc -lavcopts vpass=1:
--- pass1stats.log 2011-02-21 15:44:42.314259000 +0100
+++ pass1stats.log.dedup_patch 2011-02-21 15:41:51.262778000 +0100
@@ -6421,4 +6421,3 @@
in:6420 out:6420 type:2 q:239 itex:0 ptex:15905 mv:441 misc:1911 fcode:1 bcode:1 mc-var:989 var:350603 icount:0 skipcount:373 hbits:55;
in:6421 out:6421 type:2 q:247 itex:0 ptex:13020 mv:422 misc:1863 fcode:1 bcode:1 mc-var:953 var:352607 icount:0 skipcount:379 hbits:55;
in:6422 out:6422 type:2 q:252 itex:0 ptex:3162 mv:258 misc:1293 fcode:1 bcode:1 mc-var:837 var:352872 icount:0 skipcount:449 hbits:55;
-in:6422 out:6422 type:2 q:252 itex:0 ptex:3162 mv:258 misc:1293 fcode:1 bcode:1 mc-var:837 var:352872 icount:0 skipcount:449 hbits:55;
author | ranma |
---|---|
date | Mon, 21 Feb 2011 14:52:25 +0000 |
parents | 80a4a25c24c5 |
children |
rev | line source |
---|---|
30426
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
1 /* |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
2 * This file is part of MPlayer. |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
3 * |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
4 * MPlayer is free software; you can redistribute it and/or modify |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
6 * the Free Software Foundation; either version 2 of the License, or |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
7 * (at your option) any later version. |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
8 * |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
9 * MPlayer is distributed in the hope that it will be useful, |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
12 * GNU General Public License for more details. |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
13 * |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
14 * You should have received a copy of the GNU General Public License along |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
17 */ |
ce0122361a39
Add license header to all files missing it in the stream subdirectory.
diego
parents:
30165
diff
changeset
|
18 |
26029 | 19 #ifndef MPLAYER_CDD_H |
20 #define MPLAYER_CDD_H | |
6695
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
21 |
30165 | 22 #include <sys/types.h> |
6695
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
23 |
31417 | 24 #include "m_option.h" |
25 | |
26 extern const m_option_t cdda_opts[]; | |
27 | |
6695
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
28 typedef struct cd_track { |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
29 char *name; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
30 unsigned int track_nb; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
31 unsigned int min; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
32 unsigned int sec; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
33 unsigned int msec; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
34 unsigned long frame_begin; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
35 unsigned long frame_length; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
36 struct cd_track *prev; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
37 struct cd_track *next; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
38 } cd_track_t; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
39 |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
40 typedef struct { |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
41 char *artist; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
42 char *album; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
43 char *genre; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
44 unsigned int nb_tracks; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
45 unsigned int min; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
46 unsigned int sec; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
47 unsigned msec; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
48 cd_track_t *first; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
49 cd_track_t *last; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
50 cd_track_t *current; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
51 } cd_info_t; |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
52 |
30733 | 53 cd_info_t* cd_info_new(void); |
6695
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
54 void cd_info_free(cd_info_t *cd_info); |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
55 cd_track_t* cd_info_add_track(cd_info_t *cd_info, char *track_name, unsigned int track_nb, unsigned int min, unsigned int sec, unsigned int msec, unsigned long frame_begin, unsigned long frame_length); |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
56 cd_track_t* cd_info_get_track(cd_info_t *cd_info, unsigned int track_nb); |
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
57 |
7953 | 58 void cd_info_debug(cd_info_t *cd_info); |
6695
c2dbba99b31e
Created a new header file to store common struct & prototype for
bertrand
parents:
diff
changeset
|
59 |
31443
ea6731235485
Move declarations for functions defined in stream_cddb.c to cdd.h.
diego
parents:
31440
diff
changeset
|
60 int cdd_identify(const char *dev); |
ea6731235485
Move declarations for functions defined in stream_cddb.c to cdd.h.
diego
parents:
31440
diff
changeset
|
61 int cddb_resolve(const char *dev, char **xmcd_file); |
ea6731235485
Move declarations for functions defined in stream_cddb.c to cdd.h.
diego
parents:
31440
diff
changeset
|
62 cd_info_t* cddb_parse_xmcd(char *xmcd_file); |
ea6731235485
Move declarations for functions defined in stream_cddb.c to cdd.h.
diego
parents:
31440
diff
changeset
|
63 |
26029 | 64 #endif /* MPLAYER_CDD_H */ |