{"id":219649,"date":"2014-04-21T10:03:03","date_gmt":"2014-04-21T06:03:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=219649"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=219649","title":{"rendered":"<span class=\"post_title\">\u0417\u0430\u0445\u0432\u0430\u0442 \u0432\u0438\u0434\u0435\u043e \u0432 Unity3d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Intel INDE Media Pack \u0434\u043b\u044f Android<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/c87\/b11\/266\/c87b112669db1866746cfc49abe6a43f.png\" alt=\"image\" align=\"left\"\/>\u0412 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043a \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e <a href=\"http:\/\/habrahabr.ru\/company\/intel\/blog\/218761\/\">\u0437\u0430\u0445\u0432\u0430\u0442 \u0432\u0438\u0434\u0435\u043e \u0432 OpenGL \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445<\/a> \u0431\u044b\u043b\u0430 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0432\u0438\u0434\u0435\u043e \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Unity3d. \u041d\u0430\u0441 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u00ab\u0447\u0438\u0441\u0442\u044b\u0435\u00bb OpenGL \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u0433\u0440 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438? \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0430\u0434\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2013 \u0437\u0430\u0445\u0432\u0430\u0442 \u0432\u0438\u0434\u0435\u043e \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"http:\/\/unity3d.com\">Unity3d<\/a> \u043f\u043e\u0434 Android.<\/p>\n<h6>\u0411\u043e\u043d\u0443\u0441!<\/h6>\n<p>  \u041f\u043e \u043c\u043e\u0442\u0438\u0432\u0430\u043c \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u0435\u0441\u044c \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442 \u0432\u0438\u0434\u0435\u043e \u0432 Unity3d, \u043d\u043e \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c Unity \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u043f\u043e\u0434 Android.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0432\u0438\u0434\u0435\u043e \u0432 Unity3d:<\/p>\n<p>  1. \u041f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0441\u0442 \u044d\u0444\u0444\u0435\u043a\u0442. \u0421\u043f\u043e\u0441\u043e\u0431 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 Pro \u0432\u0435\u0440\u0441\u0438\u0438, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u0432\u0438\u0434\u0435\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f <a href=\"http:\/\/docs.unity3d.com\/Documentation\/Components\/GUIScriptingGuide.html\">Unity GUI<\/a><\/p>\n<p>  2. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0430\u0434\u0440\u043e\u0432\u043e\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430 (<i>FrameBuffer<\/i>). \u0411\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 Unity3d, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043f\u043b\u0430\u0442\u043d\u0443\u044e \u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0443\u044e, \u043e\u0431\u044a\u0435\u043a\u0442\u044b Unity GUI \u0431\u0443\u0434\u0443\u0442 \u0442\u0430\u043a \u0436\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0438\u0434\u0435\u043e.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0427\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f<\/h4>\n<p>  <\/p>\n<ul>\n<li><a href=\"http:\/\/unity3d.com\/unity\/download\">Unity3d<\/a> \u0432\u0435\u0440\u0441\u0438\u0438 4.3 Pro \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043b\u0438\u0431\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0442\u043e\u0434 \u0441 \u043a\u0430\u0434\u0440\u043e\u0432\u044b\u043c \u0431\u0443\u0444\u0435\u0440\u043e\u043c<\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 <a href=\"http:\/\/developer.android.com\/sdk\/index.html\">Android SDK<\/a><\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 <a href=\"http:\/\/habrahabr.ru\/company\/intel\/blog\/216545\/\">Intel INDE Media Pack<\/a><\/li>\n<li><a href=\"http:\/\/ant.apache.org\/\">Apache Ant <\/a> (\u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 Unity \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043f\u043e\u0434 Android)<\/li>\n<\/ul>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h4>\n<p>  \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 Unity \u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442. \u0412 \u043f\u0430\u043f\u043a\u0435 \u0430\u0441\u0441\u0435\u0442\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 <i>Plugins<\/i>, \u0430 \u0432 \u043d\u0435\u0439 \u043f\u0430\u043f\u043a\u0443 <i>Android<\/i>.<\/p>\n<p>  \u0412 \u043f\u0430\u043f\u043a\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u044b\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d <i>Intel INDE Media Pack for Android<\/i>, \u0438\u0437 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <i>libs<\/i> \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0432\u0430 jar-\u0444\u0430\u0439\u043b\u0430 (<i>android-&lt;\u0432\u0435\u0440\u0441\u0438\u044f&gt;.jar \u0438 domain-&lt;\u0432\u0435\u0440\u0441\u0438\u044f&gt;.jar<\/i>) \u0432 \u043f\u0430\u043f\u043a\u0443 <i>Android<\/i> \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/3e4\/fab\/382\/3e4fab382b02e2b5e3b526918beb2ab5.png\" alt=\"image\"\/><\/p>\n<p>  \u0412 \u0442\u043e\u0439 \u0436\u0435 \u043f\u0430\u043f\u043a\u0435 <i>Android<\/i> \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <i>Capturing.java<\/i> \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<h6>Capturing.java<\/h6>\n<p>  <\/p>\n<pre><code class=\"java\">package com.intel.inde.mp.samples.unity;  import com.intel.inde.mp.android.graphics.FullFrameTexture;  import android.os.Environment; import java.io.IOException; import java.io.File;  public class Capturing {      private static FullFrameTexture texture; \t     public Capturing()     {         texture = new FullFrameTexture();     }      \/\/ \u041f\u0443\u0442\u044c \u043a \u043f\u0430\u043f\u043a\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u0438\u0434\u0435\u043e     public static String getDirectoryDCIM()     {         return Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM) + File.separator;     }      \/\/ \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432\u0438\u0434\u0435\u043e     public void initCapturing(int width, int height, int frameRate, int bitRate)     {         VideoCapture.init(width, height, frameRate, bitRate);     }      \/\/ \u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0432\u0438\u0434\u0435\u043e     public void startCapturing(String videoPath)     {         VideoCapture capture = VideoCapture.getInstance();          synchronized (capture)          {             try              {                 capture.start(videoPath);             }              catch (IOException e)              {             }         }     }      \/\/ \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u0430     public void captureFrame(int textureID)     {         VideoCapture capture = VideoCapture.getInstance();          synchronized (capture)          {             capture.beginCaptureFrame();             texture.draw(textureID);             capture.endCaptureFrame();         }     }      \/\/ \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0432\u0438\u0434\u0435\u043e     public void stopCapturing()     {         VideoCapture capture = VideoCapture.getInstance();          synchronized (capture)          {             if (capture.isStarted())              {                 capture.stop();             }         }     } } <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d Java \u0444\u0430\u0439\u043b, \u0432 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <i>VideoCapture.java<\/i>:<\/p>\n<h6>VideoCapture.java<\/h6>\n<p>  <\/p>\n<pre><code class=\"java\">package com.intel.inde.mp.samples.unity;  import com.intel.inde.mp.*; import com.intel.inde.mp.android.AndroidMediaObjectFactory; import com.intel.inde.mp.android.AudioFormatAndroid; import com.intel.inde.mp.android.VideoFormatAndroid;  import java.io.IOException;  public class VideoCapture {     private static final String TAG = &quot;VideoCapture&quot;;      private static final String Codec = &quot;video\/avc&quot;;     private static int IFrameInterval = 1;      private static final Object syncObject = new Object();     private static volatile VideoCapture videoCapture;      private static VideoFormat videoFormat;     private static int videoWidth;     private static int videoHeight;     private GLCapture capturer;      private boolean isConfigured;     private boolean isStarted;     private long framesCaptured;      private VideoCapture()     {     }          public static void init(int width, int height, int frameRate, int bitRate)     {         videoWidth = width;         videoHeight = height;     \t         videoFormat = new VideoFormatAndroid(Codec, videoWidth, videoHeight);         videoFormat.setVideoFrameRate(frameRate);         videoFormat.setVideoBitRateInKBytes(bitRate);         videoFormat.setVideoIFrameInterval(IFrameInterval);     }      public static VideoCapture getInstance()     {         if (videoCapture == null)          {             synchronized (syncObject)              {                 if (videoCapture == null)                 {                     videoCapture = new VideoCapture();                 }             }         }         return videoCapture;     }      public void start(String videoPath) throws IOException     {         if (isStarted())         {             throw new IllegalStateException(TAG + &quot; already started!&quot;);         }          capturer = new GLCapture(new AndroidMediaObjectFactory());         capturer.setTargetFile(videoPath);         capturer.setTargetVideoFormat(videoFormat);          AudioFormat audioFormat = new AudioFormatAndroid(&quot;audio\/mp4a-latm&quot;, 44100, 2);         capturer.setTargetAudioFormat(audioFormat);          capturer.start();          isStarted = true;         isConfigured = false;         framesCaptured = 0;     }              public void stop()     {         if (!isStarted())         {             throw new IllegalStateException(TAG + &quot; not started or already stopped!&quot;);         }          try          {             capturer.stop();             isStarted = false;         }          catch (Exception ex)          {         }          capturer = null;         isConfigured = false;     }      private void configure()     {         if (isConfigured())         {             return;         }          try          {             capturer.setSurfaceSize(videoWidth, videoHeight);             isConfigured = true;         }          catch (Exception ex)          {         }     }      public void beginCaptureFrame()     {         if (!isStarted())         {             return;         }          configure();          if (!isConfigured())         {             return;         }          capturer.beginCaptureFrame();     }      public void endCaptureFrame()     {         if (!isStarted() || !isConfigured())         {             return;         }          capturer.endCaptureFrame();          framesCaptured++;     }      public boolean isStarted()     {         return isStarted;     }      public boolean isConfigured()     {         return isConfigured;     } } <\/code><\/pre>\n<p>  <b>\u0412\u0430\u0436\u043d\u043e<\/b>: \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u0430 <i>com.intel.inde.mp.samples.unity<\/i>. \u041e\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (<i>Player Settings\/Other Settings\/Bundle identifier<\/i>):<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/4d1\/260\/f36\/4d1260f367e6f6af09a8a9f7a371fb52.png\" alt=\"image\"\/><\/p>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e \u0436\u0435 \u0438\u043c\u044f \u0432 C#-\u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 Java-\u043a\u043b\u0430\u0441\u0441\u0430. \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0438\u043c\u0435\u043d\u0430 \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0443\u0442, \u0432\u0430\u0448\u0430 \u0438\u0433\u0440\u0430 \u0443\u043f\u0430\u0434\u0435\u0442 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435.<\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0432\u0430\u0448\u0443 \u0441\u0446\u0435\u043d\u0443 \u043a\u0430\u043a\u043e\u0435-\u043b\u0438\u0431\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435. \u0422\u0430\u043a \u0436\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c Intel\u00ae INDE Media Pack for Android* \u0441 \u043b\u044e\u0431\u044b\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u0430 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043d\u0443\u043b\u044f. \u041d\u043e \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0432 \u0441\u0446\u0435\u043d\u0435 \u0431\u044b\u043b\u043e \u0447\u0442\u043e-\u0442\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u043d\u043e\u0435. \u0418\u043d\u0430\u0447\u0435 \u0432\u0430\u043c \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0432\u0438\u0434\u0435\u043e-\u0440\u043e\u043b\u0438\u043a\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. <\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u0430\u043a \u0432 \u043b\u044e\u0431\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u043c Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0432 \u043f\u0430\u043f\u043a\u0435 <i>\/Plugins\/Android<\/i> \u0444\u0430\u0439\u043b <i>AndroidManifest.xml<\/i> \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:<\/p>\n<h6>AndroidManifest.xml <\/h6>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;manifest     xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     package=&quot;com.intel.inde.mp.samples.unity&quot;     android:installLocation=&quot;preferExternal&quot;     android:theme=&quot;@android:style\/Theme.NoTitleBar&quot;     android:versionCode=&quot;1&quot;     android:versionName=&quot;1.0&quot;&gt; \t       &lt;uses-sdk android:minSdkVersion=&quot;18&quot; \/&gt; \t     &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;\/&gt;     &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;\/&gt; \t     &lt;!\u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d --&gt;     &lt;uses-permission android:name=&quot;android.permission.RECORD_AUDIO&quot; \/&gt; \t     &lt;!-- \u0422\u0440\u0435\u0431\u0443\u0435\u0442 OpenGL ES &gt;= 2.0. --&gt;     &lt;uses-feature         android:glEsVersion=&quot;0x00020000&quot;         android:required=&quot;true&quot;\/&gt; \t     &lt;application \t android:icon=&quot;@drawable\/app_icon&quot;         android:label=&quot;@string\/app_name&quot;         android:debuggable=&quot;true&quot;&gt;         &lt;activity android:name=&quot;com.unity3d.player.UnityPlayerNativeActivity&quot;                   android:label=&quot;@string\/app_name&quot;&gt;             &lt;intent-filter&gt;                 &lt;action android:name=&quot;android.intent.action.MAIN&quot; \/&gt;                 &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; \/&gt;             &lt;\/intent-filter&gt;             &lt;meta-data android:name=&quot;unityplayer.UnityActivity&quot; android:value=&quot;true&quot; \/&gt;             &lt;meta-data android:name=&quot;unityplayer.ForwardNativeEventsToDalvik&quot; android:value=&quot;false&quot; \/&gt;         &lt;\/activity&gt;     &lt;\/application&gt;  &lt;\/manifest&gt; <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0443:<\/p>\n<pre><code class=\"xml\">package=&quot;com.intel.inde.mp.samples.unity&quot; <\/code><\/pre>\n<p>  \u0418\u043c\u044f \u043f\u0430\u043a\u0435\u0442\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0441\u0451 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435. \u0422\u0430\u043a \u043a\u0430\u043a Unity \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0448\u0438 Java-\u0444\u0430\u0439\u043b\u044b \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c Ant-\u0441\u043a\u0440\u0438\u043f\u0442. <\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/b>: \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0430\u0448 Ant-\u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 <a href=\"http:\/\/ant.apache.org\/manual\/\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>). <\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 Ant-\u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443\u0440\u043e\u043a\u0430. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0432 \u043f\u0430\u043f\u043a\u0435 <i>\/Plugins\/Android\/<\/i> \u0444\u0430\u0439\u043b <i>build.xml<\/i>:<\/p>\n<h6>build.xml<\/h6>\n<p>  <\/p>\n<pre><code class=\"xml\"> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;project name=&quot;UnityCapturing&quot;&gt;     &lt;!-- Change this in order to match your configuration --&gt;     &lt;property name=&quot;sdk.dir&quot; value=&quot;C:\\Android\\sdk&quot;\/&gt;     &lt;property name=&quot;target&quot; value=&quot;android-18&quot;\/&gt;     &lt;property name=&quot;unity.androidplayer.jarfile&quot; value=&quot;C:\\Program Files (x86)\\Unity\\Editor\\Data\\PlaybackEngines\\androiddevelopmentplayer\\bin\\classes.jar&quot;\/&gt;     &lt;!-- Source directory --&gt;     &lt;property name=&quot;source.dir&quot; value=&quot;\\ProjectPath\\Assets\\Plugins\\Android&quot; \/&gt;     &lt;!-- Output directory for .class files--&gt;     &lt;property name=&quot;output.dir&quot; value=&quot;\\ProjectPath\\Assets\\Plugins\\Android\\classes&quot;\/&gt;     &lt;!-- Name of the jar to be created. Please note that the name should match the name of the class and the name     placed in the AndroidManifest.xml--&gt;     &lt;property name=&quot;output.jarfile&quot; value=&quot;Capturing.jar&quot;\/&gt;       &lt;!-- Creates the output directories if they don't exist yet. --&gt;     &lt;target name=&quot;-dirs&quot;  depends=&quot;message&quot;&gt;         &lt;echo&gt;Creating output directory: ${output.dir} &lt;\/echo&gt;         &lt;mkdir dir=&quot;${output.dir}&quot; \/&gt;     &lt;\/target&gt;    &lt;!-- Compiles this project's .java files into .class files. --&gt;     &lt;target name=&quot;compile&quot; depends=&quot;-dirs&quot;                 description=&quot;Compiles project's .java files into .class files&quot;&gt;         &lt;javac encoding=&quot;ascii&quot; target=&quot;1.6&quot; debug=&quot;true&quot; destdir=&quot;${output.dir}&quot; verbose=&quot;${verbose}&quot; includeantruntime=&quot;false&quot;&gt;             &lt;src path=&quot;${source.dir}&quot; \/&gt;             &lt;classpath&gt;                 &lt;pathelement location=&quot;${sdk.dir}\\platforms\\${target}\\android.jar&quot;\/&gt; \t\t\t\t&lt;pathelement location=&quot;${source.dir}\\domain-1.0.903.jar&quot;\/&gt; \t\t\t\t&lt;pathelement location=&quot;${source.dir}\\android-1.0.903.jar&quot;\/&gt;                 &lt;pathelement location=&quot;${unity.androidplayer.jarfile}&quot;\/&gt;             &lt;\/classpath&gt;         &lt;\/javac&gt;     &lt;\/target&gt;     &lt;target name=&quot;build-jar&quot; depends=&quot;compile&quot;&gt;         &lt;zip zipfile=&quot;${output.jarfile}&quot;             basedir=&quot;${output.dir}&quot; \/&gt;     &lt;\/target&gt;     &lt;target name=&quot;clean-post-jar&quot;&gt;          &lt;echo&gt;Removing post-build-jar-clean&lt;\/echo&gt;          &lt;delete dir=&quot;${output.dir}&quot;\/&gt;     &lt;\/target&gt;     &lt;target name=&quot;clean&quot; description=&quot;Removes output files created by other targets.&quot;&gt;         &lt;delete dir=&quot;${output.dir}&quot; verbose=&quot;${verbose}&quot; \/&gt;     &lt;\/target&gt;     &lt;target name=&quot;message&quot;&gt;      &lt;echo&gt;Android Ant Build for Unity Android Plugin&lt;\/echo&gt;         &lt;echo&gt;   message:      Displays this message.&lt;\/echo&gt;         &lt;echo&gt;   clean:     Removes output files created by other targets.&lt;\/echo&gt;         &lt;echo&gt;   compile:   Compiles project's .java files into .class files.&lt;\/echo&gt;         &lt;echo&gt;   build-jar: Compiles project's .class files into .jar file.&lt;\/echo&gt;     &lt;\/target&gt; &lt;\/project&gt; <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0443\u0442\u0438 <i>source.dir<\/i>, <i>output.dir<\/i> \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0430 \u0438\u043c\u044f \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e jar-\u0444\u0430\u0439\u043b\u0430 <i>output.jarfile<\/i>. <\/p>\n<p>  \u0412 \u0440\u0435\u0436\u0438\u043c\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043f\u0430\u043f\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <i>\/Plugins\/Android<\/i> \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 <\/p>\n<pre><code class=\"dos\">ant build-jar clean-post-jar <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435, \u0442\u043e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u0431\u043e\u0440\u043a\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430!<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/87c\/b32\/750\/87cb32750b298810fe83c394c9c7b155.png\" alt=\"image\"\/><\/p>\n<p>  \u041d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0432 \u043f\u0430\u043f\u043a\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b <i>Capturing.jar<\/i>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043a\u043e\u0434 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430.<\/p>\n<p>  \u041f\u043b\u0430\u0433\u0438\u043d \u0433\u043e\u0442\u043e\u0432, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u043d\u0435\u0441\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434 Unity3d, \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0431\u0435\u0440\u0442\u043a\u0443, \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0449\u0443\u044e Unity \u0438 \u043d\u0430\u0448 Android \u043f\u043b\u0430\u0433\u0438\u043d. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0444\u0430\u0439\u043b <i>Capture.cs<\/i><\/p>\n<h6>Capture.cs<\/h6>\n<p>  <\/p>\n<pre><code class=\"cs\">using UnityEngine; using System.Collections; using System.IO; using System;  [RequireComponent(typeof(Camera))] public class Capture : MonoBehaviour { \tpublic int videoWidth = 720; \tpublic int videoHeight = 1094; \tpublic int videoFrameRate = 30; \tpublic int videoBitRate = 3000;  \tprivate string videoDir; \tpublic string fileName = &quot;game_capturing-&quot;; \t \tprivate float nextCapture = 0.0f; \tpublic bool inProgress { get; private set; } \t \tprivate static IntPtr constructorMethodID = IntPtr.Zero; \tprivate static IntPtr initCapturingMethodID = IntPtr.Zero; \tprivate static IntPtr startCapturingMethodID = IntPtr.Zero; \tprivate static IntPtr captureFrameMethodID = IntPtr.Zero; \tprivate static IntPtr stopCapturingMethodID = IntPtr.Zero;  \tprivate static IntPtr getDirectoryDCIMMethodID = IntPtr.Zero;  \tprivate IntPtr capturingObject = IntPtr.Zero;  \tvoid Start() \t{ \t\tif(!Application.isEditor)          { \t\t\t\/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043d\u0430\u0448 \u043a\u043b\u0430\u0441\u0441 \t\t\tIntPtr classID = AndroidJNI.FindClass(&quot;com\/intel\/inde\/mp\/samples\/unity\/Capturing&quot;);  \t\t\t\/\/ \u0418\u0449\u0435\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \t\t\tconstructorMethodID = AndroidJNI.GetMethodID(classID, &quot;&lt;init&gt;&quot;, &quot;()V&quot;);  \t\t\t\/\/ \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \t\t\tinitCapturingMethodID = AndroidJNI.GetMethodID(classID, &quot;initCapturing&quot;, &quot;(IIII)V&quot;); \t\t\tstartCapturingMethodID = AndroidJNI.GetMethodID(classID, &quot;startCapturing&quot;, &quot;(Ljava\/lang\/String;)V&quot;); \t\t\tcaptureFrameMethodID = AndroidJNI.GetMethodID(classID, &quot;captureFrame&quot;, &quot;(I)V&quot;); \t\t\tstopCapturingMethodID = AndroidJNI.GetMethodID(classID, &quot;stopCapturing&quot;, &quot;()V&quot;); \t\t\tgetDirectoryDCIMMethodID = AndroidJNI.GetStaticMethodID(classID, &quot;getDirectoryDCIM&quot;, &quot;()Ljava\/lang\/String;&quot;);  \t\t\tjvalue[] args = new jvalue[0];  \t\t\tvideoDir = AndroidJNI.CallStaticStringMethod(classID, getDirectoryDCIMMethodID, args);  \t\t\t\/\/ \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \t\t\tIntPtr local_capturingObject = AndroidJNI.NewObject(classID, constructorMethodID, args); \t\t\tif (local_capturingObject == IntPtr.Zero)              { \t\t\t\tDebug.LogError(&quot;Can't create Capturing object&quot;); \t\t\t\treturn; \t\t\t}  \t\t\t\/\/ \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \t\t\tcapturingObject = AndroidJNI.NewGlobalRef(local_capturingObject); \t\t\tAndroidJNI.DeleteLocalRef(local_capturingObject);  \t\t\tAndroidJNI.DeleteLocalRef(classID); \t\t}  \t\tinProgress = false; \t\tnextCapture = Time.time; \t}  \tvoid OnRenderImage(RenderTexture src, RenderTexture dest) \t{ \t\tif (inProgress && Time.time &gt; nextCapture)         { \t\t\tCaptureFrame(src.GetNativeTextureID()); \t\t\tnextCapture += 1.0f \/ videoFrameRate; \t\t}  \t\tGraphics.Blit(src, dest); \t}  \tpublic void StartCapturing() \t{ \t\tif (capturingObject == IntPtr.Zero) \t\t{             return;         }  \t\tjvalue[] videoParameters =  new jvalue[4];  \t\tvideoParameters[0].i = videoWidth; \t\tvideoParameters[1].i = videoHeight; \t\tvideoParameters[2].i = videoFrameRate; \t\tvideoParameters[3].i = videoBitRate;  \t\tAndroidJNI.CallVoidMethod(capturingObject, initCapturingMethodID, videoParameters);  \t\tDateTime date = DateTime.Now;  \t\tstring fullFileName = fileName + date.ToString(&quot;ddMMyy-hhmmss.fff&quot;) + &quot;.mp4&quot;; \t\tjvalue[] args = new jvalue[1]; \t\targs[0].l = AndroidJNI.NewStringUTF(videoDir + fullFileName); \t\tAndroidJNI.CallVoidMethod(capturingObject, startCapturingMethodID, args);  \t\tinProgress = true; \t}  \tprivate void CaptureFrame(int textureID) \t{ \t\tif (capturingObject == IntPtr.Zero) \t\t{             return;         }  \t\tjvalue[] args = new jvalue[1]; \t\targs[0].i = textureID;  \t\tAndroidJNI.CallVoidMethod(capturingObject, captureFrameMethodID, args); \t}  \tpublic void StopCapturing() \t{ \t\tinProgress = false;  \t\tif (capturingObject == IntPtr.Zero) \t\t{             return;         }  \t\tjvalue[] args = new jvalue[0];  \t\tAndroidJNI.CallVoidMethod(capturingObject, stopCapturingMethodID, args); \t} } <\/code><\/pre>\n<p>  \u041d\u0430\u0437\u043d\u0430\u0447\u044c\u0442\u0435 \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043a\u0430\u043c\u0435\u0440\u0435. \u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u0445\u0432\u0430\u0442\u043e\u043c \u0432\u0438\u0434\u0435\u043e \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u0438\u0434\u0435\u043e. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435, \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (videoWidth, videoHeight \u0438 \u0442.\u0434.)<\/p>\n<p>  \u041c\u0435\u0442\u043e\u0434\u044b <i>Start()<\/i>, <i>StartCapturing()<\/i> \u0438 <i>StopCapturing()<\/i> \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043a\u043e\u0434\u0430 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0438\u0437 Unity.<\/p>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u043c\u0435\u0442\u043e\u0434 <i>OnRenderImage()<\/i>. \u041e\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0435\u0441\u044c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0443\u0436\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d, \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d. \u0412\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0435 <i>src<\/i>, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 <i>dest<\/i>. <\/p>\n<p>  \u042d\u0442\u043e\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b, \u043d\u043e \u044d\u0442\u043e \u0432\u043d\u0435 \u0437\u043e\u043d\u044b \u043d\u0430\u0448\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432, \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043a\u0430\u043a \u0435\u0441\u0442\u044c. \u0414\u043b\u044f \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0432\u0438\u0434\u0435\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435\u043e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c <i>Id<\/i> \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u0443 <i>Capturing<\/i> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430 <i>captureFrame()<\/i> \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 <i>Id<\/i> \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430.<\/p>\n<p>  \u0414\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c <i>src<\/i> \u0432 <i>dest<\/i>:<\/p>\n<pre><code class=\"cs\">Graphics.Blit(src, dest); <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043d\u043e\u043f\u043a\u0443, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c, \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432\u0438\u0434\u0435\u043e \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438\u0433\u0440\u044b. <\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442 GUI \u0438 \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u043c \u0437\u0430 \u043d\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <i>CaptureGUI.cs<\/i><\/p>\n<h6>CaptureGUI.cs<\/h6>\n<p>  <\/p>\n<pre><code class=\"cs\">using UnityEngine; using System.Collections;  public class CaptureGUI : MonoBehaviour { \tpublic Capture capture; \tprivate GUIStyle style = new GUIStyle();  \tvoid Start() \t{ \t\tstyle.fontSize = 48; \t\tstyle.alignment = TextAnchor.MiddleCenter; \t}  \tvoid OnGUI() \t{ \t\tstyle.normal.textColor = capture.inProgress ? Color.red : Color.green;  \t\tif (GUI.Button(new Rect(10, 200, 350, 100), capture.inProgress ? &quot;[Stop Recording]&quot; : &quot;[Start Recording]&quot;, style))          { \t\t\tif (capture.inProgress)              { \t\t\t\tcapture.StopCapturing(); \t\t\t}              else              { \t\t\t\tcapture.StartCapturing(); \t\t\t} \t\t} \t}\t } <\/code><\/pre>\n<p>  \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0435 capture \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c \u043a\u043b\u0430\u0441\u0441 <i>Capture<\/i>.<\/p>\n<p>  \u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f, \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0432\u0438\u0434\u0435\u043e, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 <i>\/mnt\/sdcard\/DCIM\/<\/i>. <\/p>\n<p>  \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0440\u0430\u043d\u0435\u0435 \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 Pro \u0432\u0435\u0440\u0441\u0438\u0438 (\u0432 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <i>OnRenderImage()<\/i> \u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c <i>Graphics.Blit<\/i>), \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u2013 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0438\u0434\u0435\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 Unity GUI. \u0414\u0430\u043d\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043d\u043e\u043c\u0435\u0440 \u0434\u0432\u0430 \u2013 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <i>FrameBuffer<\/i>.<\/p>\n<h4>\u0417\u0430\u0445\u0432\u0430\u0442 \u0432\u0438\u0434\u0435\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u0434\u0440\u043e\u0432\u043e\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430<\/h4>\n<p>  \u0412\u043d\u0435\u0441\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b <i>Capturing.java<\/i>, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435<\/p>\n<h6>Capturing.java<\/h6>\n<p>  <\/p>\n<pre><code class=\"java\">package com.intel.inde.mp.samples.unity;  import com.intel.inde.mp.android.graphics.FullFrameTexture; import com.intel.inde.mp.android.graphics.FrameBuffer;  import android.os.Environment;  import java.io.IOException; import java.io.File;  public class Capturing {     private static FullFrameTexture texture;     private FrameBuffer frameBuffer; \t     public Capturing(int width, int height)     { \t    frameBuffer = new FrameBuffer();     \tframeBuffer.create(width, height);  \t    texture = new FullFrameTexture();     }      public static String getDirectoryDCIM()     {         return Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM) + File.separator;     }      public void initCapturing(int width, int height, int frameRate, int bitRate)     {         VideoCapture.init(width, height, frameRate, bitRate);     }      public void startCapturing(String videoPath)     {         VideoCapture capture = VideoCapture.getInstance();          synchronized (capture)          {             try              {                 capture.start(videoPath);             }              catch (IOException e)              {             }         }     } \t     public void beginCaptureFrame()     {     \tframeBuffer.bind();     } \t     public void captureFrame(int textureID)     {         VideoCapture capture = VideoCapture.getInstance();          synchronized (capture)          {             capture.beginCaptureFrame();             texture.draw(textureID);             capture.endCaptureFrame();         }     } \t     public void endCaptureFrame()     {     \tframeBuffer.unbind();      \tint textureID = frameBuffer.getTexture();      \tcaptureFrame(textureID);     \ttexture.draw(textureID);     }      public void stopCapturing()     {         VideoCapture capture = VideoCapture.getInstance();          synchronized (capture)          {             if (capture.isStarted())              {                 capture.stop();             }         }     } } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u0438\u0437 \u043d\u0438\u0445 \u2013 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <\/p>\n<pre><code class=\"java\">FrameBuffer frameBuffer; <\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0448\u0438\u0440\u0438\u043d\u0443 \u0438 \u0432\u044b\u0441\u043e\u0442\u0443 \u043a\u0430\u0434\u0440\u0430, \u044d\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f <i>FrameBuffer<\/i>\u2019\u0430 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430. <\/p>\n<p>  \u041f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0442\u0440\u0438 \u043d\u043e\u0432\u044b\u0445 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430: <i>frameBufferTexture()<\/i>, <i>beginCaptureFrame()<\/i> \u0438 <i>endCaptureFrame()<\/i>. \u0418\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u044f\u0441\u043d\u044b\u043c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043a\u043e\u0434\u0443 \u043d\u0430 C#.<\/p>\n<p>  \u0424\u0430\u0439\u043b <i>VideoCapture.java<\/i> \u043c\u044b \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. <\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c Android \u043f\u043b\u0430\u0433\u0438\u043d, \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0432\u044b\u0448\u0435.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 Unity. \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 <i>Capture.cs<\/i> \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:<\/p>\n<h6>Capture.cs<\/h6>\n<p>  <\/p>\n<pre><code class=\"cs\">using UnityEngine; using System.Collections; using System.IO; using System;  [RequireComponent(typeof(Camera))] public class Capture : MonoBehaviour { \tpublic int videoWidth = 720; \tpublic int videoHeight = 1094; \tpublic int videoFrameRate = 30; \tpublic int videoBitRate = 3000;  \tprivate string videoDir; \tpublic string fileName = &quot;game_capturing-&quot;; \t \tprivate float nextCapture = 0.0f; \tpublic bool inProgress { get; private set; } \tprivate bool finalizeFrame = false; \tprivate Texture2D texture = null; \t \tprivate static IntPtr constructorMethodID = IntPtr.Zero; \tprivate static IntPtr initCapturingMethodID = IntPtr.Zero; \tprivate static IntPtr startCapturingMethodID = IntPtr.Zero; \tprivate static IntPtr beginCaptureFrameMethodID = IntPtr.Zero; \tprivate static IntPtr endCaptureFrameMethodID = IntPtr.Zero; \tprivate static IntPtr stopCapturingMethodID = IntPtr.Zero;  \tprivate static IntPtr getDirectoryDCIMMethodID = IntPtr.Zero;  \tprivate IntPtr capturingObject = IntPtr.Zero;  \tvoid Start() \t{ \t\tif (!Application.isEditor)          { \t\t\t\/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043d\u0430\u0448 \u043a\u043b\u0430\u0441\u0441 \t\t\tIntPtr classID = AndroidJNI.FindClass(&quot;com\/intel\/inde\/mp\/samples\/unity\/Capturing &quot;);  \t\t\t\/\/ \u0418\u0449\u0435\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \t\t\tconstructorMethodID = AndroidJNI.GetMethodID(classID, &quot;&lt;init&gt;&quot;, &quot;(II)V&quot;);  \t\t\t\/\/ \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \t\t\tinitCapturingMethodID = AndroidJNI.GetMethodID(classID, &quot;initCapturing&quot;, &quot;(IIII)V&quot;); \t\t\tstartCapturingMethodID = AndroidJNI.GetMethodID(classID, &quot;startCapturing&quot;, &quot;(Ljava\/lang\/String;)V&quot;); \t\t\tbeginCaptureFrameMethodID = AndroidJNI.GetMethodID(classID, &quot;beginCaptureFrame&quot;, &quot;()V&quot;); \t\t\tendCaptureFrameMethodID = AndroidJNI.GetMethodID(classID, &quot;endCaptureFrame&quot;, &quot;()V&quot;); \t\t\tstopCapturingMethodID = AndroidJNI.GetMethodID(classID, &quot;stopCapturing&quot;, &quot;()V&quot;);  \t\t\tgetDirectoryDCIMMethodID = AndroidJNI.GetStaticMethodID(classID, &quot;getDirectoryDCIM&quot;, &quot;()Ljava\/lang\/String;&quot;); \t\t\tjvalue[] args = new jvalue[0]; \t\t\tvideoDir = AndroidJNI.CallStaticStringMethod(classID, getDirectoryDCIMMethodID, args);  \t\t\t\/\/ \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \t\t\tjvalue[] constructorParameters = new jvalue[2];  \t\t\tconstructorParameters[0].i = Screen.width; \t\t\tconstructorParameters[1].i = Screen.height;  \t\t\tIntPtr local_capturingObject = AndroidJNI.NewObject(classID, constructorMethodID, constructorParameters);  \t\t\tif (local_capturingObject == IntPtr.Zero)              { \t\t\t\tDebug.LogError(&quot;Can't create Capturing object&quot;); \t\t\t\treturn; \t\t\t}  \t\t\t\/\/ \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \t\t\tcapturingObject = AndroidJNI.NewGlobalRef(local_capturingObject); \t\t\tAndroidJNI.DeleteLocalRef(local_capturingObject);  \t\t\tAndroidJNI.DeleteLocalRef(classID); \t\t}  \t\tinProgress = false; \t\tnextCapture = Time.time; \t}  \tvoid OnPreRender() \t{ \t\tif (inProgress && Time.time &gt; nextCapture)          { \t\t\tfinalizeFrame = true; \t\t\tnextCapture += 1.0f \/ videoFrameRate; \t\t\tBeginCaptureFrame(); \t\t} \t}  \tpublic IEnumerator OnPostRender() \t{ \t\tif (finalizeFrame)          { \t\t\tfinalizeFrame = false; \t\t\tyield return new WaitForEndOfFrame(); \t\t\tEndCaptureFrame(); \t\t}          else          { \t\t\tyield return null; \t\t} \t}  \tpublic void StartCapturing() \t{ \t\tif (capturingObject == IntPtr.Zero) \t\t{             return;         }  \t\tjvalue[] videoParameters =  new jvalue[4];  \t\tvideoParameters[0].i = videoWidth; \t\tvideoParameters[1].i = videoHeight; \t\tvideoParameters[2].i = videoFrameRate; \t\tvideoParameters[3].i = videoBitRate;  \t\tAndroidJNI.CallVoidMethod(capturingObject, initCapturingMethodID, videoParameters);  \t\tDateTime date = DateTime.Now;  \t\tstring fullFileName = fileName + date.ToString(&quot;ddMMyy-hhmmss.fff&quot;) + &quot;.mp4&quot;; \t\tjvalue[] args = new jvalue[1];  \t\targs[0].l = AndroidJNI.NewStringUTF(videoDir + fullFileName); \t\tAndroidJNI.CallVoidMethod(capturingObject, startCapturingMethodID, args);  \t\tinProgress = true; \t}  \tprivate void BeginCaptureFrame() \t{ \t\tif (capturingObject == IntPtr.Zero) \t\t{             return;         }  \t\tjvalue[] args = new jvalue[0]; \t\tAndroidJNI.CallVoidMethod(capturingObject, beginCaptureFrameMethodID, args); \t}  \tprivate void EndCaptureFrame() \t{ \t\tif (capturingObject == IntPtr.Zero) \t\t{             return;         }  \t\tjvalue[] args = new jvalue[0]; \t\tAndroidJNI.CallVoidMethod(capturingObject, endCaptureFrameMethodID, args); \t}  \tpublic void StopCapturing() \t{ \t\tinProgress = false;  \t\tif (capturingObject == IntPtr.Zero) \t\t{             return;         }  \t\tjvalue[] args = new jvalue[0]; \t\tAndroidJNI.CallVoidMethod(capturingObject, stopCapturingMethodID, args); \t} } <\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043d\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043a\u0430\u0434\u0440\u0430 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 <i>Capturing<\/i>. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0443 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u2014 <i>(II)V<\/i>. \u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 Java \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 <i>FrameBuffer<\/i> \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0435\u043c\u0443 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. <\/p>\n<p>  \u041c\u0435\u0442\u043e\u0434 <i>OnPreRender()<\/i> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043a\u0430\u043c\u0435\u0440\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0441\u0446\u0435\u043d\u044b. \u0418\u043c\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043d\u0430\u0448 <i>FrameBuffer<\/i>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0435\u0441\u044c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443, \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u043d\u0443\u044e \u0437\u0430 <i>FrameBuffer<\/i>. <\/p>\n<p>  \u041c\u0435\u0442\u043e\u0434 <i>OnPostRender()<\/i> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430. \u041c\u044b \u0436\u0434\u0435\u043c \u043a\u043e\u043d\u0446\u0430 \u043a\u0430\u0434\u0440\u0430, \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c <i>FrameBuffer<\/i> \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 <i>Media Pack<\/i> (\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043c\u0435\u0442\u043e\u0434 <i>endCaptureFrame()<\/i> \u043a\u043b\u0430\u0441\u0441\u0430 <i>Capturing.java<\/i>). <\/p>\n<h4>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/h4>\n<p>  \u0427\u0430\u0441\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442 \u2014 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0445\u0432\u0430\u0442 \u0432\u0438\u0434\u0435\u043e \u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043a\u0430\u043a \u00ab\u043f\u0440\u043e\u0441\u044f\u0434\u0435\u0442\u00bb FPS. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0446\u0435\u043d\u044b \u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. <\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0443 \u0432\u0430\u0441 \u0431\u044b\u043b\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0447\u0435\u0442\u0447\u0438\u043a FPS. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043d\u0430 \u0441\u0446\u0435\u043d\u0443 \u043e\u0431\u044a\u0435\u043a\u0442 Unity GUI \u0438 \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u0435 \u0437\u0430 \u043d\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<h6>FPS.cs<\/h6>\n<p>  <\/p>\n<pre><code class=\"cs\">using UnityEngine; using System.Collections;  public class FPSCounter : MonoBehaviour { \tpublic float updateRate = 4.0f; \/\/ 4 updates per sec.  \tprivate int frameCount = 0; \tprivate float nextUpdate = 0.0f; \tprivate float fps = 0.0f; \tprivate GUIStyle style = new GUIStyle();  \tvoid Start() \t{ \t\tstyle.fontSize = 48; \t\tstyle.normal.textColor = Color.white;  \t\tnextUpdate = Time.time; \t}  \tvoid Update() \t{ \t\tframeCount++;  \t\tif (Time.time &gt; nextUpdate)          { \t\t\tnextUpdate += 1.0f \/ updateRate; \t\t\tfps = frameCount * updateRate; \t\t\tframeCount = 0; \t\t} \t}  \tvoid OnGUI() \t{ \t\tGUI.Label(new Rect(10, 110, 300, 100), &quot;FPS: &quot; + fps, style); \t} } <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0440\u0430\u0431\u043e\u0442\u0443 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u043e\u0439, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442, \u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441 \u0437\u0430\u043f\u0438\u0441\u044c\u044e. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 Unity3d \u0438\u043b\u0438 \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 <a href=\"https:\/\/software.intel.com\/en-us\/intel-inde\">Intel INDE Media Pack<\/a> \u2013 \u0441 \u0440\u0430\u0434\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u0432\u0435\u0442\u0438\u043c \u043d\u0430 \u043d\u0438\u0445 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/intel\/blog\/219649\/\"> http:\/\/habrahabr.ru\/company\/intel\/blog\/219649\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/c87\/b11\/266\/c87b112669db1866746cfc49abe6a43f.png\" alt=\"image\" align=\"left\"\/>\u0412 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043a \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e <a href=\"http:\/\/habrahabr.ru\/company\/intel\/blog\/218761\/\">\u0437\u0430\u0445\u0432\u0430\u0442 \u0432\u0438\u0434\u0435\u043e \u0432 OpenGL \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445<\/a> \u0431\u044b\u043b\u0430 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0432\u0438\u0434\u0435\u043e \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Unity3d. \u041d\u0430\u0441 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u00ab\u0447\u0438\u0441\u0442\u044b\u0435\u00bb OpenGL \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u0433\u0440 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438? \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0430\u0434\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2013 \u0437\u0430\u0445\u0432\u0430\u0442 \u0432\u0438\u0434\u0435\u043e \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"http:\/\/unity3d.com\">Unity3d<\/a> \u043f\u043e\u0434 Android.<\/p>\n<h6>\u0411\u043e\u043d\u0443\u0441!<\/h6>\n<p>  \u041f\u043e \u043c\u043e\u0442\u0438\u0432\u0430\u043c \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u0435\u0441\u044c \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442 \u0432\u0438\u0434\u0435\u043e \u0432 Unity3d, \u043d\u043e \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c Unity \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u043f\u043e\u0434 Android.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0432\u0438\u0434\u0435\u043e \u0432 Unity3d:<\/p>\n<p>  1. \u041f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0441\u0442 \u044d\u0444\u0444\u0435\u043a\u0442. \u0421\u043f\u043e\u0441\u043e\u0431 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 Pro \u0432\u0435\u0440\u0441\u0438\u0438, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u0432\u0438\u0434\u0435\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f <a href=\"http:\/\/docs.unity3d.com\/Documentation\/Components\/GUIScriptingGuide.html\">Unity GUI<\/a><\/p>\n<p>  2. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0430\u0434\u0440\u043e\u0432\u043e\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430 (<i>FrameBuffer<\/i>). \u0411\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 Unity3d, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043f\u043b\u0430\u0442\u043d\u0443\u044e \u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0443\u044e, \u043e\u0431\u044a\u0435\u043a\u0442\u044b Unity GUI \u0431\u0443\u0434\u0443\u0442 \u0442\u0430\u043a \u0436\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0438\u0434\u0435\u043e.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-219649","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/219649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=219649"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/219649\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=219649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=219649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=219649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}