filter_rescale.c: if input width or height are zero, infer them from the profile
[melted] / src / modules / gtk2 / producer_pango.c
index 4f4526f..2368d3e 100644 (file)
@@ -3,22 +3,22 @@
  * Copyright (C) 2003-2004 Ushodaya Enterprises Limited
  * Author: Dan Dennedy <dan@dennedy.org>
  *
- * 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 library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser 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 "producer_pango.h"
+#include <framework/mlt_producer.h>
 #include <framework/mlt_frame.h>
 #include <framework/mlt_geometry.h>
 #include <stdlib.h>
 #include <freetype/freetype.h>
 #include <iconv.h>
 #include <pthread.h>
+#include <ctype.h>
+
+typedef struct producer_pango_s *producer_pango;
+
+typedef enum
+{
+       pango_align_left = 0,
+       pango_align_center,
+       pango_align_right
+} pango_align;
 
 static pthread_mutex_t pango_mutex = PTHREAD_MUTEX_INITIALIZER;
 
@@ -543,7 +553,7 @@ static int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int i
        producer_pango this = producer->child;
 
        // Generate a frame
-       *frame = mlt_frame_init( );
+       *frame = mlt_frame_init( MLT_PRODUCER_SERVICE( producer ) );
 
        // Obtain properties of frame and producer
        mlt_properties properties = MLT_FRAME_PROPERTIES( *frame );