[longomatch/livecapture2: 21/31] Add Close() funtion to close the capturer
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/livecapture2: 21/31] Add Close() funtion to close the capturer
- Date: Mon, 3 May 2010 22:40:34 +0000 (UTC)
commit 3431af4a85f4e233635c2e80f7b06160bdf47a8d
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Mon Apr 26 00:54:19 2010 +0200
Add Close() funtion to close the capturer
CesarPlayer/Capturer/FakeCapturer.cs | 3 +++
CesarPlayer/Capturer/GstCameraCapturer.cs | 7 +++++++
CesarPlayer/Capturer/ICapturer.cs | 2 ++
CesarPlayer/Gui/CapturerBin.cs | 4 ++++
4 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/CesarPlayer/Capturer/FakeCapturer.cs b/CesarPlayer/Capturer/FakeCapturer.cs
index 91e456f..92fe24f 100644
--- a/CesarPlayer/Capturer/FakeCapturer.cs
+++ b/CesarPlayer/Capturer/FakeCapturer.cs
@@ -49,6 +49,9 @@ namespace LongoMatch.Video.Capturer
public void Run(){
}
+ public void Close(){
+ }
+
public void Start(){
timer.Start();
}
diff --git a/CesarPlayer/Capturer/GstCameraCapturer.cs b/CesarPlayer/Capturer/GstCameraCapturer.cs
index 643408c..a6f8461 100644
--- a/CesarPlayer/Capturer/GstCameraCapturer.cs
+++ b/CesarPlayer/Capturer/GstCameraCapturer.cs
@@ -293,6 +293,13 @@ namespace LongoMatch.Video.Capturer {
}
[DllImport("libcesarplayer.dll")]
+ static extern void gst_camera_capturer_close(IntPtr raw);
+
+ public void Close() {
+ gst_camera_capturer_close(Handle);
+ }
+
+ [DllImport("libcesarplayer.dll")]
static extern bool gst_camera_capturer_set_video_muxer(IntPtr raw, int type, out IntPtr error);
public bool SetVideoMuxer(LongoMatch.Video.Capturer.GccVideoMuxerType type) {
diff --git a/CesarPlayer/Capturer/ICapturer.cs b/CesarPlayer/Capturer/ICapturer.cs
index 0b529cd..7b8ea58 100644
--- a/CesarPlayer/Capturer/ICapturer.cs
+++ b/CesarPlayer/Capturer/ICapturer.cs
@@ -71,5 +71,7 @@ namespace LongoMatch.Video.Capturer
void Stop();
void Run();
+
+ void Close();
}
}
diff --git a/CesarPlayer/Gui/CapturerBin.cs b/CesarPlayer/Gui/CapturerBin.cs
index c8e8043..af3d2bf 100644
--- a/CesarPlayer/Gui/CapturerBin.cs
+++ b/CesarPlayer/Gui/CapturerBin.cs
@@ -164,6 +164,10 @@ namespace LongoMatch.Gui
public void Run(){
capturer.Run();
+ }
+
+ public void Close(){
+ capturer.Close();
}
public void SetVideoEncoder(GccVideoEncoderType type){
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]