MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / initialize_streams

Method initialize_streams

src/FFmpegWriter.cpp:145–162  ·  view source on GitHub ↗

initialize streams

Source from the content-addressed store, hash-verified

143
144// initialize streams
145void FFmpegWriter::initialize_streams() {
146 ZmqLogger::Instance()->AppendDebugMethod(
147 "FFmpegWriter::initialize_streams",
148 "oc->oformat->video_codec", oc->oformat->video_codec,
149 "oc->oformat->audio_codec", oc->oformat->audio_codec,
150 "AV_CODEC_ID_NONE", AV_CODEC_ID_NONE);
151
152 // Add the audio and video streams using the default format codecs and initialize the codecs
153 video_st = NULL;
154 audio_st = NULL;
155 if (oc->oformat->video_codec != AV_CODEC_ID_NONE && info.has_video)
156 // Add video stream
157 video_st = add_video_stream();
158
159 if (oc->oformat->audio_codec != AV_CODEC_ID_NONE && info.has_audio)
160 // Add audio stream
161 audio_st = add_audio_stream();
162}
163
164// Set video export options
165void FFmpegWriter::SetVideoOptions(bool has_video, std::string codec, Fraction fps, int width, int height, Fraction pixel_ratio, bool interlaced, bool top_field_first, int bit_rate) {

Callers

nothing calls this directly

Calls 1

AppendDebugMethodMethod · 0.80

Tested by

no test coverage detected