Skip to content

Commit

Permalink
Merge pull request #16 from aliyun/remove_rtmp_params
Browse files Browse the repository at this point in the history
rtmp
  • Loading branch information
baiyubin2020 authored Aug 10, 2016
2 parents 9cebea0 + 95f4e38 commit 60a3059
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions oss_c_sdk/oss_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -677,16 +677,13 @@ aos_status_t *oss_gen_vod_play_list(const oss_request_options_t *options,
* @param[in] live_channel the oss live channel name
* @param[in] play_list_name the oss live channel play list name
* @param[in] expires the end expire time for signed url
* @param[in] params the user defined parameters in signed url,
* if none, fill NULL
* @return signed url, non-NULL success, NULL failure
*/
char *oss_gen_rtmp_signed_url(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *live_channel,
const aos_string_t *play_list_name,
const int64_t expires,
aos_table_t *params);
const int64_t expires);

OSS_CPP_END

Expand Down
4 changes: 2 additions & 2 deletions oss_c_sdk/oss_live.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,14 @@ char *oss_gen_rtmp_signed_url(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *live_channel,
const aos_string_t *play_list_name,
const int64_t expires,
aos_table_t *params)
const int64_t expires)
{
aos_string_t signed_url;
char *expires_str = NULL;
aos_string_t expires_time;
int res = AOSE_OK;
aos_http_request_t *req = NULL;
aos_table_t *params = NULL;

expires_str = apr_psprintf(options->pool, "%" APR_INT64_T_FMT, expires);
aos_str_set(&expires_time, expires_str);
Expand Down
2 changes: 1 addition & 1 deletion oss_c_sdk_test/test_oss_live.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ void test_gen_rtmp_signed_url(CuTest *tc)
aos_str_set(&play_list_name, "play.m3u8");
expires = apr_time_now() / 1000000 + 60 * 30;
rtmp_url = oss_gen_rtmp_signed_url(options, &bucket, &channel_name,
&play_list_name, expires, NULL);
&play_list_name, expires);

// manual check passed
CuAssertStrnEquals(tc, AOS_RTMP_PREFIX, strlen(AOS_RTMP_PREFIX), rtmp_url);
Expand Down

0 comments on commit 60a3059

Please sign in to comment.