[longomatch] libcesarplayer: remove unused code
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] libcesarplayer: remove unused code
- Date: Fri, 5 Oct 2012 01:21:22 +0000 (UTC)
commit e7ccdfb7b0da843be20a18cd439dc2fc9ef07e32
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Oct 5 03:19:52 2012 +0200
libcesarplayer: remove unused code
.../Interfaces/Multimedia/IMultimediaToolkit.cs | 2 +
LongoMatch.Core/Interfaces/Multimedia/IRemuxer.cs | 33 ++++++
LongoMatch.Core/LongoMatch.Core.mdp | 1 +
LongoMatch.Core/Makefile.am | 1 +
LongoMatch.Multimedia/LongoMatch.Multimedia.mdp | 1 -
LongoMatch.Multimedia/Makefile.am | 1 -
LongoMatch.Multimedia/Remuxer/GstRemuxer.cs | 11 +-
libcesarplayer/gst-remuxer.c | 106 --------------------
8 files changed, 43 insertions(+), 113 deletions(-)
---
diff --git a/LongoMatch.Core/Interfaces/Multimedia/IMultimediaToolkit.cs b/LongoMatch.Core/Interfaces/Multimedia/IMultimediaToolkit.cs
index 1d00b24..786dacc 100644
--- a/LongoMatch.Core/Interfaces/Multimedia/IMultimediaToolkit.cs
+++ b/LongoMatch.Core/Interfaces/Multimedia/IMultimediaToolkit.cs
@@ -29,6 +29,8 @@ namespace LongoMatch.Interfaces.Multimedia
IFramesCapturer GetFramesCapturer();
+ IRemuxer GetRemuxer(string inputFile, string outputFile);
+
MediaFile DiscoverFile(string path);
List<Device> VideoDevices {get;}
diff --git a/LongoMatch.Core/Interfaces/Multimedia/IRemuxer.cs b/LongoMatch.Core/Interfaces/Multimedia/IRemuxer.cs
new file mode 100644
index 0000000..7bce6dd
--- /dev/null
+++ b/LongoMatch.Core/Interfaces/Multimedia/IRemuxer.cs
@@ -0,0 +1,33 @@
+//
+// Copyright (C) 2012 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using LongoMatch.Handlers;
+
+namespace LongoMatch.Interfaces.Multimedia
+{
+ public interface IRemuxer
+ {
+ event ErrorHandler Error;
+ event ProgressHandler Progress;
+
+ void Start();
+
+ void Cancel();
+ }
+}
+
diff --git a/LongoMatch.Core/LongoMatch.Core.mdp b/LongoMatch.Core/LongoMatch.Core.mdp
index 4e8d4b5..0a7ed3b 100644
--- a/LongoMatch.Core/LongoMatch.Core.mdp
+++ b/LongoMatch.Core/LongoMatch.Core.mdp
@@ -99,6 +99,7 @@
<File subtype="Code" buildaction="Compile" name="Stats/GameUnitStats.cs" />
<File subtype="Code" buildaction="Compile" name="Stats/GameUnitsStats.cs" />
<File subtype="Code" buildaction="Compile" name="Common/PlaysFilter.cs" />
+ <File subtype="Code" buildaction="Compile" name="Interfaces/Multimedia/IRemuxer.cs" />
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
diff --git a/LongoMatch.Core/Makefile.am b/LongoMatch.Core/Makefile.am
index edc0453..97b0573 100644
--- a/LongoMatch.Core/Makefile.am
+++ b/LongoMatch.Core/Makefile.am
@@ -32,6 +32,7 @@ SOURCES = \
Interfaces/GUI/IRenderingStateBar.cs \
Interfaces/Multimedia/IFramesCapturer.cs \
Interfaces/Multimedia/IMultimediaToolkit.cs \
+ Interfaces/Multimedia/IRemuxer.cs \
Interfaces/Multimedia/IVideoEditor.cs \
Interfaces/IDatabase.cs \
Interfaces/IPlayList.cs \
diff --git a/LongoMatch.Multimedia/LongoMatch.Multimedia.mdp b/LongoMatch.Multimedia/LongoMatch.Multimedia.mdp
index eb2fbd8..3498a7d 100644
--- a/LongoMatch.Multimedia/LongoMatch.Multimedia.mdp
+++ b/LongoMatch.Multimedia/LongoMatch.Multimedia.mdp
@@ -58,7 +58,6 @@
<File subtype="Directory" buildaction="Compile" name="Remuxer" />
<File subtype="Code" buildaction="Compile" name="Remuxer/GstRemuxer.cs" />
<File subtype="Code" buildaction="Compile" name="Remuxer/ObjectManager.cs" />
- <File subtype="Code" buildaction="Compile" name="Interfaces/IRemuxer.cs" />
</Contents>
<References>
<ProjectReference type="Project" localcopy="True" refto="libcesarplayer" />
diff --git a/LongoMatch.Multimedia/Makefile.am b/LongoMatch.Multimedia/Makefile.am
index 2ef255e..a3d3ee2 100644
--- a/LongoMatch.Multimedia/Makefile.am
+++ b/LongoMatch.Multimedia/Makefile.am
@@ -15,7 +15,6 @@ SOURCES = \
Editor/GstVideoSplitter.cs \
Interfaces/ICapturer.cs \
Interfaces/IPlayer.cs \
- Interfaces/IRemuxer.cs \
Player/GstPlayer.cs \
Player/ObjectManager.cs \
Remuxer/GstRemuxer.cs \
diff --git a/LongoMatch.Multimedia/Remuxer/GstRemuxer.cs b/LongoMatch.Multimedia/Remuxer/GstRemuxer.cs
index cc3fa9a..5636c0f 100644
--- a/LongoMatch.Multimedia/Remuxer/GstRemuxer.cs
+++ b/LongoMatch.Multimedia/Remuxer/GstRemuxer.cs
@@ -23,14 +23,15 @@ namespace LongoMatch.Video.Remuxer {
using Mono.Unix;
using LongoMatch.Common;
- using LongoMatch.Multimedia.Interfaces;
+ using LongoMatch.Handlers;
using LongoMatch.Video.Common;
+ using LongoMatch.Interfaces.Multimedia;
#region Autogenerated code
public class GstRemuxer : GLib.Object, IRemuxer {
- public event ProgressHandler Progress;
+ public event LongoMatch.Handlers.ProgressHandler Progress;
[DllImport("libcesarplayer.dll")]
static extern unsafe IntPtr gst_remuxer_new(IntPtr input_file, IntPtr output_file, out IntPtr err);
@@ -66,7 +67,7 @@ namespace LongoMatch.Video.Remuxer {
args.Args = new object[1];
args.Args[0] = GLib.Marshaller.Utf8PtrToString(arg1);
- ErrorHandler handler = (ErrorHandler) sig.Handler;
+ LongoMatch.Video.Common.ErrorHandler handler = (LongoMatch.Video.Common.ErrorHandler) sig.Handler;
handler(GLib.Object.GetObject(arg0), args);
} catch(Exception e) {
GLib.ExceptionManager.RaiseUnhandledException(e, false);
@@ -111,7 +112,7 @@ namespace LongoMatch.Video.Remuxer {
}
[GLib.Signal("error")]
- public event ErrorHandler Error {
+ public event LongoMatch.Handlers.ErrorHandler Error {
add {
GLib.Signal sig = GLib.Signal.Lookup(this, "error", new ErrorSignalDelegate(ErrorSignalCallback));
sig.AddDelegate(value);
@@ -162,7 +163,7 @@ namespace LongoMatch.Video.Remuxer {
}
[GLib.Signal("percent_completed")]
- public event PercentCompletedHandler PercentCompleted {
+ public event LongoMatch.Video.Common.PercentCompletedHandler PercentCompleted {
add {
GLib.Signal sig = GLib.Signal.Lookup(this, "percent_completed", typeof(PercentCompletedArgs));
sig.AddDelegate(value);
diff --git a/libcesarplayer/gst-remuxer.c b/libcesarplayer/gst-remuxer.c
index 1c5798a..d44ff0b 100644
--- a/libcesarplayer/gst-remuxer.c
+++ b/libcesarplayer/gst-remuxer.c
@@ -186,112 +186,6 @@ gst_remuxer_error_quark (void)
return q;
}
-
-/*static gboolean*/
-/*gst_remuxer_encoding_retimestamper (GstRemuxer *remuxer,*/
- /*GstBuffer *prev_buf, gboolean is_video)*/
-/*{*/
- /*GstClockTime buf_ts, new_buf_ts, duration;*/
- /*GstBuffer *enc_buf;*/
-
- /*g_mutex_lock(remuxer->priv->recording_lock);*/
-
- /*if (!remuxer->priv->is_recording) {*/
- /*[> Drop buffers if we are not recording <]*/
- /*GST_LOG_OBJECT (remuxer, "Dropping buffer on %s pad", is_video ? "video": "audio");*/
- /*goto done;*/
- /*}*/
-
- /*[> If we are just remuxing, drop everything until we see a keyframe <]*/
- /*if (remuxer->priv->video_needs_keyframe_sync && !remuxer->priv->video_synced) {*/
- /*if (is_video && !GST_BUFFER_FLAG_IS_SET(prev_buf, GST_BUFFER_FLAG_DELTA_UNIT)) {*/
- /*remuxer->priv->video_synced = TRUE;*/
- /*} else {*/
- /*GST_LOG_OBJECT (remuxer, "Waiting for a keyframe, "*/
- /*"dropping buffer on %s pad", is_video ? "video": "audio");*/
- /*goto done;*/
- /*}*/
- /*}*/
-
- /*enc_buf = gst_buffer_create_sub (prev_buf, 0, GST_BUFFER_SIZE(prev_buf));*/
- /*buf_ts = GST_BUFFER_TIMESTAMP (prev_buf);*/
- /*duration = GST_BUFFER_DURATION (prev_buf);*/
- /*if (duration == GST_CLOCK_TIME_NONE)*/
- /*duration = 0;*/
-
- /* Check if it's the first buffer after starting or restarting the capture
- * and update the timestamps accordingly */
- /*if (G_UNLIKELY(remuxer->priv->current_recording_start_ts == GST_CLOCK_TIME_NONE)) {*/
- /*remuxer->priv->current_recording_start_ts = buf_ts;*/
- /*remuxer->priv->last_accum_recorded_ts = remuxer->priv->accum_recorded_ts;*/
- /*GST_INFO_OBJECT (remuxer, "Starting recording at %" GST_TIME_FORMAT,*/
- /*GST_TIME_ARGS(remuxer->priv->last_accum_recorded_ts));*/
- /*}*/
-
- /*[> Clip buffers that are not in the segment <]*/
- /*if (buf_ts < remuxer->priv->current_recording_start_ts) {*/
- /*GST_WARNING_OBJECT (remuxer, "Discarding buffer out of segment");*/
- /*goto done;*/
- /*}*/
-
- /*if (buf_ts != GST_CLOCK_TIME_NONE) {*/
- /* Get the buffer timestamp with respect of the encoding time and not
- * the playing time for a continous stream in the encoders input */
- /*new_buf_ts = buf_ts - remuxer->priv->current_recording_start_ts + remuxer->priv->last_accum_recorded_ts;*/
-
- /*[> Store the last timestamp seen on this pad <]*/
- /*if (is_video)*/
- /*remuxer->priv->last_video_buf_ts = new_buf_ts;*/
- /*else*/
- /*remuxer->priv->last_audio_buf_ts = new_buf_ts;*/
-
- /*[> Update the highest encoded timestamp <]*/
- /*if (new_buf_ts + duration > remuxer->priv->accum_recorded_ts)*/
- /*remuxer->priv->accum_recorded_ts = new_buf_ts + duration;*/
- /*} else {*/
- /* h264parse only sets the timestamp on the first buffer if a frame is
- * split in several ones. Other parsers might do the same. We only set
- * the last timestamp seen on the pad */
- /*if (is_video)*/
- /*new_buf_ts = remuxer->priv->last_video_buf_ts;*/
- /*else*/
- /*new_buf_ts = remuxer->priv->last_audio_buf_ts;*/
- /*}*/
-
- /*GST_BUFFER_TIMESTAMP (enc_buf) = new_buf_ts;*/
-
- /*GST_LOG_OBJECT(remuxer, "Pushing %s frame to the encoder in ts:% " GST_TIME_FORMAT*/
- /*" out ts: %" GST_TIME_FORMAT, is_video ? "video": "audio",*/
- /*GST_TIME_ARGS(buf_ts), GST_TIME_ARGS(new_buf_ts));*/
-
- /*if (is_video)*/
- /*gst_app_src_push_buffer(GST_APP_SRC(remuxer->priv->video_appsrc), enc_buf);*/
- /*else*/
- /*gst_app_src_push_buffer(GST_APP_SRC(remuxer->priv->audio_appsrc), enc_buf);*/
-
-/*done:*/
- /*{*/
- /*g_mutex_unlock(remuxer->priv->recording_lock);*/
- /*return TRUE;*/
- /*}*/
-/*}*/
-
-/*
-static gboolean
-gst_remuxer_audio_encoding_probe (GstPad *pad, GstBuffer *buf,
- GstRemuxer *remuxer)
-{
- return gst_remuxer_encoding_retimestamper(remuxer, buf, FALSE);
-}
-
-static gboolean
-gst_remuxer_video_encoding_probe (GstPad *pad, GstBuffer *buf,
- GstRemuxer *remuxer)
-{
- return gst_remuxer_encoding_retimestamper(remuxer, buf, TRUE);
-}
-*/
-
static GstElement *
gst_remuxer_create_video_muxer (GstRemuxer * remuxer,
VideoMuxerType type)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]