MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ close()

void MayaFlux::IO::VideoStreamContext::close ( )

Release codec and scaler resources.

Safe to call multiple times.

Definition at line 24 of file VideoStreamContext.cpp.

25{
26 if (sws_context) {
27 sws_freeContext(sws_context);
28 sws_context = nullptr;
29 }
30 if (codec_context) {
31 avcodec_free_context(&codec_context);
32 codec_context = nullptr;
33 }
34 stream_index = -1;
35 total_frames = 0;
36 width = 0;
37 height = 0;
38 out_width = 0;
39 out_height = 0;
40 frame_rate = 0.0;
44 out_linesize = 0;
45 m_last_error.clear();
46}
double frame_rate
Average frame rate (fps).
uint32_t out_height
Output height after scaling.
uint32_t height
Source height in pixels.
uint32_t width
Source width in pixels.
int src_pixel_format
Source AVPixelFormat.
int out_pixel_format
Output AVPixelFormat.
int out_linesize
Output row stride in bytes.
SwsContext * sws_context
Owned; freed in destructor.
AVCodecContext * codec_context
Owned; freed in destructor.
uint32_t out_bytes_per_pixel
Bytes per pixel in output format.
uint32_t out_width
Output width after scaling.

References codec_context, frame_rate, height, m_last_error, out_bytes_per_pixel, out_height, out_linesize, out_pixel_format, out_width, src_pixel_format, stream_index, sws_context, total_frames, and width.

Referenced by open(), open_device(), and ~VideoStreamContext().

+ Here is the caller graph for this function: