Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onPictureDecode not firing the callback #249

Open
irwansyah195 opened this issue Sep 5, 2023 · 2 comments
Open

onPictureDecode not firing the callback #249

irwansyah195 opened this issue Sep 5, 2023 · 2 comments

Comments

@irwansyah195
Copy link

irwansyah195 commented Sep 5, 2023

hii , i want show RTSP stream video using SignalR and show it in web view using broadway , i already have the data from SignalR but onPictureDecode not firing my callback , please correct me if i wrong ?

Data After convert :
Data rawframe after convert

Data Before Convert :
Data rawframe before convert

CCTV Config :
CCTV config
is my NAL Units is correct and my CCTV encode is support broadway decoder ?

  var connection = new signalR.HubConnectionBuilder().withUrl("/VideoStreamHub").build();
        var decoder = new Decoder({
            rgb: true,
            sliceMode: 0
        })

        decoder.onPictureDecoded = function (buffer, width, height) {
            console.log("onPictureDecoded")
        };


        connection.on("ReceiveFrame", function (frameData) {
            try {
                var data = toUint8Array(frameData);

                console.log(data);
                decoder.decode(data);


            } catch (error) {
                console.log(error)
            }

        });

        var toUint8Array = function (parStr) {
            var raw = window.atob(parStr);
            var rawLength = raw.length;
            var array = new Uint8Array(new ArrayBuffer(rawLength));

            var i;
            for (i = 0; i < rawLength; i++) {
                array[i] = raw.charCodeAt(i);
            }

            return array;
        };

can someone help me , i have stuck with this more than 1 week .

@stoefln
Copy link

stoefln commented Mar 24, 2024

Same here! Did you find any solution @irwansyah195 ?

@wakawaka666
Copy link

兄弟 解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants