当前位置: 首页 > news >正文

【FFmpeg】AVIOContext结构体

【FFmpeg】AVIOContext结构体

  • 1.AVIOContext结构体的定义

参考:
FFMPEG结构体分析:AVIOContext

示例工程:
【FFmpeg】调用ffmpeg库实现264软编
【FFmpeg】调用ffmpeg库实现264软解
【FFmpeg】调用ffmpeg库进行RTMP推流和拉流
【FFmpeg】调用ffmpeg库进行SDL2解码后渲染

流程分析:
【FFmpeg】编码链路上主要函数的简单分析
【FFmpeg】解码链路上主要函数的简单分析

结构体分析:
【FFmpeg】AVCodec结构体
【FFmpeg】AVCodecContext结构体
【FFmpeg】AVStream结构体
【FFmpeg】AVFormatContext结构体

1.AVIOContext结构体的定义

AVIOContext定义了输入输出上下文之中的信息,涉及到码流的输入输出,是非常重要的结构体,位于libavformat\avio.h中,定义如下

/*** Bytestream IO Context.* New public fields can be added with minor version bumps.* Removal, reordering and changes to existing public fields require* a major version bump.* sizeof(AVIOContext) must not be used outside libav*.** @note None of the function pointers in AVIOContext should be called*       directly, they should only be set by the client application*       when implementing custom I/O. Normally these are set to the*       function pointers specified in avio_alloc_context()*/
// 码流输入输出的上下文
// @note AVIOContext中的所有函数指针都不应该被直接调用,它们只应该由客户端应用程序在实现自定义I/O时设置
// 通常将这些设置为avio_alloc_context()中指定的函数指针
typedef struct AVIOContext {/*** A class for private options.** If this AVIOContext is created by avio_open2(), av_class is set and* passes the options down to protocols.** If this AVIOContext is manually allocated, then av_class may be set by* the caller.** warning -- this field can be NULL, be sure to not pass this AVIOContext* to any av_opt_* functions in that case.*/// 用于私有配置的选项// 如果这个AVIOContext是由avio_open2创建的,设置av_class并将选项向下传递给协议// 如果这个AVIOContext是手动分配的,那么av_class可以由调用者设置// warning: 这个字段可以为NULL,在这种情况下,请确保不要将这个AVIOContext传递给任何av_opt_*函数const AVClass *av_class;/** The following shows the relationship between buffer, buf_ptr,* buf_ptr_max, buf_end, buf_size, and pos, when reading and when writing* (since AVIOContext is used for both):************************************************************************************                                   READING************************************************************************************                            |              buffer_size              |*                            |---------------------------------------|*                            |                                       |**                         buffer          buf_ptr       buf_end*                            +---------------+-----------------------+*                            |/ / / / / / / /|/ / / / / / /|         |*  read buffer:              |/ / consumed / | to be read /|         |*                            |/ / / / / / / /|/ / / / / / /|         |*                            +---------------+-----------------------+**                                                         pos*              +-------------------------------------------+-----------------+*  input file: |                                           |                 |*              +-------------------------------------------+-----------------+*************************************************************************************                                   WRITING************************************************************************************                             |          buffer_size                 |*                             |--------------------------------------|*                             |                                      |**                                                buf_ptr_max*                          buffer                 (buf_ptr)       buf_end*                             +-----------------------+--------------+*                             |/ / / / / / / / / / / /|              |*  write buffer:              | / / to be flushed / / |              |*                             |/ / / / / / / / / / / /|              |*                             +-----------------------+--------------+*                               buf_ptr can be in this*                               due to a backward seek**                            pos*               +-------------+----------------------------------------------+*  output file: |             |                                              |*               +-------------+----------------------------------------------+**/// buffer的起始地址unsigned char *buffer;  /**< Start of the buffer. */// 最大的buffer大小int buffer_size;        /**< Maximum buffer size */// 当前buffer指针指向的位置unsigned char *buf_ptr; /**< Current position in the buffer */// 如果read函数返回的数据少于请求,则数据的结束值可能小于buffer+buffer_size,例如,对于尚未接收到更多数据的流// 当前buffer指针的末尾unsigned char *buf_end; /**< End of the data, may be less thanbuffer+buffer_size if the read function returnedless data than requested, e.g. for streams whereno more data has been received yet. */// 私有指针,传递给read/write/seek/… 函数void *opaque;           /**< A private pointer, passed to the read/write/seek/...functions. */// 读取packetint (*read_packet)(void *opaque, uint8_t *buf, int buf_size);// 写入packetint (*write_packet)(void *opaque, const uint8_t *buf, int buf_size);// 查找int64_t (*seek)(void *opaque, int64_t offset, int whence);// 当前缓冲区在文件中的位置int64_t pos;            /**< position in the file of the current buffer */// 如果由于错误或eof而无法读取,则为Trueint eof_reached;        /**< true if was unable to read due to error or eof */// 错误码int error;              /**< contains the error code or 0 if no error happened */// 如果是写入状态,则置为trueint write_flag;         /**< true if open for writing */// 最大的packet大小int max_packet_size;// 最小的packet大小(在刷新数据之前,尝试至少缓冲这么多的数据)int min_packet_size;    /**< Try to buffer at least this amount of databefore flushing it. */// checksum用于验证数据完整性// 存储了校验值,以验证数据的完整性。通过将数据块的大小累加到checksum,然后对结果进行按位反转来实现的// 这个机制主要用于检测数据传输过程中可能发生的错误,尤其是在网络传输或文件读写中unsigned long checksum;unsigned char *checksum_ptr;unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size);/*** Pause or resume playback for network streaming protocols - e.g. MMS.*/// 暂停或恢复网络流协议的播放int (*read_pause)(void *opaque, int pause);/*** Seek to a given timestamp in stream with the specified stream_index.* Needed for some network streaming protocols which don't support seeking* to byte position.*/// 使用指定的stream_index在流中查找给定的时间戳// 需要一些网络流协议,不支持寻求字节位置int64_t (*read_seek)(void *opaque, int stream_index,int64_t timestamp, int flags);/*** A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.*//*流查找的行为,有两个定义* Seeking works like for a local file.#define AVIO_SEEKABLE_NORMAL (1 << 0)* Seeking by timestamp with avio_seek_time() is possible.#define AVIO_SEEKABLE_TIME   (1 << 1)*/int seekable;/*** avio_read and avio_write should if possible be satisfied directly* instead of going through a buffer, and avio_seek will always* call the underlying seek function directly.*/// 如果可能的话,应该直接满足Avio_read和avio_write,而不是通过缓冲区,avio_seek将始终直接调用底层的seek函数int direct;/*** ',' separated list of allowed protocols.*/// 协议的白名单const char *protocol_whitelist;/*** ',' separated list of disallowed protocols.*/// 协议的黑名单const char *protocol_blacklist;/*** A callback that is used instead of write_packet.*/// 一个用来代替write_packet的回调int (*write_data_type)(void *opaque, const uint8_t *buf, int buf_size,enum AVIODataMarkerType type, int64_t time);/*** If set, don't call write_data_type separately for AVIO_DATA_MARKER_BOUNDARY_POINT,* but ignore them and treat them as AVIO_DATA_MARKER_UNKNOWN (to avoid needlessly* small chunks of data returned from the callback).*/// 如果设置了,不要为AVIO_DATA_MARKER_BOUNDARY_POINT单独调用write_data_type,// 而是忽略它们并将它们视为AVIO_DATA_MARKER_UNKNOWN(以避免从回调返回不必要的小块数据)int ignore_boundary_point;/*** Maximum reached position before a backward seek in the write buffer,* used keeping track of already written data for a later flush.*/// 写缓冲区中向后寻道之前达到的最大位置,用于跟踪已写入的数据,以便以后刷新unsigned char *buf_ptr_max;/*** Read-only statistic of bytes read for this AVIOContext.*/// 只读统计为该AVIOContext读取的字节数int64_t bytes_read;/*** Read-only statistic of bytes written for this AVIOContext.*/// 只读统计写入该AVIOContext的字节数。int64_t bytes_written;
} AVIOContext;

