add function get_codec to return the codec used in the output mp4

This commit is contained in:
Isaac Connor 2021-11-03 17:01:11 -04:00
parent 3208059040
commit a799eb3ad9
1 changed files with 7 additions and 0 deletions

View File

@ -111,6 +111,13 @@ class VideoStore {
int writePacket(const std::shared_ptr<ZMPacket> &pkt);
int write_packets(PacketQueue &queue);
void flush_codecs();
const char *get_codec() {
if (chosen_codec_data)
return chosen_codec_data->codec_codec;
if (video_out_stream)
return avcodec_get_name(video_out_stream->codecpar->codec_id);
return "";
}
};
#endif // ZM_VIDEOSTORE_H