@@ -16,7 +16,7 @@ namespace {
1616std::size_t computeBufferSize (int width, int height, VideoBufferType type) {
1717 if (width <= 0 || height <= 0 ) {
1818 throw std::invalid_argument (
19- " LKVideoFrame : width and height must be positive" );
19+ " VideoFrame : width and height must be positive" );
2020 }
2121
2222 const auto w = static_cast <std::size_t >(width);
@@ -70,7 +70,7 @@ std::size_t computeBufferSize(int width, int height, VideoBufferType type) {
7070 }
7171
7272 default :
73- throw std::runtime_error (" LKVideoFrame : unsupported VideoBufferType" );
73+ throw std::runtime_error (" VideoFrame : unsupported VideoBufferType" );
7474 }
7575}
7676
@@ -79,7 +79,7 @@ std::vector<VideoPlaneInfo>
7979computePlaneInfos (uintptr_t base, int width, int height, VideoBufferType type) {
8080 std::vector<VideoPlaneInfo> planes;
8181 if (!base || width <= 0 || height <= 0 ) {
82- std::cerr << " [LKVideoFrame ] Warning: invalid planeInfos input (ptr="
82+ std::cerr << " [VideoFrame ] Warning: invalid planeInfos input (ptr="
8383 << base << " , w=" << width << " , h=" << height << " )\n " ;
8484 return planes;
8585 }
@@ -261,29 +261,29 @@ computePlaneInfos(uintptr_t base, int width, int height, VideoBufferType type) {
261261} // namespace
262262
263263// ----------------------------------------------------------------------------
264- // LKVideoFrame implementation
264+ // VideoFrame implementation
265265// ----------------------------------------------------------------------------
266266
267- LKVideoFrame::LKVideoFrame ()
267+ VideoFrame::VideoFrame ()
268268 : width_{0 }, height_{0 }, type_{VideoBufferType::BGRA}, data_{} {}
269269
270- LKVideoFrame::LKVideoFrame (int width, int height, VideoBufferType type,
270+ VideoFrame::VideoFrame (int width, int height, VideoBufferType type,
271271 std::vector<std::uint8_t > data)
272272 : width_(width), height_(height), type_(type), data_(std::move(data)) {
273273 const std::size_t expected = computeBufferSize (width_, height_, type_);
274274 if (data_.size () < expected) {
275- throw std::invalid_argument (" LKVideoFrame : provided data is too small for "
275+ throw std::invalid_argument (" VideoFrame : provided data is too small for "
276276 " the specified format and size" );
277277 }
278278}
279279
280- LKVideoFrame LKVideoFrame ::create (int width, int height, VideoBufferType type) {
280+ VideoFrame VideoFrame ::create (int width, int height, VideoBufferType type) {
281281 const std::size_t size = computeBufferSize (width, height, type);
282282 std::vector<std::uint8_t > buffer (size, 0 );
283- return LKVideoFrame (width, height, type, std::move (buffer));
283+ return VideoFrame (width, height, type, std::move (buffer));
284284}
285285
286- std::vector<VideoPlaneInfo> LKVideoFrame ::planeInfos () const {
286+ std::vector<VideoPlaneInfo> VideoFrame ::planeInfos () const {
287287 if (data_.empty ()) {
288288 return {};
289289 }
@@ -292,24 +292,24 @@ std::vector<VideoPlaneInfo> LKVideoFrame::planeInfos() const {
292292 return computePlaneInfos (base, width_, height_, type_);
293293}
294294
295- LKVideoFrame LKVideoFrame ::convert (VideoBufferType dst, bool flip_y) const {
295+ VideoFrame VideoFrame ::convert (VideoBufferType dst, bool flip_y) const {
296296 // Fast path: same format, no flip -> just clone the buffer.
297- // We still return a *new* LKVideoFrame , never `*this`, so copy-ctor
297+ // We still return a *new* VideoFrame , never `*this`, so copy-ctor
298298 // being deleted is not a problem.
299299 if (dst == type_ && !flip_y) {
300300 std::cerr << " KVideoFrame::convert Warning: converting to the same format"
301301 << std::endl;
302302 // copy pixel data
303303 std::vector<std::uint8_t > buf = data_;
304- return LKVideoFrame (width_, height_, type_, std::move (buf));
304+ return VideoFrame (width_, height_, type_, std::move (buf));
305305 }
306306
307307 // General path: delegate to the FFI-based conversion helper.
308- // This returns a brand new LKVideoFrame (move-constructed / elided).
308+ // This returns a brand new VideoFrame (move-constructed / elided).
309309 return convertViaFfi (*this , dst, flip_y);
310310}
311311
312- LKVideoFrame LKVideoFrame ::fromOwnedInfo (const proto::OwnedVideoBuffer &owned) {
312+ VideoFrame VideoFrame ::fromOwnedInfo (const proto::OwnedVideoBuffer &owned) {
313313 const auto &info = owned.info ();
314314 const int width = static_cast <int >(info.width ());
315315 const int height = static_cast <int >(info.height ());
@@ -359,7 +359,7 @@ LKVideoFrame LKVideoFrame::fromOwnedInfo(const proto::OwnedVideoBuffer &owned) {
359359 // owned_handle destroyed at end of scope → native buffer disposed.
360360 }
361361
362- return LKVideoFrame (width, height, type, std::move (buffer));
362+ return VideoFrame (width, height, type, std::move (buffer));
363363}
364364
365365} // namespace livekit
0 commit comments