cheese r738 - in branches/cheese-vala: . src
- From: jhaitsma svn gnome org
- To: svn-commits-list gnome org
- Subject: cheese r738 - in branches/cheese-vala: . src
- Date: Fri, 30 May 2008 22:10:21 +0000 (UTC)
Author: jhaitsma
Date: Fri May 30 22:10:21 2008
New Revision: 738
URL: http://svn.gnome.org/viewvc/cheese?rev=738&view=rev
Log:
Add Gst.Value stuff
Add cheese-flash.vala
Modified:
branches/cheese-vala/ (props changed)
branches/cheese-vala/src/cheese-webcam.vala
branches/cheese-vala/src/cheese.vala
Modified: branches/cheese-vala/src/cheese-webcam.vala
==============================================================================
--- branches/cheese-vala/src/cheese-webcam.vala (original)
+++ branches/cheese-vala/src/cheese-webcam.vala Fri May 30 22:10:21 2008
@@ -250,7 +250,6 @@
set_effect_filter (effect_filter);
}
-
void set_x_overlay () {
XOverlay overlay = (XOverlay)pipeline.get_by_interface (typeof(XOverlay));
overlay.set_xwindow_id (x11_drawable_get_xid (video_window.window));
@@ -260,7 +259,6 @@
set_x_overlay ();
}
-
void on_photo_data (Element element, Buffer buffer, Pad pad) {
var caps = buffer.get_caps ();
weak Structure structure;
@@ -329,32 +327,32 @@
void get_supported_framerates (VideoFormat format, Structure structure) {
- Value* frame_rates;
+ Gst.Value* frame_rates;
frame_rates = structure.get_value ("framerate");
if ((*frame_rates).holds (fraction_get_type ())) {
var frame_rate = new FrameRate ();
- frame_rate.numerator = value_get_fraction_numerator (*frame_rates);
- frame_rate.denominator = value_get_fraction_denominator (*frame_rates);
+ frame_rate.numerator = (*frame_rates).get_fraction_numerator ();
+ frame_rate.denominator = (*frame_rates).get_fraction_denominator ();
format.frame_rate.add (frame_rate);
- } else if ((*frame_rates).holds (value_list_get_type ())) {
- for (int i = 0; i < value_list_get_size (*frame_rates); i++) {
- Value *f;
- f = value_list_get_value (*frame_rates, i);
+ } else if ((*frame_rates).holds (Gst.Value.list_get_type ())) {
+ for (int i = 0; i < (*frame_rates).list_get_size (); i++) {
+ Gst.Value *f;
+ f = (*frame_rates).list_get_value (i);
var frame_rate = new FrameRate ();
- frame_rate.numerator = value_get_fraction_numerator (*f);
- frame_rate.denominator = value_get_fraction_denominator (*f);
+ frame_rate.numerator = (*f).get_fraction_numerator ();
+ frame_rate.denominator = (*f).get_fraction_denominator ();
format.frame_rate.add (frame_rate);
}
} else if ((*frame_rates).holds (fraction_range_get_type ())) {
- Value* fraction_range_min = value_get_fraction_range_min (*frame_rates);
- int numerator_min = value_get_fraction_numerator (*fraction_range_min);
- int denominator_min = value_get_fraction_denominator (*fraction_range_min);
-
- Value* fraction_range_max = value_get_fraction_range_max (*frame_rates);
- int numerator_max = value_get_fraction_numerator (*fraction_range_max);
- int denominator_max = value_get_fraction_denominator (*fraction_range_max);
+ Gst.Value* fraction_range_min = (*frame_rates).get_fraction_range_min ();
+ int numerator_min = (*fraction_range_min).get_fraction_numerator ();
+ int denominator_min = (*fraction_range_min).get_fraction_denominator ();
+
+ Gst.Value* fraction_range_max = (*frame_rates).get_fraction_range_max ();
+ int numerator_max = (*fraction_range_max).get_fraction_numerator ();
+ int denominator_max = (*fraction_range_max).get_fraction_denominator ();
print ("FractionRange: %d/%d - %d/%d\n", numerator_min, denominator_min, numerator_max, denominator_max);
for (int i = numerator_min; i <= numerator_max; i++) {
@@ -385,8 +383,8 @@
continue;
}
- Value* width = structure.get_value ("width");
- Value* height = structure.get_value ("height");
+ Gst.Value* width = structure.get_value ("width");
+ Gst.Value* height = structure.get_value ("height");
if ((*width).holds (typeof (int))) {
var format = new VideoFormat ();
@@ -401,10 +399,10 @@
// FIXME: vala bug. int_range_get_type should have class
print ("width hold int_range type\n");
- int min_width = value_get_int_range_min (*width);
- int max_width = value_get_int_range_max (*width);
- int min_height = value_get_int_range_min (*height);
- int max_height = value_get_int_range_max (*height);
+ int min_width = (*width).get_int_range_min ();
+ int max_width = (*width).get_int_range_max ();
+ int min_height = (*height).get_int_range_min ();
+ int max_height = (*height).get_int_range_max ();
int cur_width = min_width;
int cur_height = min_height;
Modified: branches/cheese-vala/src/cheese.vala
==============================================================================
--- branches/cheese-vala/src/cheese.vala (original)
+++ branches/cheese-vala/src/cheese.vala Fri May 30 22:10:21 2008
@@ -38,7 +38,7 @@
}
}
- static int main (string[] args) {
+ public static int main (string[] args) {
Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.PACKAGE_LOCALEDIR);
//textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
@@ -60,7 +60,7 @@
Environment.set_application_name (_("Cheese"));
Gtk.init (ref args);
- Gst.init (ref args);
+ Gst.init (ref args);
/* Necessary for the gnome_thumbnail code we use */
GnomeVFS.init ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]