mlt_properties_set_data( video_properties, "global_queue", data_queue, 0, destroy_data_queue, NULL );
mlt_properties_set_int( frame_properties, "width", mlt_properties_get_int( video_properties, "width" ) );
mlt_properties_set_int( frame_properties, "height", mlt_properties_get_int( video_properties, "height" ) );
- mlt_properties_set_int( frame_properties, "real_width", mlt_properties_get_int( video_properties, "real_width" ) );
- mlt_properties_set_int( frame_properties, "real_height", mlt_properties_get_int( video_properties, "real_height" ) );
+ mlt_properties_pass_list( frame_properties, video_properties, "meta.media.width, meta.media.height" );
mlt_properties_set_int( frame_properties, "progressive", mlt_properties_get_int( video_properties, "progressive" ) );
mlt_properties_set_double( frame_properties, "aspect_ratio", mlt_properties_get_double( video_properties, "aspect_ratio" ) );
mlt_properties_set_int( frame_properties, "image_count", image_count );
// Set the width and height
mlt_properties_set_int( frame_properties, "width", self->video_codec->width );
mlt_properties_set_int( frame_properties, "height", self->video_codec->height );
- // real_width and real_height are deprecated in favor of meta.media.width and .height
mlt_properties_set_int( properties, "meta.media.width", self->video_codec->width );
mlt_properties_set_int( properties, "meta.media.height", self->video_codec->height );
- mlt_properties_set_int( frame_properties, "real_width", self->video_codec->width );
- mlt_properties_set_int( frame_properties, "real_height", self->video_codec->height );
mlt_properties_set_double( frame_properties, "aspect_ratio", aspect_ratio );
mlt_properties_set_int( frame_properties, "colorspace", self->colorspace );
if ( self->video_codec->height == 1088 && mlt_profile_dar( mlt_service_profile( MLT_PRODUCER_SERVICE( producer ) ) ) == 16.0/9.0 )
{
mlt_properties_set_int( properties, "meta.media.height", 1080 );
- mlt_properties_set_int( frame_properties, "real_height", 1080 );
}
// Add our image operation
// The swscale and avcolor_space filters require resolution as arg to test compatibility
if ( strncmp( effect, "swscale", 7 ) == 0 || strncmp( effect, "avcolo", 6 ) == 0 )
- arg = (char*) mlt_properties_get_int( MLT_SERVICE_PROPERTIES( service ), "_real_width" );
+ arg = (char*) mlt_properties_get_int( MLT_SERVICE_PROPERTIES( service ), "meta.media.width" );
mlt_filter filter = mlt_factory_filter( profile, id, arg );
if ( filter != NULL )
int right = mlt_properties_get_int( filter_props, "right" );
int top = mlt_properties_get_int( filter_props, "top" );
int bottom = mlt_properties_get_int( filter_props, "bottom" );
- int width = mlt_properties_get_int( frame_props, "real_width" );
- int height = mlt_properties_get_int( frame_props, "real_height" );
+ int width = mlt_properties_get_int( frame_props, "meta.media.width" );
+ int height = mlt_properties_get_int( frame_props, "meta.media.height" );
int use_profile = mlt_properties_get_int( filter_props, "use_profile" );
mlt_profile profile = mlt_service_profile( MLT_FILTER_SERVICE( filter ) );
mlt_properties_set_int( frame_props, "crop.bottom", bottom );
mlt_properties_set_int( frame_props, "crop.original_width", width );
mlt_properties_set_int( frame_props, "crop.original_height", height );
- mlt_properties_set_int( frame_props, "real_width", width - left - right );
- mlt_properties_set_int( frame_props, "real_height", height - top - bottom );
+ mlt_properties_set_int( frame_props, "meta.media.width", width - left - right );
+ mlt_properties_set_int( frame_props, "meta.media.height", height - top - bottom );
}
return frame;
}
mlt_properties_set( properties, "rescale.interp", interps );
}
- // If real_width/height exist, we want that as minimum information
- if ( mlt_properties_get_int( properties, "real_width" ) )
+ // If meta.media.width/height exist, we want that as minimum information
+ if ( mlt_properties_get_int( properties, "meta.media.width" ) )
{
- iwidth = mlt_properties_get_int( properties, "real_width" );
- iheight = mlt_properties_get_int( properties, "real_height" );
+ iwidth = mlt_properties_get_int( properties, "meta.media.width" );
+ iheight = mlt_properties_get_int( properties, "meta.media.height" );
}
// Let the producer know what we are actually requested to obtain
// Normalise the input and out display aspect
int normalised_width = profile->width;
int normalised_height = profile->height;
- int real_width = mlt_properties_get_int( properties, "real_width" );
- int real_height = mlt_properties_get_int( properties, "real_height" );
+ int real_width = mlt_properties_get_int( properties, "meta.media.width" );
+ int real_height = mlt_properties_get_int( properties, "meta.media.height" );
if ( real_width == 0 )
real_width = mlt_properties_get_int( properties, "width" );
if ( real_height == 0 )
mlt_frame_set_image( frame, *buffer, size, mlt_pool_release );
mlt_frame_set_alpha( frame, alpha, alpha_size, mlt_pool_release );
mlt_properties_set_double( properties, "aspect_ratio", mlt_properties_get_double( producer_props, "aspect_ratio" ) );
- mlt_properties_set_int( properties, "real_width", *width );
- mlt_properties_set_int( properties, "real_height", *height );
+ mlt_properties_set_int( properties, "meta.media.width", *width );
+ mlt_properties_set_int( properties, "meta.media.height", *height );
return 0;
mlt_properties_set_double( frame_props, "aspect_ratio", mlt_profile_sar( cx->profile ) );
mlt_properties_set_int( frame_props, "width", cx->profile->width );
mlt_properties_set_int( frame_props, "height", cx->profile->height );
- mlt_properties_set_int( frame_props, "real_width", cx->profile->width );
- mlt_properties_set_int( frame_props, "real_height", cx->profile->height );
+ mlt_properties_set_int( frame_props, "meta.media.width", cx->profile->width );
+ mlt_properties_set_int( frame_props, "meta.media.height", cx->profile->height );
mlt_properties_set_int( frame_props, "progressive", cx->profile->progressive );
}
// The swscale and avcolor_space filters require resolution as arg to test compatibility
if ( strncmp( effect, "swscale", 7 ) == 0 || strncmp( effect, "avcolo", 6 ) == 0 )
- arg = (char*) mlt_properties_get_int( MLT_PRODUCER_PROPERTIES( producer ), "_real_width" );
+ arg = (char*) mlt_properties_get_int( MLT_PRODUCER_PROPERTIES( producer ), "meta.media.width" );
mlt_filter filter = mlt_factory_filter( profile, id, arg );
if ( filter != NULL )
// TODO: Use the animatable w and h of the crop geometry to scale independently of crop rectangle
if ( mlt_properties_get( properties, "crop" ) )
{
- int real_width = get_value( b_props, "real_width", "width" );
- int real_height = get_value( b_props, "real_height", "height" );
+ int real_width = get_value( b_props, "meta.media.width", "width" );
+ int real_height = get_value( b_props, "meta.media.height", "height" );
double input_ar = mlt_properties_get_double( b_props, "aspect_ratio" );
int scaled_width = rint( ( input_ar == 0.0 ? output_ar : input_ar ) / output_ar * real_width );
int scaled_height = real_height;
// Adjust b_frame pixel aspect
int normalised_width = geometry->item.w;
int normalised_height = geometry->item.h;
- int real_width = get_value( b_props, "real_width", "width" );
- int real_height = get_value( b_props, "real_height", "height" );
+ int real_width = get_value( b_props, "meta.media.width", "width" );
+ int real_height = get_value( b_props, "meta.media.height", "height" );
double input_ar = mlt_properties_get_double( b_props, "aspect_ratio" );
int scaled_width = rint( ( input_ar == 0.0 ? output_ar : input_ar ) / output_ar * real_width );
int scaled_height = real_height;
mlt_properties_set( properties, "meta.media.1.stream.type", "audio" );
mlt_properties_set( properties, "meta.media.1.codec.name", "pcm_s16le" );
mlt_properties_set( properties, "meta.media.1.codec.long_name", "signed 16-bit little-endian PCM" );
+ mlt_properties_set_int( properties, "meta.media.width", 720 );
+ mlt_properties_set_int( properties, "meta.media.height", this->is_pal ? 576 : 480 );
// Return the decoder
dv_decoder_return( dv_decoder );
// Update other info on the frame
mlt_properties_set_int( properties, "width", 720 );
mlt_properties_set_int( properties, "height", this->is_pal ? 576 : 480 );
- mlt_properties_set_int( properties, "real_width", 720 );
- mlt_properties_set_int( properties, "real_height", this->is_pal ? 576 : 480 );
mlt_properties_set_int( properties, "top_field_first", !this->is_pal ? 0 : ( data[ 5 ] & 0x07 ) == 0 ? 0 : 1 );
mlt_properties_set_int( properties, "colorspace", 601 );
g_object_ref( pixbuf );
mlt_properties_set_data( MLT_FRAME_PROPERTIES( frame ), "pixbuf", pixbuf, 0, ( mlt_destructor )g_object_unref, NULL );
- mlt_properties_set_int( producer_props, "real_width", gdk_pixbuf_get_width( pixbuf ) );
- mlt_properties_set_int( producer_props, "real_height", gdk_pixbuf_get_height( pixbuf ) );
+ mlt_properties_set_int( producer_props, "meta.media.width", gdk_pixbuf_get_width( pixbuf ) );
+ mlt_properties_set_int( producer_props, "meta.media.height", gdk_pixbuf_get_height( pixbuf ) );
// Store the width/height of the pixbuf temporarily
this->width = gdk_pixbuf_get_width( pixbuf );
// Set width/height
mlt_properties_set_int( properties, "width", this->width );
mlt_properties_set_int( properties, "height", this->height );
- mlt_properties_set_int( properties, "real_width", mlt_properties_get_int( producer_props, "real_width" ) );
- mlt_properties_set_int( properties, "real_height", mlt_properties_get_int( producer_props, "real_height" ) );
}
static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_format *format, int *width, int *height, int writable )
self->height = gdk_pixbuf_get_height( self->pixbuf );
mlt_events_block( producer_props, NULL );
- mlt_properties_set_int( producer_props, "_real_width", self->width );
- mlt_properties_set_int( producer_props, "_real_height", self->height );
+ mlt_properties_set_int( producer_props, "meta.media.width", self->width );
+ mlt_properties_set_int( producer_props, "meta.media.height", self->height );
mlt_properties_set_int( producer_props, "_disable_exif", disable_exif );
mlt_events_unblock( producer_props, NULL );
// Set width/height of frame
mlt_properties_set_int( properties, "width", self->width );
mlt_properties_set_int( properties, "height", self->height );
- mlt_properties_set_int( properties, "real_width", mlt_properties_get_int( producer_props, "_real_width" ) );
- mlt_properties_set_int( properties, "real_height", mlt_properties_get_int( producer_props, "_real_height" ) );
return current_idx;
}
// Give the returned frame temporal identity
mlt_frame_set_position( *frame, mlt_producer_position( producer ) );
- mlt_properties_set_int( frame_properties, "real_width", mlt_properties_get_int( properties, "width" ) );
- mlt_properties_set_int( frame_properties, "real_height", mlt_properties_get_int( properties, "height" ) );
+ mlt_properties_set_int( frame_properties, "meta.media.width", mlt_properties_get_int( properties, "width" ) );
+ mlt_properties_set_int( frame_properties, "meta.media.height", mlt_properties_get_int( properties, "height" ) );
mlt_properties_pass_list( frame_properties, properties, "width, height" );
}
result.y = ( result.y * *height / normalised_height );
// Request full resolution of b frame image.
- b_width = mlt_properties_get_int( b_props, "real_width" );
- b_height = mlt_properties_get_int( b_props, "real_height" );
+ b_width = mlt_properties_get_int( b_props, "meta.media.width" );
+ b_height = mlt_properties_get_int( b_props, "meta.media.height" );
mlt_properties_set_int( b_props, "rescale_width", b_width );
mlt_properties_set_int( b_props, "rescale_height", b_height );
surface->refcount ++;
mlt_properties_set_data( properties, "_surface", surface, 0, ( mlt_destructor )SDL_FreeSurface, 0 );
mlt_properties_set( properties, "_last_resource", this_resource );
- mlt_properties_set_int( properties, "_real_width", surface->w );
- mlt_properties_set_int( properties, "_real_height", surface->h );
+ mlt_properties_set_int( properties, "meta.media.width", surface->w );
+ mlt_properties_set_int( properties, "meta.media.height", surface->h );
}
}
else if ( surface != NULL )
mlt_properties_set_int( properties, "progressive", 1 );
mlt_properties_set_double( properties, "aspect_ratio", mlt_properties_get_double( producer_props, "aspect_ratio" ) );
mlt_properties_set_data( properties, "surface", surface, 0, ( mlt_destructor )SDL_FreeSurface, NULL );
- mlt_properties_set_int( properties, "real_width", surface->w );
- mlt_properties_set_int( properties, "real_height", surface->h );
// Push the get_image method
mlt_frame_push_get_image( *frame, producer_get_image );
mlt_properties_set_int( properties, "test_image", 0 );
mlt_properties_set_int( properties, "width", swfdec->width );
mlt_properties_set_int( properties, "height", swfdec->height );
- mlt_properties_set_int( properties, "real_width", swfdec->width );
- mlt_properties_set_int( properties, "real_height", swfdec->height );
mlt_properties_set_int( properties, "progressive", 1 );
mlt_properties_set_double( properties, "aspect_ratio", 1.0 );
mlt_properties_set_position( properties, "swfdec.position", mlt_producer_frame( producer ) );
int interp = 2;
float scale_zoom=1.0;
- if (*width!=mlt_properties_get_int( MLT_FRAME_PROPERTIES( frame ), "real_width" ))
- scale_zoom=(float)*width/(float)mlt_properties_get_int( MLT_FRAME_PROPERTIES( frame ), "real_width" );
+ if ( *width != mlt_properties_get_int( MLT_FRAME_PROPERTIES( frame ), "meta.media.width" ) )
+ scale_zoom = (float) *width / (float) mlt_properties_get_int( MLT_FRAME_PROPERTIES( frame ), "meta.media.width" );
if ( strcmp( interps, "nearest" ) == 0 || strcmp( interps, "neighbor" ) == 0 )
interp = 0;
else if ( strcmp( interps, "tiles" ) == 0 || strcmp( interps, "fast_bilinear" ) == 0 )
this->close = ( mlt_destructor )producer_close;
mlt_properties_set( properties, "resource", resource );
mlt_properties_set_data( properties, "image", image, 0, mlt_pool_release, NULL );
- mlt_properties_set_int( properties, "real_width", width );
- mlt_properties_set_int( properties, "real_height", height );
+ mlt_properties_set_int( properties, "meta.media.width", width );
+ mlt_properties_set_int( properties, "meta.media.height", height );
}
else
{
static int producer_get_image( mlt_frame this, uint8_t **buffer, mlt_image_format *format, int *width, int *height, int writable )
{
mlt_producer producer = mlt_frame_pop_service( this );
- int real_width = mlt_properties_get_int( MLT_FRAME_PROPERTIES( this ), "real_width" );
- int real_height = mlt_properties_get_int( MLT_FRAME_PROPERTIES( this ), "real_height" );
+ int real_width = mlt_properties_get_int( MLT_FRAME_PROPERTIES( this ), "meta.media.width" );
+ int real_height = mlt_properties_get_int( MLT_FRAME_PROPERTIES( this ), "meta.media.height" );
int size = real_width * real_height;
uint8_t *image = mlt_pool_alloc( size * 2 );
uint8_t *source = mlt_properties_get_data( MLT_PRODUCER_PROPERTIES( producer ), "image", NULL );
mlt_properties properties = MLT_FRAME_PROPERTIES( *frame );
// Pass the data on the frame properties
- mlt_properties_pass_list( properties, MLT_PRODUCER_PROPERTIES( producer ), "real_width,real_height" );
mlt_properties_set_int( properties, "has_image", 1 );
mlt_properties_set_int( properties, "progressive", 1 );
mlt_properties_set_double( properties, "aspect_ratio", 1 );