]> git.sesse.net Git - mlt/commitdiff
Map profile colorspace to consumer property.
authorDan Dennedy <dan@dennedy.org>
Tue, 14 Sep 2010 05:23:22 +0000 (22:23 -0700)
committerDan Dennedy <dan@dennedy.org>
Sun, 26 Sep 2010 22:20:15 +0000 (15:20 -0700)
src/framework/mlt_consumer.c

index b1a8fa19f5b7eb7d67e1ede288b0831692ceba44..b13c802b7f4b2e31381828b59d8e52743f964e75 100644 (file)
@@ -137,6 +137,7 @@ static void apply_profile_properties( mlt_consumer this, mlt_profile profile, ml
        mlt_properties_set_double( properties, "display_ratio", mlt_profile_dar( profile )  );
        mlt_properties_set_int( properties, "display_aspect_num", profile->display_aspect_num );
        mlt_properties_set_int( properties, "display_aspect_num", profile->display_aspect_num );
+       mlt_properties_set_int( properties, "colorspace", profile->colorspace );
        mlt_event_unblock( this->event_listener );
 }
 
@@ -257,6 +258,13 @@ static void mlt_consumer_property_changed( mlt_service owner, mlt_consumer this,
                        mlt_properties_set_double( properties, "display_ratio", mlt_profile_dar( profile )  );
                }
        }
+       else if ( !strcmp( name, "colorspace" ) )
+       {
+               mlt_properties properties = MLT_CONSUMER_PROPERTIES( this );
+               mlt_profile profile = mlt_service_profile( MLT_CONSUMER_SERVICE( this ) );
+               if ( profile )
+                       profile->colorspace = mlt_properties_get_int( properties, "colorspace" );
+       }
 }
 
 /** The transmitter for the consumer-frame-show event