commit
da12d00c15
@ -0,0 +1,97 @@ |
||||
name: linux build scripts |
||||
|
||||
on: |
||||
push: |
||||
branches: |
||||
- development |
||||
- main |
||||
paths: |
||||
- '.github/workflows/linux-build-scripts.yml' |
||||
- 'linux/**' |
||||
- 'scripts/**' |
||||
- 'tools/**' |
||||
- 'linux.sh' |
||||
pull_request: |
||||
branches: |
||||
- development |
||||
- main |
||||
paths: |
||||
- '.github/workflows/linux-build-scripts.yml' |
||||
- 'linux/**' |
||||
- 'scripts/**' |
||||
- 'tools/**' |
||||
- 'linux.sh' |
||||
|
||||
jobs: |
||||
build-main-on-ubuntu-2204: |
||||
name: linux main on ubuntu-22.04 |
||||
runs-on: ubuntu-22.04 |
||||
defaults: |
||||
run: |
||||
shell: bash |
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
- name: prerequisites |
||||
run: sudo apt-get install clang llvm lld libclang-11-dev libstdc++6 nasm autoconf automake libtool pkg-config curl git doxygen rapidjson-dev |
||||
- name: run the build script |
||||
run: ./linux.sh -d |
||||
- name: print build logs |
||||
if: ${{ always() }} |
||||
run: cat build.log |
||||
- name: print ffbuild logs |
||||
if: ${{ failure() }} |
||||
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' |
||||
build-lts-on-ubuntu-2204: |
||||
name: linux lts on ubuntu 22.04 |
||||
runs-on: ubuntu-22.04 |
||||
defaults: |
||||
run: |
||||
shell: bash |
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
- name: prerequisites |
||||
run: sudo apt-get install clang llvm lld libclang-11-dev libstdc++6 nasm autoconf automake libtool pkg-config curl git doxygen rapidjson-dev |
||||
- name: run the build script |
||||
run: ./linux.sh -d --lts |
||||
- name: print build logs |
||||
if: ${{ always() }} |
||||
run: cat build.log |
||||
- name: print ffbuild logs |
||||
if: ${{ failure() }} |
||||
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' |
||||
build-main-on-ubuntu-2004: |
||||
name: linux main on ubuntu-20.04 |
||||
runs-on: ubuntu-20.04 |
||||
defaults: |
||||
run: |
||||
shell: bash |
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
- name: prerequisites |
||||
run: sudo apt-get install clang llvm lld libclang-11-dev libstdc++6 nasm autoconf automake libtool pkg-config curl git doxygen rapidjson-dev |
||||
- name: run the build script |
||||
run: ./linux.sh -d |
||||
- name: print build logs |
||||
if: ${{ always() }} |
||||
run: cat build.log |
||||
- name: print ffbuild logs |
||||
if: ${{ failure() }} |
||||
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' |
||||
build-lts-on-ubuntu-2004: |
||||
name: linux lts on ubuntu 20.04 |
||||
runs-on: ubuntu-20.04 |
||||
defaults: |
||||
run: |
||||
shell: bash |
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
- name: prerequisites |
||||
run: sudo apt-get install clang llvm lld libclang-11-dev libstdc++6 nasm autoconf automake libtool pkg-config curl git doxygen rapidjson-dev |
||||
- name: run the build script |
||||
run: ./linux.sh -d --lts |
||||
- name: print build logs |
||||
if: ${{ always() }} |
||||
run: cat build.log |
||||
- name: print ffbuild logs |
||||
if: ${{ failure() }} |
||||
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' |
@ -0,0 +1,59 @@ |
||||
# Code of Conduct |
||||
|
||||
## Our Pledge |
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make |
||||
participation in our project and our community a harassment-free experience for everyone, regardless of age, body |
||||
size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, |
||||
race, religion, or sexual identity and orientation. |
||||
|
||||
## Our Standards |
||||
|
||||
Examples of behavior that contributes to creating a positive environment include: |
||||
|
||||
* Using welcoming and inclusive language |
||||
* Being respectful of differing viewpoints and experiences |
||||
* Gracefully accepting constructive criticism |
||||
* Focusing on what is best for the community |
||||
* Showing empathy towards other community members |
||||
|
||||
Examples of unacceptable behavior by participants include: |
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances |
||||
* Trolling, insulting/derogatory comments, and personal or political attacks |
||||
* Public or private harassment |
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission |
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting |
||||
|
||||
## Our Responsibilities |
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take |
||||
appropriate and fair corrective action in response to any instances of unacceptable behavior. |
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, |
||||
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any |
||||
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. |
||||
|
||||
## Scope |
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the |
||||
project or its community. Examples of representing a project or community include using an official project e-mail |
||||
address, posting via an official social media account, or acting as an appointed representative at an online or |
||||
offline event. Representation of a project may be further defined and clarified by project maintainers. |
||||
|
||||
## Enforcement |
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at |
||||
`open-source@arthenica.com`. All complaints will be reviewed and investigated and will result in a response that is |
||||
deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with |
||||
regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. |
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. |
||||
|
||||
## Attribution |
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at |
||||
[https://contributor-covenant.org/version/1/4][version]. |
||||
|
||||
[homepage]: https://contributor-covenant.org |
||||
[version]: https://contributor-covenant.org/version/1/4/ |
@ -0,0 +1,63 @@ |
||||
# How to contribute |
||||
|
||||
Thanks for taking the time to contribute! :heart: |
||||
|
||||
The following is a set of guidelines for contributing to `FFmpegKit`! |
||||
|
||||
## Project Resources |
||||
|
||||
* [Wiki](https://github.com/arthenica/ffmpeg-kit/wiki) includes most detailed documentation we have |
||||
* [FFmpegKit Feature Roadmap](https://github.com/orgs/arthenica/projects/1) shows our long term plans for the project |
||||
* [How To Get Help](https://github.com/arthenica/ffmpeg-kit/issues/215) details what you need to do if you need help |
||||
* [Discussions](https://github.com/arthenica/ffmpeg-kit/discussions) is where we expect you to ask questions |
||||
* [Issues](https://github.com/arthenica/ffmpeg-kit/issues) is for bugs and issues |
||||
|
||||
## Reporting Bugs |
||||
|
||||
Bugs are tracked as [GitHub issues](https://github.com/arthenica/ffmpeg-kit/issues). We have a `Bug report` issue |
||||
template which includes all the fields we need to see to confirm a bug and work on it. Try to fill out all template |
||||
fields, especially the logs field and steps to reproduce the bug. Reproducing a bug is crucial to be able to fix it. |
||||
|
||||
### FFmpeg Bugs |
||||
|
||||
`FFmpegKit` does not modify the original `FFmpeg` source code. Therefore, if an `FFmpeg` feature or component is not |
||||
working as expected, most probably that problem comes from `FFmpeg`. If you encounter those kind of errors, we expect |
||||
you to install the desktop version of `FFmpeg` and test that feature or component there. If it fails on desktop too |
||||
then it must be reported to [FFmpeg bug tracker](https://trac.ffmpeg.org/). If not, then it is an `FFmpegKit` bug. |
||||
Create an issue and state that this bug doesn't exist on the `desktop` version of the same `FFmpeg` version. |
||||
|
||||
## Feature Requests |
||||
|
||||
Before creating a feature request, please check our long term plan for the project, which is visible under the |
||||
[FFmpegKit Feature Roadmap](https://github.com/orgs/arthenica/projects/1). Then create an issue and fill out the |
||||
`Feature request` issue template and provide as many details as possible. |
||||
|
||||
### External Library Requests |
||||
|
||||
`FFmpeg` supports a long list of `external` libraries. In `FFmpegKit` we did our best to support most of them. |
||||
However, there are still many libraries that cannot be used within `FFmpegKit`. |
||||
|
||||
Unfortunately, cross compilation is a challenging process. Because of that, we don't take new external library |
||||
requests. Though, we are open to PRs. If someone wants to contribute we'll be happy to review their changes that |
||||
enables another external library in `FFmpeg`. |
||||
|
||||
## Pull Requests |
||||
|
||||
Although it is not mandatory, our suggestion is to first discuss the change you wish to make via an issue or a |
||||
discussion. `FFmpegKit` is a complex project. There are many things that must be considered when implementing a |
||||
feature. |
||||
|
||||
`FFmpegKit` has a unified API, which means we provide the same functionality on all platforms. Therefore, we expect |
||||
the same from the pull requests as well. A feature must be implemented for all platforms unless it is a platform specific |
||||
feature. |
||||
|
||||
Ensure that your changes rely on official documented methods and test your changes using the test applications we have |
||||
under the [ffmpeg-kit-test](https://github.com/arthenica/ffmpeg-kit-test) repository. |
||||
|
||||
`main` branch of `FFmpegKit` includes only the latest released source code. Therefore, please open your pull requests |
||||
against the development branches (`development` for native platforms, `development-react-native` for |
||||
`react-native`, `development-flutter` for `flutter`). |
||||
|
||||
Note that PRs about styling and cosmetic changes will not be accepted. |
||||
|
||||
Thanks! |
@ -1,10 +1,3 @@ |
||||
# Add project specific ProGuard rules here. |
||||
# You can control the set of applied configuration files using the |
||||
# proguardFiles setting in build.gradle. |
||||
# |
||||
# For more details, see |
||||
# http://developer.android.com/guide/developing/tools/proguard.html |
||||
|
||||
-keep class com.arthenica.ffmpegkit.FFmpegKitConfig { |
||||
native <methods>; |
||||
void log(long, int, byte[]); |
@ -1 +1,3 @@ |
||||
<manifest package="com.arthenica.ffmpegkit" /> |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
</manifest> |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,331 @@ |
||||
/*
|
||||
* This file is part of FFmpeg. |
||||
* copyright (c) 2022 Taner Sener ( tanersener gmail com ) |
||||
* |
||||
* FFmpeg 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.1 of the License, or (at your option) any later version. |
||||
* |
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software |
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||
*/ |
||||
|
||||
/*
|
||||
* This file is the modified version of ffmpeg_mux.c file living in ffmpeg source code under the fftools folder. We |
||||
* manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied |
||||
* by us to develop the ffmpeg-kit library. |
||||
* |
||||
* ffmpeg-kit changes by Taner Sener |
||||
* |
||||
* 09.2022 |
||||
* -------------------------------------------------------- |
||||
* - fftools_ prefix added to fftools headers |
||||
* - using main_ffmpeg_return_code instead of main_return_code |
||||
*/ |
||||
|
||||
#include <stdio.h> |
||||
#include <string.h> |
||||
|
||||
#include "fftools_ffmpeg.h" |
||||
|
||||
#include "libavutil/fifo.h" |
||||
#include "libavutil/intreadwrite.h" |
||||
#include "libavutil/log.h" |
||||
#include "libavutil/mem.h" |
||||
#include "libavutil/timestamp.h" |
||||
|
||||
#include "libavcodec/packet.h" |
||||
|
||||
#include "libavformat/avformat.h" |
||||
#include "libavformat/avio.h" |
||||
|
||||
static void close_all_output_streams(OutputStream *ost, OSTFinished this_stream, OSTFinished others) |
||||
{ |
||||
int i; |
||||
for (i = 0; i < nb_output_streams; i++) { |
||||
OutputStream *ost2 = output_streams[i]; |
||||
ost2->finished |= ost == ost2 ? this_stream : others; |
||||
} |
||||
} |
||||
|
||||
void of_write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, |
||||
int unqueue) |
||||
{ |
||||
AVFormatContext *s = of->ctx; |
||||
AVStream *st = ost->st; |
||||
int ret; |
||||
|
||||
/*
|
||||
* Audio encoders may split the packets -- #frames in != #packets out. |
||||
* But there is no reordering, so we can limit the number of output packets |
||||
* by simply dropping them here. |
||||
* Counting encoded video frames needs to be done separately because of |
||||
* reordering, see do_video_out(). |
||||
* Do not count the packet when unqueued because it has been counted when queued. |
||||
*/ |
||||
if (!(st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && ost->encoding_needed) && !unqueue) { |
||||
if (ost->frame_number >= ost->max_frames) { |
||||
av_packet_unref(pkt); |
||||
return; |
||||
} |
||||
ost->frame_number++; |
||||
} |
||||
|
||||
if (!of->header_written) { |
||||
AVPacket *tmp_pkt; |
||||
/* the muxer is not initialized yet, buffer the packet */ |
||||
if (!av_fifo_can_write(ost->muxing_queue)) { |
||||
size_t cur_size = av_fifo_can_read(ost->muxing_queue); |
||||
unsigned int are_we_over_size = |
||||
(ost->muxing_queue_data_size + pkt->size) > ost->muxing_queue_data_threshold; |
||||
size_t limit = are_we_over_size ? ost->max_muxing_queue_size : SIZE_MAX; |
||||
size_t new_size = FFMIN(2 * cur_size, limit); |
||||
|
||||
if (new_size <= cur_size) { |
||||
av_log(NULL, AV_LOG_ERROR, |
||||
"Too many packets buffered for output stream %d:%d.\n", |
||||
ost->file_index, ost->st->index); |
||||
exit_program(1); |
||||
} |
||||
ret = av_fifo_grow2(ost->muxing_queue, new_size - cur_size); |
||||
if (ret < 0) |
||||
exit_program(1); |
||||
} |
||||
ret = av_packet_make_refcounted(pkt); |
||||
if (ret < 0) |
||||
exit_program(1); |
||||
tmp_pkt = av_packet_alloc(); |
||||
if (!tmp_pkt) |
||||
exit_program(1); |
||||
av_packet_move_ref(tmp_pkt, pkt); |
||||
ost->muxing_queue_data_size += tmp_pkt->size; |
||||
av_fifo_write(ost->muxing_queue, &tmp_pkt, 1); |
||||
return; |
||||
} |
||||
|
||||
if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && ost->vsync_method == VSYNC_DROP) || |
||||
(st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && audio_sync_method < 0)) |
||||
pkt->pts = pkt->dts = AV_NOPTS_VALUE; |
||||
|
||||
if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { |
||||
if (ost->frame_rate.num && ost->is_cfr) { |
||||
if (pkt->duration > 0) |
||||
av_log(NULL, AV_LOG_WARNING, "Overriding packet duration by frame rate, this should not happen\n"); |
||||
pkt->duration = av_rescale_q(1, av_inv_q(ost->frame_rate), |
||||
ost->mux_timebase); |
||||
} |
||||
} |
||||
|
||||
av_packet_rescale_ts(pkt, ost->mux_timebase, ost->st->time_base); |
||||
|
||||
if (!(s->oformat->flags & AVFMT_NOTIMESTAMPS)) { |
||||
if (pkt->dts != AV_NOPTS_VALUE && |
||||
pkt->pts != AV_NOPTS_VALUE && |
||||
pkt->dts > pkt->pts) { |
||||
av_log(s, AV_LOG_WARNING, "Invalid DTS: %"PRId64" PTS: %"PRId64" in output stream %d:%d, replacing by guess\n", |
||||
pkt->dts, pkt->pts, |
||||
ost->file_index, ost->st->index); |
||||
pkt->pts = |
||||
pkt->dts = pkt->pts + pkt->dts + ost->last_mux_dts + 1 |
||||
- FFMIN3(pkt->pts, pkt->dts, ost->last_mux_dts + 1) |
||||
- FFMAX3(pkt->pts, pkt->dts, ost->last_mux_dts + 1); |
||||
} |
||||
if ((st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO || st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE) && |
||||
pkt->dts != AV_NOPTS_VALUE && |
||||
ost->last_mux_dts != AV_NOPTS_VALUE) { |
||||
int64_t max = ost->last_mux_dts + !(s->oformat->flags & AVFMT_TS_NONSTRICT); |
||||
if (pkt->dts < max) { |
||||
int loglevel = max - pkt->dts > 2 || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO ? AV_LOG_WARNING : AV_LOG_DEBUG; |
||||
if (exit_on_error) |
||||
loglevel = AV_LOG_ERROR; |
||||
av_log(s, loglevel, "Non-monotonous DTS in output stream " |
||||
"%d:%d; previous: %"PRId64", current: %"PRId64"; ", |
||||
ost->file_index, ost->st->index, ost->last_mux_dts, pkt->dts); |
||||
if (exit_on_error) { |
||||
av_log(NULL, AV_LOG_FATAL, "aborting.\n"); |
||||
exit_program(1); |
||||
} |
||||
av_log(s, loglevel, "changing to %"PRId64". This may result " |
||||
"in incorrect timestamps in the output file.\n", |
||||
max); |
||||
if (pkt->pts >= pkt->dts) |
||||
pkt->pts = FFMAX(pkt->pts, max); |
||||
pkt->dts = max; |
||||
} |
||||
} |
||||
} |
||||
ost->last_mux_dts = pkt->dts; |
||||
|
||||
ost->data_size += pkt->size; |
||||
ost->packets_written++; |
||||
|
||||
pkt->stream_index = ost->index; |
||||
|
||||
if (debug_ts) { |
||||
av_log(NULL, AV_LOG_INFO, "muxer <- type:%s " |
||||
"pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s duration:%s duration_time:%s size:%d\n", |
||||
av_get_media_type_string(ost->enc_ctx->codec_type), |
||||
av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ost->st->time_base), |
||||
av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ost->st->time_base), |
||||
av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &ost->st->time_base), |
||||
pkt->size |
||||
); |
||||
} |
||||
|
||||
ret = av_interleaved_write_frame(s, pkt); |
||||
if (ret < 0) { |
||||
print_error("av_interleaved_write_frame()", ret); |
||||
main_ffmpeg_return_code = 1; |
||||
close_all_output_streams(ost, MUXER_FINISHED | ENCODER_FINISHED, ENCODER_FINISHED); |
||||
} |
||||
} |
||||
|
||||
static int print_sdp(void) |
||||
{ |
||||
char sdp[16384]; |
||||
int i; |
||||
int j, ret; |
||||
AVIOContext *sdp_pb; |
||||
AVFormatContext **avc; |
||||
|
||||
for (i = 0; i < nb_output_files; i++) { |
||||
if (!output_files[i]->header_written) |
||||
return 0; |
||||
} |
||||
|
||||
avc = av_malloc_array(nb_output_files, sizeof(*avc)); |
||||
if (!avc) |
||||
exit_program(1); |
||||
for (i = 0, j = 0; i < nb_output_files; i++) { |
||||
if (!strcmp(output_files[i]->ctx->oformat->name, "rtp")) { |
||||
avc[j] = output_files[i]->ctx; |
||||
j++; |
||||
} |
||||
} |
||||
|
||||
if (!j) { |
||||
av_log(NULL, AV_LOG_ERROR, "No output streams in the SDP.\n"); |
||||
ret = AVERROR(EINVAL); |
||||
goto fail; |
||||
} |
||||
|
||||
ret = av_sdp_create(avc, j, sdp, sizeof(sdp)); |
||||
if (ret < 0) |
||||
goto fail; |
||||
|
||||
if (!sdp_filename) { |
||||
printf("SDP:\n%s\n", sdp); |
||||
fflush(stdout); |
||||
} else { |
||||
ret = avio_open2(&sdp_pb, sdp_filename, AVIO_FLAG_WRITE, &int_cb, NULL); |
||||
if (ret < 0) { |
||||
av_log(NULL, AV_LOG_ERROR, "Failed to open sdp file '%s'\n", sdp_filename); |
||||
goto fail; |
||||
} |
||||
|
||||
avio_print(sdp_pb, sdp); |
||||
avio_closep(&sdp_pb); |
||||
av_freep(&sdp_filename); |
||||
} |
||||
|
||||
fail: |
||||
av_freep(&avc); |
||||
return ret; |
||||
} |
||||
|
||||
/* open the muxer when all the streams are initialized */ |
||||
int of_check_init(OutputFile *of) |
||||
{ |
||||
int ret, i; |
||||
|
||||
for (i = 0; i < of->ctx->nb_streams; i++) { |
||||
OutputStream *ost = output_streams[of->ost_index + i]; |
||||
if (!ost->initialized) |
||||
return 0; |
||||
} |
||||
|
||||
ret = avformat_write_header(of->ctx, &of->opts); |
||||
if (ret < 0) { |
||||
av_log(NULL, AV_LOG_ERROR, |
||||
"Could not write header for output file #%d " |
||||
"(incorrect codec parameters ?): %s\n", |
||||
of->index, av_err2str(ret)); |
||||
return ret; |
||||
} |
||||
//assert_avoptions(of->opts);
|
||||
of->header_written = 1; |
||||
|
||||
av_dump_format(of->ctx, of->index, of->ctx->url, 1); |
||||
nb_output_dumped++; |
||||
|
||||
if (sdp_filename || want_sdp) { |
||||
ret = print_sdp(); |
||||
if (ret < 0) { |
||||
av_log(NULL, AV_LOG_ERROR, "Error writing the SDP.\n"); |
||||
return ret; |
||||
} |
||||
} |
||||
|
||||
/* flush the muxing queues */ |
||||
for (i = 0; i < of->ctx->nb_streams; i++) { |
||||
OutputStream *ost = output_streams[of->ost_index + i]; |
||||
AVPacket *pkt; |
||||
|
||||
/* try to improve muxing time_base (only possible if nothing has been written yet) */ |
||||
if (!av_fifo_can_read(ost->muxing_queue)) |
||||
ost->mux_timebase = ost->st->time_base; |
||||
|
||||
while (av_fifo_read(ost->muxing_queue, &pkt, 1) >= 0) { |
||||
ost->muxing_queue_data_size -= pkt->size; |
||||
of_write_packet(of, pkt, ost, 1); |
||||
av_packet_free(&pkt); |
||||
} |
||||
} |
||||
|
||||
return 0; |
||||
} |
||||
|
||||
int of_write_trailer(OutputFile *of) |
||||
{ |
||||
int ret; |
||||
|
||||
if (!of->header_written) { |
||||
av_log(NULL, AV_LOG_ERROR, |
||||
"Nothing was written into output file %d (%s), because " |
||||
"at least one of its streams received no packets.\n", |
||||
of->index, of->ctx->url); |
||||
return AVERROR(EINVAL); |
||||
} |
||||
|
||||
ret = av_write_trailer(of->ctx); |
||||
if (ret < 0) { |
||||
av_log(NULL, AV_LOG_ERROR, "Error writing trailer of %s: %s\n", of->ctx->url, av_err2str(ret)); |
||||
return ret; |
||||
} |
||||
|
||||
return 0; |
||||
} |
||||
|
||||
void of_close(OutputFile **pof) |
||||
{ |
||||
OutputFile *of = *pof; |
||||
AVFormatContext *s; |
||||
|
||||
if (!of) |
||||
return; |
||||
|
||||
s = of->ctx; |
||||
if (s && s->oformat && !(s->oformat->flags & AVFMT_NOFILE)) |
||||
avio_closep(&s->pb); |
||||
avformat_free_context(s); |
||||
av_dict_free(&of->opts); |
||||
|
||||
av_freep(pof); |
||||
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,79 @@ |
||||
/*
|
||||
* This file is part of FFmpeg. |
||||
* |
||||
* FFmpeg 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.1 of the License, or (at your option) any later version. |
||||
* |
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software |
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||
*/ |
||||
|
||||
/*
|
||||
* This file is the modified version of fopen_utf8.h file living in ffmpeg source code under the fftools folder. We |
||||
* manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied |
||||
* by us to develop the ffmpeg-kit library. |
||||
* |
||||
* ffmpeg-kit changes by Taner Sener |
||||
*/ |
||||
|
||||
#ifndef FFTOOLS_FOPEN_UTF8_H |
||||
#define FFTOOLS_FOPEN_UTF8_H |
||||
|
||||
#include <stdio.h> |
||||
|
||||
/* The fopen_utf8 function here is essentially equivalent to avpriv_fopen_utf8,
|
||||
* except that it doesn't set O_CLOEXEC, and that it isn't exported |
||||
* from a different library. (On Windows, each DLL might use a different |
||||
* CRT, and FILE* handles can't be shared across them.) */ |
||||
|
||||
#ifdef _WIN32 |
||||
#include "libavutil/wchar_filename.h" |
||||
|
||||
static inline FILE *fopen_utf8(const char *path_utf8, const char *mode) |
||||
{ |
||||
wchar_t *path_w, *mode_w; |
||||
FILE *f; |
||||
|
||||
/* convert UTF-8 to wide chars */ |
||||
if (get_extended_win32_path(path_utf8, &path_w)) /* This sets errno on error. */ |
||||
return NULL; |
||||
if (!path_w) |
||||
goto fallback; |
||||
|
||||
if (utf8towchar(mode, &mode_w)) |
||||
return NULL; |
||||
if (!mode_w) { |
||||
/* If failing to interpret the mode string as utf8, it is an invalid
|
||||
* parameter. */ |
||||
av_freep(&path_w); |
||||
errno = EINVAL; |
||||
return NULL; |
||||
} |
||||
|
||||
f = _wfopen(path_w, mode_w); |
||||
av_freep(&path_w); |
||||
av_freep(&mode_w); |
||||
|
||||
return f; |
||||
fallback: |
||||
/* path may be in CP_ACP */ |
||||
return fopen(path_utf8, mode); |
||||
} |
||||
|
||||
#else |
||||
|
||||
static inline FILE *fopen_utf8(const char *path, const char *mode) |
||||
{ |
||||
return fopen(path, mode); |
||||
} |
||||
#endif |
||||
|
||||
#endif /* FFTOOLS_FOPEN_UTF8_H */ |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,202 @@ |
||||
/*
|
||||
* Option handlers shared between the tools. |
||||
* copyright (c) 2022 Taner Sener ( tanersener gmail com ) |
||||
* |
||||
* This file is part of FFmpeg. |
||||
* |
||||
* FFmpeg 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.1 of the License, or (at your option) any later version. |
||||
* |
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software |
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||
*/ |
||||
|
||||
/*
|
||||
* This file is the modified version of opt_common.h file living in ffmpeg source code under the fftools folder. We |
||||
* manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied |
||||
* by us to develop the ffmpeg-kit library. |
||||
* |
||||
* ffmpeg-kit changes by Taner Sener |
||||
* |
||||
* 09.2022 |
||||
* -------------------------------------------------------- |
||||
* - CMDUTILS_COMMON_OPTIONS and CMDUTILS_COMMON_OPTIONS_AVDEVICE defines dropped |
||||
* - fftools_ prefix added to fftools headers |
||||
*/ |
||||
|
||||
#ifndef FFTOOLS_OPT_COMMON_H |
||||
#define FFTOOLS_OPT_COMMON_H |
||||
|
||||
#include "config.h" |
||||
|
||||
#include "fftools_cmdutils.h" |
||||
|
||||
#if CONFIG_AVDEVICE |
||||
/**
|
||||
* Print a listing containing autodetected sinks of the output device. |
||||
* Device name with options may be passed as an argument to limit results. |
||||
*/ |
||||
int show_sinks(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing autodetected sources of the input device. |
||||
* Device name with options may be passed as an argument to limit results. |
||||
*/ |
||||
int show_sources(void *optctx, const char *opt, const char *arg); |
||||
#endif |
||||
|
||||
/**
|
||||
* Print the license of the program to stdout. The license depends on |
||||
* the license of the libraries compiled into the program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_license(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Generic -h handler common to all fftools. |
||||
*/ |
||||
int show_help(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print the version of the program to stdout. The version message |
||||
* depends on the current versions of the repository and of the libav* |
||||
* libraries. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_version(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print the build configuration of the program to stdout. The contents |
||||
* depend on the definition of FFMPEG_CONFIGURATION. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_buildconf(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the formats supported by the |
||||
* program (including devices). |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_formats(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the muxers supported by the |
||||
* program (including devices). |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_muxers(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the demuxer supported by the |
||||
* program (including devices). |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_demuxers(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the devices supported by the |
||||
* program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_devices(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the codecs supported by the |
||||
* program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_codecs(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the decoders supported by the |
||||
* program. |
||||
*/ |
||||
int show_decoders(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the encoders supported by the |
||||
* program. |
||||
*/ |
||||
int show_encoders(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the bit stream filters supported by the |
||||
* program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_bsfs(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the protocols supported by the |
||||
* program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_protocols(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the filters supported by the |
||||
* program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_filters(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the pixel formats supported by the |
||||
* program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_pix_fmts(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the standard channel layouts supported by |
||||
* the program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_layouts(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the sample formats supported by the |
||||
* program. |
||||
*/ |
||||
int show_sample_fmts(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all supported stream dispositions. |
||||
*/ |
||||
int show_dispositions(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the color names and values recognized |
||||
* by the program. |
||||
*/ |
||||
int show_colors(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Set the libav* libraries log level. |
||||
*/ |
||||
int opt_loglevel(void *optctx, const char *opt, const char *arg); |
||||
|
||||
int opt_report(void *optctx, const char *opt, const char *arg); |
||||
int init_report(const char *env, FILE **file); |
||||
|
||||
int opt_max_alloc(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Override the cpuflags. |
||||
*/ |
||||
int opt_cpuflags(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Override the cpucount. |
||||
*/ |
||||
int opt_cpucount(void *optctx, const char *opt, const char *arg); |
||||
|
||||
#endif /* FFTOOLS_OPT_COMMON_H */ |
@ -1,5 +1,5 @@ |
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,807 +0,0 @@ |
||||
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@ |
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
} |
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||
$(am__configure_deps) $(am__DIST_COMMON)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
cscope distdir distdir-am dist dist-all distcheck
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
' |
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in README.md ar-lib compile \
|
||||
config.guess config.sub install-sh ltmain.sh missing
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-gzip
|
||||
# Exists only to be overridden by the user if desired.
|
||||
AM_DISTCHECK_DVI_TARGET = dvi
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FFMPEG_FRAMEWORKS = @FFMPEG_FRAMEWORKS@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJC = @OBJC@
|
||||
OBJCDEPMODE = @OBJCDEPMODE@
|
||||
OBJCFLAGS = @OBJCFLAGS@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
ac_ct_OBJC = @ac_ct_OBJC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
SUBDIRS = src
|
||||
all: all-recursive |
||||
|
||||
.SUFFIXES: |
||||
am--refresh: Makefile |
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) |
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) |
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) |
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) |
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps): |
||||
|
||||
mostlyclean-libtool: |
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool: |
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool: |
||||
-rm -f libtool config.lt
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets): |
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
ID: $(am__tagged_files) |
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive |
||||
TAGS: tags |
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) |
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-recursive |
||||
|
||||
CTAGS: ctags |
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) |
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS: |
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscope: cscope.files |
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
clean-cscope: |
||||
-rm -f cscope.files
|
||||
cscope.files: clean-cscope cscopelist |
||||
cscopelist: cscopelist-recursive |
||||
|
||||
cscopelist-am: $(am__tagged_files) |
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags: |
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
distdir: $(BUILT_SOURCES) |
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES) |
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -755 \
|
||||
-exec chmod u+rwx,go+rx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir |
||||
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip2: distdir |
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzip: distdir |
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-xz: distdir |
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zstd: distdir |
||||
tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir |
||||
@echo WARNING: "Support for distribution archives compressed with" \
|
||||
"legacy program 'compress' is deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-shar: distdir |
||||
@echo WARNING: "Support for shar distribution archives is" \
|
||||
"deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir |
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist dist-all: |
||||
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist |
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
*.tar.zst*) \
|
||||
zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build/sub \
|
||||
&& ../../configure \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
--srcdir=../.. --prefix="$$dc_install_base" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__post_remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck: |
||||
@test -n '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: trying to run $@ with an empty' \
|
||||
'$$(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean |
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am |
||||
check: check-recursive |
||||
all-am: Makefile |
||||
installdirs: installdirs-recursive |
||||
installdirs-am: |
||||
install: install-recursive |
||||
install-exec: install-exec-recursive |
||||
install-data: install-data-recursive |
||||
uninstall: uninstall-recursive |
||||
|
||||
install-am: all-am |
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive |
||||
install-strip: |
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic: |
||||
|
||||
clean-generic: |
||||
|
||||
distclean-generic: |
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic: |
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive |
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am |
||||
|
||||
distclean: distclean-recursive |
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive |
||||
|
||||
dvi-am: |
||||
|
||||
html: html-recursive |
||||
|
||||
html-am: |
||||
|
||||
info: info-recursive |
||||
|
||||
info-am: |
||||
|
||||
install-data-am: |
||||
|
||||
install-dvi: install-dvi-recursive |
||||
|
||||
install-dvi-am: |
||||
|
||||
install-exec-am: |
||||
|
||||
install-html: install-html-recursive |
||||
|
||||
install-html-am: |
||||
|
||||
install-info: install-info-recursive |
||||
|
||||
install-info-am: |
||||
|
||||
install-man: |
||||
|
||||
install-pdf: install-pdf-recursive |
||||
|
||||
install-pdf-am: |
||||
|
||||
install-ps: install-ps-recursive |
||||
|
||||
install-ps-am: |
||||
|
||||
installcheck-am: |
||||
|
||||
maintainer-clean: maintainer-clean-recursive |
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic |
||||
|
||||
mostlyclean: mostlyclean-recursive |
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool |
||||
|
||||
pdf: pdf-recursive |
||||
|
||||
pdf-am: |
||||
|
||||
ps: ps-recursive |
||||
|
||||
ps-am: |
||||
|
||||
uninstall-am: |
||||
|
||||
.MAKE: $(am__recursive_targets) install-am install-strip |
||||
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
||||
am--refresh check check-am clean clean-cscope clean-generic \
|
||||
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
|
||||
dist-xz dist-zip dist-zstd distcheck distclean \
|
||||
distclean-generic distclean-libtool distclean-tags \
|
||||
distcleancheck distdir distuninstallcheck dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile |
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT: |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,437 +0,0 @@ |
||||
# Helper functions for option handling. -*- Autoconf -*- |
||||
# |
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software |
||||
# Foundation, Inc. |
||||
# Written by Gary V. Vaughan, 2004 |
||||
# |
||||
# This file is free software; the Free Software Foundation gives |
||||
# unlimited permission to copy and/or distribute it, with or without |
||||
# modifications, as long as this notice is preserved. |
||||
|
||||
# serial 8 ltoptions.m4 |
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define. |
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) |
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) |
||||
# ------------------------------------------ |
||||
m4_define([_LT_MANGLE_OPTION], |
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) |
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) |
||||
# --------------------------------------- |
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a |
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are |
||||
# saved as a flag. |
||||
m4_define([_LT_SET_OPTION], |
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl |
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), |
||||
_LT_MANGLE_DEFUN([$1], [$2]), |
||||
[m4_warning([Unknown $1 option '$2'])])[]dnl |
||||
]) |
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) |
||||
# ------------------------------------------------------------ |
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
||||
m4_define([_LT_IF_OPTION], |
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) |
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) |
||||
# ------------------------------------------------------- |
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME |
||||
# are set. |
||||
m4_define([_LT_UNLESS_OPTIONS], |
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), |
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), |
||||
[m4_define([$0_found])])])[]dnl |
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 |
||||
])[]dnl |
||||
]) |
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) |
||||
# ---------------------------------------- |
||||
# OPTION-LIST is a space-separated list of Libtool options associated |
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with |
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about |
||||
# the unknown option and exit. |
||||
m4_defun([_LT_SET_OPTIONS], |
||||
[# Set options |
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), |
||||
[_LT_SET_OPTION([$1], _LT_Option)]) |
||||
|
||||
m4_if([$1],[LT_INIT],[ |
||||
dnl |
||||
dnl Simply set some default values (i.e off) if boolean options were not |
||||
dnl specified: |
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no |
||||
]) |
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no |
||||
]) |
||||
dnl |
||||
dnl If no reference was made to various pairs of opposing options, then |
||||
dnl we run the default mode handler for the pair. For example, if neither |
||||
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared |
||||
dnl archives by default: |
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) |
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) |
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) |
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], |
||||
[_LT_ENABLE_FAST_INSTALL]) |
||||
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], |
||||
[_LT_WITH_AIX_SONAME([aix])]) |
||||
]) |
||||
])# _LT_SET_OPTIONS |
||||
|
||||
|
||||
## --------------------------------- ## |
||||
## Macros to handle LT_INIT options. ## |
||||
## --------------------------------- ## |
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) |
||||
# ----------------------------------------- |
||||
m4_define([_LT_MANGLE_DEFUN], |
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) |
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) |
||||
# ----------------------------------------------- |
||||
m4_define([LT_OPTION_DEFINE], |
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl |
||||
])# LT_OPTION_DEFINE |
||||
|
||||
|
||||
# dlopen |
||||
# ------ |
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes |
||||
]) |
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN], |
||||
[_LT_SET_OPTION([LT_INIT], [dlopen]) |
||||
AC_DIAGNOSE([obsolete], |
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you |
||||
put the 'dlopen' option into LT_INIT's first parameter.]) |
||||
]) |
||||
|
||||
dnl aclocal-1.4 backwards compatibility: |
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) |
||||
|
||||
|
||||
# win32-dll |
||||
# --------- |
||||
# Declare package support for building win32 dll's. |
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll], |
||||
[enable_win32_dll=yes |
||||
|
||||
case $host in |
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) |
||||
AC_CHECK_TOOL(AS, as, false) |
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false) |
||||
;; |
||||
esac |
||||
|
||||
test -z "$AS" && AS=as |
||||
_LT_DECL([], [AS], [1], [Assembler program])dnl |
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool |
||||
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl |
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump |
||||
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl |
||||
])# win32-dll |
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL], |
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl |
||||
_LT_SET_OPTION([LT_INIT], [win32-dll]) |
||||
AC_DIAGNOSE([obsolete], |
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you |
||||
put the 'win32-dll' option into LT_INIT's first parameter.]) |
||||
]) |
||||
|
||||
dnl aclocal-1.4 backwards compatibility: |
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) |
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT]) |
||||
# ---------------------------- |
||||
# implement the --enable-shared flag, and supports the 'shared' and |
||||
# 'disable-shared' LT_INIT options. |
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. |
||||
m4_define([_LT_ENABLE_SHARED], |
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl |
||||
AC_ARG_ENABLE([shared], |
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], |
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], |
||||
[p=${PACKAGE-default} |
||||
case $enableval in |
||||
yes) enable_shared=yes ;; |
||||
no) enable_shared=no ;; |
||||
*) |
||||
enable_shared=no |
||||
# Look at the argument we got. We use all the common list separators. |
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, |
||||
for pkg in $enableval; do |
||||
IFS=$lt_save_ifs |
||||
if test "X$pkg" = "X$p"; then |
||||
enable_shared=yes |
||||
fi |
||||
done |
||||
IFS=$lt_save_ifs |
||||
;; |
||||
esac], |
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT) |
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0], |
||||
[Whether or not to build shared libraries]) |
||||
])# _LT_ENABLE_SHARED |
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) |
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) |
||||
|
||||
# Old names: |
||||
AC_DEFUN([AC_ENABLE_SHARED], |
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) |
||||
]) |
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED], |
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared]) |
||||
]) |
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) |
||||
|
||||
dnl aclocal-1.4 backwards compatibility: |
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], []) |
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], []) |
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT]) |
||||
# ---------------------------- |
||||
# implement the --enable-static flag, and support the 'static' and |
||||
# 'disable-static' LT_INIT options. |
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. |
||||
m4_define([_LT_ENABLE_STATIC], |
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl |
||||
AC_ARG_ENABLE([static], |
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], |
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], |
||||
[p=${PACKAGE-default} |
||||
case $enableval in |
||||
yes) enable_static=yes ;; |
||||
no) enable_static=no ;; |
||||
*) |
||||
enable_static=no |
||||
# Look at the argument we got. We use all the common list separators. |
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, |
||||
for pkg in $enableval; do |
||||
IFS=$lt_save_ifs |
||||
if test "X$pkg" = "X$p"; then |
||||
enable_static=yes |
||||
fi |
||||
done |
||||
IFS=$lt_save_ifs |
||||
;; |
||||
esac], |
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT) |
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0], |
||||
[Whether or not to build static libraries]) |
||||
])# _LT_ENABLE_STATIC |
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) |
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) |
||||
|
||||
# Old names: |
||||
AC_DEFUN([AC_ENABLE_STATIC], |
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) |
||||
]) |
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC], |
||||
[_LT_SET_OPTION([LT_INIT], [disable-static]) |
||||
]) |
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) |
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) |
||||
|
||||
dnl aclocal-1.4 backwards compatibility: |
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], []) |
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], []) |
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT]) |
||||
# ---------------------------------- |
||||
# implement the --enable-fast-install flag, and support the 'fast-install' |
||||
# and 'disable-fast-install' LT_INIT options. |
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. |
||||
m4_define([_LT_ENABLE_FAST_INSTALL], |
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl |
||||
AC_ARG_ENABLE([fast-install], |
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], |
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], |
||||
[p=${PACKAGE-default} |
||||
case $enableval in |
||||
yes) enable_fast_install=yes ;; |
||||
no) enable_fast_install=no ;; |
||||
*) |
||||
enable_fast_install=no |
||||
# Look at the argument we got. We use all the common list separators. |
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, |
||||
for pkg in $enableval; do |
||||
IFS=$lt_save_ifs |
||||
if test "X$pkg" = "X$p"; then |
||||
enable_fast_install=yes |
||||
fi |
||||
done |
||||
IFS=$lt_save_ifs |
||||
;; |
||||
esac], |
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) |
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0], |
||||
[Whether or not to optimize for fast installation])dnl |
||||
])# _LT_ENABLE_FAST_INSTALL |
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) |
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) |
||||
|
||||
# Old names: |
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL], |
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) |
||||
AC_DIAGNOSE([obsolete], |
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put |
||||
the 'fast-install' option into LT_INIT's first parameter.]) |
||||
]) |
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL], |
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) |
||||
AC_DIAGNOSE([obsolete], |
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put |
||||
the 'disable-fast-install' option into LT_INIT's first parameter.]) |
||||
]) |
||||
|
||||
dnl aclocal-1.4 backwards compatibility: |
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) |
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) |
||||
|
||||
|
||||
# _LT_WITH_AIX_SONAME([DEFAULT]) |
||||
# ---------------------------------- |
||||
# implement the --with-aix-soname flag, and support the `aix-soname=aix' |
||||
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT |
||||
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. |
||||
m4_define([_LT_WITH_AIX_SONAME], |
||||
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl |
||||
shared_archive_member_spec= |
||||
case $host,$enable_shared in |
||||
power*-*-aix[[5-9]]*,yes) |
||||
AC_MSG_CHECKING([which variant of shared library versioning to provide]) |
||||
AC_ARG_WITH([aix-soname], |
||||
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both], |
||||
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], |
||||
[case $withval in |
||||
aix|svr4|both) |
||||
;; |
||||
*) |
||||
AC_MSG_ERROR([Unknown argument to --with-aix-soname]) |
||||
;; |
||||
esac |
||||
lt_cv_with_aix_soname=$with_aix_soname], |
||||
[AC_CACHE_VAL([lt_cv_with_aix_soname], |
||||
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) |
||||
with_aix_soname=$lt_cv_with_aix_soname]) |
||||
AC_MSG_RESULT([$with_aix_soname]) |
||||
if test aix != "$with_aix_soname"; then |
||||
# For the AIX way of multilib, we name the shared archive member |
||||
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', |
||||
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. |
||||
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, |
||||
# the AIX toolchain works better with OBJECT_MODE set (default 32). |
||||
if test 64 = "${OBJECT_MODE-32}"; then |
||||
shared_archive_member_spec=shr_64 |
||||
else |
||||
shared_archive_member_spec=shr |
||||
fi |
||||
fi |
||||
;; |
||||
*) |
||||
with_aix_soname=aix |
||||
;; |
||||
esac |
||||
|
||||
_LT_DECL([], [shared_archive_member_spec], [0], |
||||
[Shared archive member basename, for filename based shared library versioning on AIX])dnl |
||||
])# _LT_WITH_AIX_SONAME |
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) |
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) |
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) |
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE]) |
||||
# -------------------- |
||||
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' |
||||
# LT_INIT options. |
||||
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. |
||||
m4_define([_LT_WITH_PIC], |
||||
[AC_ARG_WITH([pic], |
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], |
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])], |
||||
[lt_p=${PACKAGE-default} |
||||
case $withval in |
||||
yes|no) pic_mode=$withval ;; |
||||
*) |
||||
pic_mode=default |
||||
# Look at the argument we got. We use all the common list separators. |
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, |
||||
for lt_pkg in $withval; do |
||||
IFS=$lt_save_ifs |
||||
if test "X$lt_pkg" = "X$lt_p"; then |
||||
pic_mode=yes |
||||
fi |
||||
done |
||||
IFS=$lt_save_ifs |
||||
;; |
||||
esac], |
||||
[pic_mode=m4_default([$1], [default])]) |
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl |
||||
])# _LT_WITH_PIC |
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) |
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) |
||||
|
||||
# Old name: |
||||
AU_DEFUN([AC_LIBTOOL_PICMODE], |
||||
[_LT_SET_OPTION([LT_INIT], [pic-only]) |
||||
AC_DIAGNOSE([obsolete], |
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you |
||||
put the 'pic-only' option into LT_INIT's first parameter.]) |
||||
]) |
||||
|
||||
dnl aclocal-1.4 backwards compatibility: |
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) |
||||
|
||||
## ----------------- ## |
||||
## LTDL_INIT Options ## |
||||
## ----------------- ## |
||||
|
||||
m4_define([_LTDL_MODE], []) |
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], |
||||
[m4_define([_LTDL_MODE], [nonrecursive])]) |
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive], |
||||
[m4_define([_LTDL_MODE], [recursive])]) |
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject], |
||||
[m4_define([_LTDL_MODE], [subproject])]) |
||||
|
||||
m4_define([_LTDL_TYPE], []) |
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable], |
||||
[m4_define([_LTDL_TYPE], [installable])]) |
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience], |
||||
[m4_define([_LTDL_TYPE], [convenience])]) |
@ -1,124 +0,0 @@ |
||||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- |
||||
# |
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software |
||||
# Foundation, Inc. |
||||
# Written by Gary V. Vaughan, 2004 |
||||
# |
||||
# This file is free software; the Free Software Foundation gives |
||||
# unlimited permission to copy and/or distribute it, with or without |
||||
# modifications, as long as this notice is preserved. |
||||
|
||||
# serial 6 ltsugar.m4 |
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define. |
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) |
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...]) |
||||
# ----------------------------- |
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their |
||||
# associated separator. |
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier |
||||
# versions in m4sugar had bugs. |
||||
m4_define([lt_join], |
||||
[m4_if([$#], [1], [], |
||||
[$#], [2], [[$2]], |
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) |
||||
m4_define([_lt_join], |
||||
[m4_if([$#$2], [2], [], |
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) |
||||
|
||||
|
||||
# lt_car(LIST) |
||||
# lt_cdr(LIST) |
||||
# ------------ |
||||
# Manipulate m4 lists. |
||||
# These macros are necessary as long as will still need to support |
||||
# Autoconf-2.59, which quotes differently. |
||||
m4_define([lt_car], [[$1]]) |
||||
m4_define([lt_cdr], |
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], |
||||
[$#], 1, [], |
||||
[m4_dquote(m4_shift($@))])]) |
||||
m4_define([lt_unquote], $1) |
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR]) |
||||
# ------------------------------------------ |
||||
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. |
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended |
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). |
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different |
||||
# than defined and empty). |
||||
# |
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier |
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. |
||||
m4_define([lt_append], |
||||
[m4_define([$1], |
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) |
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) |
||||
# ---------------------------------------------------------- |
||||
# Produce a SEP delimited list of all paired combinations of elements of |
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list |
||||
# has the form PREFIXmINFIXSUFFIXn. |
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62. |
||||
m4_define([lt_combine], |
||||
[m4_if(m4_eval([$# > 3]), [1], |
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl |
||||
[[m4_foreach([_Lt_prefix], [$2], |
||||
[m4_foreach([_Lt_suffix], |
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, |
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) |
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) |
||||
# ----------------------------------------------------------------------- |
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited |
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. |
||||
m4_define([lt_if_append_uniq], |
||||
[m4_ifdef([$1], |
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], |
||||
[lt_append([$1], [$2], [$3])$4], |
||||
[$5])], |
||||
[lt_append([$1], [$2], [$3])$4])]) |
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE) |
||||
# ----------------------------- |
||||
m4_define([lt_dict_add], |
||||
[m4_define([$1($2)], [$3])]) |
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) |
||||
# -------------------------------------------- |
||||
m4_define([lt_dict_add_subkey], |
||||
[m4_define([$1($2:$3)], [$4])]) |
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY]) |
||||
# ---------------------------------- |
||||
m4_define([lt_dict_fetch], |
||||
[m4_ifval([$3], |
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), |
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) |
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) |
||||
# ----------------------------------------------------------------- |
||||
m4_define([lt_if_dict_fetch], |
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], |
||||
[$5], |
||||
[$6])]) |
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) |
||||
# -------------------------------------------------------------- |
||||
m4_define([lt_dict_filter], |
||||
[m4_if([$5], [], [], |
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])), |
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), |
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl |
||||
]) |
@ -1,23 +0,0 @@ |
||||
# ltversion.m4 -- version numbers -*- Autoconf -*- |
||||
# |
||||
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. |
||||
# Written by Scott James Remnant, 2004 |
||||
# |
||||
# This file is free software; the Free Software Foundation gives |
||||
# unlimited permission to copy and/or distribute it, with or without |
||||
# modifications, as long as this notice is preserved. |
||||
|
||||
# @configure_input@ |
||||
|
||||
# serial 4179 ltversion.m4 |
||||
# This file is part of GNU Libtool |
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.6]) |
||||
m4_define([LT_PACKAGE_REVISION], [2.4.6]) |
||||
|
||||
AC_DEFUN([LTVERSION_VERSION], |
||||
[macro_version='2.4.6' |
||||
macro_revision='2.4.6' |
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) |
||||
_LT_DECL(, macro_revision, 0) |
||||
]) |
@ -1,99 +0,0 @@ |
||||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- |
||||
# |
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software |
||||
# Foundation, Inc. |
||||
# Written by Scott James Remnant, 2004. |
||||
# |
||||
# This file is free software; the Free Software Foundation gives |
||||
# unlimited permission to copy and/or distribute it, with or without |
||||
# modifications, as long as this notice is preserved. |
||||
|
||||
# serial 5 lt~obsolete.m4 |
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool. |
||||
# |
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), |
||||
# which have later been changed to m4_define as they aren't part of the |
||||
# exported API, or moved to Autoconf or Automake where they belong. |
||||
# |
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN |
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us |
||||
# using a macro with the same name in our local m4/libtool.m4 it'll |
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define |
||||
# and doesn't know about Autoconf macros at all.) |
||||
# |
||||
# So we provide this file, which has a silly filename so it's always |
||||
# included after everything else. This provides aclocal with the |
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything |
||||
# because those macros already exist, or will be overwritten later. |
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. |
||||
# |
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. |
||||
# Yes, that means every name once taken will need to remain here until |
||||
# we give up compatibility with versions before 1.7, at which point |
||||
# we need to keep only those names which we still refer to. |
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define. |
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) |
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) |
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) |
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) |
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) |
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) |
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) |
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) |
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) |
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) |
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) |
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) |
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) |
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) |
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) |
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) |
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) |
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) |
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) |
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) |
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) |
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) |
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) |
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) |
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) |
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) |
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) |
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) |
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) |
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) |
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) |
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) |
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) |
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) |
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) |
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) |
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) |
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) |
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) |
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) |
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) |
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) |
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) |
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) |
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) |
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) |
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) |
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) |
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) |
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) |
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) |
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) |
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) |
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) |
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) |
||||
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) |
||||
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) |
||||
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) |
||||
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) |
||||
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) |
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) |
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,332 @@ |
||||
/*
|
||||
* This file is part of FFmpeg. |
||||
* copyright (c) 2022 Taner Sener ( tanersener gmail com ) |
||||
* |
||||
* FFmpeg 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.1 of the License, or (at your option) any later version. |
||||
* |
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software |
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||
*/ |
||||
|
||||
/*
|
||||
* This file is the modified version of ffmpeg_mux.c file living in ffmpeg source code under the fftools folder. We |
||||
* manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied |
||||
* by us to develop the ffmpeg-kit library. |
||||
* |
||||
* ffmpeg-kit changes by Taner Sener |
||||
* |
||||
* 09.2022 |
||||
* -------------------------------------------------------- |
||||
* - fftools_ prefix added to fftools headers |
||||
* - using main_ffmpeg_return_code instead of main_return_code |
||||
* - printf replaced with av_log statements |
||||
*/ |
||||
|
||||
#include <stdio.h> |
||||
#include <string.h> |
||||
|
||||
#include "fftools_ffmpeg.h" |
||||
|
||||
#include "libavutil/fifo.h" |
||||
#include "libavutil/intreadwrite.h" |
||||
#include "libavutil/log.h" |
||||
#include "libavutil/mem.h" |
||||
#include "libavutil/timestamp.h" |
||||
|
||||
#include "libavcodec/packet.h" |
||||
|
||||
#include "libavformat/avformat.h" |
||||
#include "libavformat/avio.h" |
||||
|
||||
static void close_all_output_streams(OutputStream *ost, OSTFinished this_stream, OSTFinished others) |
||||
{ |
||||
int i; |
||||
for (i = 0; i < nb_output_streams; i++) { |
||||
OutputStream *ost2 = output_streams[i]; |
||||
ost2->finished |= ost == ost2 ? this_stream : others; |
||||
} |
||||
} |
||||
|
||||
void of_write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, |
||||
int unqueue) |
||||
{ |
||||
AVFormatContext *s = of->ctx; |
||||
AVStream *st = ost->st; |
||||
int ret; |
||||
|
||||
/*
|
||||
* Audio encoders may split the packets -- #frames in != #packets out. |
||||
* But there is no reordering, so we can limit the number of output packets |
||||
* by simply dropping them here. |
||||
* Counting encoded video frames needs to be done separately because of |
||||
* reordering, see do_video_out(). |
||||
* Do not count the packet when unqueued because it has been counted when queued. |
||||
*/ |
||||
if (!(st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && ost->encoding_needed) && !unqueue) { |
||||
if (ost->frame_number >= ost->max_frames) { |
||||
av_packet_unref(pkt); |
||||
return; |
||||
} |
||||
ost->frame_number++; |
||||
} |
||||
|
||||
if (!of->header_written) { |
||||
AVPacket *tmp_pkt; |
||||
/* the muxer is not initialized yet, buffer the packet */ |
||||
if (!av_fifo_can_write(ost->muxing_queue)) { |
||||
size_t cur_size = av_fifo_can_read(ost->muxing_queue); |
||||
unsigned int are_we_over_size = |
||||
(ost->muxing_queue_data_size + pkt->size) > ost->muxing_queue_data_threshold; |
||||
size_t limit = are_we_over_size ? ost->max_muxing_queue_size : SIZE_MAX; |
||||
size_t new_size = FFMIN(2 * cur_size, limit); |
||||
|
||||
if (new_size <= cur_size) { |
||||
av_log(NULL, AV_LOG_ERROR, |
||||
"Too many packets buffered for output stream %d:%d.\n", |
||||
ost->file_index, ost->st->index); |
||||
exit_program(1); |
||||
} |
||||
ret = av_fifo_grow2(ost->muxing_queue, new_size - cur_size); |
||||
if (ret < 0) |
||||
exit_program(1); |
||||
} |
||||
ret = av_packet_make_refcounted(pkt); |
||||
if (ret < 0) |
||||
exit_program(1); |
||||
tmp_pkt = av_packet_alloc(); |
||||
if (!tmp_pkt) |
||||
exit_program(1); |
||||
av_packet_move_ref(tmp_pkt, pkt); |
||||
ost->muxing_queue_data_size += tmp_pkt->size; |
||||
av_fifo_write(ost->muxing_queue, &tmp_pkt, 1); |
||||
return; |
||||
} |
||||
|
||||
if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && ost->vsync_method == VSYNC_DROP) || |
||||
(st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && audio_sync_method < 0)) |
||||
pkt->pts = pkt->dts = AV_NOPTS_VALUE; |
||||
|
||||
if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { |
||||
if (ost->frame_rate.num && ost->is_cfr) { |
||||
if (pkt->duration > 0) |
||||
av_log(NULL, AV_LOG_WARNING, "Overriding packet duration by frame rate, this should not happen\n"); |
||||
pkt->duration = av_rescale_q(1, av_inv_q(ost->frame_rate), |
||||
ost->mux_timebase); |
||||
} |
||||
} |
||||
|
||||
av_packet_rescale_ts(pkt, ost->mux_timebase, ost->st->time_base); |
||||
|
||||
if (!(s->oformat->flags & AVFMT_NOTIMESTAMPS)) { |
||||
if (pkt->dts != AV_NOPTS_VALUE && |
||||
pkt->pts != AV_NOPTS_VALUE && |
||||
pkt->dts > pkt->pts) { |
||||
av_log(s, AV_LOG_WARNING, "Invalid DTS: %"PRId64" PTS: %"PRId64" in output stream %d:%d, replacing by guess\n", |
||||
pkt->dts, pkt->pts, |
||||
ost->file_index, ost->st->index); |
||||
pkt->pts = |
||||
pkt->dts = pkt->pts + pkt->dts + ost->last_mux_dts + 1 |
||||
- FFMIN3(pkt->pts, pkt->dts, ost->last_mux_dts + 1) |
||||
- FFMAX3(pkt->pts, pkt->dts, ost->last_mux_dts + 1); |
||||
} |
||||
if ((st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO || st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE) && |
||||
pkt->dts != AV_NOPTS_VALUE && |
||||
ost->last_mux_dts != AV_NOPTS_VALUE) { |
||||
int64_t max = ost->last_mux_dts + !(s->oformat->flags & AVFMT_TS_NONSTRICT); |
||||
if (pkt->dts < max) { |
||||
int loglevel = max - pkt->dts > 2 || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO ? AV_LOG_WARNING : AV_LOG_DEBUG; |
||||
if (exit_on_error) |
||||
loglevel = AV_LOG_ERROR; |
||||
av_log(s, loglevel, "Non-monotonous DTS in output stream " |
||||
"%d:%d; previous: %"PRId64", current: %"PRId64"; ", |
||||
ost->file_index, ost->st->index, ost->last_mux_dts, pkt->dts); |
||||
if (exit_on_error) { |
||||
av_log(NULL, AV_LOG_FATAL, "aborting.\n"); |
||||
exit_program(1); |
||||
} |
||||
av_log(s, loglevel, "changing to %"PRId64". This may result " |
||||
"in incorrect timestamps in the output file.\n", |
||||
max); |
||||
if (pkt->pts >= pkt->dts) |
||||
pkt->pts = FFMAX(pkt->pts, max); |
||||
pkt->dts = max; |
||||
} |
||||
} |
||||
} |
||||
ost->last_mux_dts = pkt->dts; |
||||
|
||||
ost->data_size += pkt->size; |
||||
ost->packets_written++; |
||||
|
||||
pkt->stream_index = ost->index; |
||||
|
||||
if (debug_ts) { |
||||
av_log(NULL, AV_LOG_INFO, "muxer <- type:%s " |
||||
"pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s duration:%s duration_time:%s size:%d\n", |
||||
av_get_media_type_string(ost->enc_ctx->codec_type), |
||||
av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ost->st->time_base), |
||||
av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ost->st->time_base), |
||||
av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &ost->st->time_base), |
||||
pkt->size |
||||
); |
||||
} |
||||
|
||||
ret = av_interleaved_write_frame(s, pkt); |
||||
if (ret < 0) { |
||||
print_error("av_interleaved_write_frame()", ret); |
||||
main_ffmpeg_return_code = 1; |
||||
close_all_output_streams(ost, MUXER_FINISHED | ENCODER_FINISHED, ENCODER_FINISHED); |
||||
} |
||||
} |
||||
|
||||
static int print_sdp(void) |
||||
{ |
||||
char sdp[16384]; |
||||
int i; |
||||
int j, ret; |
||||
AVIOContext *sdp_pb; |
||||
AVFormatContext **avc; |
||||
|
||||
for (i = 0; i < nb_output_files; i++) { |
||||
if (!output_files[i]->header_written) |
||||
return 0; |
||||
} |
||||
|
||||
avc = av_malloc_array(nb_output_files, sizeof(*avc)); |
||||
if (!avc) |
||||
exit_program(1); |
||||
for (i = 0, j = 0; i < nb_output_files; i++) { |
||||
if (!strcmp(output_files[i]->ctx->oformat->name, "rtp")) { |
||||
avc[j] = output_files[i]->ctx; |
||||
j++; |
||||
} |
||||
} |
||||
|
||||
if (!j) { |
||||
av_log(NULL, AV_LOG_ERROR, "No output streams in the SDP.\n"); |
||||
ret = AVERROR(EINVAL); |
||||
goto fail; |
||||
} |
||||
|
||||
ret = av_sdp_create(avc, j, sdp, sizeof(sdp)); |
||||
if (ret < 0) |
||||
goto fail; |
||||
|
||||
if (!sdp_filename) { |
||||
av_log(NULL, AV_LOG_ERROR, "SDP:\n%s\n", sdp); |
||||
fflush(stdout); |
||||
} else { |
||||
ret = avio_open2(&sdp_pb, sdp_filename, AVIO_FLAG_WRITE, &int_cb, NULL); |
||||
if (ret < 0) { |
||||
av_log(NULL, AV_LOG_ERROR, "Failed to open sdp file '%s'\n", sdp_filename); |
||||
goto fail; |
||||
} |
||||
|
||||
avio_print(sdp_pb, sdp); |
||||
avio_closep(&sdp_pb); |
||||
av_freep(&sdp_filename); |
||||
} |
||||
|
||||
fail: |
||||
av_freep(&avc); |
||||
return ret; |
||||
} |
||||
|
||||
/* open the muxer when all the streams are initialized */ |
||||
int of_check_init(OutputFile *of) |
||||
{ |
||||
int ret, i; |
||||
|
||||
for (i = 0; i < of->ctx->nb_streams; i++) { |
||||
OutputStream *ost = output_streams[of->ost_index + i]; |
||||
if (!ost->initialized) |
||||
return 0; |
||||
} |
||||
|
||||
ret = avformat_write_header(of->ctx, &of->opts); |
||||
if (ret < 0) { |
||||
av_log(NULL, AV_LOG_ERROR, |
||||
"Could not write header for output file #%d " |
||||
"(incorrect codec parameters ?): %s\n", |
||||
of->index, av_err2str(ret)); |
||||
return ret; |
||||
} |
||||
//assert_avoptions(of->opts);
|
||||
of->header_written = 1; |
||||
|
||||
av_dump_format(of->ctx, of->index, of->ctx->url, 1); |
||||
nb_output_dumped++; |
||||
|
||||
if (sdp_filename || want_sdp) { |
||||
ret = print_sdp(); |
||||
if (ret < 0) { |
||||
av_log(NULL, AV_LOG_ERROR, "Error writing the SDP.\n"); |
||||
return ret; |
||||
} |
||||
} |
||||
|
||||
/* flush the muxing queues */ |
||||
for (i = 0; i < of->ctx->nb_streams; i++) { |
||||
OutputStream *ost = output_streams[of->ost_index + i]; |
||||
AVPacket *pkt; |
||||
|
||||
/* try to improve muxing time_base (only possible if nothing has been written yet) */ |
||||
if (!av_fifo_can_read(ost->muxing_queue)) |
||||
ost->mux_timebase = ost->st->time_base; |
||||
|
||||
while (av_fifo_read(ost->muxing_queue, &pkt, 1) >= 0) { |
||||
ost->muxing_queue_data_size -= pkt->size; |
||||
of_write_packet(of, pkt, ost, 1); |
||||
av_packet_free(&pkt); |
||||
} |
||||
} |
||||
|
||||
return 0; |
||||
} |
||||
|
||||
int of_write_trailer(OutputFile *of) |
||||
{ |
||||
int ret; |
||||
|
||||
if (!of->header_written) { |
||||
av_log(NULL, AV_LOG_ERROR, |
||||
"Nothing was written into output file %d (%s), because " |
||||
"at least one of its streams received no packets.\n", |
||||
of->index, of->ctx->url); |
||||
return AVERROR(EINVAL); |
||||
} |
||||
|
||||
ret = av_write_trailer(of->ctx); |
||||
if (ret < 0) { |
||||
av_log(NULL, AV_LOG_ERROR, "Error writing trailer of %s: %s\n", of->ctx->url, av_err2str(ret)); |
||||
return ret; |
||||
} |
||||
|
||||
return 0; |
||||
} |
||||
|
||||
void of_close(OutputFile **pof) |
||||
{ |
||||
OutputFile *of = *pof; |
||||
AVFormatContext *s; |
||||
|
||||
if (!of) |
||||
return; |
||||
|
||||
s = of->ctx; |
||||
if (s && s->oformat && !(s->oformat->flags & AVFMT_NOFILE)) |
||||
avio_closep(&s->pb); |
||||
avformat_free_context(s); |
||||
av_dict_free(&of->opts); |
||||
|
||||
av_freep(pof); |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -1,177 +0,0 @@ |
||||
/*
|
||||
* This file is part of FFmpeg. |
||||
* |
||||
* FFmpeg 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.1 of the License, or (at your option) any later version. |
||||
* |
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software |
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||
*/ |
||||
|
||||
#include "config.h" |
||||
|
||||
#if HAVE_UTGETOSTYPEFROMSTRING |
||||
#include <CoreServices/CoreServices.h> |
||||
#endif |
||||
|
||||
#include "libavcodec/avcodec.h" |
||||
#include "libavcodec/videotoolbox.h" |
||||
#include "libavutil/imgutils.h" |
||||
#include "fftools_ffmpeg.h" |
||||
|
||||
typedef struct VTContext { |
||||
AVFrame *tmp_frame; |
||||
int log_once; |
||||
} VTContext; |
||||
|
||||
__thread char *videotoolbox_pixfmt; |
||||
|
||||
static int videotoolbox_retrieve_data(AVCodecContext *s, AVFrame *frame) |
||||
{ |
||||
InputStream *ist = s->opaque; |
||||
VTContext *vt = ist->hwaccel_ctx; |
||||
CVPixelBufferRef pixbuf = (CVPixelBufferRef)frame->data[3]; |
||||
OSType pixel_format = CVPixelBufferGetPixelFormatType(pixbuf); |
||||
CVReturn err; |
||||
uint8_t *data[4] = { 0 }; |
||||
int linesize[4] = { 0 }; |
||||
int planes, ret, i; |
||||
|
||||
if (frame->format == ist->hwaccel_output_format) { |
||||
av_log_once(s, AV_LOG_INFO, AV_LOG_TRACE, &vt->log_once, |
||||
"There is no video filter for videotoolbox pix_fmt now, remove the " |
||||
"-hwaccel_output_format option if video filter doesn't work\n"); |
||||
return 0; |
||||
} |
||||
|
||||
av_frame_unref(vt->tmp_frame); |
||||
|
||||
switch (pixel_format) { |
||||
case kCVPixelFormatType_420YpCbCr8Planar: vt->tmp_frame->format = AV_PIX_FMT_YUV420P; break; |
||||
case kCVPixelFormatType_422YpCbCr8: vt->tmp_frame->format = AV_PIX_FMT_UYVY422; break; |
||||
case kCVPixelFormatType_32BGRA: vt->tmp_frame->format = AV_PIX_FMT_BGRA; break; |
||||
#ifdef kCFCoreFoundationVersionNumber10_7 |
||||
case kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange: |
||||
case kCVPixelFormatType_420YpCbCr8BiPlanarFullRange: vt->tmp_frame->format = AV_PIX_FMT_NV12; break; |
||||
#endif |
||||
#if HAVE_KCVPIXELFORMATTYPE_420YPCBCR10BIPLANARVIDEORANGE |
||||
case kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange: |
||||
case kCVPixelFormatType_420YpCbCr10BiPlanarFullRange: vt->tmp_frame->format = AV_PIX_FMT_P010; break; |
||||
#endif |
||||
default: |
||||
av_log(NULL, AV_LOG_ERROR, |
||||
"%s: Unsupported pixel format: %s\n", |
||||
av_fourcc2str(s->codec_tag), videotoolbox_pixfmt); |
||||
return AVERROR(ENOSYS); |
||||
} |
||||
|
||||
vt->tmp_frame->width = frame->width; |
||||
vt->tmp_frame->height = frame->height; |
||||
ret = av_frame_get_buffer(vt->tmp_frame, 0); |
||||
if (ret < 0) |
||||
return ret; |
||||
|
||||
err = CVPixelBufferLockBaseAddress(pixbuf, kCVPixelBufferLock_ReadOnly); |
||||
if (err != kCVReturnSuccess) { |
||||
av_log(NULL, AV_LOG_ERROR, "Error locking the pixel buffer.\n"); |
||||
return AVERROR_UNKNOWN; |
||||
} |
||||
|
||||
if (CVPixelBufferIsPlanar(pixbuf)) { |
||||
|
||||
planes = CVPixelBufferGetPlaneCount(pixbuf); |
||||
for (i = 0; i < planes; i++) { |
||||
data[i] = CVPixelBufferGetBaseAddressOfPlane(pixbuf, i); |
||||
linesize[i] = CVPixelBufferGetBytesPerRowOfPlane(pixbuf, i); |
||||
} |
||||
} else { |
||||
data[0] = CVPixelBufferGetBaseAddress(pixbuf); |
||||
linesize[0] = CVPixelBufferGetBytesPerRow(pixbuf); |
||||
} |
||||
|
||||
av_image_copy(vt->tmp_frame->data, vt->tmp_frame->linesize, |
||||
(const uint8_t **)data, linesize, vt->tmp_frame->format, |
||||
frame->width, frame->height); |
||||
|
||||
ret = av_frame_copy_props(vt->tmp_frame, frame); |
||||
CVPixelBufferUnlockBaseAddress(pixbuf, kCVPixelBufferLock_ReadOnly); |
||||
if (ret < 0) |
||||
return ret; |
||||
|
||||
av_frame_unref(frame); |
||||
av_frame_move_ref(frame, vt->tmp_frame); |
||||
|
||||
return 0; |
||||
} |
||||
|
||||
static void videotoolbox_uninit(AVCodecContext *s) |
||||
{ |
||||
InputStream *ist = s->opaque; |
||||
VTContext *vt = ist->hwaccel_ctx; |
||||
|
||||
ist->hwaccel_uninit = NULL; |
||||
ist->hwaccel_retrieve_data = NULL; |
||||
|
||||
av_frame_free(&vt->tmp_frame); |
||||
|
||||
av_videotoolbox_default_free(s); |
||||
av_freep(&ist->hwaccel_ctx); |
||||
} |
||||
|
||||
int videotoolbox_init(AVCodecContext *s) |
||||
{ |
||||
InputStream *ist = s->opaque; |
||||
int loglevel = (ist->hwaccel_id == HWACCEL_AUTO) ? AV_LOG_VERBOSE : AV_LOG_ERROR; |
||||
int ret = 0; |
||||
VTContext *vt; |
||||
|
||||
vt = av_mallocz(sizeof(*vt)); |
||||
if (!vt) |
||||
return AVERROR(ENOMEM); |
||||
|
||||
ist->hwaccel_ctx = vt; |
||||
ist->hwaccel_uninit = videotoolbox_uninit; |
||||
ist->hwaccel_retrieve_data = videotoolbox_retrieve_data; |
||||
|
||||
vt->tmp_frame = av_frame_alloc(); |
||||
if (!vt->tmp_frame) { |
||||
ret = AVERROR(ENOMEM); |
||||
goto fail; |
||||
} |
||||
|
||||
// TODO: reindent
|
||||
if (!videotoolbox_pixfmt) { |
||||
ret = av_videotoolbox_default_init(s); |
||||
} else { |
||||
AVVideotoolboxContext *vtctx = av_videotoolbox_alloc_context(); |
||||
CFStringRef pixfmt_str = CFStringCreateWithCString(kCFAllocatorDefault, |
||||
videotoolbox_pixfmt, |
||||
kCFStringEncodingUTF8); |
||||
#if HAVE_UTGETOSTYPEFROMSTRING |
||||
vtctx->cv_pix_fmt_type = UTGetOSTypeFromString(pixfmt_str); |
||||
#else |
||||
av_log(s, loglevel, "UTGetOSTypeFromString() is not available " |
||||
"on this platform, %s pixel format can not be honored from " |
||||
"the command line\n", videotoolbox_pixfmt); |
||||
#endif |
||||
ret = av_videotoolbox_default_init2(s, vtctx); |
||||
CFRelease(pixfmt_str); |
||||
} |
||||
if (ret < 0) { |
||||
av_log(NULL, loglevel, "Error creating Videotoolbox decoder.\n"); |
||||
goto fail; |
||||
} |
||||
|
||||
return 0; |
||||
fail: |
||||
videotoolbox_uninit(s); |
||||
return ret; |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,79 @@ |
||||
/*
|
||||
* This file is part of FFmpeg. |
||||
* |
||||
* FFmpeg 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.1 of the License, or (at your option) any later version. |
||||
* |
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software |
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||
*/ |
||||
|
||||
/*
|
||||
* This file is the modified version of fopen_utf8.h file living in ffmpeg source code under the fftools folder. We |
||||
* manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied |
||||
* by us to develop the ffmpeg-kit library. |
||||
* |
||||
* ffmpeg-kit changes by Taner Sener |
||||
*/ |
||||
|
||||
#ifndef FFTOOLS_FOPEN_UTF8_H |
||||
#define FFTOOLS_FOPEN_UTF8_H |
||||
|
||||
#include <stdio.h> |
||||
|
||||
/* The fopen_utf8 function here is essentially equivalent to avpriv_fopen_utf8,
|
||||
* except that it doesn't set O_CLOEXEC, and that it isn't exported |
||||
* from a different library. (On Windows, each DLL might use a different |
||||
* CRT, and FILE* handles can't be shared across them.) */ |
||||
|
||||
#ifdef _WIN32 |
||||
#include "libavutil/wchar_filename.h" |
||||
|
||||
static inline FILE *fopen_utf8(const char *path_utf8, const char *mode) |
||||
{ |
||||
wchar_t *path_w, *mode_w; |
||||
FILE *f; |
||||
|
||||
/* convert UTF-8 to wide chars */ |
||||
if (get_extended_win32_path(path_utf8, &path_w)) /* This sets errno on error. */ |
||||
return NULL; |
||||
if (!path_w) |
||||
goto fallback; |
||||
|
||||
if (utf8towchar(mode, &mode_w)) |
||||
return NULL; |
||||
if (!mode_w) { |
||||
/* If failing to interpret the mode string as utf8, it is an invalid
|
||||
* parameter. */ |
||||
av_freep(&path_w); |
||||
errno = EINVAL; |
||||
return NULL; |
||||
} |
||||
|
||||
f = _wfopen(path_w, mode_w); |
||||
av_freep(&path_w); |
||||
av_freep(&mode_w); |
||||
|
||||
return f; |
||||
fallback: |
||||
/* path may be in CP_ACP */ |
||||
return fopen(path_utf8, mode); |
||||
} |
||||
|
||||
#else |
||||
|
||||
static inline FILE *fopen_utf8(const char *path, const char *mode) |
||||
{ |
||||
return fopen(path, mode); |
||||
} |
||||
#endif |
||||
|
||||
#endif /* FFTOOLS_FOPEN_UTF8_H */ |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,202 @@ |
||||
/*
|
||||
* Option handlers shared between the tools. |
||||
* copyright (c) 2022 Taner Sener ( tanersener gmail com ) |
||||
* |
||||
* This file is part of FFmpeg. |
||||
* |
||||
* FFmpeg 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.1 of the License, or (at your option) any later version. |
||||
* |
||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software |
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||
*/ |
||||
|
||||
/*
|
||||
* This file is the modified version of opt_common.h file living in ffmpeg source code under the fftools folder. We |
||||
* manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied |
||||
* by us to develop the ffmpeg-kit library. |
||||
* |
||||
* ffmpeg-kit changes by Taner Sener |
||||
* |
||||
* 09.2022 |
||||
* -------------------------------------------------------- |
||||
* - CMDUTILS_COMMON_OPTIONS and CMDUTILS_COMMON_OPTIONS_AVDEVICE defines dropped |
||||
* - fftools_ prefix added to fftools headers |
||||
*/ |
||||
|
||||
#ifndef FFTOOLS_OPT_COMMON_H |
||||
#define FFTOOLS_OPT_COMMON_H |
||||
|
||||
#include "config.h" |
||||
|
||||
#include "fftools_cmdutils.h" |
||||
|
||||
#if CONFIG_AVDEVICE |
||||
/**
|
||||
* Print a listing containing autodetected sinks of the output device. |
||||
* Device name with options may be passed as an argument to limit results. |
||||
*/ |
||||
int show_sinks(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing autodetected sources of the input device. |
||||
* Device name with options may be passed as an argument to limit results. |
||||
*/ |
||||
int show_sources(void *optctx, const char *opt, const char *arg); |
||||
#endif |
||||
|
||||
/**
|
||||
* Print the license of the program to stdout. The license depends on |
||||
* the license of the libraries compiled into the program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_license(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Generic -h handler common to all fftools. |
||||
*/ |
||||
int show_help(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print the version of the program to stdout. The version message |
||||
* depends on the current versions of the repository and of the libav* |
||||
* libraries. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_version(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print the build configuration of the program to stdout. The contents |
||||
* depend on the definition of FFMPEG_CONFIGURATION. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_buildconf(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the formats supported by the |
||||
* program (including devices). |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_formats(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the muxers supported by the |
||||
* program (including devices). |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_muxers(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the demuxer supported by the |
||||
* program (including devices). |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_demuxers(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the devices supported by the |
||||
* program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_devices(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the codecs supported by the |
||||
* program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_codecs(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the decoders supported by the |
||||
* program. |
||||
*/ |
||||
int show_decoders(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the encoders supported by the |
||||
* program. |
||||
*/ |
||||
int show_encoders(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the bit stream filters supported by the |
||||
* program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_bsfs(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the protocols supported by the |
||||
* program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_protocols(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the filters supported by the |
||||
* program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_filters(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the pixel formats supported by the |
||||
* program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_pix_fmts(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the standard channel layouts supported by |
||||
* the program. |
||||
* This option processing function does not utilize the arguments. |
||||
*/ |
||||
int show_layouts(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the sample formats supported by the |
||||
* program. |
||||
*/ |
||||
int show_sample_fmts(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all supported stream dispositions. |
||||
*/ |
||||
int show_dispositions(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Print a listing containing all the color names and values recognized |
||||
* by the program. |
||||
*/ |
||||
int show_colors(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Set the libav* libraries log level. |
||||
*/ |
||||
int opt_loglevel(void *optctx, const char *opt, const char *arg); |
||||
|
||||
int opt_report(void *optctx, const char *opt, const char *arg); |
||||
int init_report(const char *env, FILE **file); |
||||
|
||||
int opt_max_alloc(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Override the cpuflags. |
||||
*/ |
||||
int opt_cpuflags(void *optctx, const char *opt, const char *arg); |
||||
|
||||
/**
|
||||
* Override the cpucount. |
||||
*/ |
||||
int opt_cpucount(void *optctx, const char *opt, const char *arg); |
||||
|
||||
#endif /* FFTOOLS_OPT_COMMON_H */ |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue