Skip to content

Commit 4a669d1

Browse files
Add Java Bindings (#1)
* Initialize Java Bindings Co-authored-by: Anton Margoline <[email protected]>
1 parent cadf57c commit 4a669d1

File tree

182 files changed

+25095
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+25095
-1
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
#
4+
# These are explicitly windows files and should use crlf
5+
*.bat text eol=crlf
6+

.github/workflows/gradle.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow will build a Java project with Gradle
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: Java CI with Gradle
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, windows-latest, macos-latest]
18+
19+
steps:
20+
- name: Get latest CMake
21+
# Using 'latest' branch, the latest CMake is installed.
22+
uses: lukka/get-cmake@latest
23+
- uses: actions/checkout@v2
24+
with:
25+
submodules: 'recursive'
26+
- name: Set up JDK 1.8
27+
uses: actions/setup-java@v1
28+
with:
29+
java-version: 1.8
30+
- name: Build with Gradle
31+
run: gradle build
32+
- uses: actions/upload-artifact@v2
33+
with:
34+
name: Package-${{ matrix.os }}
35+
path: build/libs

.gitignore

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
2+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
3+
4+
# User-specific stuff
5+
.idea/**/workspace.xml
6+
.idea/**/tasks.xml
7+
.idea/**/usage.statistics.xml
8+
.idea/**/dictionaries
9+
.idea/**/shelf
10+
11+
# Generated files
12+
.idea/**/contentModel.xml
13+
14+
# Sensitive or high-churn files
15+
.idea/**/dataSources/
16+
.idea/**/dataSources.ids
17+
.idea/**/dataSources.local.xml
18+
.idea/**/sqlDataSources.xml
19+
.idea/**/dynamic.xml
20+
.idea/**/uiDesigner.xml
21+
.idea/**/dbnavigator.xml
22+
23+
# Gradle
24+
.idea/**/gradle.xml
25+
.idea/**/libraries
26+
27+
# Gradle and Maven with auto-import
28+
# When using Gradle or Maven with auto-import, you should exclude module files,
29+
# since they will be recreated, and may cause churn. Uncomment if using
30+
# auto-import.
31+
# .idea/artifacts
32+
# .idea/compiler.xml
33+
# .idea/jarRepositories.xml
34+
# .idea/modules.xml
35+
# .idea/*.iml
36+
# .idea/modules
37+
# *.iml
38+
# *.ipr
39+
40+
# CMake
41+
cmake-build-*/
42+
build/
43+
44+
# Mongo Explorer plugin
45+
.idea/**/mongoSettings.xml
46+
47+
# File-based project format
48+
*.iws
49+
50+
# IntelliJ
51+
out/
52+
.gradle/
53+
54+
# mpeltonen/sbt-idea plugin
55+
.idea_modules/
56+
57+
# JIRA plugin
58+
atlassian-ide-plugin.xml
59+
60+
# Cursive Clojure plugin
61+
.idea/replstate.xml
62+
63+
# Crashlytics plugin (for Android Studio and IntelliJ)
64+
com_crashlytics_export_strings.xml
65+
crashlytics.properties
66+
crashlytics-build.properties
67+
fabric.properties
68+
69+
# Editor-based Rest Client
70+
.idea/httpRequests
71+
72+
# Android studio 3.1+ serialized cache file
73+
.idea/caches/build_file_checksums.ser

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "deps/OpenTimelineIO"]
2+
path = deps/OpenTimelineIO
3+
url = https://github.com/PixarAnimationStudios/OpenTimelineIO
4+
branch = master

CMakeLists.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
2+
3+
project(jotio VERSION 0.14.0 LANGUAGES CXX)
4+
5+
set(CMAKE_CXX_EXTENSIONS OFF)
6+
set(CMAKE_CXX_STANDARD 11)
7+
8+
include(GNUInstallDirs)
9+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
10+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<CONFIG>/${CMAKE_SYSTEM_NAME})
11+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<CONFIG>/${CMAKE_SYSTEM_NAME})
12+
13+
# jvm
14+
find_package(Java REQUIRED)
15+
# https://stackoverflow.com/questions/51047978/cmake-could-not-find-jni
16+
set(JAVA_AWT_LIBRARY NotNeeded)
17+
set(JAVA_JVM_LIBRARY NotNeeded)
18+
set(JAVA_AWT_INCLUDE_PATH NotNeeded)
19+
find_package(JNI REQUIRED)
20+
21+
include_directories(${JNI_INCLUDE_DIRS})
22+
23+
# force off-tree build
24+
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
25+
message(FATAL_ERROR "CMake generation is not allowed within the source directory!
26+
Remove the CMakeCache.txt file and try again from another folder, e.g.:
27+
mkdir build && cd build
28+
cmake ..
29+
")
30+
endif()
31+
32+
# default to Release build
33+
if(NOT CMAKE_BUILD_TYPE)
34+
set(CMAKE_BUILD_TYPE Release CACHE STRING
35+
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
36+
FORCE)
37+
endif()
38+
39+
include_directories(src/main/include)
40+
add_subdirectory(deps/OpenTimelineIO build/natives)
41+
add_subdirectory(src/main/cpp)

CONTRIBUTORS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This is a list of people who have committed code to the OpenTimelineIO-Java-Bindings project, sorted alphabetically by first name. Many other people have contributed to OpenTimelineIO-Java-Bindings in other ways, and we appreciate your help very much.
2+
3+
If you know of anyone missing from this list, please contact us: https://lists.aswf.io/g/otio-discussion
4+
5+
* Anton Margoline ([margant](https://github.com/margant))
6+
* Karthik Ramesh Iyer ([KarthikRIyer](https://github.com/KarthikRIyer))
7+
* Stephan Steinbach ([ssteinbach](https://github.com/ssteinbach))

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright [yyyy] Contributors to the OpenTimelineIO project
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
OpenTimelineIO-Java-bindings
2+
=======
3+
[![OpenTimelineIO](images/opentimelineio-color.svg)](http://opentimeline.io)
4+
==============
5+
6+
[![Supported VFX Platform Versions](https://img.shields.io/badge/vfx%20platform-2016--2020-lightgrey.svg)](http://www.vfxplatform.com/)
7+
8+
Main web site: http://opentimeline.io/
9+
10+
Documentation:
11+
12+
Discussion group: https://lists.aswf.io/g/otio-discussion
13+
14+
Slack channel: https://academysoftwarefdn.slack.com/messages/CMQ9J4BQC
15+
To join, create an account here first: https://slack.aswf.io/
16+
17+
PUBLIC BETA NOTICE
18+
------------------
19+
20+
OpenTimelineIO is currently in Public Beta. That means that it may be missing
21+
some essential features and there are large changes planned. During this phase
22+
we actively encourage you to provide feedback, requests, comments, and/or
23+
contributions.
24+
25+
Overview
26+
--------
27+
28+
OpenTimelineIO is an interchange format and API for editorial cut information.
29+
OTIO is not a container format for media, rather it contains information about
30+
the order and length of cuts and references to external media. This repository
31+
contains the Java bindings built over the C++ core which you can find [here](https://github.com/PixarAnimationStudios/OpenTimelineIO).
32+
33+
OTIO includes both a file format and an API for manipulating that format.
34+
It also implements a dependency-less library for dealing strictly with time, `opentime`.
35+
36+
You can provide adapters for your video editing tool or pipeline as needed.
37+
38+
Quick-Start
39+
-----------
40+
41+
You can add OpenTimelineIO as a dependency to your gradle project as:
42+
```
43+
<insert gradle dep>
44+
```
45+
46+
You can add OpenTimelineIO as a dependency to your maven project as:
47+
```
48+
<insert maven dep>
49+
```
50+
51+
52+
Building OpenTimelineIO-Java-Bindings
53+
------------------------
54+
55+
OpenTimelineIO-Java-Bindings have been built and tested on Ubuntu 18.04LTS, Windows 10 and macOS using [Gradle](https://gradle.org/install/) and [CMake](https://cmake.org/download/).
56+
After installing Gradle and CMake follw these steps:
57+
58+
```console
59+
git clone --recurse-submodules https://github.com/OpenTimelineIO/OpenTimelineIO-Java-Bindings
60+
61+
cd otio-java
62+
63+
gradle build # this builds and runs all tests
64+
```
65+
66+
You can find the generated jar file in the `build/libs` directory.
67+
68+
Examples
69+
--------
70+
71+
Looking through the unit tests is a great way to see what OTIO can do.
72+
See [here](https://github.com/OpenTimelineIO/OpenTimelineIO-Java-Bindings/tree/master/src/test/java/io/opentimeline).
73+
74+
Developing
75+
----------
76+
77+
If you want to contribute to the project, please see: https://opentimelineio.readthedocs.io/en/latest/tutorials/contributing.html
78+
79+
You can get the latest development version via:
80+
81+
`git clone --recurse-submodules https://github.com/OpenTimelineIO/OpenTimelineIO-Java-Bindings.git`
82+
83+
License
84+
-------
85+
OpenTimelineIO is open source software. Please see the [LICENSE](LICENSE) for details.
86+
87+
Nothing in the license file or this project grants any right to use Pixar or any other contributor’s trade names, trademarks, service marks, or product names.
88+
89+
Contact
90+
-------
91+
92+
For more information, please visit http://opentimeline.io/
93+
or https://github.com/PixarAnimationStudios/OpenTimelineIO
94+
or join our discussion forum: https://lists.aswf.io/g/otio-discussion

0 commit comments

Comments
 (0)