ffmpegmux->videopads = 0;
ffmpegmux->audiopads = 0;
ffmpegmux->max_delay = 0;
+
+ #ifdef TIZEN_FEATURE_LIBAV
+ ffmpegmux->expected_trailer_size = 0;
+ ffmpegmux->nb_video_frames = 0;
+ ffmpegmux->nb_audio_frames = 0;
+ #endif /* TIZEN_FEATURE_LIBAV */
}
-
- return;
+ #ifdef TIZEN_FEATURE_LIBAV
+ static void
+ gst_ffmpegmux_release_pad (GstElement * element, GstPad * pad)
+ {
+ GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) element;
+ GstFFMpegMuxPad *collect_pad;
+ AVStream *st;
+ int i;
+ collect_pad = (GstFFMpegMuxPad *)gst_pad_get_element_private(pad);
+
+ GST_DEBUG ("Release requested pad[%s:%s]", GST_DEBUG_PAD_NAME(pad));
+ st = ffmpegmux->context->streams[collect_pad->padnum];
+ if (st) {
+ if (st->codec) {
+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
+ ffmpegmux->videopads--;
+ } else {
+ ffmpegmux->audiopads--;
+ }
+ if (st->codec->extradata) {
+ av_free(st->codec->extradata);
+ st->codec->extradata = NULL;
+ }
+ g_free(st->codec);
+ st->codec = NULL;
+ }
+ if (ffmpegmux->context->priv_data) {
+ MOVMuxContext *mov = ffmpegmux->context->priv_data;
+ if (mov && mov->tracks) {
+ for (i = 0 ; i < ffmpegmux->context->nb_streams ; i++) {
+ MOVTrack *trk = &mov->tracks[i];
+ if (trk && trk->vos_data) {
+ av_free(trk->vos_data);
+ trk->vos_data = NULL;
+ }
+ }
+ av_free(mov->tracks);
+ mov->tracks = NULL;
+ }
+ av_free(ffmpegmux->context->priv_data);
+ ffmpegmux->context->priv_data = NULL;
+ }
+ ffmpegmux->context->nb_streams--;
+ g_free(st);
+ st = NULL;
+ }
+ gst_collect_pads_remove_pad(ffmpegmux->collect, pad);
+ gst_element_remove_pad(element, pad);
+ }
+ #endif /* TIZEN_FEATURE_LIBAV */
+
static void
gst_ffmpegmux_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
* no buffers left */
if (best_pad != NULL) {
GstBuffer *buf;
- AVPacket pkt;
+ AVPacket pkt = { 0, };
GstMapInfo map;
+ #ifdef TIZEN_FEATURE_LIBAV
+ av_init_packet (&pkt);
+ pkt.is_mux = 1;
+ #endif /* TIZEN_FEATURE_LIBAV */
+
/* push out current buffer */
buf =
gst_collect_pads_pop (ffmpegmux->collect, (GstCollectData *) best_pad);
ffmpegmux->opened = FALSE;
gst_ffmpegdata_close (ffmpegmux->context->pb);
}
-
+ #ifdef TIZEN_FEATURE_LIBAV
+ for (i = 0 ; i < ffmpegmux->context->nb_streams ; i++) {
+ ffmpegmux->context->streams[i]->start_time = AV_NOPTS_VALUE;
+ ffmpegmux->context->streams[i]->duration = AV_NOPTS_VALUE;
+ ffmpegmux->context->streams[i]->cur_dts = AV_NOPTS_VALUE;
+ }
+ }
+ #endif
break;
case GST_STATE_CHANGE_READY_TO_NULL:
break;
--- /dev/null
-Version: 1.16.2
-Release: 3
+ Name: gst-libav
+ Summary: Libav plugin for GStreamer
-Source100: common.tar.gz
-Source101: libav.tar.gz
-URL: http://cgit.freedesktop.org/gstreamer/gst-libav
++Version: 1.19.2
++Release: 0
+ Group: Multimedia/Framework
+ License: LGPL-2.0+
+ Source: %{name}-%{version}.tar.gz
-%setup -q -T -D -a 100
-%setup -q -T -D -a 101
++URL: https://gitlab.freedesktop.org/gstreamer/gst-libav
+ BuildRequires: gettext
+ BuildRequires: which
+ BuildRequires: yasm
+ BuildRequires: bzip2-devel
++BuildRequires: meson >= 0.48.0
+ BuildRequires: pkgconfig(gstreamer-1.0)
+ BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
+ BuildRequires: pkgconfig(glib-2.0)
+ BuildRequires: pkgconfig(zlib)
+ BuildRequires: pkgconfig(vorbis)
+ BuildRequires: pkgconfig(theora)
+ BuildRequires: pkgconfig(orc-0.4)
++BuildRequires: pkgconfig(libavcodec)
++BuildRequires: pkgconfig(libavfilter)
++BuildRequires: pkgconfig(libavformat)
++BuildRequires: pkgconfig(libavutil)
+
+ %description
+ This GStreamer plugin supports a large number of audio and video compression
+ formats through the use of the libav library. The plugin contains GStreamer
+ elements for decoding 90+ formats (AVI, MPEG, OGG, Matroska, ASF, ...),
+ demuxing 30+ formats and colorspace conversion.
+
+
+ %prep
+ %setup -q -n gst-libav-%{version}
-NOCONFIGURE=1 ./autogen.sh
-
+
+ %build
- -DTIZEN_PRODUCT_TV\
+ export CFLAGS+=" -Wall -g -fPIC\
+ %if "%{tizen_profile_name}" == "tv"
- -DTIZEN_FEATURE_LIBAV"
-
-EXTRA_CONFIGURE="--disable-demuxer=mm --disable-decoder=jpeg2000 --disable-decoder=hevc"
-%{?asan:EXTRA_CONFIGURE="$EXTRA_CONFIGURE --disable-asm"}
-%configure --disable-static \
- --enable-lgpl\
- --disable-jpeg\
- --prefix=%{_prefix} \
- --with-html-dir=/tmp/dump\
- --with-libav-extra-configure="$EXTRA_CONFIGURE"
-
-
-make %{?jobs:-j%jobs}
++ -DTIZEN_PRODUCT_TV\
+ %endif
-%make_install
-
++ -DTIZEN_FEATURE_LIBAV"
++%meson --auto-features=auto
++%meson_build
+
+ %install
+ rm -rf %{buildroot}
-%license COPYING.LIB
++%meson_install
+
+ %files
+ %manifest %{name}.manifest
+ %defattr(-,root,root,-)
-
++%license COPYING
+ %{_libdir}/gstreamer-1.0/libgstlibav.so
+