Deprecate GF_Terminal and code reorganization
- remove terminal.c and related includes - removed mp4client, osmo4ios, Osmo4 Android and MP4Box android - added old mp4client features in gpac -mp4c - iOS build now uses gpac directly - added GPAC android (GUI, MP4Box and gpac command line) and cleanup android build - fixed threading issues in android (audio, mediacodec) - prevent JSRuntime destruction for android - added display orientation handling for mobile devices - fixed potential gl shader setup bug on iOS and android - mobile camera support through libavdevice - fixed bugs dealing with ttc font collection - inspect filter can now dump to GPAC log system
@@ -15,6 +15,12 @@
|
||||
- UTC-based range extraction in reframer
|
||||
- Thumbnail generator filter
|
||||
|
||||
## Misc
|
||||
- Removed GF_Terminal API
|
||||
- Removed MP4Client, merged old behaviour in gpac -mp4c
|
||||
- Removed osmo4ios, direct compilation of gpac is now used on iOS
|
||||
- Removed Android Osmo4 and MP4Box, replaced by GPAC for Android which can run GUI as well as MP4Box and gpac command lines
|
||||
|
||||
|
||||
# 22/02/2022: GPAC 2.0
|
||||
|
||||
|
||||
29
Makefile
@@ -49,9 +49,6 @@ sggen:
|
||||
mods:
|
||||
$(MAKE) -C modules all
|
||||
|
||||
instmoz:
|
||||
$(MAKE) -C applications/osmozilla install
|
||||
|
||||
depend:
|
||||
$(MAKE) -C src dep
|
||||
$(MAKE) -C applications dep
|
||||
@@ -69,6 +66,7 @@ distclean:
|
||||
rm -f config.mak config.h config.log
|
||||
@find . -type f -name '*.gcno*' -delete
|
||||
@find . -type f -name '*.gcda*' -delete
|
||||
@find . -type f -name '*.dep*' -delete
|
||||
@rm -f coverage.info 2> /dev/null
|
||||
@rm -f bin/gcc/gm_*$(DYN_LIB_SUFFIX) 2> /dev/null
|
||||
@rm -f bin/gcc/gf_*$(DYN_LIB_SUFFIX) 2> /dev/null
|
||||
@@ -77,7 +75,7 @@ doc:
|
||||
@cd $(SRC_PATH)/share/doc && doxygen
|
||||
|
||||
man:
|
||||
@cd $(SRC_PATH)/share/doc/man && MP4Box -genman && MP4Client -genman && gpac -genman
|
||||
@cd $(SRC_PATH)/share/doc/man && MP4Box -genman && gpac -genman
|
||||
|
||||
test_suite:
|
||||
@cd $(SRC_PATH)/testsuite && ./make_tests.sh -precommit -p=0
|
||||
@@ -124,13 +122,6 @@ ifeq ($(DISABLE_ISOFF),no)
|
||||
if [ -f bin/gcc/MP4Box$(EXE_SUFFIX) ] ; then \
|
||||
$(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/MP4Box$(EXE_SUFFIX) "$(DESTDIR)$(prefix)/bin" ; \
|
||||
fi
|
||||
endif
|
||||
ifneq ($(STATIC_BINARY),yes)
|
||||
ifeq ($(DISABLE_PLAYER),no)
|
||||
if [ -f bin/gcc/MP4Client$(EXE_SUFFIX) ] ; then \
|
||||
$(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/MP4Client$(EXE_SUFFIX) "$(DESTDIR)$(prefix)/bin" ; \
|
||||
fi
|
||||
endif
|
||||
endif
|
||||
$(INSTALL) -d "$(DESTDIR)$(prefix)/$(lib_dir)/$(moddir)"
|
||||
ifneq ($(STATIC_BINARY),yes)
|
||||
@@ -144,7 +135,6 @@ endif
|
||||
$(INSTALL) -d "$(DESTDIR)$(prefix)/$(man_dir)"
|
||||
$(INSTALL) -d "$(DESTDIR)$(prefix)/$(man_dir)/man1"
|
||||
$(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/share/doc/man/mp4box.1 $(DESTDIR)$(prefix)/$(man_dir)/man1/
|
||||
$(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/share/doc/man/mp4client.1 $(DESTDIR)$(prefix)/$(man_dir)/man1/
|
||||
$(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/share/doc/man/gpac.1 $(DESTDIR)$(prefix)/$(man_dir)/man1/
|
||||
$(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/share/doc/man/gpac-filters.1 $(DESTDIR)$(prefix)/$(man_dir)/man1/
|
||||
$(INSTALL) -d "$(DESTDIR)$(prefix)/share/gpac"
|
||||
@@ -197,11 +187,6 @@ lninstall:
|
||||
ifeq ($(DISABLE_ISOFF),no)
|
||||
ln -sf $(BUILD_PATH)/bin/gcc/MP4Box$(EXE_SUFFIX) $(DESTDIR)$(prefix)/bin/MP4Box$(EXE_SUFFIX)
|
||||
endif
|
||||
ifneq ($(STATIC_BINARY),yes)
|
||||
ifeq ($(DISABLE_PLAYER),no)
|
||||
ln -sf $(BUILD_PATH)/bin/gcc/MP4Client$(EXE_SUFFIX) $(DESTDIR)$(prefix)/bin/MP4Client$(EXE_SUFFIX)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CONFIG_DARWIN),yes)
|
||||
ln -s $(BUILD_PATH)/bin/gcc/libgpac$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/$(lib_dir)/libgpac.$(VERSION_SONAME)$(DYN_LIB_SUFFIX)
|
||||
ln -sf $(DESTDIR)$(prefix)/$(lib_dir)/libgpac.$(VERSION_SONAME)$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/$(lib_dir)/libgpac.$(VERSION_MAJOR)$(DYN_LIB_SUFFIX)
|
||||
@@ -230,10 +215,8 @@ uninstall:
|
||||
$(MAKE) uninstall-lib
|
||||
rm -rf $(DESTDIR)$(prefix)/$(lib_dir)/$(moddir)
|
||||
rm -rf $(DESTDIR)$(prefix)/bin/MP4Box
|
||||
rm -rf $(DESTDIR)$(prefix)/bin/MP4Client
|
||||
rm -rf $(DESTDIR)$(prefix)/bin/gpac
|
||||
rm -rf $(DESTDIR)$(prefix)/$(man_dir)/man1/mp4box.1
|
||||
rm -rf $(DESTDIR)$(prefix)/$(man_dir)/man1/mp4client.1
|
||||
rm -rf $(DESTDIR)$(prefix)/$(man_dir)/man1/gpac.1
|
||||
rm -rf $(DESTDIR)$(prefix)/$(man_dir)/man1/gpac-filters.1
|
||||
rm -rf $(DESTDIR)$(prefix)/share/gpac
|
||||
@@ -317,13 +300,6 @@ uninstall-lib:
|
||||
|
||||
ifeq ($(CONFIG_DARWIN),yes)
|
||||
dmg:
|
||||
# @if [ ! -z "$(shell git diff FETCH_HEAD)" ]; then \
|
||||
# echo "Local revision and remote revision are not congruent; you may have local commit."; \
|
||||
# echo "Please consider pushing your commit before generating an installer"; \
|
||||
# exit 1; \
|
||||
# fi
|
||||
rm "bin/gcc/MP4Client"
|
||||
$(MAKE) -C applications/mp4client
|
||||
./mkdmg.sh $(arch)
|
||||
endif
|
||||
|
||||
@@ -346,7 +322,6 @@ help:
|
||||
@echo "lib: builds GPAC library only (libgpac.so)"
|
||||
@echo "apps: builds programs only"
|
||||
@echo "modules: builds modules only"
|
||||
@echo "instmoz: build and local install of osmozilla"
|
||||
@echo "sggen: builds scene graph generators"
|
||||
@echo
|
||||
@echo "clean: clean src repository"
|
||||
|
||||
15
README.md
@@ -70,18 +70,9 @@ MP4Box is a multi-purpose MP4 file manipulation for the prompt, featuring media
|
||||
|
||||
|
||||
## gpac
|
||||
GPAC includes a filter engine in charge of stream management and used by most applications in GPAC - [read this post](https://wiki.gpac.io/Rearchitecture) for more discussion on how this impacts MP4Box and MP4Client.
|
||||
GPAC includes a filter engine in charge of stream management and used by most applications in GPAC - [read this post](https://wiki.gpac.io/Rearchitecture) for more discussion on how this impacts MP4Box.
|
||||
The gpac application is a direct interface to the filter engine of GPAC, allowing any combinaison of filters not enabled by other applications. See `gpac -h`, `man gpac`, `man gpac-filters` or [our wiki](https://wiki.gpac.io/Filters) for more details.
|
||||
|
||||
## MP4Client (deprecated)
|
||||
MP4Client is a media player built upon libgpac, featuring a rich media interactive composition engine with MPEG-4 BIFS, SVG, VRML/X3D support.
|
||||
For GPAC configuration instruction, check `MP4Client -h` , `man MP4Client` or [our wiki](https://wiki.gpac.io/mp4client).
|
||||
|
||||
__Warning__
|
||||
MP4Client is deprecated and will be removed in the next release. Start modifying your scripts:
|
||||
- replace `MP4Client URL` with `gpac -play URL` (audio/video playback only) or `gpac -mp4c URL` (if compositor is needed)
|
||||
- replace `MP4Client -gui URL` with `gpac -gui URL`.
|
||||
|
||||
# Getting started
|
||||
## Download
|
||||
Stable and nightly builds installers for Windows, Linux, OSX, Android, iOS are available on [gpac.io](https://gpac.wp.imt.fr/downloads/).
|
||||
@@ -126,7 +117,7 @@ The v0.8.X release (the last one using the legacy architecture) is officially de
|
||||
|
||||
## V2.X
|
||||
Targets:
|
||||
- [ ] drop MP4Client and GF_Terminal API
|
||||
- [x] drop MP4Client/Osmo4 and GF_Terminal API
|
||||
- [ ] User authentication for HTTP and RTSP servers
|
||||
- [ ] DASH event support
|
||||
- [ ] Web integration (emscripten, Remotery UI)
|
||||
@@ -135,5 +126,5 @@ Targets:
|
||||
- [ ] GUI cleanup ?
|
||||
- [ ] deprecate `:filemode` in ROUTE
|
||||
- [ ] support ClearKey Content Protection (CCP)
|
||||
- [ ] FFMPEG subtitle support
|
||||
- [x] FFMPEG subtitle support
|
||||
|
||||
|
||||
@@ -2,35 +2,8 @@ include ../config.mak
|
||||
|
||||
APPDIRS=gpac
|
||||
|
||||
ifeq ($(STATIC_BINARY),yes)
|
||||
APPDIRS+=mp4box
|
||||
else
|
||||
|
||||
ifeq ($(DISABLE_PLAYER),no)
|
||||
APPDIRS+=mp4client
|
||||
endif
|
||||
|
||||
ifeq ($(DISABLE_ISOFF),no)
|
||||
APPDIRS+=mp4box
|
||||
|
||||
endif
|
||||
|
||||
V4STUDIODIR=
|
||||
INSTDIRS=mp4client
|
||||
ifeq ($(CONFIG_XUL),no)
|
||||
else
|
||||
#INSTDIRS+=osmozilla
|
||||
#APPDIRS+=osmozilla
|
||||
endif
|
||||
|
||||
#disable due to version incompatibilities
|
||||
ifeq ($(USE_WXWIDGETS),yes)
|
||||
#APPDIRS+=osmo4_wx
|
||||
#V4STUDIODIR=V4Studio
|
||||
#INSTDIRS+=osmo4_wx
|
||||
endif
|
||||
|
||||
#STATIC_BINARY
|
||||
endif
|
||||
|
||||
ALLDIRS=$(APPDIRS)
|
||||
@@ -43,9 +16,6 @@ apps:
|
||||
sggen:
|
||||
$(MAKE) -C generators all
|
||||
|
||||
V4Studio:
|
||||
set -e; for i in $(V4STUDIODIR) ; do $(MAKE) -C $$i dep; done
|
||||
|
||||
dep:
|
||||
set -e; for i in $(ALLDIRS) ; do $(MAKE) -C $$i dep; done
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "23.0.3"
|
||||
buildToolsVersion "25.0.0"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.gpac.mp4box"
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -57,9 +57,9 @@ static pascal OSErr ae_open_doc (const AppleEvent *ae_event, AppleEvent *ae_repl
|
||||
long count;
|
||||
|
||||
err = AEGetParamDesc(ae_event, keyDirectObject, typeAEList, &docList);
|
||||
if (err)
|
||||
if (err) {
|
||||
return (noErr);
|
||||
|
||||
}
|
||||
err = AECountItems(&docList, &count);
|
||||
if (err == noErr) {
|
||||
err = AEGetNthPtr(&docList, 1, typeFSRef, NULL, NULL, &ref, sizeof(FSRef), NULL);
|
||||
@@ -747,7 +747,7 @@ Bool GPAC_EventProc(void *ptr, GF_Event *evt)
|
||||
}
|
||||
return 0;
|
||||
case GF_EVENT_MOUSEMOVE:
|
||||
if (right_down && (user.init_flags & GF_TERM_WINDOWLESS) ) {
|
||||
if (right_down && (user.init_flags & GF_VOUT_WINDOWLESS) ) {
|
||||
GF_Event move;
|
||||
move.move.x = evt->mouse.x - last_x;
|
||||
move.move.y = last_y-evt->mouse.y;
|
||||
@@ -921,7 +921,7 @@ Bool GPAC_EventProc(void *ptr, GF_Event *evt)
|
||||
}
|
||||
break;
|
||||
case GF_EVENT_SIZE:
|
||||
if (user.init_flags & GF_TERM_WINDOWLESS) {
|
||||
if (user.init_flags & GF_VOUT_WINDOWLESS) {
|
||||
GF_Event move;
|
||||
move.type = GF_EVENT_MOVE;
|
||||
move.move.align_x = align_mode & 0xFF;
|
||||
@@ -1342,8 +1342,8 @@ int mp4client_main(int argc, char **argv)
|
||||
if (playback_speed <= 0) playback_speed = FIX_ONE;
|
||||
i++;
|
||||
}
|
||||
else if (!strcmp(arg, "-no-wnd")) user.init_flags |= GF_TERM_WINDOWLESS;
|
||||
else if (!strcmp(arg, "-no-back")) user.init_flags |= GF_TERM_WINDOW_TRANSPARENT;
|
||||
else if (!strcmp(arg, "-no-wnd")) user.init_flags |= GF_VOUT_WINDOWLESS;
|
||||
else if (!strcmp(arg, "-no-back")) user.init_flags |= GF_VOUT_WINDOW_NO_DECORATION;
|
||||
else if (!strcmp(arg, "-align")) {
|
||||
if (argv[i+1][0]=='m') align_mode = 1;
|
||||
else if (argv[i+1][0]=='b') align_mode = 2;
|
||||
@@ -1431,12 +1431,13 @@ int mp4client_main(int argc, char **argv)
|
||||
/*dummy in this case (global vars) but MUST be non-NULL*/
|
||||
user.opaque = &user;
|
||||
|
||||
if (no_audio) user.init_flags |= GF_TERM_NO_AUDIO;
|
||||
if (no_audio) gf_opts_set_key("temp", "no-audio", "yes");
|
||||
|
||||
if (bench_mode) {
|
||||
gf_opts_discard_changes();
|
||||
auto_exit = GF_TRUE;
|
||||
if (bench_mode!=2) user.init_flags |= GF_TERM_NO_VIDEO;
|
||||
if (bench_mode!=2)
|
||||
gf_opts_set_key("temp", "no-video", "yes");
|
||||
}
|
||||
|
||||
if (forced_width && forced_height) {
|
||||
@@ -282,7 +282,7 @@ void bifs3d_viewpoints_merger(GF_ISOFile *file, char *szConfigFile, u32 width, u
|
||||
}
|
||||
|
||||
memset(&b2v, 0, sizeof(BIFSVID));
|
||||
user.init_flags = GF_TERM_NO_AUDIO;
|
||||
user.init_flags = 0;
|
||||
/* Initialization of the compositor */
|
||||
b2v.sr = gf_sc_new(&user, 0, NULL);
|
||||
gf_sc_set_option(b2v.sr, GF_OPT_VISIBLE, 0);
|
||||
@@ -492,7 +492,7 @@ void bifs_to_vid(GF_ISOFile *file, char *szConfigFile, u32 width, u32 height, ch
|
||||
}
|
||||
|
||||
needs_raw = 0;
|
||||
user.init_flags = GF_TERM_NO_AUDIO | GF_TERM_FORCE_3D;
|
||||
user.init_flags = 0;
|
||||
b2v.sr = gf_sc_new(&user, 0, NULL);
|
||||
gf_sc_set_option(b2v.sr, GF_OPT_VISIBLE, 0);
|
||||
|
||||
|
||||
@@ -10,26 +10,24 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<TableLayout
|
||||
android:id="@+id/usernameAndPasswordLayout"
|
||||
android:id="@+id/url_auth_layout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:baselineAligned="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userNameLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_gravity="right"
|
||||
android:text="@string/usernameLabel" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/userNamePrompt"
|
||||
android:id="@+id/userName"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
@@ -40,13 +38,11 @@
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow2"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:gravity="fill_horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/passwordLabel"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
@@ -506,7 +506,7 @@ int main (int argc, char *argv[])
|
||||
user.EventProc = GPAC_EventProc;
|
||||
/*dummy in this case (global vars) but MUST be non-NULL*/
|
||||
//user.opaque = user.modules;
|
||||
if (no_audio) user.init_flags |= GF_TERM_NO_AUDIO;
|
||||
if (no_audio) gf_opts_set_key("temp", "no-audio", "yes");
|
||||
|
||||
if (bench_mode) {
|
||||
//gf_cfg_discard_changes(user.config);
|
||||
@@ -41,10 +41,15 @@ endif
|
||||
|
||||
|
||||
#common objs - insert after ../static if any to overwrite list of objects
|
||||
OBJS= main.o
|
||||
OBJS=gpac.o compositor_tools.o gpac_help.o
|
||||
|
||||
SRCS := $(OBJS:.o=.c)
|
||||
|
||||
ifeq ($(CONFIG_DARWIN),yes)
|
||||
OBJS+= carbon_hook.o
|
||||
LDFLAGS += -framework Carbon
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_WIN32),yes)
|
||||
OBJS+=$(SRC_PATH)/manifest.o
|
||||
endif
|
||||
|
||||
84
applications/gpac/carbon_hook.c
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* GPAC - Multimedia Framework C SDK
|
||||
*
|
||||
* Authors: Jean Le Feuvre
|
||||
* Copyright (c) Telecom ParisTech 2022
|
||||
* All rights reserved
|
||||
*
|
||||
* This file is part of GPAC / gpac application
|
||||
*
|
||||
* GPAC is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* GPAC is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined(__DARWIN__) || defined(__APPLE__)
|
||||
#include <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
#include <gpac/setup.h>
|
||||
//declare prototype, don't include gpac.h due to conflict in Fixed type between gpac and OSX
|
||||
void carbon_remove_hook(void);
|
||||
void carbon_set_hook(void);
|
||||
void gpac_open_urls(const char *urls);
|
||||
|
||||
int gf_dynstrcat(char **str, const char *to_append, const char *sep);
|
||||
|
||||
static AEEventHandlerUPP open_doc_UPP;
|
||||
|
||||
void carbon_remove_hook()
|
||||
{
|
||||
AERemoveEventHandler(kCoreEventClass, kAEOpenDocuments, open_doc_UPP, false);
|
||||
DisposeAEEventHandlerUPP(open_doc_UPP);
|
||||
}
|
||||
|
||||
static pascal OSErr sdl_ae_open_doc(const AppleEvent *ae_event, AppleEvent *ae_reply, long ae_ref_count)
|
||||
{
|
||||
char path[4096];
|
||||
OSErr err;
|
||||
AEDescList docList;
|
||||
long i, count;
|
||||
char *urls = NULL;
|
||||
|
||||
err = AEGetParamDesc(ae_event, keyDirectObject, typeAEList, &docList);
|
||||
if (err) goto exit;
|
||||
|
||||
err = AECountItems(&docList, &count);
|
||||
if (err) goto exit;
|
||||
for (i=0; i<count; i++) {
|
||||
FSRef ref;
|
||||
err = AEGetNthPtr(&docList, i+1, typeFSRef, NULL, NULL, &ref, sizeof(FSRef), NULL);
|
||||
if (err) continue;
|
||||
FSRefMakePath(&ref, (UInt8 *) path, 4096);
|
||||
path[4095]=0;
|
||||
gf_dynstrcat(&urls, path, ",");
|
||||
}
|
||||
if (urls) {
|
||||
gpac_open_urls(urls);
|
||||
gf_free(urls);
|
||||
}
|
||||
|
||||
AEDisposeDesc(&docList);
|
||||
|
||||
exit:
|
||||
return (noErr);
|
||||
}
|
||||
|
||||
void carbon_set_hook()
|
||||
{
|
||||
open_doc_UPP = NewAEEventHandlerUPP(sdl_ae_open_doc);
|
||||
AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, open_doc_UPP, 0L, false);
|
||||
}
|
||||
|
||||
|
||||
1728
applications/gpac/compositor_tools.c
Normal file
2481
applications/gpac/gpac.c
Normal file
88
applications/gpac/gpac.h
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* GPAC - Multimedia Framework C SDK
|
||||
*
|
||||
* Authors: Jean Le Feuvre
|
||||
* Copyright (c) Telecom ParisTech 2022
|
||||
* All rights reserved
|
||||
*
|
||||
* This file is part of GPAC / gpac application
|
||||
*
|
||||
* GPAC is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* GPAC is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <gpac/filters.h>
|
||||
#include <gpac/events.h>
|
||||
|
||||
#ifndef GPAC_CONFIG_ANDROID
|
||||
|
||||
//gpac is loaded using sink compositor in base player mode (-mp4c) with a custum event proc
|
||||
#define LOAD_MP4C 1
|
||||
//gpac is loaded with gui
|
||||
#define LOAD_GUI 2
|
||||
//gpac is loaded with gui from env var GPAC_GUI (OSX only for now)
|
||||
#define LOAD_GUI_ENV 3
|
||||
//gpac is loaded with gui but uses event proc (ios only for now)
|
||||
#define LOAD_GUI_CBK 4
|
||||
|
||||
void load_compositor(GF_Filter *f);
|
||||
void unload_compositor(void);
|
||||
Bool mp4c_event_proc(void *ptr, GF_Event *evt);
|
||||
Bool mp4c_parse_arg(char *arg, char *arg_val);
|
||||
Bool mp4c_handle_prompt(u8 char_val);
|
||||
Bool mp4c_task(void );
|
||||
void mp4c_help(u32 argmode);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//if uncommented, check argument description matches our conventions - see filter.h
|
||||
#define CHECK_DOC
|
||||
|
||||
#define SEP_LINK 5
|
||||
#define SEP_FRAG 2
|
||||
#define SEP_LIST 3
|
||||
|
||||
#include <gpac/main.h>
|
||||
|
||||
void gpac_filter_help(void);
|
||||
void gpac_modules_help(void);
|
||||
void gpac_alias_help(GF_SysArgMode argmode);
|
||||
void gpac_core_help(GF_SysArgMode mode, Bool for_logs);
|
||||
void gpac_usage(GF_SysArgMode argmode);
|
||||
void gpac_config_help(void);
|
||||
void gpac_suggest_arg(char *aname);
|
||||
void gpac_suggest_filter(char *fname, Bool is_help, Bool filter_only);
|
||||
void gpac_check_session_args(void);
|
||||
int gpac_make_lang(char *filename);
|
||||
Bool gpac_expand_alias(int o_argc, char **o_argv);
|
||||
void gpac_load_suggested_filter_args(void);
|
||||
void dump_all_props(char *pname);
|
||||
void dump_all_colors(void);
|
||||
void dump_all_audio_cicp(void);
|
||||
void dump_all_codec(GF_SysArgMode argmode);
|
||||
void write_core_options(void );
|
||||
void write_file_extensions(void );
|
||||
void write_filters_options(void);
|
||||
Bool print_filters(int argc, char **argv, GF_SysArgMode argmode);
|
||||
void parse_sep_set(const char *arg, Bool *override_seps);
|
||||
|
||||
|
||||
#if defined(GPAC_CONFIG_DARWIN) && !defined(GPAC_CONFIG_IOS)
|
||||
void carbon_remove_hook(void);
|
||||
void carbon_set_hook(void);
|
||||
#endif
|
||||
|
||||
void gpac_open_urls(const char *urls);
|
||||
72
applications/gpac/gpac.rc
Normal file
@@ -0,0 +1,72 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "windows.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Fran<61>ais (France) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""windows.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ICON3 ICON "..\\..\\share\\doc\\gpac.ico"
|
||||
#endif // Fran<61>ais (France) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>GPAC</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFiles</key>
|
||||
@@ -31,7 +33,7 @@
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Osmo4</string>
|
||||
<string>GPAC</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
@@ -39,7 +41,11 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>gpac</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0000</string>
|
||||
<string>12.0.0</string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>GPAC needs camera access to handle this URL</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>GPAC needs microphone access to handle this URL</string>
|
||||
<key>UIFileSharingEnabled</key>
|
||||
<true/>
|
||||
<key>UIRequiresFullScreen</key>
|
||||
64
applications/gpac/ios_main.m
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* GPAC - Multimedia Framework C SDK
|
||||
*
|
||||
* Authors: Jean Le Feuvre
|
||||
* Copyright (c) Telecom ParisTech 2022
|
||||
* All rights reserved
|
||||
*
|
||||
* This file is part of GPAC / gpac ios application
|
||||
*
|
||||
* GPAC is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* GPAC is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef main
|
||||
#undef main
|
||||
#endif
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
//requires SDL 2.0.10 - if not available, remove ios_main.m from project
|
||||
typedef int (*SDL_main_func)(int argc, char *argv[]);
|
||||
extern int SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);
|
||||
|
||||
int SDL_main(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int i, needs_uikit=0;
|
||||
|
||||
if (argc<=1) {
|
||||
needs_uikit=1;
|
||||
} else {
|
||||
for (i=1; i<argc; i++) {
|
||||
if (strstr(argv[i], "-mp4c")
|
||||
|| strstr(argv[i], "-gui")
|
||||
|| strstr(argv[i], "-req-gl")
|
||||
|| strstr(argv[i], "vout")
|
||||
|| strstr(argv[i], "player=base")
|
||||
|| strstr(argv[i], "player=gui")
|
||||
) {
|
||||
needs_uikit = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (needs_uikit) {
|
||||
return SDL_UIKitRunApp(argc, argv, SDL_main);
|
||||
}
|
||||
|
||||
return SDL_main(argc, argv);
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 143 KiB |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
51
applications/gpac/ios_sensors/sensors.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* GPAC - Multimedia Framework C SDK
|
||||
*
|
||||
* Authors: Jean Le Feuvre
|
||||
* Copyright (c) Telecom ParisTech 2022
|
||||
* All rights reserved
|
||||
*
|
||||
* This file is part of GPAC / gpac ios application
|
||||
*
|
||||
* GPAC is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* GPAC is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreMotion/CoreMotion.h>
|
||||
#import <CoreLocation/CoreLocation.h>
|
||||
|
||||
#include "sensors_def.h"
|
||||
|
||||
@interface SensorAccess : NSObject <CLLocationManagerDelegate>
|
||||
{
|
||||
SensorDataCallback* sensorCallbak;
|
||||
int sensorType;
|
||||
int gpsActive;
|
||||
int sensorActive;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) CMMotionManager *motionManager;
|
||||
@property (nonatomic, retain) NSOperationQueue *queue;
|
||||
@property (nonatomic, retain) CLLocationManager *locMngr;
|
||||
|
||||
- (int) setSensorType :(int) type;
|
||||
- (int) getSensorType;
|
||||
- (int) setSensorCallback:(SensorDataCallback*)callback ;
|
||||
- (int) startSensor;
|
||||
- (int) stopSensor;
|
||||
- (int) isSensorStarted;
|
||||
|
||||
@end
|
||||
@@ -1,11 +1,27 @@
|
||||
//
|
||||
// ios_mpegv.m
|
||||
// ios_mpegv
|
||||
//
|
||||
// Created by mac on 3/8/13.
|
||||
//
|
||||
//
|
||||
|
||||
/*
|
||||
* GPAC - Multimedia Framework C SDK
|
||||
*
|
||||
* Authors: Jean Le Feuvre
|
||||
* Copyright (c) Telecom ParisTech 2022
|
||||
* All rights reserved
|
||||
*
|
||||
* This file is part of GPAC / gpac ios application
|
||||
*
|
||||
* GPAC is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* GPAC is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
#import "sensors.h"
|
||||
|
||||
@implementation SensorAccess
|
||||
57
applications/gpac/ios_sensors/sensors_def.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* GPAC - Multimedia Framework C SDK
|
||||
*
|
||||
* Authors: Jean Le Feuvre
|
||||
* Copyright (c) Telecom ParisTech 2022
|
||||
* All rights reserved
|
||||
*
|
||||
* This file is part of GPAC / gpac ios application
|
||||
*
|
||||
* GPAC is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* GPAC is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SENSORS_DEF_H_
|
||||
#define _SENSORS_DEF_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//accelerometer
|
||||
#define SENSOR_ACCELEROMETER 0
|
||||
//gyro
|
||||
#define SENSOR_GYROSCOPE 1
|
||||
//yaw-pitch-roll
|
||||
#define SENSOR_ORIENTATION 2
|
||||
//magnetometer
|
||||
#define SENSOR_MAGNETOMETER 3
|
||||
//GPS
|
||||
#define SENSOR_GPS 4
|
||||
|
||||
typedef void (SensorDataCallback)(int sensor_type, float x, float y, float z, float w);
|
||||
|
||||
void *sensor_create(int type, SensorDataCallback *callback);
|
||||
int sensor_destroy(void** inst);
|
||||
int sensor_get_type(void* inst);
|
||||
int sensor_start(void* inst);
|
||||
int sensor_stop(void* inst);
|
||||
int sensor_is_running(void* inst);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //_SENSORS_DEF_H_
|
||||
17
applications/gpac/resource.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
//
|
||||
#define IDI_ICON1 102
|
||||
#define IDI_ICON2 103
|
||||
#define IDI_ICON3 105
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 106
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
44
applications/gpac_android/.gitignore
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
### Mac BS ###
|
||||
.DS_Store
|
||||
|
||||
### Android ###
|
||||
# Built application files
|
||||
*.apk
|
||||
*.ap_
|
||||
captures/
|
||||
|
||||
# Files for the Dalvik VM
|
||||
*.dex
|
||||
|
||||
# Java class files
|
||||
*.class
|
||||
|
||||
# Generated files
|
||||
bin/
|
||||
gen/
|
||||
|
||||
# copied files
|
||||
src/main/assets/
|
||||
|
||||
# Gradle files
|
||||
.gradle/
|
||||
build/
|
||||
!build/jar/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
local.properties
|
||||
|
||||
# Proguard folder generated by Eclipse
|
||||
proguard/
|
||||
|
||||
#Log Files
|
||||
*.log
|
||||
|
||||
|
||||
## Intellij settings
|
||||
.idea/
|
||||
*.iml
|
||||
|
||||
## jimu mirror
|
||||
app/mirror/
|
||||
.gradle
|
||||
48
applications/gpac_android/build.gradle
Normal file
@@ -0,0 +1,48 @@
|
||||
apply plugin: 'com.android.application'
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.1.2'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "25.0.2"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "io.gpac.gpac"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 22
|
||||
}
|
||||
|
||||
sourceSets.main {
|
||||
jni.srcDirs = [] // This prevents the auto generation of Android.mk
|
||||
jniLibs.srcDir 'src/main/libs' // our JNI libs
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile files('libs/real3d.jar')
|
||||
compile 'com.android.support:recyclerview-v7:23.1.1'
|
||||
compile 'com.android.support:cardview-v7:23.1.1'
|
||||
compile 'com.android.support:appcompat-v7:23.1.1'
|
||||
compile 'com.android.support:design:23.1.1'
|
||||
}
|
||||