김민석

8thWeek

Showing 1000 changed files with 79 additions and 4727 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

1 +{
2 + "cells": [
3 + {
4 + "cell_type": "code",
5 + "execution_count": 1,
6 + "metadata": {},
7 + "outputs": [
8 + {
9 + "ename": "KeyboardInterrupt",
10 + "evalue": "",
11 + "output_type": "error",
12 + "traceback": [
13 + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
14 + "\u001b[1;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
15 + "\u001b[1;32m<ipython-input-1-babf98098e41>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 6\u001b[0m \u001b[1;32mwhile\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcap1\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0misOpened\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mand\u001b[0m \u001b[0mcap2\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0misOpened\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 7\u001b[0m \u001b[0mret\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mframe\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcap1\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mread\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 8\u001b[1;33m \u001b[0mret2\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mframe2\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcap2\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mread\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 9\u001b[0m \u001b[0mcv2\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mimshow\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'frame'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mframe\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 10\u001b[0m \u001b[0mcv2\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mimshow\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'frame2'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mframe2\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
16 + "\u001b[1;31mKeyboardInterrupt\u001b[0m: "
17 + ]
18 + }
19 + ],
20 + "source": [
21 + "import cv2\n",
22 + "\n",
23 + "cap1 = cv2.VideoCapture(\"rtsp://172.30.1.49\")\n",
24 + "#cap2 = cv2.VideoCapture(\"rtsp://172.30.1.50:8080/video/h264\")\n",
25 + "i = 0\n",
26 + "\n",
27 + "while(cap1.isOpened()):\n",
28 + " ret, frame = cap1.read()\n",
29 + "# ret2, frame2 = cap2.read()\n",
30 + " cv2.imshow('frame', frame)\n",
31 + " cv2.imwrite(f'frames/{i}.jpg', frame)\n",
32 + " i +=1\n",
33 + " if cv2.waitKey(20) & 0xFF == ord('q'):\n",
34 + " break\n",
35 + "\n",
36 + "cap.releases()\n",
37 + "cv2.destroyAllWindows()"
38 + ]
39 + },
40 + {
41 + "cell_type": "code",
42 + "execution_count": null,
43 + "metadata": {},
44 + "outputs": [],
45 + "source": []
46 + }
47 + ],
48 + "metadata": {
49 + "kernelspec": {
50 + "display_name": "Python 3",
51 + "language": "python",
52 + "name": "python3"
53 + },
54 + "language_info": {
55 + "codemirror_mode": {
56 + "name": "ipython",
57 + "version": 3
58 + },
59 + "file_extension": ".py",
60 + "mimetype": "text/x-python",
61 + "name": "python",
62 + "nbconvert_exporter": "python",
63 + "pygments_lexer": "ipython3",
64 + "version": "3.8.5"
65 + }
66 + },
67 + "nbformat": 4,
68 + "nbformat_minor": 4
69 +}
1 -This is test
...\ No newline at end of file ...\ No newline at end of file
1 +# 2021 03 19
2 +교수님 면담 진행 - 인공위성 열기구 비행기 드론 지상으로의 Hierarchical Edge computing 주제에 관해 논의 -> 실험하기 어렵다 판단해서 새로운 주제 선정
3 +# 2021 03 26
4 +교수님과의 면담을 통해 주제 선정(재난 상황에서 실시간 영상 스트리밍이 가능한 Multiple UAV 시스템 개발)
5 +# 2021 04 02
6 +선정한 주제에 관해 기초 조사를 완료하고 피드백 (ppt, 기초조사서)
7 +# 2021 04 09
8 +실시간 스트리밍이 가능한 앱 어플리케이션과 사용방법을 익힘
9 +# 2021 04 12
10 +조사한 라이브러리와 도구들을 가지고 적절한 방법인지 평가와 미진한 부분 내용 보충
......
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<classpath>
3 - <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
4 - <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
5 - <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
6 - <classpathentry kind="src" path="src"/>
7 - <classpathentry kind="src" path="gen"/>
8 - <classpathentry kind="output" path="bin/classes"/>
9 -</classpath>
1 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 -<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
3 -<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;resources&gt;&#13;&#10;&lt;item path=&quot;/Tutorial4/jni&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/resources&gt;}"/>
4 -<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
5 -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;resources&gt;&#13;&#10;&lt;item path=&quot;/Tutorial4/jni&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/resources&gt;}"/>
6 -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="D:\NDK\android-ndk-r9d\ndk-build.cmd"/>
7 -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,clean"/>
8 -<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
9 -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/Tutorial4}"/>
10 -</launchConfiguration>
1 -# Default ignored files
2 -/shelf/
3 -/workspace.xml
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<module type="JAVA_MODULE" version="4">
3 - <component name="NewModuleRootManager" inherit-compiler-output="true">
4 - <exclude-output />
5 - <content url="file://$MODULE_DIR$" />
6 - <orderEntry type="inheritedJdk" />
7 - <orderEntry type="sourceFolder" forTests="false" />
8 - </component>
9 -</module>
...\ No newline at end of file ...\ No newline at end of file
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<project version="4">
3 - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
4 - <output url="file://$PROJECT_DIR$/out" />
5 - </component>
6 -</project>
...\ No newline at end of file ...\ No newline at end of file
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<project version="4">
3 - <component name="ProjectModuleManager">
4 - <modules>
5 - <module fileurl="file://$PROJECT_DIR$/Tutorial4.iml" filepath="$PROJECT_DIR$/Tutorial4.iml" />
6 - </modules>
7 - </component>
8 -</project>
...\ No newline at end of file ...\ No newline at end of file
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<project version="4">
3 - <component name="VcsDirectoryMappings">
4 - <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5 - </component>
6 -</project>
...\ No newline at end of file ...\ No newline at end of file
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<projectDescription>
3 - <name>Tutorial4</name>
4 - <comment></comment>
5 - <projects>
6 - </projects>
7 - <buildSpec>
8 - <buildCommand>
9 - <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
10 - <arguments>
11 - <dictionary>
12 - <key>LaunchConfigHandle</key>
13 - <value>&lt;project&gt;/.externalToolBuilders/NDK-tutorial4.launch</value>
14 - </dictionary>
15 - </arguments>
16 - </buildCommand>
17 - <buildCommand>
18 - <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
19 - <arguments>
20 - </arguments>
21 - </buildCommand>
22 - <buildCommand>
23 - <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
24 - <arguments>
25 - </arguments>
26 - </buildCommand>
27 - <buildCommand>
28 - <name>org.eclipse.jdt.core.javabuilder</name>
29 - <arguments>
30 - </arguments>
31 - </buildCommand>
32 - <buildCommand>
33 - <name>com.android.ide.eclipse.adt.ApkBuilder</name>
34 - <arguments>
35 - </arguments>
36 - </buildCommand>
37 - </buildSpec>
38 - <natures>
39 - <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
40 - <nature>org.eclipse.jdt.core.javanature</nature>
41 - </natures>
42 -</projectDescription>
1 -eclipse.preferences.version=1
2 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3 -org.eclipse.jdt.core.compiler.compliance=1.6
4 -org.eclipse.jdt.core.compiler.source=1.6
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 - package="com.gst_sdk_tutorials.tutorial_4"
4 - android:versionCode="1"
5 - android:versionName="1.0">
6 - <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>
7 - <uses-permission android:name="android.permission.INTERNET"/>
8 - <uses-permission android:name="android.permission.CAMERA" />
9 - <uses-feature android:glEsVersion="0x00020000"/>
10 - <application android:label="@string/app_name"
11 - android:icon="@drawable/gst_sdk_icon">
12 - <activity android:name=".Tutorial4"
13 - android:label="@string/app_name">
14 - <intent-filter>
15 - <action android:name="android.intent.action.MAIN" />
16 - <category android:name="android.intent.category.LAUNCHER" />
17 - </intent-filter>
18 - </activity>
19 - </application>
20 -</manifest>
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<module type="JAVA_MODULE" version="4">
3 - <component name="FacetManager">
4 - <facet type="android" name="Android">
5 - <configuration />
6 - </facet>
7 - </component>
8 - <component name="NewModuleRootManager" inherit-compiler-output="true">
9 - <exclude-output />
10 - <content url="file://$MODULE_DIR$">
11 - <sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
12 - <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
13 - </content>
14 - <orderEntry type="jdk" jdkName="Android API 30 Platform" jdkType="Android SDK" />
15 - <orderEntry type="sourceFolder" forTests="false" />
16 - </component>
17 -</module>
...\ No newline at end of file ...\ No newline at end of file
1 -<?xml version="1.0"?>
2 -<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
3 -<!-- /etc/fonts/fonts.conf file to configure system font access -->
4 -<fontconfig>
5 -
6 -<!-- Font directory list -->
7 -
8 - <dir prefix="xdg">fontconfig/fonts</dir>
9 -
10 -<!-- Font cache directory list -->
11 -
12 - <cachedir prefix="xdg">fontconfig</cachedir>
13 -
14 -<!--
15 - Accept deprecated 'mono' alias, replacing it with 'monospace'
16 --->
17 - <match target="pattern">
18 - <test qual="any" name="family">
19 - <string>mono</string>
20 - </test>
21 - <edit name="family" mode="assign" binding="same">
22 - <string>monospace</string>
23 - </edit>
24 - </match>
25 -
26 -<!--
27 - Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
28 --->
29 - <match target="pattern">
30 - <test qual="any" name="family">
31 - <string>sans serif</string>
32 - </test>
33 - <edit name="family" mode="assign" binding="same">
34 - <string>sans-serif</string>
35 - </edit>
36 - </match>
37 -
38 -<!--
39 - Accept deprecated 'sans' alias, replacing it with 'sans-serif'
40 --->
41 - <match target="pattern">
42 - <test qual="any" name="family">
43 - <string>sans</string>
44 - </test>
45 - <edit name="family" mode="assign" binding="same">
46 - <string>sans-serif</string>
47 - </edit>
48 - </match>
49 -
50 - <config>
51 -<!--
52 - These are the default Unicode chars that are expected to be blank
53 - in fonts. All other blank chars are assumed to be broken and
54 - won't appear in the resulting charsets
55 - -->
56 - <blank>
57 - <int>0x0020</int> <!-- SPACE -->
58 - <int>0x00A0</int> <!-- NO-BREAK SPACE -->
59 - <int>0x00AD</int> <!-- SOFT HYPHEN -->
60 - <int>0x034F</int> <!-- COMBINING GRAPHEME JOINER -->
61 - <int>0x0600</int> <!-- ARABIC NUMBER SIGN -->
62 - <int>0x0601</int> <!-- ARABIC SIGN SANAH -->
63 - <int>0x0602</int> <!-- ARABIC FOOTNOTE MARKER -->
64 - <int>0x0603</int> <!-- ARABIC SIGN SAFHA -->
65 - <int>0x06DD</int> <!-- ARABIC END OF AYAH -->
66 - <int>0x070F</int> <!-- SYRIAC ABBREVIATION MARK -->
67 - <int>0x115F</int> <!-- HANGUL CHOSEONG FILLER -->
68 - <int>0x1160</int> <!-- HANGUL JUNGSEONG FILLER -->
69 - <int>0x1680</int> <!-- OGHAM SPACE MARK -->
70 - <int>0x17B4</int> <!-- KHMER VOWEL INHERENT AQ -->
71 - <int>0x17B5</int> <!-- KHMER VOWEL INHERENT AA -->
72 - <int>0x180E</int> <!-- MONGOLIAN VOWEL SEPARATOR -->
73 - <int>0x2000</int> <!-- EN QUAD -->
74 - <int>0x2001</int> <!-- EM QUAD -->
75 - <int>0x2002</int> <!-- EN SPACE -->
76 - <int>0x2003</int> <!-- EM SPACE -->
77 - <int>0x2004</int> <!-- THREE-PER-EM SPACE -->
78 - <int>0x2005</int> <!-- FOUR-PER-EM SPACE -->
79 - <int>0x2006</int> <!-- SIX-PER-EM SPACE -->
80 - <int>0x2007</int> <!-- FIGURE SPACE -->
81 - <int>0x2008</int> <!-- PUNCTUATION SPACE -->
82 - <int>0x2009</int> <!-- THIN SPACE -->
83 - <int>0x200A</int> <!-- HAIR SPACE -->
84 - <int>0x200B</int> <!-- ZERO WIDTH SPACE -->
85 - <int>0x200C</int> <!-- ZERO WIDTH NON-JOINER -->
86 - <int>0x200D</int> <!-- ZERO WIDTH JOINER -->
87 - <int>0x200E</int> <!-- LEFT-TO-RIGHT MARK -->
88 - <int>0x200F</int> <!-- RIGHT-TO-LEFT MARK -->
89 - <int>0x2028</int> <!-- LINE SEPARATOR -->
90 - <int>0x2029</int> <!-- PARAGRAPH SEPARATOR -->
91 - <int>0x202A</int> <!-- LEFT-TO-RIGHT EMBEDDING -->
92 - <int>0x202B</int> <!-- RIGHT-TO-LEFT EMBEDDING -->
93 - <int>0x202C</int> <!-- POP DIRECTIONAL FORMATTING -->
94 - <int>0x202D</int> <!-- LEFT-TO-RIGHT OVERRIDE -->
95 - <int>0x202E</int> <!-- RIGHT-TO-LEFT OVERRIDE -->
96 - <int>0x202F</int> <!-- NARROW NO-BREAK SPACE -->
97 - <int>0x205F</int> <!-- MEDIUM MATHEMATICAL SPACE -->
98 - <int>0x2060</int> <!-- WORD JOINER -->
99 - <int>0x2061</int> <!-- FUNCTION APPLICATION -->
100 - <int>0x2062</int> <!-- INVISIBLE TIMES -->
101 - <int>0x2063</int> <!-- INVISIBLE SEPARATOR -->
102 - <int>0x206A</int> <!-- INHIBIT SYMMETRIC SWAPPING -->
103 - <int>0x206B</int> <!-- ACTIVATE SYMMETRIC SWAPPING -->
104 - <int>0x206C</int> <!-- INHIBIT ARABIC FORM SHAPING -->
105 - <int>0x206D</int> <!-- ACTIVATE ARABIC FORM SHAPING -->
106 - <int>0x206E</int> <!-- NATIONAL DIGIT SHAPES -->
107 - <int>0x206F</int> <!-- NOMINAL DIGIT SHAPES -->
108 - <int>0x2800</int> <!-- BRAILLE PATTERN BLANK -->
109 - <int>0x3000</int> <!-- IDEOGRAPHIC SPACE -->
110 - <int>0x3164</int> <!-- HANGUL FILLER -->
111 - <int>0xFEFF</int> <!-- ZERO WIDTH NO-BREAK SPACE -->
112 - <int>0xFFA0</int> <!-- HALFWIDTH HANGUL FILLER -->
113 - <int>0xFFF9</int> <!-- INTERLINEAR ANNOTATION ANCHOR -->
114 - <int>0xFFFA</int> <!-- INTERLINEAR ANNOTATION SEPARATOR -->
115 - <int>0xFFFB</int> <!-- INTERLINEAR ANNOTATION TERMINATOR -->
116 - </blank>
117 -<!--
118 - Rescan configuration every 30 seconds when FcFontSetList is called
119 - -->
120 - <rescan>
121 - <int>30</int>
122 - </rescan>
123 - </config>
124 -
125 -</fontconfig>
126 -
This diff could not be displayed because it is too large.
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 - package="com.gst_sdk_tutorials.tutorial_4"
4 - android:versionCode="1"
5 - android:versionName="1.0">
6 - <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>
7 - <uses-permission android:name="android.permission.INTERNET"/>
8 - <uses-permission android:name="android.permission.CAMERA" />
9 - <uses-feature android:glEsVersion="0x00020000"/>
10 - <application android:label="@string/app_name"
11 - android:icon="@drawable/gst_sdk_icon">
12 - <activity android:name=".Tutorial4"
13 - android:label="@string/app_name">
14 - <intent-filter>
15 - <action android:name="android.intent.action.MAIN" />
16 - <category android:name="android.intent.category.LAUNCHER" />
17 - </intent-filter>
18 - </activity>
19 - </application>
20 -</manifest>
No preview for this file type
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 - copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 - private static void copyCaCertificates(Context context) {
44 - AssetManager assetManager = context.getAssets();
45 - File filesDir = context.getFilesDir();
46 - File sslDir = new File (filesDir, "ssl");
47 - File certsDir = new File (sslDir, "certs");
48 - File certs = new File (certsDir, "ca-certificates.crt");
49 -
50 - certsDir.mkdirs();
51 -
52 - try {
53 - /* Copy the certificates file */
54 - copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 - } catch (IOException e) {
56 - e.printStackTrace();
57 - }
58 - }
59 -
60 - private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 - InputStream in;
62 - OutputStream out;
63 - byte[] buffer = new byte[1024];
64 - int read;
65 -
66 - if (outFile.exists())
67 - outFile.delete();
68 -
69 - in = assetManager.open(assetPath);
70 - out = new FileOutputStream (outFile);
71 - while((read = in.read(buffer)) != -1){
72 - out.write(buffer, 0, read);
73 - }
74 - in.close();
75 - out.flush();
76 - out.close();
77 - }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
1 -package org.freedesktop.gstreamer;
2 -
3 -import java.io.File;
4 -import java.io.FileOutputStream;
5 -import java.io.IOException;
6 -import java.io.InputStream;
7 -import java.io.OutputStream;
8 -
9 -import android.content.Context;
10 -import android.content.res.AssetManager;
11 -
12 -public class GStreamer {
13 - private static native void nativeInit(Context context) throws Exception;
14 -
15 - public static void init(Context context) throws Exception {
16 - nativeInit(context);
17 - copyFonts(context);
18 -@INCLUDE_CA_CERTIFICATES@ copyCaCertificates(context);
19 - }
20 -
21 - private static void copyFonts(Context context) {
22 - AssetManager assetManager = context.getAssets();
23 - File filesDir = context.getFilesDir();
24 - File fontsFCDir = new File (filesDir, "fontconfig");
25 - File fontsDir = new File (fontsFCDir, "fonts");
26 - File fontsCfg = new File (fontsFCDir, "fonts.conf");
27 -
28 - fontsDir.mkdirs();
29 -
30 - try {
31 - /* Copy the config file */
32 - copyFile (assetManager, "fontconfig/fonts.conf", fontsCfg);
33 - /* Copy the fonts */
34 - for(String filename : assetManager.list("fontconfig/fonts/truetype")) {
35 - File font = new File(fontsDir, filename);
36 - copyFile (assetManager, "fontconfig/fonts/truetype/" + filename, font);
37 - }
38 - } catch (IOException e) {
39 - e.printStackTrace();
40 - }
41 - }
42 -
43 -@INCLUDE_CA_CERTIFICATES@ private static void copyCaCertificates(Context context) {
44 -@INCLUDE_CA_CERTIFICATES@ AssetManager assetManager = context.getAssets();
45 -@INCLUDE_CA_CERTIFICATES@ File filesDir = context.getFilesDir();
46 -@INCLUDE_CA_CERTIFICATES@ File sslDir = new File (filesDir, "ssl");
47 -@INCLUDE_CA_CERTIFICATES@ File certsDir = new File (sslDir, "certs");
48 -@INCLUDE_CA_CERTIFICATES@ File certs = new File (certsDir, "ca-certificates.crt");
49 -@INCLUDE_CA_CERTIFICATES@
50 -@INCLUDE_CA_CERTIFICATES@ certsDir.mkdirs();
51 -@INCLUDE_CA_CERTIFICATES@
52 -@INCLUDE_CA_CERTIFICATES@ try {
53 -@INCLUDE_CA_CERTIFICATES@ /* Copy the certificates file */
54 -@INCLUDE_CA_CERTIFICATES@ copyFile (assetManager, "ssl/certs/ca-certificates.crt", certs);
55 -@INCLUDE_CA_CERTIFICATES@ } catch (IOException e) {
56 -@INCLUDE_CA_CERTIFICATES@ e.printStackTrace();
57 -@INCLUDE_CA_CERTIFICATES@ }
58 -@INCLUDE_CA_CERTIFICATES@ }
59 -
60 -@INCLUDE_COPY_FILE@ private static void copyFile(AssetManager assetManager, String assetPath, File outFile) throws IOException {
61 -@INCLUDE_COPY_FILE@ InputStream in;
62 -@INCLUDE_COPY_FILE@ OutputStream out;
63 -@INCLUDE_COPY_FILE@ byte[] buffer = new byte[1024];
64 -@INCLUDE_COPY_FILE@ int read;
65 -@INCLUDE_COPY_FILE@
66 -@INCLUDE_COPY_FILE@ if (outFile.exists())
67 -@INCLUDE_COPY_FILE@ outFile.delete();
68 -@INCLUDE_COPY_FILE@
69 -@INCLUDE_COPY_FILE@ in = assetManager.open(assetPath);
70 -@INCLUDE_COPY_FILE@ out = new FileOutputStream (outFile);
71 -@INCLUDE_COPY_FILE@ while((read = in.read(buffer)) != -1){
72 -@INCLUDE_COPY_FILE@ out.write(buffer, 0, read);
73 -@INCLUDE_COPY_FILE@ }
74 -@INCLUDE_COPY_FILE@ in.close();
75 -@INCLUDE_COPY_FILE@ out.flush();
76 -@INCLUDE_COPY_FILE@ out.close();
77 -@INCLUDE_COPY_FILE@ }
78 -}
No preview for this file type
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.