All Products
Search
Document Center

:lv_stop_push_streaming_cb

Last Updated:Mar 01, 2022

Sends notifications when a link to the URL that is used to push live streams or play local videos is disconnected.

This operation is a callback function. After you receive the notifications, you must stop the pushing of the streams.

Description

typedef int (*lv_stop_push_streaming_cb)(const lv_device_auth_s *auth, const lv_stop_push_stream_param_s *param);

The following table describes the related parameters.

Parameter

Type

Description

auth

lv_device_auth_s *

The device information for authentication.

param

const lv_stop_push_stream_param_s*

The additional parameters, such as the main stream or sub-stream of the live stream.

Sample code

Note

The sample code is provided for reference only. The complete code is contained in the SDK.

// The callback function stop_push_streaming_cb is defined in SDK Demo to implement the lv_start_push_streaming_cb operation.
lv_stop_push_streaming_cb = stop_push_streaming_cb;

// The callback function stopPushStreamingCallback is defined in SDK Demo.
static int stop_push_streaming_cb(const lv_device_auth_s *auth, const lv_stop_push_stream_param_s *param) {
{
    if (param->service_id == g_live_service_id) {
        // Stop the live stream.
    } else if (param->service_id == g_vod_service_id) {
        // Stop the playback of local videos.
    }

    return 0;
}