From: Alessandro Decina Date: Mon, 28 Dec 2015 23:57:36 +0000 (+1100) Subject: applemedia: avfvideosrc: output at highest fps/resolution by default X-Git-Tag: 1.19.3~507^2~7322 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf86d7fef1de204eec08b18e1aebb8fc5797b220;p=platform%2Fupstream%2Fgstreamer.git applemedia: avfvideosrc: output at highest fps/resolution by default Fixate to the highest possible resolution and fps. Otherwise by default we end up fixating at 2fps and the lowest supported resolution, which is hardly what someone who bought an overpriced smartphone wants. --- diff --git a/sys/applemedia/avfvideosrc.m b/sys/applemedia/avfvideosrc.m index 075adff..455fd2f 100644 --- a/sys/applemedia/avfvideosrc.m +++ b/sys/applemedia/avfvideosrc.m @@ -996,6 +996,7 @@ caps_filter_out_gl_memory (GstCapsFeatures * features, GstStructure * structure, - (GstCaps *)fixate:(GstCaps *)new_caps { GstGLContext *context; + GstStructure *structure; new_caps = gst_caps_make_writable (new_caps); @@ -1005,6 +1006,13 @@ caps_filter_out_gl_memory (GstCapsFeatures * features, GstStructure * structure, else gst_object_unref (context); + new_caps = gst_caps_truncate (new_caps); + structure = gst_caps_get_structure (new_caps, 0); + /* crank up to 11. This is what the presets do, but we don't use the presets + * in ios >= 7.0 */ + gst_structure_fixate_field_nearest_int (structure, "height", G_MAXINT); + gst_structure_fixate_field_nearest_fraction (structure, "framerate", G_MAXINT, 1); + return gst_caps_fixate (new_caps); }