Commit a9f1daca authored by Ghislain MARY's avatar Ghislain MARY

Add definition of high-fps video preset.

parent f1194284
......@@ -137,6 +137,7 @@ LOCAL_CFLAGS += -DHAVE_POLARSSL_SSL_H=1 -DHAVE_DTLS=1
ifeq ($(_BUILD_VIDEO),1)
LOCAL_SRC_FILES += \
voip/video_preset_high_fps.c \
voip/videostarter.c \
voip/videostream.c \
voip/rfc3984.c \
......
......@@ -218,6 +218,7 @@
<ClCompile Include="..\..\..\src\voip\stun_udp.c" />
<ClCompile Include="..\..\..\src\voip\videostarter.c" />
<ClCompile Include="..\..\..\src\voip\videostream.c" />
<ClCompile Include="..\..\..\src\voip\video_preset_high_fps.c" />
<ClCompile Include="..\..\..\src\voip\vp8rtpfmt.c" />
</ItemGroup>
<ItemGroup>
......
......@@ -223,6 +223,7 @@ if(ENABLE_VIDEO)
voip/rfc3984.c
voip/videostarter.c
voip/videostream.c
voip/video_preset_high_fps.c
)
if(WIN32 AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
add_definitions(-DHAVE_DIRECTSHOW)
......
......@@ -297,7 +297,8 @@ libmediastreamer_voip_la_SOURCES+= voip/rfc2429.h \
utils/bits_rw.c \
utils/x11_helper.c \
utils/stream_regulator.c utils/stream_regulator.h \
voip/layouts.c voip/layouts.h
voip/layouts.c voip/layouts.h \
voip/video_preset_high_fps.c
if ORTP_ENABLED
libmediastreamer_voip_la_SOURCES+= voip/videostream.c
......
......@@ -254,6 +254,7 @@ static int managers_ref=0;
void ms_factory_init_voip(MSFactory *obj){
MSSndCardManager *cm;
MSVideoPresetsManager *vpm;
int i;
/* register builtin VoIP MSFilter's */
......@@ -287,7 +288,8 @@ void ms_factory_init_voip(MSFactory *obj){
}
#ifdef VIDEO_ENABLED
ms_video_presets_manager_new(obj);
vpm = ms_video_presets_manager_new(obj);
register_video_preset_high_fps(vpm);
#endif
#if defined(VIDEO_ENABLED) && defined(MS2_FILTERS) && !defined(NO_FFMPEG) && defined(HAVE_LIBAVCODEC_AVCODEC_H)
......
......@@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define PRIVATE_H
#include "mediastreamer2/mediastream.h"
#include "mediastreamer2/msvideopresets.h"
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) || defined(__WIN32__)
......@@ -114,6 +115,9 @@ MSSrtpCtx* ms_srtp_context_new();
void ms_srtp_context_delete(MSSrtpCtx *session);
void register_video_preset_high_fps(MSVideoPresetsManager *manager);
#ifdef __cplusplus
}
#endif
......
/*
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"
static MSVideoConfiguration high_fps_desktop_vp8_conf_list[] = {
MS_VIDEO_CONF(1536000, 2560000, SXGA_MINUS, 25, 4),
MS_VIDEO_CONF(800000, 2000000, 720P, 25, 4),
MS_VIDEO_CONF(800000, 1536000, XGA, 25, 4),
MS_VIDEO_CONF( 600000, 1024000, SVGA, 25, 2),
MS_VIDEO_CONF( 350000, 600000, VGA, 25, 2),
MS_VIDEO_CONF( 350000, 600000, VGA, 15, 1),
MS_VIDEO_CONF( 200000, 350000, CIF, 18, 1),
MS_VIDEO_CONF( 150000, 200000, QVGA, 15, 1),
MS_VIDEO_CONF( 100000, 150000, QVGA, 10, 1),
MS_VIDEO_CONF( 64000, 100000, QCIF, 12, 1),
MS_VIDEO_CONF( 0, 64000, QCIF, 5 ,1)
};
static MSVideoConfiguration high_fps_embedded_vp8_conf_list[] = {
MS_VIDEO_CONF(2048000, 2560000, UXGA, 12, 2),
MS_VIDEO_CONF(1024000, 1536000, SXGA_MINUS, 12, 2),
MS_VIDEO_CONF( 750000, 1024000, XGA, 12, 2),
MS_VIDEO_CONF( 500000, 750000, SVGA, 12, 2),
MS_VIDEO_CONF( 300000, 500000, VGA, 12, 2),
MS_VIDEO_CONF( 100000, 300000, QVGA, 18, 2),
MS_VIDEO_CONF( 64000, 100000, QCIF, 12, 2),
MS_VIDEO_CONF(300000, 600000, VGA, 12, 1),
MS_VIDEO_CONF(100000, 300000, QVGA, 10, 1),
MS_VIDEO_CONF( 64000, 100000, QCIF, 10, 1),
MS_VIDEO_CONF( 0, 64000, QCIF, 5, 1)
};
void register_video_preset_high_fps(MSVideoPresetsManager *manager) {
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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment