You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
FFmpegAndroid/app/src/main/cpp/ff_rtmp_pusher.h

39 lines
600 B

//
// Created by xu fulong on 2022/9/9.
//
#ifndef FF_RTMP_PUSHER_H
#define FF_RTMP_PUSHER_H
#include "ffmpeg_jni_define.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "libavformat/avformat.h"
#include "libavcodec/avcodec.h"
#include "libavutil/time.h"
#ifdef __cplusplus
}
#endif
class FFRtmpPusher {
private:
AVFormatContext *inFormatCtx;
AVFormatContext *outFormatCtx;
AVPacket packet;
int video_index = -1;
int audio_index = -1;
public:
int open(const char *inputPath, const char *outputPath);
int push();
void close();
};
#endif //FF_RTMP_PUSHER_H