亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? scan.c

?? linux TV 源碼
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
		buf += descriptor_len;		descriptors_loop_len -= descriptor_len;	}}static void parse_pat(const unsigned char *buf, int section_length,		      int transport_stream_id){	while (section_length > 0) {		struct service *s;		int service_id = (buf[0] << 8) | buf[1];		if (service_id == 0) {			buf += 4;		/*  skip nit pid entry... */			section_length -= 4;			continue;		}		/* SDT might have been parsed first... */		s = find_service(current_tp, service_id);		if (!s)			s = alloc_service(current_tp, service_id);		s->pmt_pid = ((buf[2] & 0x1f) << 8) | buf[3];		if (!s->priv && s->pmt_pid) {			s->priv = malloc(sizeof(struct section_buf));			setup_filter(s->priv, demux_devname,				     s->pmt_pid, 0x02, 1, 0, 5);			add_filter (s->priv);		}		buf += 4;		section_length -= 4;	};}static void parse_pmt (const unsigned char *buf, int section_length, int service_id){	int program_info_len;	struct service *s;        char msg_buf[14 * AUDIO_CHAN_MAX + 1];        char *tmp;        int i;	s = find_service (current_tp, service_id);	if (!s) {		error("PMT for serivce_id 0x%04x was not in PAT\n", service_id);		return;	}	s->pcr_pid = ((buf[0] & 0x1f) << 8) | buf[1];	program_info_len = ((buf[2] & 0x0f) << 8) | buf[3];	buf += program_info_len + 4;	section_length -= program_info_len + 4;	while (section_length > 0) {		int ES_info_len = ((buf[3] & 0x0f) << 8) | buf[4];		int elementary_pid = ((buf[1] & 0x1f) << 8) | buf[2];		switch (buf[0]) {		case 0x01:		case 0x02:			moreverbose("  VIDEO     : PID 0x%04x\n", elementary_pid);			if (s->video_pid == 0)				s->video_pid = elementary_pid;			break;		case 0x03:		case 0x04:			moreverbose("  AUDIO     : PID 0x%04x\n", elementary_pid);			if (s->audio_num < AUDIO_CHAN_MAX) {				s->audio_pid[s->audio_num] = elementary_pid;				parse_descriptors (PMT, buf + 5, ES_info_len, s);				s->audio_num++;			}			else				warning("more than %i audio channels, truncating\n",				     AUDIO_CHAN_MAX);			break;		case 0x06:			if (find_descriptor(0x56, buf + 5, ES_info_len, NULL, NULL)) {				moreverbose("  TELETEXT  : PID 0x%04x\n", elementary_pid);				s->teletext_pid = elementary_pid;				break;			}			else if (find_descriptor(0x59, buf + 5, ES_info_len, NULL, NULL)) {				/* Note: The subtitling descriptor can also signal				 * teletext subtitling, but then the teletext descriptor				 * will also be present; so we can be quite confident				 * that we catch DVB subtitling streams only here, w/o				 * parsing the descriptor. */				moreverbose("  SUBTITLING: PID 0x%04x\n", elementary_pid);				s->subtitling_pid = elementary_pid;				break;			}			else if (find_descriptor(0x6a, buf + 5, ES_info_len, NULL, NULL)) {				moreverbose("  AC3       : PID 0x%04x\n", elementary_pid);				s->ac3_pid = elementary_pid;				break;			}			/* fall through */		default:			moreverbose("  OTHER     : PID 0x%04x TYPE 0x%02x\n", elementary_pid, buf[0]);		};		buf += ES_info_len + 5;		section_length -= ES_info_len + 5;	};        tmp = msg_buf;        tmp += sprintf(tmp, "0x%04x (%.4s)", s->audio_pid[0], s->audio_lang[0]);	if (s->audio_num > AUDIO_CHAN_MAX) {		warning("more than %i audio channels: %i, truncating to %i\n",		      AUDIO_CHAN_MAX, s->audio_num, AUDIO_CHAN_MAX);		s->audio_num = AUDIO_CHAN_MAX;	}        for (i=1; i<s->audio_num; i++)                tmp += sprintf(tmp, ", 0x%04x (%.4s)", s->audio_pid[i], s->audio_lang[i]);        debug("0x%04x 0x%04x: %s -- %s, pmt_pid 0x%04x, vpid 0x%04x, apid %s\n",	    s->transport_stream_id,	    s->service_id,	    s->provider_name, s->service_name,	    s->pmt_pid, s->video_pid, msg_buf);}static void parse_nit (const unsigned char *buf, int section_length, int network_id){	int descriptors_loop_len = ((buf[0] & 0x0f) << 8) | buf[1];	if (section_length < descriptors_loop_len + 4)	{		warning("section too short: network_id == 0x%04x, section_length == %i, "		     "descriptors_loop_len == %i\n",		     network_id, section_length, descriptors_loop_len);		return;	}	parse_descriptors (NIT, buf + 2, descriptors_loop_len, NULL);	section_length -= descriptors_loop_len + 4;	buf += descriptors_loop_len + 4;	while (section_length > 6) {		int transport_stream_id = (buf[0] << 8) | buf[1];		struct transponder *t, tn;		descriptors_loop_len = ((buf[4] & 0x0f) << 8) | buf[5];		if (section_length < descriptors_loop_len + 4 ||		    !transport_stream_id)		{			warning("section too short: transport_stream_id == 0x%04x, "			     "section_length == %i, descriptors_loop_len == %i\n",			     transport_stream_id, section_length,			     descriptors_loop_len);			break;		}		debug("transport_stream_id 0x%04x\n", transport_stream_id);		memset(&tn, 0, sizeof(tn));		tn.type = -1;		tn.network_id = network_id;		tn.transport_stream_id = transport_stream_id;		parse_descriptors (NIT, buf + 6, descriptors_loop_len, &tn);		if (tn.type == fe_info.type) {			/* only add if develivery_descriptor matches FE type */			t = find_transponder(tn.param.frequency);			if (!t)				t = alloc_transponder(tn.param.frequency);			copy_transponder(t, &tn);		}		section_length -= descriptors_loop_len + 6;		buf += descriptors_loop_len + 6;	};}static void parse_sdt (const unsigned char *buf, int section_length,		int transport_stream_id){	buf += 3;	       /*  skip original network id + reserved field */	while (section_length > 4) {		int service_id = (buf[0] << 8) | buf[1];		int descriptors_loop_len = ((buf[3] & 0x0f) << 8) | buf[4];		struct service *s;		if (section_length < descriptors_loop_len ||		    !transport_stream_id ||		    !descriptors_loop_len)		{			warning("section too short: service_id == 0x%02x, section_length == %i"			     "descriptors_loop_len == %i\n",			     service_id, section_length,			     descriptors_loop_len);			break;		}		s = find_service(current_tp, service_id);		if (!s)			/* maybe PAT has not yet been parsed... */			s = alloc_service(current_tp, service_id);		s->running = (buf[3] >> 5) & 0x7;		s->scrambled = (buf[3] >> 4) & 1;		parse_descriptors (SDT, buf + 5, descriptors_loop_len, s);		section_length -= descriptors_loop_len + 5;		buf += descriptors_loop_len + 5;	};}static int get_bit (uint8_t *bitfield, int bit){	return (bitfield[bit/8] >> (bit % 8)) & 1;}static void set_bit (uint8_t *bitfield, int bit){	bitfield[bit/8] |= 1 << (bit % 8);}/** *   returns 0 when more sections are expected *	   1 when all sections are read on this pid *	   -1 on invalid table id */static int parse_section (struct section_buf *s){	const unsigned char *buf = s->buf;	int table_id;	int section_length;	int table_id_ext;	int section_version_number;	int section_number;	int last_section_number;	int i;	table_id = buf[0];	if (s->table_id != table_id)		return -1;	section_length = (((buf[1] & 0x0f) << 8) | buf[2]) - 11;	table_id_ext = (buf[3] << 8) | buf[4];	section_version_number = (buf[5] >> 1) & 0x1f;	section_number = buf[6];	last_section_number = buf[7];	if (s->segmented && s->table_id_ext != -1 && s->table_id_ext != table_id_ext) {		/* find or allocate actual section_buf matching table_id_ext */		while (s->next_seg) {			s = s->next_seg;			if (s->table_id_ext == table_id_ext)				break;		}		if (s->table_id_ext != table_id_ext) {			assert(s->next_seg == NULL);			s->next_seg = calloc(1, sizeof(struct section_buf));			s->next_seg->segmented = s->segmented;			s->next_seg->run_once = s->run_once;			s->next_seg->timeout = s->timeout;			s = s->next_seg;			s->table_id = table_id;			s->table_id_ext = table_id_ext;			s->section_version_number = section_version_number;		}	}	if (s->section_version_number != section_version_number ||			s->table_id_ext != table_id_ext) {		struct section_buf *next_seg = s->next_seg;		if (s->section_version_number != -1 && s->table_id_ext != -1)			debug("section version_number or table_id_ext changed "				"%d -> %d / %04x -> %04x\n",				s->section_version_number, section_version_number,				s->table_id_ext, table_id_ext);		s->table_id_ext = table_id_ext;		s->section_version_number = section_version_number;		s->sectionfilter_done = 0;		memset (s->section_done, 0, sizeof(s->section_done));		s->next_seg = next_seg;	}	buf += 8;	if (!get_bit(s->section_done, section_number)) {		set_bit (s->section_done, section_number);		debug("pid 0x%02x tid 0x%02x table_id_ext 0x%04x, "		    "%i/%i (version %i)\n",		    s->pid, table_id, table_id_ext, section_number,		    last_section_number, section_version_number);		switch (table_id) {		case 0x00:			verbose("PAT\n");			parse_pat (buf, section_length, table_id_ext);			break;		case 0x02:			verbose("PMT 0x%04x for service 0x%04x\n", s->pid, table_id_ext);			parse_pmt (buf, section_length, table_id_ext);			break;		case 0x41:			verbose("////////////////////////////////////////////// NIT other\n");		case 0x40:			verbose("NIT (%s TS)\n", table_id == 0x40 ? "actual":"other");			parse_nit (buf, section_length, table_id_ext);			break;		case 0x42:		case 0x46:			verbose("SDT (%s TS)\n", table_id == 0x42 ? "actual":"other");			parse_sdt (buf, section_length, table_id_ext);			break;		default:			;		};		for (i = 0; i <= last_section_number; i++)			if (get_bit (s->section_done, i) == 0)				break;		if (i > last_section_number)			s->sectionfilter_done = 1;	}	if (s->segmented) {		/* always wait for timeout; this is because we don't now how		 * many segments there are		 */		return 0;	}	else if (s->sectionfilter_done)		return 1;	return 0;}static int read_sections (struct section_buf *s){	int section_length, count;	if (s->sectionfilter_done && !s->segmented)		return 1;	/* the section filter API guarantess that we get one full section	 * per read(), provided that the buffer is large enough (it is)	 */	if (((count = read (s->fd, s->buf, sizeof(s->buf))) < 0) && errno == EOVERFLOW)		count = read (s->fd, s->buf, sizeof(s->buf));	if (count < 0) {		errorn("read_sections: read error");		return -1;	}	if (count < 4)		return -1;	section_length = ((s->buf[1] & 0x0f) << 8) | s->buf[2];	if (count != section_length + 3)		return -1;	if (parse_section(s) == 1)		return 1;	return 0;}static LIST_HEAD(running_filters);static LIST_HEAD(waiting_filters);static int n_running;#define MAX_RUNNING 32static struct pollfd poll_fds[MAX_RUNNING];static struct section_buf* poll_section_bufs[MAX_RUNNING];static void setup_filter (struct section_buf* s, const char *dmx_devname,			  int pid, int tid, int run_once, int segmented, int timeout){	memset (s, 0, sizeof(struct section_buf));	s->fd = -1;	s->dmx_devname = dmx_devname;	s->pid = pid;	s->table_id = tid;	s->run_once = run_once;	s->segmented = segmented;	if (long_timeout)		s->timeout = 5 * timeout;	else		s->timeout = timeout;	s->table_id_ext = -1;	s->section_version_number = -1;	INIT_LIST_HEAD (&s->list);}static void update_poll_fds(void){	struct list_head *p;	struct section_buf* s;	int i;	memset(poll_section_bufs, 0, sizeof(poll_section_bufs));	for (i = 0; i < MAX_RUNNING; i++)		poll_fds[i].fd = -1;	i = 0;	list_for_each (p, &running_filters) {		if (i >= MAX_RUNNING)			fatal("too many poll_fds\n");		s = list_entry (p, struct section_buf, list);		if (s->fd == -1)			fatal("s->fd == -1 on running_filters\n");		verbosedebug("poll fd %d\n", s->fd);		poll_fds[i].fd = s->fd;		poll_fds[i].events = POLLIN;		poll_fds[i].revents = 0;		poll_section_bufs[i] = s;		i++;	}	if (i != n_running)		fatal("n_running is hosed\n");}static int start_filter (struct section_buf* s){	struct dmx_sct_filter_params f;	if (n_running >= MAX_RUNNING)		goto err0;	if ((s->fd = open (s->dmx_devname, O_RDWR | O_NONBLOCK)) < 0)		goto err0;	verbosedebug("start filter pid 0x%04x table_id 0x%02x\n", s->pid, s->table_id);	memset(&f, 0, sizeof(f));	f.pid = (uint16_t) s->pid;	if (s->table_id < 0x100 && s->table_id > 0) {		f.filter.filter[0] = (uint8_t) s->table_id;		f.filter.mask[0]   = 0xff;	}	f.timeout = 0;	f.flags = DMX_IMMEDIATE_START | DMX_CHECK_CRC;	if (ioctl(s->fd, DMX_SET_FILTER, &f) == -1) {		errorn ("ioctl DMX_SET_FILTER failed");		goto err1;	}	s->sectionfilter_done = 0;	time(&s->start_time);	list_del_init (&s->list);  /* might be in waiting filter list */	list_add (&s->list, &running_filters);	n_running++;	update_poll_fds();	return 0;err1:	ioctl (s->fd, DMX_STOP);	close (s->fd);err0:	return -1;}static void stop_filter (struct section_buf *s){	verbosedebug("stop filter pid 0x%04x\n", s->pid);	ioctl (s->fd, DMX_STOP);	close (s->fd);	s->fd = -1;	list_del (&s->list);	s->running_time += time(NULL) - s->start_time;	n_running--;	update_poll_fds();}static void add_filter (struct section_buf *s){	verbosedebug("add filter pid 0x%04x\n", s->pid);	if (start_filter (s))		list_add_tail (&s->list, &waiting_filters);}static void remove_filter (struct section_buf *s){	verbosedebug("remove filter pid 0x%04x\n", s->pid);	stop_filter (s);	while (!list_empty(&waiting_filters)) {		struct list_head *next = waiting_filters.next;		s = list_entry (next, struct section_buf, list);		if (start_filter (s))			break;	};}static void read_filters (void){	struct section_buf *s;	int i, n, done;	n = poll(poll_fds, n_running, 1000);	if (n == -1)		errorn("poll");	for (i = 0; i < n_running; i++) {		s = poll_section_bufs[i];		if (!s)			fatal("poll_section_bufs[%d] is NULL\n", i);		if (poll_fds[i].revents)			done = read_sections (s) == 1;		else			done = 0; /* timeout */		if (done || time(NULL) > s->start_time + s->timeout) {			if (s->run_once) {				if (done)					verbosedebug("filter done pid 0x%04x\n", s->pid);				else					warning("filter timeout pid 0x%04x\n", s->pid);				remove_filter (s);			}		}	}}static int mem_is_zero (const void *mem, int size){	const char *p = mem;	while (size) {		if (*p != 0x00)			return 0;		p++;	}	return 1;}#define SWITCHFREQ 11700000#define LOF_HI     10600000#define LOF_LO      9750000static int switch_pos = 0;static int __tune_to_transponder (int frontend_fd, struct transponder *t){	struct dvb_frontend_parameters p;	fe_status_t s;	int i;	current_tp = t;	if (mem_is_zero (&t->param, sizeof(struct dvb_frontend_parameters)))		return -1;	memcpy (&p, &t->param, sizeof(struct dvb_frontend_parameters));	if (verbosity >= 1) {		dprintf(1, ">>> tune to: ");		dump_dvb_parameters (stderr, t);		if (t->last_tuning_failed)			dprintf(1, " (tuning failed)");		dprintf(1, "\n");	}	if (t->type == FE_QPSK) {

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品在线观看播放| 亚洲综合另类小说| 成人精品视频一区| 亚洲欧洲精品天堂一级| 91久久精品一区二区| 亚洲国产人成综合网站| 欧美一区二区视频在线观看2022| 麻豆传媒一区二区三区| 久久久久亚洲蜜桃| av在线不卡网| 午夜精品福利在线| 欧美mv和日韩mv国产网站| 高清国产一区二区| 一区二区三区欧美亚洲| 7777精品伊人久久久大香线蕉最新版| 麻豆成人免费电影| 国产精品每日更新| 欧美熟乱第一页| 久久99国产精品免费网站| 日本一区二区免费在线观看视频| 国产欧美一区二区精品性色超碰 | 成人一道本在线| 亚洲视频免费观看| 欧美一区二区大片| 成人伦理片在线| 亚洲成人免费av| 久久众筹精品私拍模特| 91丨九色丨尤物| 日本不卡不码高清免费观看 | www一区二区| 99国产精品一区| 日韩av电影天堂| 欧美激情在线看| 欧美丰满高潮xxxx喷水动漫| 国产成人亚洲综合色影视| 亚洲一区二区三区精品在线| 精品国产91九色蝌蚪| 色综合网站在线| 精品一区二区三区日韩| 亚洲欧美日韩国产中文在线| 日韩三级.com| 色哟哟国产精品| 久久99精品国产91久久来源| 亚洲欧美日韩国产手机在线| 日韩欧美一二三| 色综合网站在线| 国内成+人亚洲+欧美+综合在线| 亚洲精品国产一区二区精华液 | 国产精品911| 香蕉久久一区二区不卡无毒影院 | 欧美r级在线观看| 91丨porny丨在线| 精品一区二区三区蜜桃| 亚洲国产精品一区二区www在线| 国产片一区二区| 欧美一区二区三区公司| 91尤物视频在线观看| 韩国欧美国产1区| 亚洲一区二区黄色| 国内成人自拍视频| 丝袜美腿亚洲色图| 亚洲欧美日韩在线| 国产日韩欧美不卡| 精品国产污网站| 制服丝袜亚洲精品中文字幕| 色欧美片视频在线观看在线视频| 国产成人免费视频| 免费av网站大全久久| 一区二区三区产品免费精品久久75| 国产精品天干天干在线综合| 欧美精品一区二| 欧美美女bb生活片| 在线亚洲一区二区| 不卡的av网站| 国产99久久久国产精品潘金网站| 免费精品99久久国产综合精品| 亚洲午夜免费电影| 亚洲人午夜精品天堂一二香蕉| 欧美极品另类videosde| 精品国产成人系列| 欧美大片在线观看| 欧美一区二区三区系列电影| 欧美三级欧美一级| 色狠狠桃花综合| 99久久综合99久久综合网站| 国产精品亚洲一区二区三区妖精| 久久精品国产免费| 视频一区在线播放| 亚洲成人免费观看| 亚洲电影在线播放| 亚洲精品国产精华液| 亚洲天天做日日做天天谢日日欢 | 色伊人久久综合中文字幕| 成人激情视频网站| 高清国产一区二区三区| 国产成人免费在线观看| 国产成人一级电影| 岛国一区二区三区| 国产99久久精品| 成人免费高清在线观看| 国产成a人亚洲| 国产69精品久久久久毛片 | 久久99久久99精品免视看婷婷 | www亚洲一区| 欧美成人国产一区二区| 日韩免费在线观看| 日韩欧美在线网站| 久久综合中文字幕| 国产色爱av资源综合区| 欧美激情中文不卡| 国产精品白丝在线| 亚洲视频香蕉人妖| 亚洲精品videosex极品| 亚洲午夜影视影院在线观看| 亚洲成人免费av| 日韩av中文在线观看| 另类小说欧美激情| 国内精品视频一区二区三区八戒| 国产剧情一区二区| 国产sm精品调教视频网站| 成人丝袜18视频在线观看| www.亚洲人| 91久久精品一区二区三| 欧美丰满高潮xxxx喷水动漫| 日韩欧美久久久| 久久亚洲私人国产精品va媚药| 国产无人区一区二区三区| 国产精品美女久久久久高潮| 亚洲丝袜自拍清纯另类| 亚洲第一久久影院| 美国一区二区三区在线播放| 国产精品自拍av| 99热精品国产| 欧美网站一区二区| 日韩精品资源二区在线| 久久久久久久久久久99999| 中文在线免费一区三区高中清不卡| 亚洲男人的天堂在线观看| 午夜精品一区二区三区免费视频| 免费观看91视频大全| 国产九色sp调教91| 99re成人在线| 91精品国产综合久久福利| 精品国内二区三区| 欧美经典一区二区| 亚洲综合久久av| 麻豆91精品视频| 成人免费av资源| 欧美少妇性性性| 精品美女被调教视频大全网站| 中文子幕无线码一区tr| 亚洲高清中文字幕| 久久国产福利国产秒拍| www.久久精品| 69av一区二区三区| 日本一二三四高清不卡| 亚洲最新视频在线观看| 久久国产精品99精品国产| 国产亚洲欧美日韩在线一区| 夜夜爽夜夜爽精品视频| 精品午夜久久福利影院| 91小视频免费看| 欧美一级免费大片| 国产精品色呦呦| 日韩电影在线观看网站| 成人美女在线观看| 欧美一区二区三区影视| 综合分类小说区另类春色亚洲小说欧美| 天天色天天操综合| 国产v日产∨综合v精品视频| 欧美喷潮久久久xxxxx| 欧美国产欧美亚州国产日韩mv天天看完整| 亚洲一二三区在线观看| 国产成人免费在线| 91精品国产麻豆国产自产在线| 欧美国产日韩在线观看| 日韩av午夜在线观看| 91免费精品国自产拍在线不卡| 日韩欧美国产系列| 亚洲激情一二三区| 国产一区二区0| 欧美丰满嫩嫩电影| 亚洲欧美偷拍三级| 国产麻豆成人传媒免费观看| 欧美日韩精品欧美日韩精品一 | www.爱久久.com| 欧美成人在线直播| 亚洲最大色网站| gogogo免费视频观看亚洲一| 欧美一二三四在线| 亚洲一区二区视频在线观看| 岛国精品在线观看| www国产精品av| 午夜av一区二区三区| 91美女在线看| 国产视频一区二区三区在线观看| 日本视频一区二区| 在线观看日韩电影| 中文字幕亚洲区| 国产不卡高清在线观看视频|