mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-09 21:14:02 +00:00
[Unit-tests] Fix previously defined AM_* in tests.
This commit is contained in:
@@ -21,9 +21,14 @@ FST_CORE_BEGIN("./conf")
|
||||
|
||||
FST_TEST_BEGIN(vp8_test)
|
||||
{
|
||||
switch_image_t *img;
|
||||
uint8_t buf[SWITCH_DEFAULT_VIDEO_SIZE + 12];
|
||||
switch_status_t status;
|
||||
switch_codec_t codec = { 0 };
|
||||
switch_frame_t frame = { 0 };
|
||||
switch_codec_settings_t codec_settings = {{ 0 }};
|
||||
int packets = 0;
|
||||
switch_status_t encode_status;
|
||||
|
||||
// switch_set_string(codec_settings.video.config_profile_name, "conference");
|
||||
codec_settings.video.width = 1280;
|
||||
@@ -39,12 +44,9 @@ FST_CORE_BEGIN("./conf")
|
||||
&codec_settings, fst_pool);
|
||||
fst_check(status == SWITCH_STATUS_SUCCESS);
|
||||
|
||||
switch_image_t *img = switch_img_alloc(NULL, SWITCH_IMG_FMT_I420, 1280, 720, 1);
|
||||
img = switch_img_alloc(NULL, SWITCH_IMG_FMT_I420, 1280, 720, 1);
|
||||
fst_requires(img);
|
||||
|
||||
uint8_t buf[SWITCH_DEFAULT_VIDEO_SIZE + 12];
|
||||
switch_frame_t frame = { 0 };
|
||||
|
||||
frame.packet = buf;
|
||||
frame.packetlen = SWITCH_DEFAULT_VIDEO_SIZE + 12;
|
||||
frame.data = buf + 12;
|
||||
@@ -55,9 +57,6 @@ FST_CORE_BEGIN("./conf")
|
||||
frame.timestamp = 0;
|
||||
frame.img = img;
|
||||
|
||||
int packets = 0;
|
||||
switch_status_t encode_status;
|
||||
|
||||
do {
|
||||
frame.datalen = SWITCH_DEFAULT_VIDEO_SIZE;
|
||||
encode_status = switch_core_codec_encode_video(&codec, &frame);
|
||||
|
||||
Reference in New Issue
Block a user