H265Session.js 797 B

12345678910111213141516171819202122232425262728293031323334
  1. function H265Session() {
  2. let frameRate = null; //根据SDP或者SPS设置
  3. let decodeMode = 'canvas';
  4. function constructor() {
  5. }
  6. constructor.prototype = {
  7. init() {
  8. this.resolutionChangedCallback = () => {
  9. };
  10. },
  11. remuxRTPData(rtspInterleaved, rtpHeader, rtpPayload){
  12. console.log('h265session->',rtspInterleaved, rtpHeader, rtpPayload);
  13. },
  14. set rtpSessionCallback(func) {
  15. this.handleDecodedData = func;
  16. },
  17. setFrameRate(fps) {
  18. frameRate = fps;
  19. //console.log('frameRate: ', frameRate)
  20. },
  21. setResolutionChangedCallback(callback) {
  22. this.resolutionChangedCallback = callback;
  23. }
  24. }
  25. return new constructor();
  26. }