H264码流解析(三):解析SPS和PPS_sps pps 解析-程序员宅基地

技术标签: 音视频  H264  

上两篇里面写了划分NALU和指数哥伦布编码,这一篇主要写解析SPS和PPS。

1、下载bs.h头文件

下载bs.h头文件,并在项目中使用

下载地址

2、解析SPS

H264官方文档英文版下载

先看SPS(序列参数集)的结构,再7.3.2.1.1里面包含了SPS结构的介绍

 其中scaling_list函数在7.3.2.1.1.1里,如图所示

vui_parameters函数在E1.1里 ,如图所示

hrd_parameters()函数在E.1.2里面,如图 

具体代码如下,注意点就是我们要将EBSP的数据转变为RBSP的数据才可以解析,不然系欸小会有问题

#define Extended_SAR 255
bs_t* b;
void scaling_list(uint32_t* scalingList, int sizeOfScalingList, uint32_t useDefaultScalingMatrixFlag) {
	int lastScale = 8;
	int nextScale = 8;
	for (int j = 0; j < sizeOfScalingList; j++) {
		if (nextScale != 0) {
			int delta_scale = bs_read_se(b);
			std::cout << "delta_scale:" << delta_scale << std::endl;
			nextScale = (lastScale + delta_scale + 256) % 256;
			useDefaultScalingMatrixFlag = (j == 0 && nextScale  == 0);
		}
		scalingList[j] = (nextScale == 0) ? lastScale : nextScale;
		lastScale = scalingList[j];
	}
}

void hrd_parameters() {
	std::cout << "==hrd==" << std::endl;
	uint32_t cpb_cnt_minus1 = bs_read_ue(b);
	std::cout << "cpb_cnt_minus1:" << cpb_cnt_minus1 << std::endl;
	std::cout << "bit_rate_scale:" << bs_read_u(b, 4) << std::endl;
	std::cout << "cpb_size_scale:" << bs_read_u(b, 4) << std::endl;
	uint32_t bit_rate_value_minus1[5];
	uint32_t cpb_size_value_minus1[5];
	uint32_t cbr_flag[5];
	for (int SchedSelIdx = 0; SchedSelIdx <= cpb_cnt_minus1; SchedSelIdx++) {
		bit_rate_value_minus1[SchedSelIdx] = bs_read_ue(b);
		cpb_size_value_minus1[SchedSelIdx] = bs_read_ue(b);
		cbr_flag[SchedSelIdx] = bs_read_u1(b);
	}
	std::cout << "initial_cpb_removal_delay_length_minus1:" << bs_read_u(b, 5) << std::endl;
	std::cout << "cpb_removal_delay_length_minus1:" << bs_read_u(b, 5) << std::endl;
	std::cout << "dpb_output_delay_length_minus1:" << bs_read_u(b, 5) << std::endl;
	std::cout << "time_offset_length:" << bs_read_u(b, 5) << std::endl;
	std::cout << "==hrd end==" << std::endl;
}

void vui_parameters() {
	std::cout << "==VUI==" << std::endl;
	uint32_t aspect_ratio_info_present_flag = bs_read_u1(b);
	std::cout << "aspect_ratio_info_present_flag:" << aspect_ratio_info_present_flag << std::endl;
	if (aspect_ratio_info_present_flag) {
		uint32_t aspect_ratio_idc = bs_read_u8(b);
		std::cout << "  aspect_ratio_idc:" << aspect_ratio_idc << std::endl;
		if (aspect_ratio_idc == Extended_SAR){
			std::cout << "    sar_width:" << bs_read_u(b,16);
			std::cout << "    sar_height:" << bs_read_u(b, 16);
		}
	}
	uint32_t overscan_info_present_flag = bs_read_u1(b);
	std::cout << "overscan_info_present_flag:" << overscan_info_present_flag << std::endl;
	if (overscan_info_present_flag) {
		std::cout << "  overscan_appropriate_flag:" << bs_read_u1(b) << std::endl;
	}
	uint32_t video_signal_type_present_flag = bs_read_u1(b);
	std::cout << "video_signal_type_present_flag:" << video_signal_type_present_flag << std::endl;
	if (video_signal_type_present_flag) {
		std::cout << "  video_format:" << bs_read_u(b,3) << std::endl;
		std::cout << "  video_full_range_flag:" << bs_read_u1(b) << std::endl;
		uint32_t colour_description_present_flag = bs_read_u1(b);
		std::cout << "  colour_description_present_flag:" << colour_description_present_flag << std::endl;
		if (colour_description_present_flag) {
			std::cout << "    colour_primaries:" << bs_read_u8(b) << std::endl;
			std::cout << "    transfer_characteristics:" << bs_read_u8(b) << std::endl;
			std::cout << "    matrix_coefficients:" << bs_read_u8(b) << std::endl;
		}
	}
	uint32_t chroma_loc_info_present_flag = bs_read_u1(b);
	std::cout << "chroma_loc_info_present_flag:" << chroma_loc_info_present_flag << std::endl;
	if (chroma_loc_info_present_flag) {
		std::cout << "  chroma_sample_loc_type_top_field:" << bs_read_ue(b) << std::endl;
		std::cout << "  chroma_sample_loc_type_bottom_field:" << bs_read_ue(b) << std::endl;
	}
	uint32_t timing_info_present_flag = bs_read_u1(b);
	std::cout << "timing_info_present_flag:" << timing_info_present_flag << std::endl;
	if (timing_info_present_flag) {
		std::cout << "  num_units_in_tick:" << bs_read_u(b, 32) << std::endl;
		std::cout << "  time_scale:" << bs_read_u(b, 32) << std::endl;
		std::cout << "  fixed_frame_rate_flag:" << bs_read_u1(b) << std::endl;
	}
	uint32_t nal_hrd_parameters_present_flag = bs_read_u1(b);
	std::cout << "nal_hrd_parameters_present_flag:" << nal_hrd_parameters_present_flag << std::endl;
	if (nal_hrd_parameters_present_flag) {
		hrd_parameters();
	}
	uint32_t vcl_hrd_parameters_present_flag = bs_read_u1(b);
	std::cout << "vcl_hrd_parameters_present_flag:" << vcl_hrd_parameters_present_flag << std::endl;
	if (vcl_hrd_parameters_present_flag) {
		hrd_parameters();
	}
	if (nal_hrd_parameters_present_flag || vcl_hrd_parameters_present_flag) {
		std::cout << "  low_delay_hrd_flag:" << bs_read_u1(b) << std::endl;
	}
	std::cout << "pic_struct_present_flag:" << bs_read_u1(b) << std::endl;
	uint32_t bitstream_restriction_flag = bs_read_u1(b);
	std::cout << "bitstream_restriction_flag:" << bitstream_restriction_flag << std::endl;
	if (bitstream_restriction_flag) {
		std::cout << "  motion_vectors_over_pic_boundaries_flag:" << bs_read_u1(b) << std::endl;
		std::cout << "  max_bytes_per_pic_denom:" << bs_read_ue(b) << std::endl;
		std::cout << "  max_bits_per_mb_denom:" << bs_read_ue(b) << std::endl;
		std::cout << "  log2_max_mv_length_horizontal:" << bs_read_ue(b) << std::endl;
		std::cout << "  log2_max_mv_length_vertical:" << bs_read_ue(b) << std::endl;
		std::cout << "  num_reorder_frames:" << bs_read_ue(b) << std::endl;
		std::cout << "  max_dec_frame_buffering:" << bs_read_ue(b) << std::endl;
	}
	std::cout << "==VUI== End" << std::endl;
}

std::vector<uint8_t> EBSP2RBSP(uint8_t* buffer, int len) {
	// 00 00 03 去掉03
	std::vector<uint8_t> ebsp;
	int i = 0;
	for (i = 0; i < len-2; ++i) {
		if (buffer[i] == 0x00 && buffer[i+1] == 0x00 && buffer[i+2] == 0x03) {
			ebsp.push_back(buffer[i++]);
			ebsp.push_back(buffer[i++]);
		}
		else {
			ebsp.push_back(buffer[i]);
		}
	}
	for (; i < len; ++i) {
		ebsp.push_back(buffer[i]);
	}
	return ebsp;
}
uint32_t chroma_format_idc; // pps要使用
void ParseSPS(uint8_t* buffer, int len) {
	std::vector<uint8_t> ebsp = EBSP2RBSP(buffer, len);
	b = bs_new(ebsp.data(), ebsp.size());
	
	std::cout << "forbidden_zero_bit :" << bs_read_u(b, 1) << std::endl;
	std::cout << "nal_ref_idc:" << bs_read_u(b, 2) << std::endl;
	std::cout << "nal_unit_type:" << bs_read_u(b, 5) << std::endl;
	uint32_t profile_idc = bs_read_u8(b);
	std::cout << "profile_idc:" << profile_idc << std::endl;
	std::cout << "constraint_set0_flag:" << bs_read_u(b, 1) << std::endl;
	std::cout << "constraint_set1_flag:" << bs_read_u(b, 1) << std::endl;
	std::cout << "constraint_set2_flag:" << bs_read_u(b, 1) << std::endl;
	std::cout << "constraint_set3_flag:" << bs_read_u(b, 1) << std::endl;
	std::cout << "constraint_set4_flag:" << bs_read_u(b, 1) << std::endl;
	std::cout << "constraint_set5_flag:" << bs_read_u(b, 1) << std::endl;
	std::cout << "reserved_zero_2bits :" << bs_read_u(b, 2) << std::endl;
	std::cout << "level_idc:" << bs_read_u8(b) << std::endl;
	std::cout << "seq_parameter_set_id:" << bs_read_ue(b) << std::endl;
	if (profile_idc == 100 || profile_idc == 110 || profile_idc == 122 ||
		profile_idc == 244 || profile_idc == 44 || profile_idc == 83 ||
		profile_idc == 86 || profile_idc == 118 || profile_idc == 128) {
		chroma_format_idc = bs_read_ue(b);
		std::cout << "  chroma_format_idc:" << chroma_format_idc << std::endl;
		if (chroma_format_idc == 3) {
			std::cout << "  separate_colour_plane_flag:" << bs_read_u(b, 1) << std::endl;
		}
		std::cout << "  bit_depth_luma_minus8:" << bs_read_ue(b) << std::endl;
		std::cout << "  bit_depth_chroma_minus8:" << bs_read_ue(b) << std::endl;
		std::cout << "  qpprime_y_zero_transform_bypass_flag:" << bs_read_u(b, 1) << std::endl;
		uint32_t seq_scaling_matrix_present_flag = bs_read_u(b, 1);
		std::cout << "  seq_scaling_matrix_present_flag:" << seq_scaling_matrix_present_flag << std::endl;
		
		if (seq_scaling_matrix_present_flag) {
			uint32_t seq_scaling_list_present_flag[12];
			uint32_t* ScalingList4x4[12];
			uint32_t UseDefaultScalingMatrix4x4Flag[12];
			uint32_t* ScalingList8x8[12];
			uint32_t UseDefaultScalingMatrix8x8Flag[12];
			for (int i = 0; i < ((chroma_format_idc != 3) ? 8 : 12); i++) {
				seq_scaling_list_present_flag[i] = bs_read_u(b, 1);
				if (seq_scaling_list_present_flag[i]) {
					if (i < 6) {
						scaling_list(ScalingList4x4[i], 16,
							UseDefaultScalingMatrix4x4Flag[i]);
					}
					else {
						scaling_list(ScalingList8x8[i-6], 64,
							UseDefaultScalingMatrix8x8Flag[i-6]);
					}
				}
			}
		}
	}
	std::cout << "log2_max_frame_num_minus4:" << bs_read_ue(b) << std::endl;
	uint32_t pic_order_cnt_type = bs_read_ue(b);
	std::cout << "pic_order_cnt_type:" << pic_order_cnt_type << std::endl;
	if (pic_order_cnt_type == 0) {
		std::cout << "  log2_max_pic_order_cnt_lsb_minus4:" << bs_read_ue(b) << std::endl;
	}
	else if (pic_order_cnt_type == 1) {
		std::cout << "  delta_pic_order_always_zero_flag:" << bs_read_u(b, 1) << std::endl;
		std::cout << "  offset_for_non_ref_pic:" << bs_read_se(b) << std::endl;
		std::cout << "  offset_for_top_to_bottom_field:" << bs_read_se(b) << std::endl;
		uint32_t num_ref_frames_in_pic_order_cnt_cycle = bs_read_ue(b);
		std::cout << "  num_ref_frames_in_pic_order_cnt_cycle:" << num_ref_frames_in_pic_order_cnt_cycle << std::endl;
		int offset_for_ref_frame[256];
		for (int i = 0; i < num_ref_frames_in_pic_order_cnt_cycle; i++) {
			offset_for_ref_frame[i] = bs_read_se(b);
		}
	}
	std::cout << "max_num_ref_frames:" << bs_read_ue(b) << std::endl;
	std::cout << "gaps_in_frame_num_value_allowed_flag:" << bs_read_u(b,1) << std::endl;
	std::cout << "pic_width_in_mbs_minus1:" << bs_read_ue(b) << std::endl;
	std::cout << "pic_height_in_map_units_minus1:" << bs_read_ue(b) << std::endl;
	uint32_t frame_mbs_only_flag = bs_read_u(b, 1);
	std::cout << "frame_mbs_only_flag:" << frame_mbs_only_flag << std::endl;
	if (!frame_mbs_only_flag) {
		std::cout << "  mb_adaptive_frame_field_flag:" << bs_read_u(b, 1) << std::endl;
	}
	std::cout << "direct_8x8_inference_flag:" << bs_read_u(b, 1) << std::endl;
	uint32_t frame_cropping_flag = bs_read_u(b, 1);
	std::cout << "frame_cropping_flag:" << frame_cropping_flag << std::endl;
	if (frame_cropping_flag) {
		std::cout << "  frame_crop_left_offset:" << bs_read_ue(b) << std::endl;
		std::cout << "  frame_crop_right_offset:" << bs_read_ue(b) << std::endl;
		std::cout << "  frame_crop_top_offset:" << bs_read_ue(b) << std::endl;
		std::cout << "  frame_crop_bottom_offset:" << bs_read_ue(b) << std::endl;
	}
	uint32_t vui_parameters_present_flag = bs_read_u(b, 1);
	std::cout << "vui_parameters_present_flag:" << vui_parameters_present_flag << std::endl;
	if (vui_parameters_present_flag) {
		vui_parameters();
	}
	bs_free(b);
}

 通过解析我们可以发现SPS序列参数集里面包含以下内容:

(1)、profile_idc,指明所需要的profile

(2)、level_idc,指明所需要的level

(3)、sps的id,后面pps根据sps的id找到对应的sps

(4)、max_num_ref_frames用于参考帧的最大数目

(5)、图像的宽pic_width_in_mbs_minus1和高pic_height_in_map_units_minus1,计算方法width = (pic_width_in_mbs_minus1+1)*16 。height = (pic_height_in_map_units_minus1+1)*16

(6)、video_full_range_flag ,表示video range还是full fange

(7)、帧速率,每一帧之间的间隔

(8)、 frame_mbs_only_flag,宏块编码方式,为1表示所有宏块都是用帧编码,为0表示可能使用帧编码也可能使用场编码

(9)、log2_max_pic_order_cnt_lsb_minus4,表示POC的上限

(10)、pic_order_cnt_type,指明poc的编码方式,poc标识图像的播放顺序

等等

具体可以参考下面两篇文章

H264___sps_pps___分析_郭风朴(guofengpu)的Android影音专栏-程序员宅基地

H264参数结构三:序列参数集层(SPS) & 图像参数集语义_heanyu的专栏-程序员宅基地

3、解析PPS

PPS:图像参数集,具体内容如下

具体代码如下所示

// 一个bit 1,若干个bit 0
void rbsp_trailing_bits() {
		int rbsp_stop_one_bit = bs_read_u1(b); // equal to 1
		std::cout << "rbsp_stop_one_bit:" << rbsp_stop_one_bit << std::endl;
		while (!bs_byte_aligned(b)){
			int rbsp_alignment_zero_bit = bs_read_u1(b); // equal to 0
		}
}

// 是不是有更多的RBSP数据
uint32_t more_rbsp_data() {
	if (bs_eof(b)) { return 0; }
	if (bs_peek_u1(b) == 1) { return 0; } // if next bit is 1, we've reached the stop bit
	return 1;
}

void ParsePPS(uint8_t* buffer, int len) {
	std::cout << "=========================PPS=======================" << std::endl;
	std::vector<uint8_t> ebsp = EBSP2RBSP(buffer, len);
	// std::cout << "pps buffer len:" << ebsp.size() << std::endl;
	b = bs_new(ebsp.data(), ebsp.size());
	std::cout << "forbidden_zero_bit :" << bs_read_u(b, 1) << std::endl;
	std::cout << "nal_ref_idc:" << bs_read_u(b, 2) << std::endl;
	std::cout << "nal_unit_type:" << bs_read_u(b, 5) << std::endl;
	std::cout << "pic_parameter_set_id:" << bs_read_ue(b) << std::endl;
	std::cout << "seq_parameter_set_id:" << bs_read_ue(b) << std::endl;
	std::cout << "entropy_coding_mode_flag:" << bs_read_u1(b) << std::endl;
	std::cout << "bottom_field_pic_order_in_frame_present_flag:" << bs_read_u1(b) << std::endl;
	uint32_t num_slice_groups_minus1 = bs_read_ue(b);
	std::cout << "num_slice_groups_minus1:" << num_slice_groups_minus1 << std::endl;
	if (num_slice_groups_minus1 > 0) {
		uint32_t slice_group_map_type = bs_read_ue(b);
		std::cout << "  slice_group_map_type:" << slice_group_map_type << std::endl;
		if (slice_group_map_type == 0) {
			uint32_t run_length_minus1[8];
			for (int iGroup = 0; iGroup <= num_slice_groups_minus1; iGroup++) {
				run_length_minus1[iGroup] = bs_read_ue(b);
			}
		}
		else if (slice_group_map_type == 2) {
			uint32_t top_left[8];
			uint32_t bottom_right[8];
			for (int iGroup = 0; iGroup < num_slice_groups_minus1; iGroup++) {
				top_left[iGroup] = bs_read_ue(b);
				bottom_right[iGroup] = bs_read_ue(b);
			}
		}
		else if (slice_group_map_type == 3 ||
			slice_group_map_type == 4 ||
			slice_group_map_type == 5) {
			std::cout << "    slice_group_change_direction_flag:" << bs_read_u1(b) << std::endl;
			std::cout << "    slice_group_change_rate_minus1:" << bs_read_ue(b) << std::endl;
		}
		else if (slice_group_map_type == 6) {
			uint32_t pic_size_in_map_units_minus1 = bs_read_ue(b);
			std::cout << "    pic_size_in_map_units_minus1:" << pic_size_in_map_units_minus1 << std::endl;
			uint32_t slice_group_id[8];
			for (int i = 0; i <= pic_size_in_map_units_minus1; i++) {
				slice_group_id[i] = bs_read_ue(b);
			}
		}
	}
	std::cout << "num_ref_idx_l0_default_active_minus1:" << bs_read_ue(b) << std::endl;
	std::cout << "num_ref_idx_l1_default_active_minus1:" << bs_read_ue(b) << std::endl;
	std::cout << "weighted_pred_flag:" << bs_read_u1(b) << std::endl;
	std::cout << "weighted_bipred_idc:" << bs_read_u(b,2) << std::endl;
	std::cout << "pic_init_qp_minus26:" << bs_read_se(b) << std::endl;
	std::cout << "pic_init_qs_minus26:" << bs_read_se(b) << std::endl;
	std::cout << "chroma_qp_index_offset:" << bs_read_se(b) << std::endl;
	std::cout << "deblocking_filter_control_present_flag:" << bs_read_u1(b) << std::endl;
	std::cout << "constrained_intra_pred_flag:" << bs_read_u1(b) << std::endl;
	std::cout << "redundant_pic_cnt_present_flag:" << bs_read_u1(b) << std::endl;
	if (more_rbsp_data()) {
		uint32_t transform_8x8_mode_flag = bs_read_u1(b);
		std::cout << "  transform_8x8_mode_flag:" << transform_8x8_mode_flag << std::endl;
		uint32_t pic_scaling_matrix_present_flag = bs_read_u1(b);
		std::cout << "  pic_scaling_matrix_present_flag:" << std::endl;
		uint32_t pic_scaling_list_present_flag[6];
		uint32_t* ScalingList4x4[12];
		uint32_t UseDefaultScalingMatrix4x4Flag[12];
		uint32_t* ScalingList8x8[12];
		uint32_t UseDefaultScalingMatrix8x8Flag[12];
		if (pic_scaling_matrix_present_flag) {
			for (int i = 0; i < 6 + ((chroma_format_idc != 3) ? 2 : 6) * transform_8x8_mode_flag; i++) {
				pic_scaling_list_present_flag[i] = bs_read_u1(b);
				if (pic_scaling_list_present_flag[i]) {
					if (i < 6) {
						scaling_list(ScalingList4x4[i], 16,
							UseDefaultScalingMatrix4x4Flag[i]);
					}
					else {
						scaling_list(ScalingList8x8[i - 6], 64,
							UseDefaultScalingMatrix8x8Flag[i - 6]);
					}
				}
			}
		}
		std::cout << "  second_chroma_qp_index_offset:" << bs_read_se(b) << std::endl;
	}
	rbsp_trailing_bits();
	bs_free(b);
}

 PPS里面主要包含以下内容

(1)、PPS的id

(2)、SPS的id

(3)、entropy_coding_mode_flag 熵编码的选择,为0表示使用CAVLC,为表示CABAC

(4)、num_slice_groups_minus1,加1表示图像中使用片组的个数

等等

当然,我们也可以不适用bs.h头文件,也可以自己写解析过程,主要就是bs_read_u1,bs_read_u,bs_read_u8,bs_read_ue,bs_read_se这几个函数

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/yp18792574062/article/details/104776931

智能推荐

c# 调用c++ lib静态库_c#调用lib-程序员宅基地

文章浏览阅读2w次,点赞7次,收藏51次。四个步骤1.创建C++ Win32项目动态库dll 2.在Win32项目动态库中添加 外部依赖项 lib头文件和lib库3.导出C接口4.c#调用c++动态库开始你的表演...①创建一个空白的解决方案,在解决方案中添加 Visual C++ , Win32 项目空白解决方案的创建:添加Visual C++ , Win32 项目这......_c#调用lib

deepin/ubuntu安装苹方字体-程序员宅基地

文章浏览阅读4.6k次。苹方字体是苹果系统上的黑体,挺好看的。注重颜值的网站都会使用,例如知乎:font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, W..._ubuntu pingfang

html表单常见操作汇总_html表单的处理程序有那些-程序员宅基地

文章浏览阅读159次。表单表单概述表单标签表单域按钮控件demo表单标签表单标签基本语法结构<form action="处理数据程序的url地址“ method=”get|post“ name="表单名称”></form><!--action,当提交表单时,向何处发送表单中的数据,地址可以是相对地址也可以是绝对地址--><!--method将表单中的数据传送给服务器处理,get方式直接显示在url地址中,数据可以被缓存,且长度有限制;而post方式数据隐藏传输,_html表单的处理程序有那些

PHP设置谷歌验证器(Google Authenticator)实现操作二步验证_php otp 验证器-程序员宅基地

文章浏览阅读1.2k次。使用说明:开启Google的登陆二步验证(即Google Authenticator服务)后用户登陆时需要输入额外由手机客户端生成的一次性密码。实现Google Authenticator功能需要服务器端和客户端的支持。服务器端负责密钥的生成、验证一次性密码是否正确。客户端记录密钥后生成一次性密码。下载谷歌验证类库文件放到项目合适位置(我这边放在项目Vender下面)https://github.com/PHPGangsta/GoogleAuthenticatorPHP代码示例://引入谷_php otp 验证器

【Python】matplotlib.plot画图横坐标混乱及间隔处理_matplotlib更改横轴间距-程序员宅基地

文章浏览阅读4.3k次,点赞5次,收藏11次。matplotlib.plot画图横坐标混乱及间隔处理_matplotlib更改横轴间距

docker — 容器存储_docker 保存容器-程序员宅基地

文章浏览阅读2.2k次。①Storage driver 处理各镜像层及容器层的处理细节,实现了多层数据的堆叠,为用户 提供了多层数据合并后的统一视图②所有 Storage driver 都使用可堆叠图像层和写时复制(CoW)策略③docker info 命令可查看当系统上的 storage driver主要用于测试目的,不建议用于生成环境。_docker 保存容器

随便推点

网络拓扑结构_网络拓扑csdn-程序员宅基地

文章浏览阅读834次,点赞27次,收藏13次。网络拓扑结构是指计算机网络中各组件(如计算机、服务器、打印机、路由器、交换机等设备)及其连接线路在物理布局或逻辑构型上的排列形式。这种布局不仅描述了设备间的实际物理连接方式,也决定了数据在网络中流动的路径和方式。不同的网络拓扑结构影响着网络的性能、可靠性、可扩展性及管理维护的难易程度。_网络拓扑csdn

JS重写Date函数,兼容IOS系统_date.prototype 将所有 ios-程序员宅基地

文章浏览阅读1.8k次,点赞5次,收藏8次。IOS系统Date的坑要创建一个指定时间的new Date对象时,通常的做法是:new Date("2020-09-21 11:11:00")这行代码在 PC 端和安卓端都是正常的,而在 iOS 端则会提示 Invalid Date 无效日期。在IOS年月日中间的横岗许换成斜杠,也就是new Date("2020/09/21 11:11:00")通常为了兼容IOS的这个坑,需要做一些额外的特殊处理,笔者在开发的时候经常会忘了兼容IOS系统。所以就想试着重写Date函数,一劳永逸,避免每次ne_date.prototype 将所有 ios

如何将EXCEL表导入plsql数据库中-程序员宅基地

文章浏览阅读5.3k次。方法一:用PLSQL Developer工具。 1 在PLSQL Developer的sql window里输入select * from test for update; 2 按F8执行 3 打开锁, 再按一下加号. 鼠标点到第一列的列头,使全列成选中状态,然后粘贴,最后commit提交即可。(前提..._excel导入pl/sql

Git常用命令速查手册-程序员宅基地

文章浏览阅读83次。Git常用命令速查手册1、初始化仓库git init2、将文件添加到仓库git add 文件名 # 将工作区的某个文件添加到暂存区 git add -u # 添加所有被tracked文件中被修改或删除的文件信息到暂存区,不处理untracked的文件git add -A # 添加所有被tracked文件中被修改或删除的文件信息到暂存区,包括untracked的文件...

分享119个ASP.NET源码总有一个是你想要的_千博二手车源码v2023 build 1120-程序员宅基地

文章浏览阅读202次。分享119个ASP.NET源码总有一个是你想要的_千博二手车源码v2023 build 1120

【C++缺省函数】 空类默认产生的6个类成员函数_空类默认产生哪些类成员函数-程序员宅基地

文章浏览阅读1.8k次。版权声明:转载请注明出处 http://blog.csdn.net/irean_lau。目录(?)[+]1、缺省构造函数。2、缺省拷贝构造函数。3、 缺省析构函数。4、缺省赋值运算符。5、缺省取址运算符。6、 缺省取址运算符 const。[cpp] view plain copy_空类默认产生哪些类成员函数

推荐文章

热门文章

相关标签