FFMPeg代码分析:AVPacket结构体和av_read_frame函数-程序员宅基地

技术标签: 图像与音视频  

转自:http://blog.csdn.net/shaqoneal/article/details/16960927

AVPacket结构用于保存压缩编码过的数据。在解码时,该结构的实例通常作为解复用器(demuxer)的输出并输入到解码器中;在编码时,通常是编码器的输出,并输入到复用器(muxer)中。该结构体的定义如下:

  1. typedef struct AVPacket {  
  2.     /** 
  3.      * A reference to the reference-counted buffer where the packet data is 
  4.      * stored. 
  5.      * May be NULL, then the packet data is not reference-counted. 
  6.      */  
  7.     AVBufferRef *buf;  
  8.     /** 
  9.      * Presentation timestamp in AVStream->time_base units; the time at which 
  10.      * the decompressed packet will be presented to the user. 
  11.      * Can be AV_NOPTS_VALUE if it is not stored in the file. 
  12.      * pts MUST be larger or equal to dts as presentation cannot happen before 
  13.      * decompression, unless one wants to view hex dumps. Some formats misuse 
  14.      * the terms dts and pts/cts to mean something different. Such timestamps 
  15.      * must be converted to true pts/dts before they are stored in AVPacket. 
  16.      */  
  17.     int64_t pts;//显示时间戳  
  18.     /** 
  19.      * Decompression timestamp in AVStream->time_base units; the time at which 
  20.      * the packet is decompressed. 
  21.      * Can be AV_NOPTS_VALUE if it is not stored in the file. 
  22.      */  
  23.     int64_t dts;//解码时间戳  
  24.     uint8_t *data;//实例所包含的压缩数据,直接获取该指针指向缓存的数据可以得到压缩过的码流;  
  25.     int   size;//原始压缩数据的大小  
  26.     int   stream_index;//标识当前AVPacket所从属的码流  
  27.     /** 
  28.      * A combination of AV_PKT_FLAG values 
  29.      */  
  30.     int   flags;  
  31.     /** 
  32.      * Additional packet data that can be provided by the container. 
  33.      * Packet can contain several types of side information. 
  34.      */  
  35.     struct {  
  36.         uint8_t *data;  
  37.         int      size;  
  38.         enum AVPacketSideDataType type;  
  39.     } *side_data;  
  40.     int side_data_elems;  
  41.   
  42.     /** 
  43.      * Duration of this packet in AVStream->time_base units, 0 if unknown. 
  44.      * Equals next_pts - this_pts in presentation order. 
  45.      */  
  46.     int   duration;  
  47. #if FF_API_DESTRUCT_PACKET  
  48.     attribute_deprecated  
  49.     void  (*destruct)(struct AVPacket *);  
  50.     attribute_deprecated  
  51.     void  *priv;  
  52. #endif  
  53.     int64_t pos;                            ///< byte position in stream, -1 if unknown  
  54.   
  55.     /** 
  56.      * Time difference in AVStream->time_base units from the pts of this 
  57.      * packet to the point at which the output from the decoder has converged 
  58.      * independent from the availability of previous frames. That is, the 
  59.      * frames are virtually identical no matter if decoding started from 
  60.      * the very first frame or from this keyframe. 
  61.      * Is AV_NOPTS_VALUE if unknown. 
  62.      * This field is not the display duration of the current packet. 
  63.      * This field has no meaning if the packet does not have AV_PKT_FLAG_KEY 
  64.      * set. 
  65.      * 
  66.      * The purpose of this field is to allow seeking in streams that have no 
  67.      * keyframes in the conventional sense. It corresponds to the 
  68.      * recovery point SEI in H.264 and match_time_delta in NUT. It is also 
  69.      * essential for some types of subtitle streams to ensure that all 
  70.      * subtitles are correctly displayed after seeking. 
  71.      */  
  72.     int64_t convergence_duration;  
  73. } AVPacket;  
在demo中,调用了av_read_frame(pFormatCtx, &packet)函数从pFormatCtx所指向的环境的文件中读取压缩码流数据,保存到AVPacket实例packet中。av_read_frame()函数实现如下所示:
  1. int av_read_frame(AVFormatContext *s, AVPacket *pkt)  
  2. {  
  3.     const int genpts = s->flags & AVFMT_FLAG_GENPTS;  
  4.     int          eof = 0;  
  5.     int ret;  
  6.     AVStream *st;  
  7.   
  8.     if (!genpts) {  
  9.         ret = s->packet_buffer ?  
  10.             read_from_packet_buffer(&s->packet_buffer, &s->packet_buffer_end, pkt) :  
  11.             read_frame_internal(s, pkt);  
  12.         if (ret < 0)  
  13.             return ret;  
  14.         goto return_packet;  
  15.     }  
  16.   
  17.     for (;;) {  
  18.         AVPacketList *pktl = s->packet_buffer;  
  19.   
  20.         if (pktl) {  
  21.             AVPacket *next_pkt = &pktl->pkt;  
  22.   
  23.             if (next_pkt->dts != AV_NOPTS_VALUE) {  
  24.                 int wrap_bits = s->streams[next_pkt->stream_index]->pts_wrap_bits;  
  25.                 // last dts seen for this stream. if any of packets following  
  26.                 // current one had no dts, we will set this to AV_NOPTS_VALUE.  
  27.                 int64_t last_dts = next_pkt->dts;  
  28.                 while (pktl && next_pkt->pts == AV_NOPTS_VALUE) {  
  29.                     if (pktl->pkt.stream_index == next_pkt->stream_index &&  
  30.                         (av_compare_mod(next_pkt->dts, pktl->pkt.dts, 2LL << (wrap_bits - 1)) < 0)) {  
  31.                         if (av_compare_mod(pktl->pkt.pts, pktl->pkt.dts, 2LL << (wrap_bits - 1))) { //not b frame  
  32.                             next_pkt->pts = pktl->pkt.dts;  
  33.                         }  
  34.                         if (last_dts != AV_NOPTS_VALUE) {  
  35.                             // Once last dts was set to AV_NOPTS_VALUE, we don't change it.  
  36.                             last_dts = pktl->pkt.dts;  
  37.                         }  
  38.                     }  
  39.                     pktl = pktl->next;  
  40.                 }  
  41.                 if (eof && next_pkt->pts == AV_NOPTS_VALUE && last_dts != AV_NOPTS_VALUE) {  
  42.                     // Fixing the last reference frame had none pts issue (For MXF etc).  
  43.                     // We only do this when  
  44.                     // 1. eof.  
  45.                     // 2. we are not able to resolve a pts value for current packet.  
  46.                     // 3. the packets for this stream at the end of the files had valid dts.  
  47.                     next_pkt->pts = last_dts + next_pkt->duration;  
  48.                 }  
  49.                 pktl = s->packet_buffer;  
  50.             }  
  51.   
  52.             /* read packet from packet buffer, if there is data */  
  53.             if (!(next_pkt->pts == AV_NOPTS_VALUE &&  
  54.                   next_pkt->dts != AV_NOPTS_VALUE && !eof)) {  
  55.                 ret = read_from_packet_buffer(&s->packet_buffer,  
  56.                                                &s->packet_buffer_end, pkt);  
  57.                 goto return_packet;  
  58.             }  
  59.         }  
  60.   
  61.         ret = read_frame_internal(s, pkt);  
  62.         if (ret < 0) {  
  63.             if (pktl && ret != AVERROR(EAGAIN)) {  
  64.                 eof = 1;  
  65.                 continue;  
  66.             } else  
  67.                 return ret;  
  68.         }  
  69.   
  70.         if (av_dup_packet(add_to_pktbuf(&s->packet_buffer, pkt,  
  71.                           &s->packet_buffer_end)) < 0)  
  72.             return AVERROR(ENOMEM);  
  73.     }  
  74.   
  75. return_packet:  
  76.   
  77.     st = s->streams[pkt->stream_index];  
  78.     if (st->skip_samples) {  
  79.         uint8_t *p = av_packet_new_side_data(pkt, AV_PKT_DATA_SKIP_SAMPLES, 10);  
  80.         if (p) {  
  81.             AV_WL32(p, st->skip_samples);  
  82.             av_log(s, AV_LOG_DEBUG, "demuxer injecting skip %d\n", st->skip_samples);  
  83.         }  
  84.         st->skip_samples = 0;  
  85.     }  
  86.   
  87.     if ((s->iformat->flags & AVFMT_GENERIC_INDEX) && pkt->flags & AV_PKT_FLAG_KEY) {  
  88.         ff_reduce_index(s, st->index);  
  89.         av_add_index_entry(st, pkt->pos, pkt->dts, 0, 0, AVINDEX_KEYFRAME);  
  90.     }  
  91.   
  92.     if (is_relative(pkt->dts))  
  93.         pkt->dts -= RELATIVE_TS_BASE;  
  94.     if (is_relative(pkt->pts))  
  95.         pkt->pts -= RELATIVE_TS_BASE;  
  96.   
  97.     return ret;  

上文中贴出了av_read_frame()函数的实现,现在更细致地分析一下其内部的实现流程。

av_read_frame()开始后,通常会调用read_frame_internal(s, pkt)函数:

  1. static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)  
  2. {  
  3.     int ret = 0, i, got_packet = 0;  
  4.   
  5.     av_init_packet(pkt);  
  6.   
  7.     while (!got_packet && !s->parse_queue) {  
  8.         AVStream *st;  
  9.         AVPacket cur_pkt;  
  10.   
  11.         /* read next packet */  
  12.         ret = ff_read_packet(s, &cur_pkt);  
  13.         if (ret < 0) {  
  14.             if (ret == AVERROR(EAGAIN))  
  15.                 return ret;  
  16.             /* flush the parsers */  
  17.             for(i = 0; i < s->nb_streams; i++) {  
  18.                 st = s->streams[i];  
  19.                 if (st->parser && st->need_parsing)  
  20.                     parse_packet(s, NULL, st->index);  
  21.             }  
  22.             /* all remaining packets are now in parse_queue => 
  23.              * really terminate parsing */  
  24.             break;  
  25.         }  
  26.         ret = 0;  
  27.         st  = s->streams[cur_pkt.stream_index];  
  28.   
  29.         if (cur_pkt.pts != AV_NOPTS_VALUE &&  
  30.             cur_pkt.dts != AV_NOPTS_VALUE &&  
  31.             cur_pkt.pts < cur_pkt.dts) {  
  32.             av_log(s, AV_LOG_WARNING, "Invalid timestamps stream=%d, pts=%s, dts=%s, size=%d\n",  
  33.                    cur_pkt.stream_index,  
  34.                    av_ts2str(cur_pkt.pts),  
  35.                    av_ts2str(cur_pkt.dts),  
  36.                    cur_pkt.size);  
  37.         }  
  38.         if (s->debug & FF_FDEBUG_TS)  
  39.             av_log(s, AV_LOG_DEBUG, "ff_read_packet stream=%d, pts=%s, dts=%s, size=%d, duration=%d, flags=%d\n",  
  40.                    cur_pkt.stream_index,  
  41.                    av_ts2str(cur_pkt.pts),  
  42.                    av_ts2str(cur_pkt.dts),  
  43.                    cur_pkt.size,  
  44.                    cur_pkt.duration,  
  45.                    cur_pkt.flags);  
  46.   
  47.         if (st->need_parsing && !st->parser && !(s->flags & AVFMT_FLAG_NOPARSE)) {  
  48.             st->parser = av_parser_init(st->codec->codec_id);  
  49.             if (!st->parser) {  
  50.                 av_log(s, AV_LOG_VERBOSE, "parser not found for codec "  
  51.                        "%s, packets or times may be invalid.\n",  
  52.                        avcodec_get_name(st->codec->codec_id));  
  53.                 /* no parser available: just output the raw packets */  
  54.                 st->need_parsing = AVSTREAM_PARSE_NONE;  
  55.             } else if(st->need_parsing == AVSTREAM_PARSE_HEADERS) {  
  56.                 st->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES;  
  57.             } else if(st->need_parsing == AVSTREAM_PARSE_FULL_ONCE) {  
  58.                 st->parser->flags |= PARSER_FLAG_ONCE;  
  59.             } else if(st->need_parsing == AVSTREAM_PARSE_FULL_RAW) {  
  60.                 st->parser->flags |= PARSER_FLAG_USE_CODEC_TS;  
  61.             }  
  62.         }  
  63.   
  64.         if (!st->need_parsing || !st->parser) {  
  65.             /* no parsing needed: we just output the packet as is */  
  66.             *pkt = cur_pkt;  
  67.             compute_pkt_fields(s, st, NULL, pkt);  
  68.             if ((s->iformat->flags & AVFMT_GENERIC_INDEX) &&  
  69.                 (pkt->flags & AV_PKT_FLAG_KEY) && pkt->dts != AV_NOPTS_VALUE) {  
  70.                 ff_reduce_index(s, st->index);  
  71.                 av_add_index_entry(st, pkt->pos, pkt->dts, 0, 0, AVINDEX_KEYFRAME);  
  72.             }  
  73.             got_packet = 1;  
  74.         } else if (st->discard < AVDISCARD_ALL) {  
  75.             if ((ret = parse_packet(s, &cur_pkt, cur_pkt.stream_index)) < 0)  
  76.                 return ret;  
  77.         } else {  
  78.             /* free packet */  
  79.             av_free_packet(&cur_pkt);  
  80.         }  
  81.         if (pkt->flags & AV_PKT_FLAG_KEY)  
  82.             st->skip_to_keyframe = 0;  
  83.         if (st->skip_to_keyframe) {  
  84.             av_free_packet(&cur_pkt);  
  85.             if (got_packet) {  
  86.                 *pkt = cur_pkt;  
  87.             }  
  88.             got_packet = 0;  
  89.         }  
  90.     }  
  91.   
  92.     if (!got_packet && s->parse_queue)  
  93.         ret = read_from_packet_buffer(&s->parse_queue, &s->parse_queue_end, pkt);  
  94.   
  95.     if(s->debug & FF_FDEBUG_TS)  
  96.         av_log(s, AV_LOG_DEBUG, "read_frame_internal stream=%d, pts=%s, dts=%s, size=%d, duration=%d, flags=%d\n",  
  97.             pkt->stream_index,  
  98.             av_ts2str(pkt->pts),  
  99.             av_ts2str(pkt->dts),  
  100.             pkt->size,  
  101.             pkt->duration,  
  102.             pkt->flags);  
  103.   
  104.     return ret;  
  105. }  
首先调用av_init_packet(pkt)对pkt进行初始化:
  1. void av_init_packet(AVPacket *pkt)  
  2. {  
  3.     pkt->pts                  = AV_NOPTS_VALUE;  
  4.     pkt->dts                  = AV_NOPTS_VALUE;  
  5.     pkt->pos                  = -1;  
  6.     pkt->duration             = 0;  
  7.     pkt->convergence_duration = 0;  
  8.     pkt->flags                = 0;  
  9.     pkt->stream_index         = 0;  
  10. #if FF_API_DESTRUCT_PACKET  
  11. FF_DISABLE_DEPRECATION_WARNINGS  
  12.     pkt->destruct             = NULL;  
  13. FF_ENABLE_DEPRECATION_WARNINGS  
  14. #endif  
  15.     pkt->buf                  = NULL;  
  16.     pkt->side_data            = NULL;  
  17.     pkt->side_data_elems      = 0;  
  18. }  
该函数将pts、dts设为AV_NOPTS_VALUE,将pos初始化为-1,将其他参数设为0或空值;随后在一个while循环中,调用ff_read_packet函数读取数据:
  1. int ff_read_packet(AVFormatContext *s, AVPacket *pkt)  
  2. {  
  3.     int ret, i, err;  
  4.     AVStream *st;  
  5.   
  6.     for(;;){  
  7.         AVPacketList *pktl = s->raw_packet_buffer;  
  8.   
  9.         if (pktl) {  
  10.             *pkt = pktl->pkt;  
  11.             st = s->streams[pkt->stream_index];  
  12.             if (s->raw_packet_buffer_remaining_size <= 0) {  
  13.                 if ((err = probe_codec(s, st, NULL)) < 0)  
  14.                     return err;  
  15.             }  
  16.             if(st->request_probe <= 0){  
  17.                 s->raw_packet_buffer = pktl->next;  
  18.                 s->raw_packet_buffer_remaining_size += pkt->size;  
  19.                 av_free(pktl);  
  20.                 return 0;  
  21.             }  
  22.         }  
  23.   
  24.         pkt->data = NULL;  
  25.         pkt->size = 0;  
  26.         av_init_packet(pkt);  
  27.         ret= s->iformat->read_packet(s, pkt);  
  28.         if (ret < 0) {  
  29.             if (!pktl || ret == AVERROR(EAGAIN))  
  30.                 return ret;  
  31.             for (i = 0; i < s->nb_streams; i++) {  
  32.                 st = s->streams[i];  
  33.                 if (st->probe_packets) {  
  34.                     if ((err = probe_codec(s, st, NULL)) < 0)  
  35.                         return err;  
  36.                 }  
  37.                 av_assert0(st->request_probe <= 0);  
  38.             }  
  39.             continue;  
  40.         }  
  41.   
  42.         if ((s->flags & AVFMT_FLAG_DISCARD_CORRUPT) &&  
  43.             (pkt->flags & AV_PKT_FLAG_CORRUPT)) {  
  44.             av_log(s, AV_LOG_WARNING,  
  45.                    "Dropped corrupted packet (stream = %d)\n",  
  46.                    pkt->stream_index);  
  47.             av_free_packet(pkt);  
  48.             continue;  
  49.         }  
  50.   
  51.         if(!(s->flags & AVFMT_FLAG_KEEP_SIDE_DATA))  
  52.             av_packet_merge_side_data(pkt);  
  53.   
  54.         if(pkt->stream_index >= (unsigned)s->nb_streams){  
  55.             av_log(s, AV_LOG_ERROR, "Invalid stream index %d\n", pkt->stream_index);  
  56.             continue;  
  57.         }  
  58.   
  59.         st= s->streams[pkt->stream_index];  
  60.         pkt->dts = wrap_timestamp(st, pkt->dts);  
  61.         pkt->pts = wrap_timestamp(st, pkt->pts);  
  62.   
  63.         force_codec_ids(s, st);  
  64.   
  65.         /* TODO: audio: time filter; video: frame reordering (pts != dts) */  
  66.         if (s->use_wallclock_as_timestamps)  
  67.             pkt->dts = pkt->pts = av_rescale_q(av_gettime(), AV_TIME_BASE_Q, st->time_base);  
  68.   
  69.         if(!pktl && st->request_probe <= 0)  
  70.             return ret;  
  71.   
  72.         add_to_pktbuf(&s->raw_packet_buffer, pkt, &s->raw_packet_buffer_end);  
  73.         s->raw_packet_buffer_remaining_size -= pkt->size;  
  74.   
  75.         if ((err = probe_codec(s, st, pkt)) < 0)  
  76.             return err;  
  77.     }  
  78. }  
