mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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.
This commit is contained in:
parent
22a0914cce
commit
bf86d7fef1
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue