Some cleanup in Gstreamer Audio, should be finished 100% now! Please test

Frames are now pulled in a thread for better performance. We still need to grab the right frame from the Framebuffer and we might need to switch Gstreamer's Frame stepping API.
refs #1
This commit is contained in:
Stephan Sundermann committed 2013-02-22 17:53:57 +01:00
1 parent ea4a8abd87
commit b60169d2a6
9 files changed
+134 -100

No files matched your search

+15 -11
View File
@@ -1,5 +1,6 @@
#pragma once
#include <mutex>
#include <thread>
#include "gst/gst.h"
#include "GstreamerVideo.h"
#include "gst\app\gstappsink.h"
@@ -32,36 +33,39 @@ public:
bool IsFinished();
private:
GMainLoop *MainLoop;
GMainContext *Context;
VocaluxeClock *Clock;
struct BufferFrame {
GstSample *Sample;
GstBuffer *Buffer;
GstMapInfo Memory;
gboolean Displayed;
};
thread CopyThread;
GstAppSink *Appsink;
GstElement *Element;
GstBus *Bus;
GstMessage *Message;
ApplicationFrame Frame;
GstMapInfo Mapinfo;
GstSample *Sample;
GstBuffer *Buffer;
GstCaps *BufferCaps;
GstStructure *BufferStructure;
BufferFrame FrameBuffer[5];
gboolean BufferFull;
mutex Mutex;
gboolean Loop;
gboolean Running;
volatile gboolean Copying;
gboolean Paused;
gboolean Finished;
gfloat Duration;
ApplicationFrame ReturnFrame;
void RefreshDuration();
GstFlowReturn NewBufferRecieved(GstAppSink *Sink);
static GstFlowReturn fake_callback(GstAppSink *sink ,gpointer data);
void Copy();
};