]> git.sesse.net Git - mlt/commitdiff
(De)serialize colorspace in profile.
authorDan Dennedy <dan@dennedy.org>
Thu, 14 Oct 2010 02:42:11 +0000 (19:42 -0700)
committerDan Dennedy <dan@dennedy.org>
Thu, 14 Oct 2010 02:42:11 +0000 (19:42 -0700)
src/modules/xml/consumer_xml.c
src/modules/xml/producer_xml.c

index 880fbc0a22ce42b43e5540045355397be3c39690..f093ffe014dc9faebe93b8c092e9d5efb8bf0ca2 100644 (file)
@@ -675,6 +675,8 @@ xmlDocPtr xml_make_doc( mlt_consumer consumer, mlt_service service )
        xmlNewProp( profile_node, _x("frame_rate_num"), _x(tmpstr) );
        sprintf( tmpstr, "%d", profile->frame_rate_den );
        xmlNewProp( profile_node, _x("frame_rate_den"), _x(tmpstr) );
+       sprintf( tmpstr, "%d", profile->colorspace );
+       xmlNewProp( profile_node, _x("colorspace"), _x(tmpstr) );
 
        // Construct the context maps
        context->id_map = mlt_properties_new();
index e5e15ad1e59d1c31c241f829e610b6b382f4ae5d..61e397bf658f82bb0f747ed2ed89b46127598403 100644 (file)
@@ -309,6 +309,7 @@ static void on_start_profile( deserialise_context context, const xmlChar *name,
                                p->progressive = my_profile->progressive;
                                p->sample_aspect_den = my_profile->sample_aspect_den;
                                p->sample_aspect_num = my_profile->sample_aspect_num;
+                               p->colorspace = my_profile->colorspace;
                                p->is_explicit = 1;
                                mlt_profile_close( my_profile );
                        }
@@ -338,6 +339,8 @@ static void on_start_profile( deserialise_context context, const xmlChar *name,
                        p->frame_rate_num = strtol( _s(atts[ 1 ]), NULL, 0 );
                else if ( xmlStrcmp( atts[ 0 ], _x("frame_rate_den") ) == 0 )
                        p->frame_rate_den = strtol( _s(atts[ 1 ]), NULL, 0 );
+               else if ( xmlStrcmp( atts[ 0 ], _x("colorspace") ) == 0 )
+                       p->colorspace = strtol( _s(atts[ 1 ]), NULL, 0 );
        }
 }