Commit graph

47 commits

Author SHA1 Message Date
Andreas Cadhalpun 6235a04ef3 libav: Remove usage of deprecated API
https://bugzilla.gnome.org/show_bug.cgi?id=757498
2016-01-16 16:47:40 +02:00
Reynaldo H. Verdejo Pinochet 598f71d12c Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe

(Includes unrelated formatting change to go through
indent checker commit hook)
2015-11-20 10:48:47 -08:00
Vineeth TM 2d94a1cbcc avvidenc: Fix frame memory leak
The frame being passed to handle_frame should be unref'ed in all cases

https://bugzilla.gnome.org/show_bug.cgi?id=757453
2015-11-02 09:25:34 +02:00
Sebastian Dröge e5e78379ad avvidenc: Pass the correct user_data to gst_buffer_new_wrapped_full()
Fixes crash with e.g.

  gst-launch-1.0 videotestsrc num-buffers=40 ! \
    videoconvert ! avenc_huffyuv ! fakesink
2015-10-03 18:14:05 +01:00
Jan Schmidt 30a406591a avvid/audenc: Set some tags in the output for downstream's info
Add the codec name and bitrate into the output for informational
purposes. Bitrate in particular is now used by flvmux to set
videodatarate and audiodatarate in the resulting stream
2015-08-24 00:01:40 +10:00
Thiago Santos fa29036836 avvidenc: use template subset check for accept-caps
It is faster than doing a query that propagates downstream and
should be enough
2015-08-17 04:36:39 -03:00
Thiago Santos 427db7f484 avvidenc: remove useless getcaps method
It just calls the exact same function as the default handler
2015-08-16 14:13:05 -03:00
Sebastian Dröge 8271b2755a avvidenc: Fix compiler warning
gstavvidenc.c: In function 'gst_ffmpegvidenc_flush_buffers':
gstavvidenc.c:733:7: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
       GstFFMpegVidEncClass *oclass =
       ^
cc1: all warnings being treated as errors
2015-06-28 16:54:35 +02:00
Sebastian Dröge e964dcdb02 avvidenc: Set AVFrame flags for interlacing per frame and not in set_format()
They will get overridden by av_frame_unref() with the defaults.
2015-06-28 16:35:46 +02:00
Sebastian Dröge 45ab256e54 av{aud,vid}enc: Create wrapped output buffers with GST_MEMORY_FLAG_READONLY
libav might still have references to the buffers itself and uses a writability
system similar to ours based on reference counts.
2015-06-28 16:32:02 +02:00
Sebastian Dröge 6998d982c7 avvidenc: Properly wrap and free the output AVPackets generated during draining 2015-06-28 16:30:54 +02:00
Sebastian Dröge 3943cdf18a avvidenc: Make sure to keep input data alive until libav is done with it 2015-06-28 16:27:52 +02:00
Sebastian Dröge d6b5fc4f34 av{aud,vid}enc: Stop using deprecated AVFrame APIs 2015-06-28 15:37:23 +02:00
Sebastian Dröge d3a2a9a951 libav: Change from deprecated PIX_FMT_* to AV_PIX_FMT_* 2015-03-10 10:17:45 +01:00
Sebastian Dröge e42cc96566 avvidenc: Make sure to fixate caps before setting them on the pad
After the recent addition of negotiation support for MPEG4 part 2
profiles via caps it can happen that the generated caps at this
point still contain multiple profiles. For example if downstream
does not care. Just fixate anything here and use those caps.
2014-06-21 18:29:32 +02:00
Sebastian Dröge 406d5ba04a avvidenc: Fix indention and "bracketing" of goto labels
Should fix CID 1219865, which looks like the code analysis
algorithm was just confused.
2014-06-02 09:27:17 +02:00
Wim Taymans 3dda75f493 avvidenc: do all negotiation before opening the decoder
We first want to complete negotiation before opening the encoder.
Negotiation might configure flags and other things that might be needed
when opening the encoder.
2014-05-29 18:16:42 +02:00
Gavin Hurlbut 38fc56e207 avvidenc: Add thread-count parameter for libav encoders
As some libav encoders (such as MPEG2) use a thread_count parameter to control
how many threads to use, and since it was always being set to 0 (which uses
the default), suboptimal threading can sometimes be chosen.  This extends the
libav encoders to allow for a max-threads parameter which is passed into
the internal structure to control this knob if applicable to the encoder.

https://bugzilla.gnome.org/show_bug.cgi?id=726612
2014-05-19 15:07:02 +01:00
Vincent Penquerc'h 3529de1784 avvidenc: guard against division by zero
and other nonsensical time base values while we're at it.

Coverity 1139699
2014-04-30 18:18:50 +01:00
Stian Selnes 245be56510 avvidenc: Fix leak of AVBufferRef
AVPacket contains AVBufferRef which may leak unless unreffed properly.

