(x, y, width, height)
| 261 | } |
| 262 | |
| 263 | _createContext(x, y, width, height) { |
| 264 | const maxContexts = 64; |
| 265 | if (Object.keys(this._contexts).length >= maxContexts) { |
| 266 | let oldestContextId = this._findOldestContextId(); |
| 267 | delete this._contexts[oldestContextId]; |
| 268 | } |
| 269 | let context = new H264Context(width, height); |
| 270 | this._contexts[this._contextId(x, y, width, height)] = context; |
| 271 | return context; |
| 272 | } |
| 273 | |
| 274 | _getContext(x, y, width, height) { |
| 275 | let context = this._contexts[this._contextId(x, y, width, height)]; |
no test coverage detected