mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-30 23:02:24 +08:00
AI automatically translates all comments in the code into English (#3917)
This commit is contained in:
@@ -22,7 +22,8 @@
|
||||
#include "Util/ResourcePool.h"
|
||||
namespace mediakit {
|
||||
|
||||
//该类用于产生MPEG-TS/MPEG-PS
|
||||
// 该类用于产生MPEG-TS/MPEG-PS [AUTO-TRANSLATED:267efc85]
|
||||
// This class is used to generate MPEG-TS/MPEG-PS
|
||||
class MpegMuxer : public MediaSinkInterface {
|
||||
public:
|
||||
MpegMuxer(bool is_ps = false);
|
||||
@@ -30,21 +31,33 @@ public:
|
||||
|
||||
/**
|
||||
* 添加音视频轨道
|
||||
* Add audio and video tracks
|
||||
|
||||
* [AUTO-TRANSLATED:7b0c1d64]
|
||||
*/
|
||||
bool addTrack(const Track::Ptr &track) override;
|
||||
|
||||
/**
|
||||
* 重置音视频轨道
|
||||
* Reset audio and video tracks
|
||||
|
||||
* [AUTO-TRANSLATED:6eb1b742]
|
||||
*/
|
||||
void resetTracks() override;
|
||||
|
||||
/**
|
||||
* 输入帧数据
|
||||
* Input frame data
|
||||
|
||||
* [AUTO-TRANSLATED:d13bc7f2]
|
||||
*/
|
||||
bool inputFrame(const Frame::Ptr &frame) override;
|
||||
|
||||
/**
|
||||
* 刷新输出所有frame缓存
|
||||
* Flush all frame buffers in the output
|
||||
|
||||
* [AUTO-TRANSLATED:adaea568]
|
||||
*/
|
||||
void flush() override;
|
||||
|
||||
@@ -54,6 +67,13 @@ protected:
|
||||
* @param buffer ts/ps数据包
|
||||
* @param timestamp 时间戳,单位毫秒
|
||||
* @param key_pos 是否为关键帧的第一个ts/ps包,用于确保ts切片第一帧为关键帧
|
||||
* Callback for outputting ts/ps data
|
||||
* @param buffer ts/ps data packet
|
||||
* @param timestamp Timestamp, in milliseconds
|
||||
* @param key_pos Whether it is the first ts/ps packet of a key frame, used to ensure that the first frame of the ts slice is a key frame
|
||||
|
||||
|
||||
* [AUTO-TRANSLATED:dda8ed40]
|
||||
*/
|
||||
virtual void onWrite(std::shared_ptr<toolkit::Buffer> buffer, uint64_t timestamp, bool key_pos) = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user