AVIOContext当中比较重要的信息包括:
(1)unsigned char *buffer:buffer的起始地址
(2)int buffer_size:buffer的大小
(3)unsigned char *buf_ptr:buffer当前的指针
(4)unsigned char *buf_end:buffer末尾的地址
(5)void *opaque:URLContext
(6)int (*read_packet)(void *opaque, uint8_t *buf, int buf_size):读取packet
(7)int (*write_packet)(void *opaque, const uint8_t *buf, int buf_size):写入packet
(8)int64_t (*seek)(void *opaque, int64_t offset, int whence):定位查找
(9)unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size):更新校验信息checksum
(10)int (*read_pause)(void *opaque, int pause):暂停流的读取
(11)const char *protocol_XXXlist:协议的黑白名单

相对比于雷博记录的内容,新版本的AVIOContext增加的比较重要的是协议的黑白名单,白名单当中的protocol表示可用,黑名单当中的protocol表示不可用。在解码的时候,buffer会存储FFmpeg读取的数据,例如解码已经编码好的.h264文件。

URLContext的定义如下,位于libavformat\url.h中

typedef struct URLContext {const AVClass *av_class;    /**< information for av_log(). Set by url_open(). */const struct URLProtocol *prot;void *priv_data;char *filename;             /**< specified URL */int flags;int max_packet_size;        /**< if non zero, the stream is packetized with this max packet size */int is_streamed;            /**< true if streamed (no seek possible), default = false */int is_connected;AVIOInterruptCB interrupt_callback;int64_t rw_timeout;         /**< maximum time to wait for (network) read/write operation completion, in mcs */const char *protocol_whitelist;const char *protocol_blacklist;int min_packet_size;        /**< if non zero, the stream is packetized with this min packet size */
} URLContext;

