Skip to content

Console: API response only 10 streams, should support pagination by console. #3451

@saturndeng

Description

@saturndeng

Note: Please read the FAQ before filing an issue, see #2716

Description

SRS 6.0.26 console only displays up to 10 video streams. If there are more than 10 video streams, they will not be displayed in the video stream list. In the console's virtual host (Vhosts) menu, you can see 13 online streams, but in the console's video stream menu, you can only see 10 video stream lists. The other three video streams are not displayed in the video stream list, but they can indeed be watched normally.

  1. SRS Version: 6.0.26

  2. SRS Console screenshot:

Virtual host menu shows 13 online streams, screenshot (copy the link below and open it in a new window to view):
https://mclz.fjxf-119.cn:7443/uploads/20221113/13.png

Console video stream menu only lists 10 video streams, and the ones exceeding 10 are not displayed (copy the link below and open it in a new window to view):

https://mclz.fjxf-119.cn:7443/uploads/20221113/10.png

In the source code srs_app_http_api.cpp, around line 796, is the count of online streams incorrect, causing the maximum to be 10?

     int count = srs_max(10, atoi(rcount.c_str()));   
       std::string rstart = r->query_get("start");
        std::string rcount = r->query_get("count");
        int start = srs_max(0, atoi(rstart.c_str()));
        int count = srs_max(10, atoi(rcount.c_str()));
        if ((err = stat->dumps_streams(data, start, count)) != srs_success) {
            int code = srs_error_code(err);
            srs_error_reset(err);
            return srs_api_response_code(w, r, code);
        }

Expectation

Hope to display all online video streams

Metadata

Metadata

Labels

APIHTTP-API, HTTP-Callback, etc.BugIt might be a bug.EnglishNativeThis issue is conveyed exclusively in English.EnhancementImprovement or enhancement.FeatureIt's a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions