Previously, the pkt_size option only affected write buffering in the file
protocol. This change extends its effect to read mode as well.
On embedded systems with limited RAM, users can now reduce I/O buffer
memory by setting a smaller pkt_size.
Signed-off-by: caifan3 <caifan3@xiaomi.com>
Add a "pkt_size" AVOption to the Unix domain socket protocol. This option
allows the user to specify the maximum packet size for packet-oriented
sockets (SOCK_DGRAM and SOCK_SEQPACKET).
Signed-off-by: caifan3 <caifan3@xiaomi.com>
This option allows the user to specify the maximum packet size for packet-oriented
sockets (SOCK_DGRAM and SOCK_SEQPACKET).
For SOCK_STREAM, it sets the I/O buffer size to reduce memory usage.
Signed-off-by: caifan3 <caifan3@xiaomi.com>
fmpeg/libavformat/cache.c:130:52: warning: format '%lld' expects argument of type 'long long int', but argument 6 has type 'int64_t' {aka 'long int'} [-Wformat=]
130 | av_log(h, AV_LOG_INFO, "%s end ret %d bytes %lld %lldbps\n", __func__, ret, offset, bps);
| ~~~^ ~~~~~~
| | |
| long long int int64_t {aka long int}
| %ld
ffmpeg/libavformat/cache.c:130:57: warning: format '%lld' expects argument of type 'long long int', but argument 7 has type 'int64_t' {aka 'long int'} [-Wformat=]
130 | av_log(h, AV_LOG_INFO, "%s end ret %d bytes %lld %lldbps\n", __func__, ret, offset, bps);
| ~~~^ ~~~
| | |
| long long int int64_t {aka long int}
| %ld
ffmpeg/libavformat/cache.c: In function 'add_entry':
ffmpeg/libavformat/cache.c:200:66: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'int64_t' {aka 'long int'} [-Wformat=]
200 | av_log(h, AV_LOG_ERROR, "Failed to seek in cache, ret %lld errno %d\n", pos, errno);
| ~~~^ ~~~
| | |
| long long int int64_t {aka long int}
| %ld
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
_url_close does't called when init_input failed in avformat_open_input.
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
The min_packet_size/max_packet_size were hardcoded to 256KB for
performance. The new option makes it possible to configure a
smaller packet size on embedded devices with limited memory
resources.
Signed-off-by: yangsen5 <1441923451@qq.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
ffmpeg/libavdevice/nuttx.c:206:5: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Werror=implicit-function-declaration]
206 | close(fd);
| ^~~~~
| pclose
At top level:
ffmpeg/libavfilter/af_amix.c:727:5: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Werror=implicit-function-declaration]
727 | close(s->timer_fd);
| ^~~~~
| pclose
ffmpeg/libavfilter/af_amix.c: In function 'process_command':
ffmpeg/libavfilter/af_amix.c:806:13: error: implicit declaration of function 'read'; did you mean 'fread'? [-Werror=implicit-function-declaration]
806 | read(pollfd->fd, &exp, sizeof(exp));
| ^~~~
| fread
ffmpeg/libavfilter/sink_movie_async.c:82:5: error: unknown type name 'pthread_cond_t'
82 | pthread_cond_t cond;
| ^~~~~~~~~~~~~~
ffmpeg/libavfilter/sink_movie_async.c: In function 'moviesink_send_cmd':
ffmpeg/libavfilter/sink_movie_async.c:116:5: error: implicit declaration of function 'pthread_mutex_lock' [-Werror=implicit-function-declaration]
116 | pthread_mutex_lock(&priv->mutex);
| ^~~~~~~~~~~~~~~~~~
ffmpeg/libavfilter/sink_movie_async.c:118:5: error: implicit declaration of function 'pthread_cond_signal' [-Werror=implicit-function-declaration]
118 | pthread_cond_signal(&priv->cond);
| ^~~~~~~~~~~~~~~~~~~
ffmpeg/libavfilter/sink_movie_async.c:119:5: error: implicit declaration of function 'pthread_mutex_unlock'; did you mean 'nxrmutex_unlock'? [-Werror=implicit-function-declaration]
119 | pthread_mutex_unlock(&priv->mutex);
| ^~~~~~~~~~~~~~~~~~~~
| nxrmutex_unlock
ffmpeg/libavfilter/sink_movie_async.c: In function 'moviesink_thread':
ffmpeg/libavfilter/sink_movie_async.c:669:13: error: implicit declaration of function 'pthread_cond_wait' [-Werror=implicit-function-declaration]
669 | pthread_cond_wait(&priv->cond, &priv->mutex);
| ^~~~~~~~~~~~~~~~~
ffmpeg/libavfilter/sink_movie_async.c: In function 'moviesink_uninit':
ffmpeg/libavfilter/sink_movie_async.c:763:5: error: implicit declaration of function 'pthread_mutex_destroy'; did you mean 'nxrmutex_destroy'? [-Werror=implicit-function-declaration]
763 | pthread_mutex_destroy(&priv->mutex);
| ^~~~~~~~~~~~~~~~~~~~~
| nxrmutex_destroy
ffmpeg/libavfilter/sink_movie_async.c:764:5: error: implicit declaration of function 'pthread_cond_destroy' [-Werror=implicit-function-declaration]
Signed-off-by: anjiahao <anjiahao@xiaomi.com>