Mercurial > mplayer.hg
view stream/dvbin.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 | 8449d9eab838 |
children |
line wrap: on
line source
/* Imported from the dvbstream project * * Modified for use with MPlayer, for details see the changelog at * http://svn.mplayerhq.hu/mplayer/trunk/ * $Id$ */ #ifndef MPLAYER_DVBIN_H #define MPLAYER_DVBIN_H #include "config.h" #include "stream.h" #define SLOF (11700*1000UL) #define LOF1 (9750*1000UL) #define LOF2 (10600*1000UL) #include <inttypes.h> #include <linux/dvb/dmx.h> #include <linux/dvb/frontend.h> #include <linux/dvb/version.h> #undef DVB_ATSC #if defined(DVB_API_VERSION_MINOR) /* kernel headers >=2.6.28 have version 5. * * FIXME: are there any real differences between 3.1 and 5? */ #if (DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1) || DVB_API_VERSION == 5 #define DVB_ATSC 1 #endif #endif #define DVB_CHANNEL_LOWER -1 #define DVB_CHANNEL_HIGHER 1 #ifndef DMX_FILTER_SIZE #define DMX_FILTER_SIZE 16 #endif typedef struct { char *name; int freq, srate, diseqc, tone; char pol; int tpid, dpid1, dpid2, progid, ca, pids[DMX_FILTER_SIZE], pids_cnt; fe_spectral_inversion_t inv; fe_modulation_t mod; fe_transmit_mode_t trans; fe_bandwidth_t bw; fe_guard_interval_t gi; fe_code_rate_t cr, cr_lp; fe_hierarchy_t hier; } dvb_channel_t; typedef struct { uint16_t NUM_CHANNELS; uint16_t current; dvb_channel_t *channels; } dvb_channels_list; typedef struct { int type; dvb_channels_list *list; char *name; int devno; } dvb_card_config_t; typedef struct { int count; dvb_card_config_t *cards; void *priv; } dvb_config_t; typedef struct { int card; int fe_fd; int sec_fd; int demux_fd[3], demux_fds[DMX_FILTER_SIZE], demux_fds_cnt; int dvr_fd; dvb_config_t *config; dvb_channels_list *list; int tuner_type; int is_on; int retry; int timeout; int last_freq; } dvb_priv_t; #define TUNER_SAT 1 #define TUNER_TER 2 #define TUNER_CBL 3 #define TUNER_ATSC 4 int dvb_step_channel(stream_t *, int); int dvb_set_channel(stream_t *, int, int); dvb_config_t *dvb_get_config(void); void dvb_free_config(dvb_config_t *config); #endif /* MPLAYER_DVBIN_H */