initialize streams
| 143 | |
| 144 | // initialize streams |
| 145 | void 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 |
| 165 | void 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) { |
nothing calls this directly
no test coverage detected