mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-15 12:20:01 +01:00
Re-implementation of MediaPlayer and Stream update
Avoid using gst video frames, and simply copy buffer instead. Use gst memory map to access pointer to RGBA data. unreferencing the buffer frees the memory (apparently). Also free OpenGL objects on close to free memory. Overall, memory consumption seems to be reduced.
This commit is contained in:
@@ -368,18 +368,18 @@ private:
|
||||
} FrameStatus;
|
||||
|
||||
struct Frame {
|
||||
GstVideoFrame vframe;
|
||||
GstBuffer *buffer;
|
||||
FrameStatus status;
|
||||
bool full;
|
||||
bool is_new;
|
||||
GstClockTime position;
|
||||
std::mutex access;
|
||||
|
||||
Frame() {
|
||||
full = false;
|
||||
buffer = NULL;
|
||||
is_new = false;
|
||||
status = INVALID;
|
||||
position = GST_CLOCK_TIME_NONE;
|
||||
}
|
||||
void unmap();
|
||||
};
|
||||
Frame frame_[N_VFRAME];
|
||||
guint write_index_;
|
||||
|
||||
Reference in New Issue
Block a user