Merge remote-tracking branch 'origin/master' into 0.11
authorEdward Hervey <edward.hervey@collabora.co.uk>
Fri, 30 Dec 2011 10:49:27 +0000 (11:49 +0100)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Fri, 30 Dec 2011 10:49:27 +0000 (11:49 +0100)
Conflicts:
tests/examples/camerabin2/Makefile.am

1  2 
gst-libs/gst/video/gstbasevideocodec.c
gst/camerabin2/gstcamerabin2.c
tests/examples/camerabin2/Makefile.am
tests/examples/camerabin2/gst-camera2.c

Simple merge
@@@ -15,7 -15,7 +15,7 @@@ gst_camera2_LDADD   = 
          $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_MAJORMINOR@.la \
          $(GST_PLUGINS_BASE_LIBS) \
          -lgstinterfaces-@GST_MAJORMINOR@ \
-         -lgstvideo-@GST_MAJORMINOR@ \
 -      -lgstpbutils-@GST_MAJORMINOR@ \
++        -lgstpbutils-@GST_MAJORMINOR@ \
          $(GST_LIBS) \
        $(GTK_LIBS) \
        $(GMODULE_EXPORT_LIBS)
  
  #include "gst-camera2.h"
  
+ #include <string.h>
+ #include <gst/pbutils/encoding-profile.h>
  #include <gst/gst.h>
 -#include <gst/interfaces/xoverlay.h>
 +#include <gst/video/videooverlay.h>
  #include <gtk/gtk.h>
  #include <gdk/gdkx.h>
  #include <gdk/gdkkeysyms.h>
  
  static GstElement *camera;
  static GtkBuilder *builder;
 -      gst_caps_new_simple ("application/ogg", NULL), NULL);
+ static GtkWidget *ui_main_window;
+ typedef struct
+ {
+   const gchar *name;
+   GstEncodingProfile *(*create_profile) ();
+ } GstCameraVideoFormat;
+ static GstEncodingProfile *
+ create_ogg_profile (void)
+ {
+   GstEncodingContainerProfile *container;
+   container = gst_encoding_container_profile_new ("ogg", NULL,
 -      gst_encoding_video_profile_new (gst_caps_new_simple ("video/x-theora",
 -              NULL), NULL, NULL, 1));
++      gst_caps_new_empty_simple ("application/ogg"), NULL);
+   gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *)
 -      gst_encoding_audio_profile_new (gst_caps_new_simple ("audio/x-vorbis",
 -              NULL), NULL, NULL, 1));
++      gst_encoding_video_profile_new (gst_caps_new_empty_simple
++          ("video/x-theora"), NULL, NULL, 1));
+   gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *)
 -      gst_caps_new_simple ("video/webm", NULL), NULL);
++      gst_encoding_audio_profile_new (gst_caps_new_empty_simple
++          ("audio/x-vorbis"), NULL, NULL, 1));
+   return (GstEncodingProfile *) container;
+ }
+ static GstEncodingProfile *
+ create_webm_profile (void)
+ {
+   GstEncodingContainerProfile *container;
+   container = gst_encoding_container_profile_new ("webm", NULL,
 -      gst_encoding_video_profile_new (gst_caps_new_simple ("video/x-vp8", NULL),
++      gst_caps_new_empty_simple ("video/webm"), NULL);
+   gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *)
 -      gst_encoding_audio_profile_new (gst_caps_new_simple ("audio/x-vorbis",
 -              NULL), NULL, NULL, 1));
++      gst_encoding_video_profile_new (gst_caps_new_empty_simple ("video/x-vp8"),
+           NULL, NULL, 1));
+   gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *)
 -      gst_encoding_video_profile_new (gst_caps_new_simple ("video/x-h264",
 -              NULL), NULL, NULL, 1));
++      gst_encoding_audio_profile_new (gst_caps_new_empty_simple
++          ("audio/x-vorbis"), NULL, NULL, 1));
+   return (GstEncodingProfile *) container;
+ }
+ static GstEncodingProfile *
+ create_mp4_profile (void)
+ {
+   GstEncodingContainerProfile *container;
+   container = gst_encoding_container_profile_new ("mp4", NULL,
+       gst_caps_new_simple ("video/quicktime", "variant", G_TYPE_STRING, "iso",
+           NULL), NULL);
+   gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *)
++      gst_encoding_video_profile_new (gst_caps_new_empty_simple
++          ("video/x-h264"), NULL, NULL, 1));
+   gst_encoding_container_profile_add_profile (container, (GstEncodingProfile *)
+       gst_encoding_audio_profile_new (gst_caps_new_simple ("audio/mpeg",
+               "version", G_TYPE_INT, 4, NULL), NULL, NULL, 1));
+   return (GstEncodingProfile *) container;
+ }
+ GstCameraVideoFormat formats[] = {
+   {"ogg (theora/vorbis)", create_ogg_profile}
+   ,
+   {"webm (vp8/vorbis)", create_webm_profile}
+   ,
+   {"mp4 (h264+aac)", create_mp4_profile}
+   ,
+   {NULL, NULL}
+ };
  
  void
  on_mainWindow_delete_event (GtkWidget * widget, GdkEvent * event, gpointer data)