Skip to content

Commit

Permalink
Merge branch 'master' into buildbot-scte35-id3-markers
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouqueau committed Feb 13, 2024
2 parents c1ef5c1 + fb35bdc commit 12a672b
Show file tree
Hide file tree
Showing 324 changed files with 9,072 additions and 4,112 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!

- [ ] I looked for a similar issue and couldn't find any.
- [ ] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ ] I tried with the latest version of GPAC. Installers available at https://gpac.io/downloads/gpac-nightly-builds/
- [ ] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/bug-reporting/
Detailed guidelines: https://gpac.io/bug-reporting/
35 changes: 35 additions & 0 deletions .github/workflows/ga.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: GitHub Actions
run-name: build with docker
on: [push]

jobs:
master-build-and-deploy:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }}
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: build image
run: docker build -t gpac-ubuntu -f build/docker/ubuntu.Dockerfile .
- name: check docker images
run: docker image list
- name: check docker run
run: docker run gpac-ubuntu || true
- name: login docker hub
run: docker login --username gpac --password ${{secrets.DOCKER_HUB_TOKEN}}
- name: tag docker image
run: docker tag gpac-ubuntu gpac/ubuntu:latest
- name: push docker image
run: docker push gpac/ubuntu:latest


other-builds:
runs-on: ubuntu-latest
if: ${{ github.ref != 'refs/heads/master' || github.event_name != 'push' }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: build image
run: docker build -t gpac-ubuntu -f build/docker/ubuntu.Dockerfile .
5 changes: 3 additions & 2 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

## Filters
- Async HTTP request in all filters
- JS/Python/NodeJS bindings for httpout server
- Fixed cors and mime types in httpout for wasm and sharedArrayuffer support
- Allow compilation without threads
- Allow compilation without network
Expand Down Expand Up @@ -397,8 +398,8 @@ It also adds several small features:
- The counter source from the DASH sequences added to the public content.
- HLS and DASH playback minor fixes.
- Cleanup of DASH client logs.
- Added support for DASH SRD in 360 for independent videos videos (NxM partial spheres) [more](https://gpac.wp.imt.fr/2016/05/25/srd/)
- Added support for DASH SRD in 360 for HEV Ctiled videos (NxM tiles on one sphere) - [checkout tuto](https://gpac.wp.imt.fr/2017/02/01/hevc-tile-based-adaptation-guide/)
- Added support for DASH SRD in 360 for independent videos videos (NxM partial spheres) [more](https://gpac.io/2016/05/25/srd/)
- Added support for DASH SRD in 360 for HEV Ctiled videos (NxM tiles on one sphere) - [checkout tuto](https://gpac.io/2017/02/01/hevc-tile-based-adaptation-guide/)
- Apple VideoToolBox hardware decoding support for OSX and iOS for AVC|H264.
- Android hardware decoding hardware acceleration for AVC|H264 (HEVC on its way).
- Android build is based on Android Studio.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ GPAC is an open-source multimedia framework focused on modularity and standards
GPAC provides tools to process, inspect, package, stream, playback and interact with media content. Such content can be any combination of audio, video, subtitles, metadata, scalable graphics, encrypted media, 2D/3D graphics and ECMAScript.
GPAC is best-known for its wide MP4/ISOBMFF capabilities and is popular among video enthusiasts, academic researchers, standardization bodies, and professional broadcasters.

For more information, visit [GPAC website](http://gpac.io)
For more information, visit [https://gpac.io](https://gpac.io)

GPAC is distributed under the LGPL v2.1 or later, and is also available, for most of it, under a [commercial license](https://www.motionspell.com/gpac-licensing).

Expand Down Expand Up @@ -72,11 +72,11 @@ 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.
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.
The gpac application is a direct interface to the filter engine of GPAC, allowing any combination 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.

# 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/).
Stable and nightly builds installers for Windows, Linux, OSX, Android, iOS are available on [gpac.io](https://gpac.io/downloads/).

If you want to compile GPAC yourself, please follow the instructions in the [build section](https://wiki.gpac.io/Build-Introduction) of our wiki.

Expand All @@ -101,7 +101,7 @@ Please use [github](https://github.com/gpac/gpac/issues) for feature requests an
## Contributing
A complex project like GPAC wouldn’t exist and persist without the support of its community. Please contribute: a nice message, supporting us in our communication, reporting issues when you see them… any gesture, even the smallest ones, counts.

If you want to contribute to GPAC, you can find ideas at [GSoC page](https://gpac.wp.imt.fr/jobs/google-summer-of-code-ideas/) or look for a [good first issue](https://github.com/gpac/gpac/labels/good%20first%20issue). In any doubt please feel free to [contact us](mailto:contact@gpac.io).
If you want to contribute to GPAC, you can find ideas at [GSoC page](https://gpac.io/jobs/google-summer-of-code-ideas/) or look for a [good first issue](https://github.com/gpac/gpac/labels/good%20first%20issue). In any doubt please feel free to [contact us](mailto:contact@gpac.io).

# Team
GPAC is brought to you by an experienced team of developers with a wide track-record on media processing.
Expand Down
4 changes: 2 additions & 2 deletions applications/gpac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ else ifeq ($(CONFIG_EMSCRIPTEN),yes)
EXT="."$(EM_TYPE)
PROG="gpac"$(EXT)

#export defaul symbols and modularize as libgpac
exports=-sMODULARIZE=1 -sEXPORT_NAME=libgpac -sEXPORTED_RUNTIME_METHODS=callMain,cwrap,stackSave,stackRestore,stackAlloc,addFunction,FS,IDBFS,allocateUTF8OnStack,getValue,setValue,UTF8ToString
#export default symbols and modularize as libgpac
exports=-sMODULARIZE=1 -sEXPORT_NAME=libgpac -sEXPORTED_RUNTIME_METHODS=cwrap,stackSave,stackRestore,stackAlloc,addFunction,FS,IDBFS,allocateUTF8OnStack,getValue,setValue,UTF8ToString -sEXPORTED_FUNCTIONS=_malloc,_free,_main
ifeq ($(DISABLE_THREADS),no)
LINKFLAGS+=$(exports),PThread -sPTHREAD_POOL_SIZE=1 -sPTHREAD_POOL_SIZE_STRICT=0
else
Expand Down
7 changes: 3 additions & 4 deletions applications/gpac/compositor_tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,10 +792,9 @@ Bool mp4c_event_proc(void *ptr, GF_Event *evt)
case GF_EVENT_AUTHORIZATION:
{
u32 nb_retry = 4;
assert( evt->type == GF_EVENT_AUTHORIZATION);
assert( evt->auth.user);
assert( evt->auth.password);
assert( evt->auth.site_url);
gf_fatal_assert( evt->auth.user);
gf_fatal_assert( evt->auth.password);
gf_assert( evt->auth.site_url);
while ((!strlen(evt->auth.user) || !strlen(evt->auth.password)) && (nb_retry > 0) ) {
nb_retry--;
fprintf(stderr, "**** Authorization required for site %s ****\n", evt->auth.site_url);
Expand Down
13 changes: 8 additions & 5 deletions applications/gpac/gpac.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,9 @@ void gpac_em_sig_handler(int type)
gf_fs_abort(session, GF_FS_FLUSH_FAST);
break;
case 3:
fprintf(stderr, "Aborting without flush ...\n");
fprintf(stderr, "Aborting without flush %s...\n", nb_loops ? "and stoping loops" : "");
gf_fs_abort(session, GF_FS_FLUSH_NONE);
nb_loops=0;
break;
case 4:
if (!enable_reports) {
Expand Down Expand Up @@ -1098,7 +1099,7 @@ static int gpac_run()
}

if (print_filters(argc, argv, argmode)==GF_FALSE)
e = GF_FILTER_NOT_FOUND;
e = GF_NOT_FOUND;
ERR_EXIT
}
if (view_filter_conn) {
Expand Down Expand Up @@ -1425,7 +1426,8 @@ static int gpac_done(GF_Err e, Bool exit_only)

{
if (e) {
fprintf(stderr, "session error %s\n", gf_error_to_string(e) );
if (e!=GF_NOT_FOUND)
fprintf(stderr, "session error: %s\n", gf_error_to_string(e) );
} else {
e = gf_fs_get_last_connect_error(session);
if (e<0) fprintf(stderr, "session last connect error %s\n", gf_error_to_string(e) );
Expand Down Expand Up @@ -1500,6 +1502,7 @@ static int gpac_done(GF_Err e, Bool exit_only)
gf_log_reset_file();

#ifdef GPAC_CONFIG_EMSCRIPTEN
emscripten_cancel_main_loop();
return gpac_run();
#else
goto restart;
Expand Down Expand Up @@ -2943,8 +2946,8 @@ static u32 gpac_unit_tests(GF_MemTrackerType mem_track)
gpac_suggest_arg("blcksize");
gpac_suggest_filter("outf", GF_FALSE, GF_FALSE);
//todo: build tests for these two
gf_filter_pid_negociate_property_str(NULL, NULL, NULL);
gf_filter_pid_negociate_property_dyn(NULL, NULL, NULL);
gf_filter_pid_negotiate_property_str(NULL, NULL, NULL);
gf_filter_pid_negotiate_property_dyn(NULL, NULL, NULL);

gf_props_parse_type("uint");
//this one is just a wrapper around an internal function
Expand Down
2 changes: 1 addition & 1 deletion applications/gpac/gpac.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ 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);
Bool 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);
Expand Down
38 changes: 26 additions & 12 deletions applications/gpac/gpac_help.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ const char *gpac_doc =
"- gfopt: following options are not tracked (no value)\n"
"- gpac: argument separator for URLs (no value)\n"
"- ccp: filter replacement control (string list value)\n"
"- NCID: ID of netcap configuration to use (string)\n"
"- DBG: debug missing input PID property (`=pid`), missing input packet property (`=pck`) or both (`=all`)\n"
"\n"
"The buffer control options are used to change the default buffering of PIDs of a filter:\n"
"- `FBT` controls the maximum buffer time of output PIDs of a filter\n"
Expand All @@ -494,7 +496,7 @@ const char *gpac_doc =
"\n"
"If another filter sends a buffer requirement messages, the maximum value of `FBT` (resp. `FBD`) and the user requested buffer time will be used for output buffer time (resp. decoding buffer time).\n"
"\n"
"These options can be set:\n"
"The options `FBT`, `FBU`, `FBD` and `DBG` can be set:\n"
"- per filter instance: `fA reframer:FBU=2`\n"
"- per filter class for the run: `--reframer@FBU=2`\n"
"- in the GPAC config file in a per-filter section: `[filter@reframer]FBU=2`\n"
Expand Down Expand Up @@ -1123,12 +1125,13 @@ void gpac_suggest_arg(char *aname)
}
}

void gpac_suggest_filter(char *fname, Bool is_help, Bool filter_only)
Bool gpac_suggest_filter(char *fname, Bool is_help, Bool filter_only)
{
Bool found = GF_FALSE;
Bool exact_match = GF_FALSE;
Bool first = GF_FALSE;
u32 i, count, pass_exact = GF_TRUE;
if (!fname) return;
if (!fname) return GF_FALSE;

if (filter_only || !is_help) pass_exact = GF_FALSE;

Expand Down Expand Up @@ -1188,6 +1191,7 @@ void gpac_suggest_filter(char *fname, Bool is_help, Bool filter_only)
if (!doc) doc = "Not documented";
GF_LOG(GF_LOG_INFO, GF_LOG_APP, ("%s: %s\n", alias, doc));
found = GF_TRUE;
if (is_help) return GF_TRUE;
}
}
else if (gf_sys_word_match(fname, alias)) {
Expand All @@ -1211,15 +1215,21 @@ void gpac_suggest_filter(char *fname, Bool is_help, Bool filter_only)
i++;

if (gf_sys_word_match(fname, arg->name)) {
if (!first) {
if (!strcmp(fname, arg->name)) {
gf_sys_format_help(helpout, help_flags | GF_PRINTARG_HIGHLIGHT_FIRST, "-%s: %s\n", arg->name, arg->description);
first = GF_TRUE;
if (!found) {
GF_LOG(GF_LOG_ERROR, GF_LOG_APP, ("No such filter %s\n", fname));
found = GF_TRUE;
exact_match = GF_TRUE;
} else {
if (!first) {
first = GF_TRUE;
if (!found) {
GF_LOG(GF_LOG_ERROR, GF_LOG_APP, ("No such filter %s\n", fname));
found = GF_TRUE;
}
GF_LOG(GF_LOG_WARNING, GF_LOG_APP, ("\nClosest core option: \n"));
}
GF_LOG(GF_LOG_WARNING, GF_LOG_APP, ("\nClosest core option: \n"));
GF_LOG(GF_LOG_INFO, GF_LOG_APP, ("-%s: %s\n", arg->name, arg->description));
}
GF_LOG(GF_LOG_INFO, GF_LOG_APP, ("-%s: %s\n", arg->name, arg->description));
}
}

Expand All @@ -1236,8 +1246,9 @@ void gpac_suggest_filter(char *fname, Bool is_help, Bool filter_only)

if (pass_exact) {
if (!strcmp(fname, arg->arg_name)) {
gf_sys_format_help(helpout, help_flags | GF_PRINTARG_HIGHLIGHT_FIRST, "%s.%s %s\n", reg->name, arg->arg_name, arg->arg_desc);
gf_sys_format_help(helpout, help_flags | GF_PRINTARG_HIGHLIGHT_FIRST, "%s.%s: %s\n", reg->name, arg->arg_name, arg->arg_desc);
found = GF_TRUE;
exact_match = GF_TRUE;
}
continue;
}
Expand Down Expand Up @@ -1283,6 +1294,7 @@ void gpac_suggest_filter(char *fname, Bool is_help, Bool filter_only)

}
}
if (exact_match) return GF_TRUE;
if (!found) {
if (pass_exact) {
pass_exact = GF_FALSE;
Expand All @@ -1294,6 +1306,7 @@ void gpac_suggest_filter(char *fname, Bool is_help, Bool filter_only)
is_help ? ", gpac -h or search all help using gpac -hx" : ""
));
}
return GF_FALSE;
}

static void gpac_suggest_filter_arg(GF_Config *opts, const char *argname, u32 atype)
Expand Down Expand Up @@ -2167,7 +2180,8 @@ Bool print_filters(int argc, char **argv, GF_SysArgMode argmode)

if (found) return GF_TRUE;

gpac_suggest_filter(fname, GF_TRUE, GF_FALSE);
if (gpac_suggest_filter(fname, GF_TRUE, GF_FALSE))
return GF_TRUE;
return GF_FALSE;
}

Expand Down Expand Up @@ -3442,7 +3456,7 @@ Bool gpac_expand_alias(int o_argc, char **o_argv)
argv[a_idx] = o_argv[i];
a_idx++;
}
assert(argc==a_idx);
gf_assert(argc==a_idx);

for (i=0; i< (u32) argc; i++) {
char *arg = argv[i];
Expand Down
6 changes: 3 additions & 3 deletions applications/mp4box/filedump.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* GPAC - Multimedia Framework C SDK
*
* Authors: Jean Le Feuvre
* Copyright (c) Telecom ParisTech 2000-2023
* Copyright (c) Telecom ParisTech 2000-2024
* All rights reserved
*
* This file is part of GPAC / mp4box application
Expand Down Expand Up @@ -2543,7 +2543,7 @@ static void DumpMetaItem(GF_ISOFile *file, Bool root_meta, u32 tk_num, char *nam

if (cenc_scheme) {
Bool is_protected;
u8 skip_byte_block, crypt_byte_block;
u32 skip_byte_block, crypt_byte_block;
const u8 *key_info;
u32 key_info_size;
fprintf(stderr, " - Protection scheme: %s v0x%08X", gf_4cc_to_str(cenc_scheme), cenc_version);
Expand Down Expand Up @@ -3646,7 +3646,7 @@ static void DumpStsdInfo(GF_ISOFile *file, u32 trackNum, Bool full_dump, Bool du
const u8 *def_key;
u32 def_key_size;
Bool IsEncrypted;
u8 crypt_byte_block, skip_byte_block;
u32 crypt_byte_block, skip_byte_block;
IV_size = 0;
gf_isom_get_cenc_info(file, trackNum, stsd_idx, NULL, &scheme_type, &version);

Expand Down

0 comments on commit 12a672b

Please sign in to comment.