adaptive tester: use MIR camera instead of the default one to get a...

adaptive tester: use MIR camera instead of the default one to get a reproductible scenario environment
parent 751080a9
......@@ -713,18 +713,27 @@ MS2_PUBLIC void video_stream_update_video_params(VideoStream *stream);
MS2_PUBLIC void video_stream_iterate(VideoStream *stream);
/**
* Ask the video stream to send a Full-Intra Request.
* Asks the video stream to send a Full-Intra Request.
* @param[in] stream The videostream object.
*/
MS2_PUBLIC void video_stream_send_fir(VideoStream *stream);
/**
* Ask the video stream to generate a Video Fast Update (generally after receiving a Full-Intra Request.
* Asks the video stream to generate a Video Fast Update (generally after receiving a Full-Intra Request.
* @param[in] stream The videostream object.
*/
MS2_PUBLIC void video_stream_send_vfu(VideoStream *stream);
MS2_PUBLIC void video_stream_stop(VideoStream * stream);
/**
* Try to set the size of the video that is sent. Since this relies also on the
* bitrate specified, make sure to set the payload bitrate accordingly with
* rtp_profile_get_payload and normal_bitrate value otherwise the best
* possible resolution will be taken instead of the requested one.
* @param[in] stream The videostream for which to get the sent video size.
* @param[in] vsize The sent video size wished.
*/
MS2_PUBLIC void video_stream_set_sent_video_size(VideoStream *stream, MSVideoSize vsize);
/**
......
......@@ -197,7 +197,7 @@ void start_adaptive_stream(MSFormatType type, stream_manager_t ** pmarielle, str
MediaStream *marielle_ms,*margaux_ms;
OrtpNetworkSimulatorParams params={0};
#if VIDEO_ENABLED
MSWebCam * marielle_webcam=ms_web_cam_manager_get_default_cam (ms_web_cam_manager_get());
MSWebCam * marielle_webcam=mediastreamer2_tester_get_mir_webcam(ms_web_cam_manager_get());
#endif
stream_manager_t *marielle=*pmarielle=stream_manager_new(type);
stream_manager_t *margaux=*pmargaux=stream_manager_new(type);
......
......@@ -86,7 +86,7 @@ extern void mediastreamer2_tester_set_writable_dir(const char* writable_dir);
int apple_main(int argc, char *argv[]);
#endif
MSWebCam* mediastreamer2_tester_get_mir_webcam();
MSWebCam* mediastreamer2_tester_get_mir_webcam(MSWebCamManager *mgr);
#ifdef __cplusplus
};
......
......@@ -39,18 +39,18 @@ static RtpProfile rtp_profile;
#define H264_PAYLOAD_TYPE 104
#define MP4V_PAYLOAD_TYPE 105
MSWebCam* mediastreamer2_tester_get_mir_webcam() {
MSWebCam* mediastreamer2_tester_get_mir_webcam(MSWebCamManager *mgr) {
MSWebCam *cam;
#ifdef _MSC_VER
extern __declspec(dllimport) MSWebCamDesc mire_desc;
#else
extern MSWebCamDesc mire_desc;
#endif
cam = ms_web_cam_manager_get_cam(ms_web_cam_manager_get(), "Mire: Mire (synthetic moving picture)");
cam = ms_web_cam_manager_get_cam(mgr, "Mire: Mire (synthetic moving picture)");
if (cam == NULL) {
cam=ms_web_cam_new(&mire_desc);
ms_web_cam_manager_add_cam(ms_web_cam_manager_get(),cam);
ms_web_cam_manager_add_cam(mgr,cam);
}
return cam;
......@@ -433,7 +433,7 @@ static void avpf_rpsi_count(void) {
marielle->vconf->fps=15;
marielle->vconf->vsize.height=MS_VIDEO_SIZE_CIF_H;
marielle->vconf->vsize.width=MS_VIDEO_SIZE_CIF_W;
marielle->cam = mediastreamer2_tester_get_mir_webcam();
marielle->cam = mediastreamer2_tester_get_mir_webcam(ms_web_cam_manager_get());
margaux->vconf=ms_new0(MSVideoConfiguration,1);
......@@ -441,7 +441,7 @@ static void avpf_rpsi_count(void) {
margaux->vconf->fps=5; /*to save cpu resource*/
margaux->vconf->vsize.height=MS_VIDEO_SIZE_CIF_H;
margaux->vconf->vsize.width=MS_VIDEO_SIZE_CIF_W;
margaux->cam = mediastreamer2_tester_get_mir_webcam();
margaux->cam = mediastreamer2_tester_get_mir_webcam(ms_web_cam_manager_get());
if (supported) {
init_video_streams(marielle, margaux, TRUE, FALSE, &params,VP8_PAYLOAD_TYPE);
......
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