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

Method Open

src/FFmpegWriter.cpp:96–115  ·  view source on GitHub ↗

Open the writer

Source from the content-addressed store, hash-verified

94
95// Open the writer
96void 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)
118void FFmpegWriter::auto_detect_format() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected