Open the writer
| 94 | |
| 95 | // Open the writer |
| 96 | void FFmpegWriter::Open() { |
| 97 | if (!is_open) { |
| 98 | // Open the writer |
| 99 | is_open = true; |
| 100 | |
| 101 | // Prepare streams (if needed) |
| 102 | if (!prepare_streams) |
| 103 | PrepareStreams(); |
| 104 | |
| 105 | // Now that all the parameters are set, we can open the audio and video codecs and allocate the necessary encode buffers |
| 106 | if (info.has_video && video_st) |
| 107 | open_video(oc, video_st); |
| 108 | if (info.has_audio && audio_st) |
| 109 | open_audio(oc, audio_st); |
| 110 | |
| 111 | // Write header (if needed) |
| 112 | if (!write_header) |
| 113 | WriteHeader(); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | // auto detect format (from path) |
| 118 | void FFmpegWriter::auto_detect_format() { |
nothing calls this directly
no outgoing calls
no test coverage detected