Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(950)

Side by Side Diff: webrtc/sdk/android/api/org/webrtc/VideoFileRenderer.java

Issue 2813363004: Reland of Android Logging.java: Load native library only when needed (Closed)
Patch Set: Fix Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/FileVideoCapturer.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 package org.webrtc; 11 package org.webrtc;
12 12
13 import android.os.Handler; 13 import android.os.Handler;
14 import android.os.HandlerThread; 14 import android.os.HandlerThread;
15 import java.io.FileOutputStream; 15 import java.io.FileOutputStream;
16 import java.io.IOException; 16 import java.io.IOException;
17 import java.nio.ByteBuffer; 17 import java.nio.ByteBuffer;
18 import java.util.concurrent.CountDownLatch; 18 import java.util.concurrent.CountDownLatch;
19 import java.util.ArrayList; 19 import java.util.ArrayList;
20 20
21 /** 21 /**
22 * Can be used to save the video frames to file. 22 * Can be used to save the video frames to file.
23 */ 23 */
24 public class VideoFileRenderer implements VideoRenderer.Callbacks { 24 public class VideoFileRenderer implements VideoRenderer.Callbacks {
25 static {
26 System.loadLibrary("jingle_peerconnection_so");
27 }
28
25 private static final String TAG = "VideoFileRenderer"; 29 private static final String TAG = "VideoFileRenderer";
26 30
27 private final HandlerThread renderThread; 31 private final HandlerThread renderThread;
28 private final Object handlerLock = new Object(); 32 private final Object handlerLock = new Object();
29 private final Handler renderThreadHandler; 33 private final Handler renderThreadHandler;
30 private final FileOutputStream videoOutFile; 34 private final FileOutputStream videoOutFile;
31 private final String outputFileName; 35 private final String outputFileName;
32 private final int outputFileWidth; 36 private final int outputFileWidth;
33 private final int outputFileHeight; 37 private final int outputFileHeight;
34 private final int outputFrameSize; 38 private final int outputFrameSize;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 165 }
162 166
163 public static native void nativeI420Scale(ByteBuffer srcY, int strideY, ByteBu ffer srcU, 167 public static native void nativeI420Scale(ByteBuffer srcY, int strideY, ByteBu ffer srcU,
164 int strideU, ByteBuffer srcV, int strideV, int width, int height, ByteBuff er dst, 168 int strideU, ByteBuffer srcV, int strideV, int width, int height, ByteBuff er dst,
165 int dstWidth, int dstHeight); 169 int dstWidth, int dstHeight);
166 170
167 public static native ByteBuffer nativeCreateNativeByteBuffer(int size); 171 public static native ByteBuffer nativeCreateNativeByteBuffer(int size);
168 172
169 public static native void nativeFreeNativeByteBuffer(ByteBuffer buffer); 173 public static native void nativeFreeNativeByteBuffer(ByteBuffer buffer);
170 } 174 }
OLDNEW
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/FileVideoCapturer.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698