相对于老版本的FFmpeg,这里一个比较大的改变是增加了protocol的黑白名单。URLProtocol的定义如下,同样位于libavformat\url.h中

typedef struct URLProtocol {const char *name;int     (*url_open)( URLContext *h, const char *url, int flags);/*** This callback is to be used by protocols which open further nested* protocols. options are then to be passed to ffurl_open_whitelist()* or ffurl_connect() for those nested protocols.*/// 此回调将由打开进一步嵌套协议的协议使用。然后将这些嵌套协议的选项传递给ffurl_open_whitelist()或ffurl_connect()int     (*url_open2)(URLContext *h, const char *url, int flags, AVDictionary **options);int     (*url_accept)(URLContext *s, URLContext **c);int     (*url_handshake)(URLContext *c);/*** Read data from the protocol.* If data is immediately available (even less than size), EOF is* reached or an error occurs (including EINTR), return immediately.* Otherwise:* In non-blocking mode, return AVERROR(EAGAIN) immediately.* In blocking mode, wait for data/EOF/error with a short timeout (0.1s),* and return AVERROR(EAGAIN) on timeout.* Checking interrupt_callback, looping on EINTR and EAGAIN and until* enough data has been read is left to the calling function; see* retry_transfer_wrapper in avio.c.*/// 从protocol读取数据// 如果数据立即可用(甚至小于大小),达到EOF或发生错误(包括EINTR),则立即返回// 在非阻塞模式下,立即返回AVERROR(EAGAIN)。在阻塞模式下,等待数据/EOF/错误有一个短超时(0.1s),并在超时时返回AVERROR(EAGAIN)// 检查interrupt_callback,在EINTR和EAGAIN上循环,直到有足够的数据被读取给调用函数;参见avio.c中的retry_transfer_wrapperint     (*url_read)( URLContext *h, unsigned char *buf, int size);int     (*url_write)(URLContext *h, const unsigned char *buf, int size);int64_t (*url_seek)( URLContext *h, int64_t pos, int whence);int     (*url_close)(URLContext *h);int (*url_read_pause)(void *urlcontext, int pause);int64_t (*url_read_seek)(void *urlcontext, int stream_index,int64_t timestamp, int flags);int (*url_get_file_handle)(URLContext *h);int (*url_get_multi_file_handle)(URLContext *h, int **handles,int *numhandles);int (*url_get_short_seek)(URLContext *h);int (*url_shutdown)(URLContext *h, int flags);const AVClass *priv_data_class;int priv_data_size;int flags;// 相对比于老版本的FFmpeg,这里还增加了dir的操作int (*url_check)(URLContext *h, int mask);int (*url_open_dir)(URLContext *h);int (*url_read_dir)(URLContext *h, AVIODirEntry **next);int (*url_close_dir)(URLContext *h);int (*url_delete)(URLContext *h);int (*url_move)(URLContext *h_src, URLContext *h_dst);const char *default_whitelist;
} URLProtocol;

在实际的结构体定义如下所示,定义是file的protocol,其中还定义了白名单为"file,crypto,data"

const URLProtocol ff_file_protocol = {.name                = "file",.url_open            = file_open,.url_read            = file_read,.url_write           = file_write,.url_seek            = file_seek,.url_close           = file_close,.url_get_file_handle = file_get_handle,.url_check           = file_check,.url_delete          = file_delete,.url_move            = file_move,.priv_data_size      = sizeof(FileContext),.priv_data_class     = &file_class,.url_open_dir        = file_open_dir,.url_read_dir        = file_read_dir,.url_close_dir       = file_close_dir,.default_whitelist   = "file,crypto,data"
};

又比如tcp的protocol,不过这里没有定义默认的白名单

const URLProtocol ff_tcp_protocol = {.name                = "tcp",.url_open            = tcp_open,.url_accept          = tcp_accept,.url_read            = tcp_read,.url_write           = tcp_write,.url_close           = tcp_close,.url_get_file_handle = tcp_get_file_handle,.url_get_short_seek  = tcp_get_window_size,.url_shutdown        = tcp_shutdown,.priv_data_size      = sizeof(TCPContext),.flags               = URL_PROTOCOL_FLAG_NETWORK,.priv_data_class     = &tcp_class,
};

CSDN : https://blog.csdn.net/weixin_42877471
Github : https://github.com/DoFulangChen

相关文章:

【FFmpeg】AVIOContext结构体

【FFmpeg】AVIOContext结构体 1.AVIOContext结构体的定义 参考&#xff1a; FFMPEG结构体分析&#xff1a;AVIOContext 示例工程&#xff1a; 【FFmpeg】调用ffmpeg库实现264软编 【FFmpeg】调用ffmpeg库实现264软解 【FFmpeg】调用ffmpeg库进行RTMP推流和拉流 【FFmpeg】调用…...

Python控制结构

文章目录 控制结构1. 条件语句1.1 if语句1.2 elif语句1.3 else 语句 2. 循环语句2.1 for循环2.2 while循环 控制循环的语句3.1 break语句3.2 continue语句3.3 else语句与循环配合 控制结构 Python中的控制结构是指管理代码执行流程的语句和机制&#xff0c;包括条件语句、循环…...

OpenCV--图形轮廓

图形轮廓 图像轮廓查找轮廓绘制轮廓计算轮廓的面积和周长多边形逼近与凸包外接矩形 图像轮廓 import cv2 import numpy as np""" 图形轮廓--具有相同颜色或灰度的连续点的曲线 用于图形分析和物体的识别和检测 注意&#xff1a;为了检测的准确性&#xff0c;必…...

MYSQL通过EXPLAIN关键字来分析SQL查询的执行计划,判断是否命中了索引

在MySQL中&#xff0c;你可以通过EXPLAIN关键字来分析SQL查询的执行计划&#xff0c;从而判断是否命中了索引。 准备查询语句&#xff1a; 首先&#xff0c;你需要一个带有WHERE子句的SELECT查询&#xff0c;因为WHERE子句中的条件通常与索引相关联。例如&#xff1a; SELECT …...

clean code-代码整洁之道 阅读笔记(第十二章)

第十二章 系统 12.1 通过选进设计达到整洁目的 Kent Beck关于简单设计的四条规则&#xff0c;对于创建具有良好设计的软件有着莫大的帮助。 据Kent所述&#xff0c;只要遵循以下规则&#xff0c;设计就能变得"简单"&#xff1a;运行所有测试&#xff1b;不可重复&…...

FFmpeg YUV编码为H264

使用FFmpeg库把YUV420P文件编码为H264文件&#xff0c;FFmpeg版本为4.4.2-0。 需要yuv测试文件的&#xff0c;可以从我上传的MP4文件中用ffmpeg提取&#xff0c;命令如下&#xff1a; ffmpeg -i <input.mp4> -pix_fmt yuv420p <output.yuv> 代码如下&#xff1a;…...

【C语言】顺序表(上卷)

什么是数据结构&#xff1f; 数据结构是由“数据”和“结构”两词组合而来的。 数据需要管理。数据结构就是计算机存储、组织数据的方式。比如一个班级就是一个结构&#xff0c;管理的就是班级里的学生。如果我们要找三年2班的同学李华&#xff0c;就可以直接去三年2班找而不…...

Luma AI如何注册:文生视频领域的新星

文章目录 Luma AI如何注册&#xff1a;文生视频领域的新星一、Luma 注册方式二、Luma 的效果三、Luma 的优势四、Luma 的功能总结 Luma AI如何注册&#xff1a;文生视频领域的新星 近年来&#xff0c;Luma AI 凭借其在文生视频领域的创新技术&#xff0c;逐渐成为行业的新星。…...

一站式实时数仓Hologres整体能力介绍

讲师&#xff1a;阿里云Hologres PD丁烨 一、产品定位 随着技术的进步&#xff0c;大数据正从规模化转向实时化处理。用户对传统的T1分析已不满足&#xff0c;期望获得更高时效性的计算和分析能力。例如实时大屏&#xff0c;城市大脑的交通监控、风控和实时的个性化推荐&…...

如何在 Windows 上安装 Docker Desktop

如何在 Windows 上安装 Docker Desktop Docker 是一个开放平台&#xff0c;用于开发、部署和运行应用程序。Docker Desktop 是 Docker 在 Windows 和 macOS 上的官方客户端&#xff0c;它使得开发者能够轻松地在本地环境中构建、运行和共享容器化应用程序。本文将详细介绍如何…...

WPF由文本框输入的内容动态渲染下拉框

在做项目过程中&#xff0c;需要扫码枪扫描快递单号或者手动输入快递单号时&#xff0c;自动检索该单号是哪个快递公司的&#xff0c;下拉框中自动带出该单号的快递公司。当输入的快递单号不存在时&#xff0c;将数据库中所有快递公司都带出 效果&#xff1a; 通过输入的快递单…...

RPCMon:一款基于ETW的RPC监控工具

关于RPCMon RPCMon是一款基于事件跟踪的WindowsRPC监控工具&#xff0c;该工具是一款GUI工具&#xff0c;可以帮助广大研究人员通过ETW&#xff08;Event Tracing for Windows&#xff09;扫描RPC通信。 RPCMon能够为广大研究人员提供进程之间RPC通信的高级视图&#xff0c;该…...

【odoo】常用的字符转义:“>“,“<“,““,“/“等

概要 字符转义是指在编写代码或处理文本数据时&#xff0c;将特殊字符转换为另一种形式&#xff0c;以便在特定的上下文中正确解析和处理这些字符。 内容 特殊字符描述XML转义表示法&和符号&amp;<小于符号<>大于符号>"双引号&quot;单引号&ap…...

李宏毅深度学习项目——HW1个人笔记

视频链接 PDF链接 googleColab链接 GoogleColab是一个免费的jupyter notebook&#xff0c;可以用上面的gpu资源进行训练 题目 通过前两天的数据&#xff0c;预测第三天某个人感染新冠的概率 范例 导包 # Numerical Operations import math import numpy as np# Reading/Wr…...

3D Gaussian Splatting Windows安装

0.安装C++ 编译器 https://aka.ms/vs/17/release/vs_buildtools.exe 1.下载源码 git clone https://github.com/graphdeco-inria/gaussian-splatting --recursive 2.安装cuda NVIDIA GPU Computing Toolkit CUDA Toolkit Archive | NVIDIA Developer 3.安装COLMAP...

人脸识别——可解释的人脸识别(XFR)人脸识别模型是根据什么来识别个人的

可解释性人脸识别&#xff08;XFR&#xff09;&#xff1f; 人脸识别有一个任务叫1:N&#xff08;识别&#xff09;。这个任务将一个人的照片与N张注册照片进行比较&#xff0c;找出相似度最高的人。 这项任务用于刑事调查和出入境点。在犯罪调查中&#xff0c;任务从监控摄像…...

仓库管理系统的设计

管理员账户功能包括&#xff1a;系统首页&#xff0c;个人中心&#xff0c;管理员管理&#xff0c;公告管理&#xff0c;物资管理&#xff0c;基础数据管理&#xff0c;用户管理 用户账户功能包括&#xff1a;系统首页&#xff0c;个人中心&#xff0c;公告管理&#xff0c;物…...

最火AI角色扮演流量已达谷歌搜索20%!每秒处理2万推理请求,Transformer作者公开优化秘诀

卡奥斯智能交互引擎是卡奥斯基于海尔近40年工业生产经验积累和卡奥斯7年工业互联网平台建设的最佳实践&#xff0c;基于大语言模型和RAG技术&#xff0c;集合海量工业领域生态资源方优质产品和知识服务&#xff0c;旨在通过智能搜索、连续交互&#xff0c;实时生成个性化的内容…...

MySQL:MySQL分组排序函数rank()、row_number()、dense_rank()与partition by结合使用

一、前言 在 MySQL 中&#xff0c;虽然标准的 SQL 函数 RANK(), ROW_NUMBER(), 和 DENSE_RANK() 是 SQL 标准的一部分&#xff0c;但早期的 MySQL 版本并不直接支持这些窗口函数。然而&#xff0c;从 MySQL 8.0 开始&#xff0c;这些函数被引入以支持窗口函数&#xff08;也称为…...

opencv c++ 检测图像尺寸大小,标注轮廓

1. 项目背景 本项目旨在开发一个图像处理程序&#xff0c;通过使用计算机视觉技术&#xff0c;能够自动检测图像中物体的尺寸并进行分类。项目利用了开源的计算机视觉库 OpenCV&#xff0c;实现了图像的灰度处理、二值化、轮廓检测、边界框绘制以及尺寸分类等功能。通过这些功…...

Python数据可视化基础:使用Matplotlib绘制图表

Python数据可视化基础&#xff1a;使用Matplotlib绘制图表 数据可视化是数据分析中的重要环节&#xff0c;它可以帮助我们更直观地理解数据。Python作为一门强大的编程语言&#xff0c;提供了多种库来支持数据可视化&#xff0c;其中Matplotlib是最为流行和功能丰富的库之一。…...

Java开发接口设计的原则

在现代软件开发实践中&#xff0c;接口设计扮演着至关重要的角色。它不仅关乎代码的结构和未来的可维护性&#xff0c;还直接影响到软件系统的灵活性和扩展性。本文将通过实例详解几个核心的接口设计原则&#xff0c;帮助开发者更好地编写和管理接口&#xff0c;从而提升软件的…...

[火灾警报系统]yolov5_7.0-pyside6火焰烟雾识别源码

国内每年都会发生大大小小的火灾&#xff0c;造成生命、财产的损失。但是很多火灾如果能够早期发现&#xff0c;并及时提供灭火措施&#xff0c;将会大大较小损失。本套源码采用yolov5-7.0目标检测算法结合pyside6可视化界面源码&#xff0c;当检测到火灾时&#xff0c;能否发出…...

机器学习和深度学习区别

定义和范围&#xff1a; 机器学习&#xff1a;是一门多领域交叉学科&#xff0c;涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。它专门研究计算机怎样模拟或实现人类的学习行为&#xff0c;以获取新的知识或技能&#xff0c;重新组织已有的知识结构使之不断改…...

【功能详解】银河麒麟操作系统“安全启动”是如何发挥作用的?

2023年12月&#xff0c;财政部、工信部发布了7项信息类产品《政府采购需求标准》&#xff0c;为包括操作系统在内多项产品的政府集中采购提供政策支撑。其中&#xff0c;安全、可信作为国产操作系统的基本要求备受关注。 安全体系的构建离不开操作系统本身的硬实力&#xff0c…...

关于多线程的理解

#系列文章 关于时间复杂度o(1), o(n), o(logn), o(nlogn)的理解 关于HashMap的哈希碰撞、拉链法和key的哈希函数设计 关于JVM内存模型和堆内存模型的理解 关于代理模式的理解 关于Mysql基本概念的理解 关于软件设计模式的理解 关于Redis知识的理解 文章目录 前言一、线程…...

C语言 | Leetcode C语言题解之第155题最小栈

题目&#xff1a; 题解&#xff1a; //单调栈 单调递减 typedef struct {//正常 stackint stack[10000];int stackTop;//辅助 stackint minStack[10000];int minStackTop; } MinStack;MinStack* minStackCreate() {MinStack* newStack (MinStack *) malloc(sizeof(MinS…...

Qdrant 的基础教程

目录 安装Qdrant安装Qdrant客户端初始化Qdrant客户端创建集合&#xff08;Collection&#xff09;插入向量数据创建索引搜索向量清理资源 Qdrant是一个开源的向量数据库&#xff0c;它专注于高维向量的快速相似性搜索。以下是一个基础的Qdrant教程&#xff0c;帮助你开始使用Qd…...

任务4.8.3 利用SparkSQL统计每日新增用户

实战概述&#xff1a;利用SparkSQL统计每日新增用户 任务背景 在大数据时代&#xff0c;快速准确地统计每日新增用户是数据分析和业务决策的重要部分。本任务旨在使用Apache SparkSQL处理用户访问历史数据&#xff0c;以统计每日新增用户数量。 任务目标 处理用户访问历史数…...

DS知识点总结--线性表定义及顺序表示

数据结构知识点汇总(考研C版) 文章目录 数据结构知识点汇总(考研C版)二、线性表2.1 线性表的定义和操作2.1.1 线性表的定义2.1.2 线性表的基本操作 2.2 线性表的顺序表示2.2.1 顺序表的定义2.2.2 顺序表上的基本操作的实现 二、线性表 2.1 线性表的定义和操作 2.1.1 线性表的…...

互联科技 行业网站/抖音关键词用户搜索排名靠前

扩展rhel5.9下使用lvm管理的根分区 核心步骤&#xff1a; 添加sdb----->pvcreate----->vgextend----->lvextend----->resize2fs 文件系统信息如下&#xff1a; [rootrhel59 ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/mapper/VolGr…...

小红书怎么推广自己的产品/seo教程论坛

很多时候&#xff0c;我们看问题&#xff0c;看人&#xff0c;看事情&#xff0c;都只是看到了表面&#xff0c;别人的成功&#xff0c;往往是在背后默默的付出很多的努力&#xff0c;才有了这么一点的成绩和收获&#xff0c;可是&#xff0c;我们当中却有很多人&#xff0c;自…...

西安装修公司排名十强/百度seo营销

以前同事问及为何数据库例程在监听器中状态为unnkown&#xff0c;这是何意&#xff0e;有何影响&#xff0e;查阅了资料&#xff0c;解决如下&#xff1a;# listener.ora Network Configuration File: E:\oracle\product\10.2.0\db_1\network\admin\listener.ora# Generated by…...

域名对网站排名的影响/外贸网站制作公司

我的这篇博客有详细的JSON规范格式说明。 JSON格式说明。这篇博客的内容摘录自RFC草案7159&#xff0c;所以权威性很高。 JSON是javascript中引用数据类型–对象的超集(子集:[超-出自java面相对象之继承之super关键词])。它的初衷是为了解决各个软件系统之间交换数据的需求。和…...

青岛网站开发建设/拼多多商品关键词搜索排名

栈上分配内存和回收都是自动的&#xff0c;不用程序员来处理 堆上分配内存有系列的函数或操作符 如c的 malloc vs free c的 new vs delete 这些内存的分配和释放由程序员来负责 引用的长篇大论开始了&#xff1a; 在C中&#xff0c;内存分成5个区&#xff0c;他们分别是堆、栈、…...

wordpress 清除/抖音指数

定义&#xff1a;定义一系列算法&#xff0c;将它们一个个封装起来&#xff0c;并且使他们之间可以相互替换。本模式使得算法可以独立于使用它的客户而变化。 类型&#xff1a;对象行为型模式 类图&#xff1a; 策略模式是对算法的封装&#xff0c;把一系列的算法分别封装到对应…...