https://bugzilla.gnome.org/show_bug.cgi?id=726814
2014-04-29 09:07:33 +02:00
Mark Nauwelaerts 6daa80bbbe avvidenc: discard input frame upon encoding error 2014-03-25 21:06:01 +01:00
Mark Nauwelaerts 7a8eae6ea9 avvidenc: make all properties work again
... as previously broken due to additional compliance property
(see 13ffed87b1).
2014-02-23 11:40:14 +01:00
Mark Nauwelaerts f86fd7e29e avvidenc: avoid busy-looping when flushing frames
... such as when receiving EOS event.
2014-02-01 14:40:45 +01:00
Vincent Penquerc'h ca1b5d8576 gst-libav: fix context leaks
A AVCodecContext needs cleaning up before being freed.
Go through all of the allocations/setups to ensure none of them
can leak a context or its contents.
2014-01-15 09:02:33 +00:00
Sebastian Dröge 0a819702c0 avenc: Stop using the removed inter_threshold field 2014-01-03 16:27:34 +01:00
Sebastian Dröge 0400f7cc28 avviddec rebase 2014-01-03 16:27:11 +01:00
Sebastian Dröge 53966ee304 avvidenc: Port to av_encode_video2()
av_encode_video() is deprecated and an ugly API anyway.
2014-01-03 16:24:28 +01:00
Mark Nauwelaerts 1aa253cd3b avvidenc: plug input_state leak 2013-12-07 12:11:03 +01:00
Greg Rutz 13ffed87b1 avenc: Add compliance property
Add a new property to GstFFMpegVidEnc and GstFFMpegAudEnc to supply
the "strict compliance" value to AVCodecContext

https://bugzilla.gnome.org/show_bug.cgi?id=691617
2013-10-15 09:27:03 +02:00
Sebastian Dröge 6571196fb8 libav: avcodec_close() also resets fields like the AVCodec
We need to reload the defaults for the codec after closing it,
otherwise we can't access codec information like the supported
sample rates and can crash.

https://bugzilla.gnome.org/show_bug.cgi?id=707040
2013-08-29 16:53:28 +02:00
Tim-Philipp Müller ffe85cb0ef avvidenc: propagate flow return values upstream in finish() 2013-08-21 13:47:15 +01:00
Sebastian Dröge ae946bab1c libav: Use new flush vfunc of video codec base classes and remove reset implementations 2013-08-15 15:51:52 +02:00
Tim-Philipp Müller 068be939cb CODEC_ID_* -> AV_CODEC_ID_* 2013-05-06 23:56:22 +01:00
Sebastian Dröge 022ab84288 av: Fix some memory leaks and misuse of libav API 2012-12-17 16:35:36 +01:00
Sebastian Dröge 86361bf6df avvidenc: Simplify color formats in the raw video caps 2012-12-11 18:48:34 +00:00
Sebastian Dröge 2d7ebf9514 av: Correctly populate the codec context with the defaults 2012-12-05 19:25:37 +01:00
Sebastian Dröge d840211412 av: Use av_codec_is_{en,de}coder() API instead of private struct fields 2012-12-05 10:52:34 +01:00
Sebastian Dröge f5c112990f av: Port remaining simple bits 2012-12-04 18:36:56 +01:00
Luca Barbato 5f03a7d869 av: update to use AVOption variants. 2012-12-04 18:36:30 +01:00
Sebastian Dröge 4132a73f0e avvidenc: Implement reset vfunc 2012-11-20 11:56:57 +01:00
Sebastian Dröge d3f8c5f0cc avvidenc: Don't send any frames downstream when draining unless requested to do so 2012-11-20 11:53:52 +01:00
Sebastian Dröge 970f40b935 avvidenc: Use gst_caps_truncate() 2012-11-20 10:35:01 +01:00
Sebastian Dröge 6895df72d6 av: Use PROP_ instead of ARG_ 2012-11-20 10:31:49 +01:00
Tim-Philipp Müller d0ef33d463 Fix FSF address 2012-11-04 00:22:16 +00:00
Tim-Philipp Müller 451a6c2ecf avvidenc: also skip non-video encoders
Doesn't actually make any difference at the moment, but
seems the right thing to do.

https://bugzilla.gnome.org/show_bug.cgi?id=685113
2012-09-30 16:25:29 +01:00
Edward Hervey 0f9cc8dac6 libav: Switch to non-deprecated symbols
This symbols/enums will all be deprecated in the next releases
2012-09-13 15:23:26 +02:00
Edward Hervey 90a8b3fb9f ext: ffmpeg/gstffmpeg*.[ch] => libav/gstav*.[ch] 2012-09-10 17:53:54 +02:00
Renamed from ext/ffmpeg/gstffmpegvidenc.c (Browse further)