Rtspvideoplugin __exclusive__ May 2026

 
 
 
 

add_library(rtsp_plugin SHARED src/plugin.cpp) target_include_directories(rtsp_plugin PRIVATE $FFMPEG_INCLUDE_DIRS) target_link_libraries(rtsp_plugin $FFMPEG_LIBRARIES) target_compile_definitions(rtsp_plugin PRIVATE -DPLUGIN_EXPORTS)

__declspec(dllexport) void UpdateTexture(void* player, void* texturePtr, int width, int height) uint8_t* rgbData; ((FFmpegRTSPDecoder*)player)->readFrame(&rgbData, &width, &height); // Copy to Unity Texture2D native pointer memcpy(texturePtr, rgbData, width * height * 3);

void Start() player = CreateRTSPPlayer(); OpenStream(player, "rtsp://192.168.1.100/stream"); videoTexture = new Texture2D(1920, 1080, TextureFormat.RGB24, false); GetComponent<Renderer>().material.mainTexture = videoTexture;