Am Di., 6. Aug. 2019 um 17:08 Uhr schrieb Nicolas Gaullier <nicolas.gaull...@arkena.com>: > > --- > libavformat/s337m.c | 64 > ++++++++++++++++++++++++++++++++++++++++++++--------- > libavformat/s337m.h | 64 > +++++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 117 insertions(+), 11 deletions(-) > create mode 100644 libavformat/s337m.h
> diff --git a/libavformat/s337m.h b/libavformat/s337m.h > new file mode 100644 > index 0000000000..0f21a23a30 > --- /dev/null > +++ b/libavformat/s337m.h > @@ -0,0 +1,64 @@ > +/* > + * Copyright (C) 2017 foo86 > + * > + * 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 > + */ > + > +#ifndef AVFORMAT_S337M_H > +#define AVFORMAT_S337M_H > + > +#define MARKER_16LE 0x72F81F4E > +#define MARKER_20LE 0x20876FF0E154 > +#define MARKER_24LE 0x72F8961F4EA5 > + > +#define IS_16LE_MARKER(state) ((state & 0xFFFFFFFF) == MARKER_16LE) > +#define IS_20LE_MARKER(state) ((state & 0xF0FFFFF0FFFF) == MARKER_20LE) > +#define IS_24LE_MARKER(state) ((state & 0xFFFFFFFFFFFF) == MARKER_24LE) > +#define IS_LE_MARKER(state) (IS_16LE_MARKER(state) || > IS_20LE_MARKER(state) || IS_24LE_MARKER(state)) > + > +#define S337M_MIN_OFFSET 1601*4 > +#define S337M_MAX_OFFSET 2002*6 > + > +#define S337M_PROBE_GUARDBAND_MIN_BYTES 0 > +#define DOLBY_E_PHASE_MIN 0.000610 > +#define DOLBY_E_PHASE_MAX 0.001050 > + > +/** > + * Detect s337m packets in a PCM_S16LE/S24LE stereo stream > + * If found, the codec of the stream is updated > + * Requires a single sample with enough (S337M_PROBE_GUARDBAND_MIN_BYTES) > and clean (set to zero) guard band > + * @param avc For av_log > + * @param pb Associated IO context > + * @param st Streams > + * @param size Maximum IO read size available for probing at current position > + * @return = 0 if no error encountered (even if no s337m was found) > + */ > +int avpriv_s337m_probe_stream(void *avc, AVIOContext *pb, AVStream **st, int > size); Sorry for not commenting earlier: This is to the best of my knowledge not acceptable (to have a public function for a particular format), instead create a new demuxer that supports this raw format. Carl Eugen _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".