[byzanz/0.2: 11/14] Add WebM support
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [byzanz/0.2: 11/14] Add WebM support
- Date: Mon, 21 Feb 2011 18:35:56 +0000 (UTC)
commit ea7951600aa1664d62c903bedfe78241d00d8c5d
Author: Benjamin Otte <otte redhat com>
Date: Mon Feb 21 19:01:01 2011 +0100
Add WebM support
po/POTFILES.in | 1 +
src/Makefile.am | 2 +
src/byzanzencoder.c | 2 +
src/byzanzencoderwebm.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++
src/byzanzencoderwebm.h | 46 +++++++++++++++++++++++++++++++++++++++
5 files changed, 106 insertions(+), 0 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 784c341..a6dc1f1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -8,6 +8,7 @@ src/byzanzencoderflv.c
src/byzanzencodergif.c
src/byzanzencodergstreamer.c
src/byzanzencoderogv.c
+src/byzanzencoderwebm.c
src/byzanzlayer.c
src/byzanzlayercursor.c
src/byzanzlayerwindow.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 9ce716d..1f6f87f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -14,6 +14,7 @@ noinst_HEADERS = \
byzanzencodergif.h \
byzanzencodergstreamer.h \
byzanzencoderogv.h \
+ byzanzencoderwebm.h \
byzanzlayer.h \
byzanzlayercursor.h \
byzanzlayerwindow.h \
@@ -34,6 +35,7 @@ libbyzanz_la_SOURCES = \
byzanzencodergif.c \
byzanzencodergstreamer.c \
byzanzencoderogv.c \
+ byzanzencoderwebm.c \
byzanzlayer.c \
byzanzlayercursor.c \
byzanzlayerwindow.c \
diff --git a/src/byzanzencoder.c b/src/byzanzencoder.c
index f899e7a..7c2c8ed 100644
--- a/src/byzanzencoder.c
+++ b/src/byzanzencoder.c
@@ -433,10 +433,12 @@ byzanz_encoder_type_get_filter (GType encoder_type)
#include "byzanzencoderflv.h"
#include "byzanzencodergif.h"
#include "byzanzencoderogv.h"
+#include "byzanzencoderwebm.h"
typedef GType (* TypeFunc) (void);
static const TypeFunc functions[] = {
byzanz_encoder_gif_get_type,
+ byzanz_encoder_webm_get_type,
byzanz_encoder_ogv_get_type,
byzanz_encoder_flv_get_type,
/* debug types */
diff --git a/src/byzanzencoderwebm.c b/src/byzanzencoderwebm.c
new file mode 100644
index 0000000..bb6215e
--- /dev/null
+++ b/src/byzanzencoderwebm.c
@@ -0,0 +1,55 @@
+/* desktop session recorder
+ * Copyright (C) 2010 Benjamin Otte <otte gnome org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "byzanzencoderwebm.h"
+
+#include <glib/gi18n.h>
+
+G_DEFINE_TYPE (ByzanzEncoderWebm, byzanz_encoder_webm, BYZANZ_TYPE_ENCODER_GSTREAMER)
+
+static void
+byzanz_encoder_webm_class_init (ByzanzEncoderWebmClass *klass)
+{
+ ByzanzEncoderClass *encoder_class = BYZANZ_ENCODER_CLASS (klass);
+ ByzanzEncoderGStreamerClass *gstreamer_class = BYZANZ_ENCODER_GSTREAMER_CLASS (klass);
+
+ encoder_class->filter = gtk_file_filter_new ();
+ g_object_ref_sink (encoder_class->filter);
+ gtk_file_filter_set_name (encoder_class->filter, _("WebM video"));
+ gtk_file_filter_add_mime_type (encoder_class->filter, "video/webm");
+ gtk_file_filter_add_pattern (encoder_class->filter, "*.webm");
+
+ gstreamer_class->pipeline_string =
+ "appsrc name=src ! ffmpegcolorspace ! videorate ! "
+ "video/x-raw-yuv,framerate=25/1 ! vp8enc ! webmmux ! giostreamsink name=sink";
+ gstreamer_class->audio_pipeline_string =
+ "autoaudiosrc name=audiosrc ! audioconvert ! vorbisenc ! queue ! webmmux name=muxer ! giostreamsink name=sink "
+ "appsrc name=src ! ffmpegcolorspace ! videorate ! "
+ "video/x-raw-yuv,framerate=25/1 ! vp8enc ! queue ! muxer.";
+}
+
+static void
+byzanz_encoder_webm_init (ByzanzEncoderWebm *encoder_webm)
+{
+}
+
diff --git a/src/byzanzencoderwebm.h b/src/byzanzencoderwebm.h
new file mode 100644
index 0000000..aeb4996
--- /dev/null
+++ b/src/byzanzencoderwebm.h
@@ -0,0 +1,46 @@
+/* desktop session recorder
+ * Copyright (C) 2010 Benjamin Otte <otte gnome org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "byzanzencodergstreamer.h"
+
+#ifndef __HAVE_BYZANZ_ENCODER_WEBM_H__
+#define __HAVE_BYZANZ_ENCODER_WEBM_H__
+
+typedef struct _ByzanzEncoderWebm ByzanzEncoderWebm;
+typedef struct _ByzanzEncoderWebmClass ByzanzEncoderWebmClass;
+
+#define BYZANZ_TYPE_ENCODER_WEBM (byzanz_encoder_webm_get_type())
+#define BYZANZ_IS_ENCODER_WEBM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BYZANZ_TYPE_ENCODER_WEBM))
+#define BYZANZ_IS_ENCODER_WEBM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BYZANZ_TYPE_ENCODER_WEBM))
+#define BYZANZ_ENCODER_WEBM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BYZANZ_TYPE_ENCODER_WEBM, ByzanzEncoderWebm))
+#define BYZANZ_ENCODER_WEBM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BYZANZ_TYPE_ENCODER_WEBM, ByzanzEncoderWebmClass))
+#define BYZANZ_ENCODER_WEBM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BYZANZ_TYPE_ENCODER_WEBM, ByzanzEncoderWebmClass))
+
+struct _ByzanzEncoderWebm {
+ ByzanzEncoderGStreamer encoder;
+};
+
+struct _ByzanzEncoderWebmClass {
+ ByzanzEncoderGStreamerClass encoder_class;
+};
+
+GType byzanz_encoder_webm_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __HAVE_BYZANZ_ENCODER_WEBM_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]