Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Receive RTP/H264 packet and show as a texture

Discussion in 'Windows' started by halleywang, Mar 16, 2017.

  1. halleywang

    halleywang

    Joined:
    Mar 2, 2017
    Posts:
    14
    Hi everyone, I want to receive RTP/H264 packet from my server on my UWP device.
    At the beginning, I tried to use plugins for VLC which can allow me to open sdp file and start the streaming. But the plugins for VLC all cannot be built into my UWP device.

    The x86 dll files setting is :
    platform for plugins -> "WSA players"
    SDK -> UWP
    CPU ->x86
    ScriptingBackend -> dot Net
    Don't Process -> ticked

    Then build as VS Project and build into my uwp device, but VS cannot find the dll file. After copy and paste the dll files directly to VS project, VS can find the dll file but it cannot recognize the dll files as x86 architecture when building into HoloLens(UWP x86).

    Q1: What else can I try to build the dll files into UWP?

    If the dll files cannot use in UWP in the end, then I think I should de-packetize the RTP/h264 packet from the server by myself and decode the h264 frame buffer. The de-packetize steps can be find in many tutorials, but I don't know how to decode the h264 frame buffer in Unity.

    Q2: How to decode the h264 frame buffer in Unity?

    Thanks!

    P.S. Sorry if it is a naive question.

    Best Regards,
    Halley
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,644
    DLL files are available to use on HoloLens, but they have to be recompiled for UWP. You can't simply take a DLL compiled for Win32 and use it on UWP.
     
  3. halleywang

    halleywang

    Joined:
    Mar 2, 2017
    Posts:
    14
    Hi Tautvydas-Zilys,thanks for your quick reply!

    But if I use the DLL files which is recompiled by unity, VS will return an error as I mentioned above...it cannot recognize the DLL files as x86 architecture...

    Does it mean there's some errors in the DLL files (They can be used in Unity Editor )?
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,644
    Unity does not recompile your native DLL files. You must recompile them yourself from C/C++ source code.
     
  5. halleywang

    halleywang

    Joined:
    Mar 2, 2017
    Posts:
    14
    Hi Tautvydas-Zilys,thanks again!!

    Now I got the point...the Dll file cannot be used in UWP because it is not compiled for UWP!!

    Thank you !!!
     
  6. hui11

    hui11

    Joined:
    Jul 31, 2018
    Posts:
    1
    hi,do you get a solution for receiving RTP/H264 packet from server on my UWP device?