PROP_0,
PROP_LARGE_FILE,
PROP_MOVIE_TIMESCALE,
+ PROP_TRAK_TIMESCALE,
PROP_DO_CTTS,
PROP_FLAVOR,
PROP_FAST_START,
#define DEFAULT_LARGE_FILE FALSE
#define DEFAULT_MOVIE_TIMESCALE 1000
+#define DEFAULT_TRAK_TIMESCALE 0
#define DEFAULT_DO_CTTS FALSE
#define DEFAULT_FAST_START FALSE
#define DEFAULT_FAST_START_TEMP_FILE NULL
"Timescale to use in the movie (units per second)",
1, G_MAXUINT32, DEFAULT_MOVIE_TIMESCALE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
+ g_object_class_install_property (gobject_class, PROP_TRAK_TIMESCALE,
+ g_param_spec_uint ("trak-timescale", "Track timescale",
+ "Timescale to use for the tracks (units per second, 0 is automatic)",
+ 0, G_MAXUINT32, DEFAULT_TRAK_TIMESCALE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_DO_CTTS,
g_param_spec_boolean ("presentation-time",
"Include presentation-time info",
qtpad->fourcc = entry.fourcc;
qtpad->sample_size = constant_size;
atom_trak_set_audio_type (qtpad->trak, qtmux->context, &entry,
- entry.sample_rate, ext_atom, constant_size);
+ qtmux->trak_timescale ? qtmux->trak_timescale : entry.sample_rate,
+ ext_atom, constant_size);
gst_object_unref (qtmux);
return TRUE;
/* bring frame numerator into a range that ensures both reasonable resolution
* as well as a fair duration */
- rate = adjust_rate (framerate_num);
+ rate = qtmux->trak_timescale ?
+ qtmux->trak_timescale : adjust_rate (framerate_num);
GST_DEBUG_OBJECT (qtmux, "Rate of video track selected: %" G_GUINT32_FORMAT,
rate);
case PROP_MOVIE_TIMESCALE:
g_value_set_uint (value, qtmux->timescale);
break;
+ case PROP_TRAK_TIMESCALE:
+ g_value_set_uint (value, qtmux->trak_timescale);
+ break;
case PROP_DO_CTTS:
g_value_set_boolean (value, qtmux->guess_pts);
break;
case PROP_MOVIE_TIMESCALE:
qtmux->timescale = g_value_get_uint (value);
break;
+ case PROP_TRAK_TIMESCALE:
+ qtmux->trak_timescale = g_value_get_uint (value);
+ break;
case PROP_DO_CTTS:
qtmux->guess_pts = g_value_get_boolean (value);
break;