diff --git a/TODO b/TODO index 3a0199c38..1452a7c00 100644 --- a/TODO +++ b/TODO @@ -3,20 +3,12 @@ hot stuff: * ice support * run a user given command upon incoming calls -* linphonec on win32 -* RTP inactivity timeout to close lost calls. - +* SIP/TLS and SRTP low priority: ------------- -* random RTP ports (to enable direct mapping NAT) * zeroconf support for advertising services (cool stuff!) * have the possibility to define several profiles (config files) and switch between them -* display call duration * help tips for the registration box -* The length (or duration) of the call could be displayed (see icons2.png) * 2. There could be a sound effect for "busy" - a short "beep-beep-beep" would be sufficient (try http://www.google.com/search?q=busy.wav) -* The call history could be a bit more clear (see history.png). And it - should be saved somewhere, so you can track your calls if you need to... -* move resampling stuff to use speex instead of libresample. \ No newline at end of file diff --git a/console/commands.c b/console/commands.c index 2fd9b5401..3abe0fb68 100644 --- a/console/commands.c +++ b/console/commands.c @@ -175,6 +175,7 @@ LPC_COMMAND commands[] = { }, { "staticpic", lpc_cmd_staticpic, "Manage static pictures when nowebcam", "'staticpic set' : Set path to picture that should be used.\n" + "'staticpic fps' : Get/set frames per seconds for picture emission.\n" }, { "ipv6", lpc_cmd_ipv6, "Use IPV6", "'ipv6 status' : show ipv6 usage status.\n" @@ -1218,6 +1219,19 @@ lpc_cmd_staticpic(LinphoneCore *lc, char *args) return 1; } + if (strcmp(arg1, "fps")==0) { + if (arg2) { + float fps = atof(arg2); /* FIXME: Handle not-a-float */ + linphone_core_set_static_picture_fps(lc, fps); + return 1; + } else { + float fps; + fps = linphone_core_get_static_picture_fps(lc); + linphonec_out("Current FPS %f\n", fps); + return 1; + } + } + return 0; /* Syntax error */ } diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index af13e57a0..145f67012 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -3106,8 +3106,8 @@ const char *linphone_core_get_video_device(const LinphoneCore *lc){ return NULL; } -int linphone_core_set_static_picture(LinphoneCore *lc, const char *path) { #ifdef VIDEO_ENABLED +static VideoStream * get_active_video_stream(LinphoneCore *lc){ VideoStream *vs = NULL; LinphoneCall *call=linphone_core_get_current_call (lc); /* Select the video stream from the call in the first place */ @@ -3118,7 +3118,13 @@ int linphone_core_set_static_picture(LinphoneCore *lc, const char *path) { if (vs == NULL && lc->previewstream) { vs = lc->previewstream; } - + return vs; +} +#endif + +int linphone_core_set_static_picture(LinphoneCore *lc, const char *path) { +#ifdef VIDEO_ENABLED + VideoStream *vs=get_active_video_stream(lc); /* If we have a video stream (either preview, either from call), we have a source and it is using the static picture filter, then force the filter to use that picture. */ @@ -3128,7 +3134,6 @@ int linphone_core_set_static_picture(LinphoneCore *lc, const char *path) { (void *)path); } } - /* Tell the static image filter to use that image from now on so that the image will be used next time it has to be read */ ms_static_image_set_default_image(path); @@ -3138,6 +3143,48 @@ int linphone_core_set_static_picture(LinphoneCore *lc, const char *path) { return 0; } +int linphone_core_set_static_picture_fps(LinphoneCore *lc, float fps) { +#ifdef VIDEO_ENABLED + VideoStream *vs = NULL; + + vs=get_active_video_stream(lc); + + /* If we have a video stream (either preview, either from call), we + have a source and it is using the static picture filter, then + force the filter to use that picture. */ + if (vs && vs->source) { + if (ms_filter_get_id(vs->source) == MS_STATIC_IMAGE_ID) { + ms_filter_call_method(vs->source, MS_FILTER_SET_FPS,(void *)&fps); + } + } +#else + ms_warning("Video support not compiled."); +#endif + return 0; +} + +float linphone_core_get_static_picture_fps(LinphoneCore *lc) { +#ifdef VIDEO_ENABLED + VideoStream *vs = NULL; + vs=get_active_video_stream(lc); + /* If we have a video stream (either preview, either from call), we + have a source and it is using the static picture filter, then + force the filter to use that picture. */ + if (vs && vs->source) { + if (ms_filter_get_id(vs->source) == MS_STATIC_IMAGE_ID) { + + float fps; + + ms_filter_call_method(vs->source, MS_FILTER_GET_FPS,(void *)&fps); + return fps; + } + } +#else + ms_warning("Video support not compiled."); +#endif + return 0; +} + /** * Returns the native window handle of the video window, casted as an unsigned long. * diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 555d38cdf..52247d902 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -760,6 +760,10 @@ const char *linphone_core_get_video_device(const LinphoneCore *lc); /* Set static picture to be used when "Static picture" is the video device */ int linphone_core_set_static_picture(LinphoneCore *lc, const char *path); +/* Set and get frame rate for static picture */ +int linphone_core_set_static_picture_fps(LinphoneCore *lc, float fps); +float linphone_core_get_static_picture_fps(LinphoneCore *lc); + /*function to be used for eventually setting window decorations (icons, title...)*/ unsigned long linphone_core_get_native_video_window_id(const LinphoneCore *lc); diff --git a/mediastreamer2 b/mediastreamer2 index ea7ca97aa..efe65efba 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit ea7ca97aaaa6f191dfec112f137fb048a4ef2139 +Subproject commit efe65efba0a5c434aa82ab4d3aaa6fec4e4c158c diff --git a/oRTP b/oRTP index 534074027..6bc540160 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 534074027a2163694ce6f8a520f0d6f6ac82b15d +Subproject commit 6bc540160a8729f63f6074b958161bc696e78f93