该函数从AVFormatContext指针格式的媒体文件句柄中读取待解码数据,并储存于AVPacket实例中。当读取成功时返回0,读取失败则返回AVERROR值。
该函数调用av_init_packet对参数pkg初始化,并调用iformat的方法read_packet读取数据。在本demo中,AVFormatContext实例中iformat成员为ff_mov_demuxer,如下所示:
  1. AVInputFormat ff_mov_demuxer = {  
  2.     .name           = "mov,mp4,m4a,3gp,3g2,mj2",  
  3.     .long_name      = NULL_IF_CONFIG_SMALL("QuickTime / MOV"),  
  4.     .priv_data_size = sizeof(MOVContext),  
  5.     .read_probe     = mov_probe,  
  6.     .read_header    = mov_read_header,  
  7.     .read_packet    = mov_read_packet,  
  8.     .read_close     = mov_read_close,  
  9.     .read_seek      = mov_read_seek,  
  10.     .priv_class     = &mov_class,  
  11.     .flags          = AVFMT_NO_BYTE_SEEK,  
  12. };  
其read_packet指针指向mov_read_packet函数,这个函数的内容也比较长,暂时就不贴了,有时间慢慢分析。
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/hjwang1/article/details/17956953

智能推荐

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_空类默认产生哪些类成员函数

推荐文章

热门文章

相关标签