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

智能推荐

oracle 12c 集群安装后的检查_12c查看crs状态-程序员宅基地

文章浏览阅读1.6k次。安装配置gi、安装数据库软件、dbca建库见下:http://blog.csdn.net/kadwf123/article/details/784299611、检查集群节点及状态:[root@rac2 ~]# olsnodes -srac1 Activerac2 Activerac3 Activerac4 Active[root@rac2 ~]_12c查看crs状态

解决jupyter notebook无法找到虚拟环境的问题_jupyter没有pytorch环境-程序员宅基地

文章浏览阅读1.3w次,点赞45次,收藏99次。我个人用的是anaconda3的一个python集成环境,自带jupyter notebook,但在我打开jupyter notebook界面后,却找不到对应的虚拟环境,原来是jupyter notebook只是通用于下载anaconda时自带的环境,其他环境要想使用必须手动下载一些库:1.首先进入到自己创建的虚拟环境(pytorch是虚拟环境的名字)activate pytorch2.在该环境下下载这个库conda install ipykernelconda install nb__jupyter没有pytorch环境

国内安装scoop的保姆教程_scoop-cn-程序员宅基地

文章浏览阅读5.2k次,点赞19次,收藏28次。选择scoop纯属意外,也是无奈,因为电脑用户被锁了管理员权限,所有exe安装程序都无法安装,只可以用绿色软件,最后被我发现scoop,省去了到处下载XXX绿色版的烦恼,当然scoop里需要管理员权限的软件也跟我无缘了(譬如everything)。推荐添加dorado这个bucket镜像,里面很多中文软件,但是部分国外的软件下载地址在github,可能无法下载。以上两个是官方bucket的国内镜像,所有软件建议优先从这里下载。上面可以看到很多bucket以及软件数。如果官网登陆不了可以试一下以下方式。_scoop-cn

Element ui colorpicker在Vue中的使用_vue el-color-picker-程序员宅基地

文章浏览阅读4.5k次,点赞2次,收藏3次。首先要有一个color-picker组件 <el-color-picker v-model="headcolor"></el-color-picker>在data里面data() { return {headcolor: ’ #278add ’ //这里可以选择一个默认的颜色} }然后在你想要改变颜色的地方用v-bind绑定就好了,例如:这里的:sty..._vue el-color-picker

迅为iTOP-4412精英版之烧写内核移植后的镜像_exynos 4412 刷机-程序员宅基地

文章浏览阅读640次。基于芯片日益增长的问题,所以内核开发者们引入了新的方法,就是在内核中只保留函数,而数据则不包含,由用户(应用程序员)自己把数据按照规定的格式编写,并放在约定的地方,为了不占用过多的内存,还要求数据以根精简的方式编写。boot启动时,传参给内核,告诉内核设备树文件和kernel的位置,内核启动时根据地址去找到设备树文件,再利用专用的编译器去反编译dtb文件,将dtb还原成数据结构,以供驱动的函数去调用。firmware是三星的一个固件的设备信息,因为找不到固件,所以内核启动不成功。_exynos 4412 刷机

Linux系统配置jdk_linux配置jdk-程序员宅基地

文章浏览阅读2w次,点赞24次,收藏42次。Linux系统配置jdkLinux学习教程,Linux入门教程(超详细)_linux配置jdk

随便推点

matlab(4):特殊符号的输入_matlab微米怎么输入-程序员宅基地

文章浏览阅读3.3k次,点赞5次,收藏19次。xlabel('\delta');ylabel('AUC');具体符号的对照表参照下图:_matlab微米怎么输入

C语言程序设计-文件(打开与关闭、顺序、二进制读写)-程序员宅基地

文章浏览阅读119次。顺序读写指的是按照文件中数据的顺序进行读取或写入。对于文本文件,可以使用fgets、fputs、fscanf、fprintf等函数进行顺序读写。在C语言中,对文件的操作通常涉及文件的打开、读写以及关闭。文件的打开使用fopen函数,而关闭则使用fclose函数。在C语言中,可以使用fread和fwrite函数进行二进制读写。‍ Biaoge 于2024-03-09 23:51发布 阅读量:7 ️文章类型:【 C语言程序设计 】在C语言中,用于打开文件的函数是____,用于关闭文件的函数是____。

Touchdesigner自学笔记之三_touchdesigner怎么让一个模型跟着鼠标移动-程序员宅基地

文章浏览阅读3.4k次,点赞2次,收藏13次。跟随鼠标移动的粒子以grid(SOP)为partical(SOP)的资源模板,调整后连接【Geo组合+point spirit(MAT)】,在连接【feedback组合】适当调整。影响粒子动态的节点【metaball(SOP)+force(SOP)】添加mouse in(CHOP)鼠标位置到metaball的坐标,实现鼠标影响。..._touchdesigner怎么让一个模型跟着鼠标移动

【附源码】基于java的校园停车场管理系统的设计与实现61m0e9计算机毕设SSM_基于java技术的停车场管理系统实现与设计-程序员宅基地

文章浏览阅读178次。项目运行环境配置:Jdk1.8 + Tomcat7.0 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。项目技术:Springboot + mybatis + Maven +mysql5.7或8.0+html+css+js等等组成,B/S模式 + Maven管理等等。环境需要1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。_基于java技术的停车场管理系统实现与设计

Android系统播放器MediaPlayer源码分析_android多媒体播放源码分析 时序图-程序员宅基地

文章浏览阅读3.5k次。前言对于MediaPlayer播放器的源码分析内容相对来说比较多,会从Java-&amp;amp;gt;Jni-&amp;amp;gt;C/C++慢慢分析,后面会慢慢更新。另外,博客只作为自己学习记录的一种方式,对于其他的不过多的评论。MediaPlayerDemopublic class MainActivity extends AppCompatActivity implements SurfaceHolder.Cal..._android多媒体播放源码分析 时序图

java 数据结构与算法 ——快速排序法-程序员宅基地

文章浏览阅读2.4k次,点赞41次,收藏13次。java 数据结构与算法 ——快速排序法_快速排序法