video_preset_high_fps.c 3.31 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
/*
mediastreamer2 library - modular sound and video processing and streaming
Copyright (C) 2015  Belledonne Communications SARL

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

#ifdef HAVE_CONFIG_H
#include "mediastreamer-config.h"
#endif

#include "mediastreamer2/msvideopresets.h"


Ghislain MARY's avatar
Ghislain MARY committed
27 28 29 30
static MSVideoConfiguration custom_conf_list[] = {
	MS_VIDEO_CONF(0, 10000000, HDTVP, 30, 1)
};

31 32

static MSVideoConfiguration high_fps_desktop_vp8_conf_list[] = {
33 34 35 36
	MS_VIDEO_CONF(2000000,  3000000,  720P, 30, 4),
	MS_VIDEO_CONF(1500000,  2000000,   XGA, 30, 4),
	MS_VIDEO_CONF(1000000,  1500000,  SVGA, 30, 4),
	MS_VIDEO_CONF( 600000,  1000000,   VGA, 30, 2),
Ghislain MARY's avatar
Ghislain MARY committed
37
	MS_VIDEO_CONF( 350000,   600000,   CIF, 30, 2),
38 39 40 41
	MS_VIDEO_CONF( 280000,   350000,  QVGA, 30, 1),
	MS_VIDEO_CONF( 150000,   280000,  QCIF, 30, 1),
	MS_VIDEO_CONF( 120000,   150000,  QCIF, 20, 1),
	MS_VIDEO_CONF(      0,   120000,  QCIF, 10 ,1)
42 43 44
};

static MSVideoConfiguration high_fps_embedded_vp8_conf_list[] = {
45
	MS_VIDEO_CONF(600000, 3000000,  VGA, 30, 2),
46 47 48 49 50 51 52 53 54 55 56
	MS_VIDEO_CONF(350000,  600000,  CIF, 30, 2),
	MS_VIDEO_CONF(280000,  350000, QVGA, 30, 2),
	MS_VIDEO_CONF(150000,  280000, QCIF, 30, 1),
	MS_VIDEO_CONF(120000,  150000, QCIF, 20, 1),
	MS_VIDEO_CONF(     0,  120000, QCIF, 10, 1)
};

static MSVideoConfiguration high_fps_desktop_h264_conf_list[] = {
	MS_VIDEO_CONF(2000000, 3000000, 720P, 30, 4),
	MS_VIDEO_CONF(1500000, 2000000,  XGA, 30, 4),
	MS_VIDEO_CONF(1000000, 1500000, SVGA, 30, 4),
57
	MS_VIDEO_CONF( 600000, 1000000,  VGA, 30, 2),
58 59 60 61 62 63 64 65
	MS_VIDEO_CONF( 400000,  600000,  CIF, 30, 2),
	MS_VIDEO_CONF( 350000,  400000, QVGA, 30, 2),
	MS_VIDEO_CONF( 200000,  350000, QCIF, 30, 1),
	MS_VIDEO_CONF( 150000,  200000, QCIF, 15, 1),
	MS_VIDEO_CONF(      0,  150000, QCIF, 10, 1)
};

static MSVideoConfiguration high_fps_embedded_h264_conf_list[] = {
66
	MS_VIDEO_CONF(600000, 3000000,  VGA, 30, 2),
67 68 69 70 71
	MS_VIDEO_CONF(400000,  600000,  CIF, 30, 2),
	MS_VIDEO_CONF(350000,  400000, QVGA, 30, 2),
	MS_VIDEO_CONF(200000,  350000, QCIF, 30, 1),
	MS_VIDEO_CONF(150000,  200000, QCIF, 15, 1),
	MS_VIDEO_CONF(     0,  150000, QCIF, 10, 1)
72 73 74 75
};


void register_video_preset_high_fps(MSVideoPresetsManager *manager) {
Ghislain MARY's avatar
Ghislain MARY committed
76
	ms_video_presets_manager_register_preset_configuration(manager, "custom", NULL, custom_conf_list);
77 78
	ms_video_presets_manager_register_preset_configuration(manager, "high-fps", "desktop,vp8", high_fps_desktop_vp8_conf_list);
	ms_video_presets_manager_register_preset_configuration(manager, "high-fps", "embedded,vp8", high_fps_embedded_vp8_conf_list);
79 80
	ms_video_presets_manager_register_preset_configuration(manager, "high-fps", "desktop,h264", high_fps_desktop_h264_conf_list);
	ms_video_presets_manager_register_preset_configuration(manager, "high-fps", "embedded,h264", high_fps_embedded_h264_conf_list);
81
}