mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 16:58:35 +00:00
FS-9266 #resolve
This commit is contained in:
parent
5fea56286e
commit
c0499fbb22
@ -352,10 +352,10 @@ SWITCH_DECLARE(void) switch_img_find_position(switch_img_position_t pos, int sw,
|
|||||||
*
|
*
|
||||||
* \param[in] src The image descriptor
|
* \param[in] src The image descriptor
|
||||||
* \param[in] dest The target memory address
|
* \param[in] dest The target memory address
|
||||||
* \param[in] size The size of target memory address used for bounds check
|
* \param[in] stride Bytes in a row for the destination. Pass 0 if the buffer has contiguous rows. Can be negative. A multiple of 16 is optimal.
|
||||||
* \param[in] fmt The target format
|
* \param[in] fmt The target format
|
||||||
*/
|
*/
|
||||||
SWITCH_DECLARE(switch_status_t) switch_img_to_raw(switch_image_t *src, void *dest, switch_size_t size, switch_img_fmt_t fmt);
|
SWITCH_DECLARE(switch_status_t) switch_img_to_raw(switch_image_t *src, void *dest, int stride, switch_img_fmt_t fmt);
|
||||||
/*!\brief convert raw memory to switch_img_t
|
/*!\brief convert raw memory to switch_img_t
|
||||||
*
|
*
|
||||||
* if dest is NULL then a new img is created, user should destroy it later,
|
* if dest is NULL then a new img is created, user should destroy it later,
|
||||||
|
@ -720,7 +720,7 @@ static switch_status_t video_thread_callback(switch_core_session_t *session, swi
|
|||||||
switch_assert(context->rawImage->width * 3 == context->rawImage->widthStep);
|
switch_assert(context->rawImage->width * 3 == context->rawImage->widthStep);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_img_to_raw(frame->img, context->rawImage->imageData, context->rawImage->widthStep * context->h, SWITCH_IMG_FMT_RGB24);
|
switch_img_to_raw(frame->img, context->rawImage->imageData, context->rawImage->widthStep, SWITCH_IMG_FMT_RGB24);
|
||||||
detectAndDraw(context);
|
detectAndDraw(context);
|
||||||
|
|
||||||
if (context->detected.simo_count > 20) {
|
if (context->detected.simo_count > 20) {
|
||||||
|
@ -1659,7 +1659,7 @@ int vlc_write_video_imem_get_callback(void *data, const char *cookie, int64_t *
|
|||||||
}
|
}
|
||||||
|
|
||||||
*output = context->video_frame_buffer;
|
*output = context->video_frame_buffer;
|
||||||
switch_img_to_raw(img, *output, *size, SWITCH_IMG_FMT_YUY2);
|
switch_img_to_raw(img, *output, 0, SWITCH_IMG_FMT_YUY2);
|
||||||
switch_img_free(&img);
|
switch_img_free(&img);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2031,7 +2031,7 @@ static inline uint32_t switch_img_fmt2fourcc(switch_img_fmt_t fmt)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_img_to_raw(switch_image_t *src, void *dest, switch_size_t size, switch_img_fmt_t fmt)
|
SWITCH_DECLARE(switch_status_t) switch_img_to_raw(switch_image_t *src, void *dest, int stride, switch_img_fmt_t fmt)
|
||||||
{
|
{
|
||||||
#ifdef SWITCH_HAVE_YUV
|
#ifdef SWITCH_HAVE_YUV
|
||||||
uint32_t fourcc;
|
uint32_t fourcc;
|
||||||
@ -2050,7 +2050,7 @@ SWITCH_DECLARE(switch_status_t) switch_img_to_raw(switch_image_t *src, void *des
|
|||||||
ret = ConvertFromI420(src->planes[0], src->stride[0],
|
ret = ConvertFromI420(src->planes[0], src->stride[0],
|
||||||
src->planes[1], src->stride[1],
|
src->planes[1], src->stride[1],
|
||||||
src->planes[2], src->stride[2],
|
src->planes[2], src->stride[2],
|
||||||
dest, size,
|
dest, stride,
|
||||||
src->d_w, src->d_h,
|
src->d_w, src->d_h,
|
||||||
fourcc);
|
fourcc);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user