Commit Graph

14 Commits

Author SHA1 Message Date
mtdxc
4a2c4d0e98
处理seek offset为负数情况 (#4742)
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
DockerPy / build (push) Has been cancelled
Linux / build (push) Has been cancelled
Linux_Python / build (push) Has been cancelled
macOS / build (push) Has been cancelled
macOS_Python / build (push) Has been cancelled
Windows / build (push) Has been cancelled
Windows_Python / build (push) Has been cancelled
详见media-server的buffer实现, seek的语义和回调不一致,这边进行统一
static int mov_file_read(void* fp, void* data, uint64_t bytes)
{
    if (bytes == fread(data, 1, bytes, (FILE*)fp))
        return 0;
	return 0 != ferror((FILE*)fp) ? ferror((FILE*)fp) : -1 /*EOF*/;
}

static int mov_file_write(void* fp, const void* data, uint64_t bytes)
{
return bytes == fwrite(data, 1, bytes, (FILE*)fp) ? 0 :
ferror((FILE*)fp);
}

static int mov_file_seek(void* fp, int64_t offset)
{
	return fseek64((FILE*)fp, offset, offset >= 0 ? SEEK_SET : SEEK_END);
}

static int64_t mov_file_tell(void* fp)
{
	return ftell64((FILE*)fp);
}
2026-05-28 10:49:33 +08:00
alex
4152dcd409
AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00
夏楚
bbe8f4a018
release 8.0 2023-12-09 16:23:51 +08:00
XiaoYan Lin
cb0579a16d
新增支持hls-fmp4直播(#2603 #977 #1965)
同时主要优化点包括:
1、编译宏特性开关优化。
2、转协议复用器相关创建代码移动至Recorder类。
3、转协议复用器onAllTrackReady函数修改为addTrackCompleted。
4、startRecord/stopRecord/isRecording接口新增支持ts/fmp4/hls-fmp4协议。

Co-authored-by: xia-chu <771730766@qq.com>
Co-authored-by: linxiaoyan87 <linxiaoyan87@foxmail.com>
2023-07-02 12:02:33 +08:00
夏楚
c72cf4cbcc
整理命名空间 (#1409)
* feat: remove using namespace mediakit in header files.

(cherry picked from commit d44aeb339a8a0e1f0455be82b21fe4b1b536299f)

* feat: remove using namespace mediakit in FFmpegSource.h

* feat: remove using namespace mediakit in RtpExt.h

* feat: remove using namespace mediakit in header files.

* feat: remove using namespace std in header files.

* feat: remove using namespace std in header files when zltoolkit remove std in header

* 补充命名空间

* 整理命名空间

* 整理命名空间2

* 修复macos ci

* 修复编译问题

* 修复编译问题2

* 修复编译问题3

Co-authored-by: Johnny <hellojinqiang@gmail.com>
Co-authored-by: Xiaofeng Wang <wasphin@gmail.com>
2022-02-02 20:34:50 +08:00
ziyue
098ecf542a 部分代码移至第三方库 2021-12-29 14:18:52 +08:00
Dw9
bb9695a247
解决win32下大文件点播不了问题 (#1188) 2021-10-26 20:35:55 +08:00
xia-chu
b6cbc87712 全面整理代码,去除编译警告 2021-01-17 18:31:50 +08:00
xiongziliang
d971eccf92 新增支持HTTP-fMP4 WebSocket-fMP4直播 2020-09-20 19:45:37 +08:00
xiongziliang
071d0a9fd1 提炼MP4相关接口和代码 2020-09-20 19:45:04 +08:00
xiongziliang
2dd1046131 合并fmp4和mov接口 2020-09-20 19:44:20 +08:00
xiongziliang
477475a60f 批量添加bom头、批量替换tab字符 2020-05-18 15:31:49 +08:00
xiongziliang
7019e4717c 整理授权协议 2020-04-04 20:30:09 +08:00
xiongziliang
095834fe57 重写MP4点播 2020-04-03 20:46:55 +08:00