aboutsummaryrefslogtreecommitdiff
path: root/src/capture/capture.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/capture/capture.c')
-rw-r--r--src/capture/capture.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/capture/capture.c b/src/capture/capture.c
index 699745a..eea0d1d 100644
--- a/src/capture/capture.c
+++ b/src/capture/capture.c
@@ -42,6 +42,18 @@ int gsr_capture_capture(gsr_capture *cap, AVFrame *frame) {
return cap->capture(cap, frame);
}
+void gsr_capture_end(gsr_capture *cap, AVFrame *frame) {
+ if(!cap->started) {
+ fprintf(stderr, "gsr error: gsr_capture_end failed: the gsr capture has not been started\n");
+ return;
+ }
+
+ if(!cap->capture_end)
+ return;
+
+ cap->capture_end(cap, frame);
+}
+
void gsr_capture_destroy(gsr_capture *cap, AVCodecContext *video_codec_context) {
cap->destroy(cap, video_codec_context);
}