summaryrefslogtreecommitdiff
path: root/omx/gstomxaudioenc.c
Commit message (Collapse)AuthorAgeFilesLines
* omx: allow gst_omx_port_acquire_buffer() to not wait for buffersGuillaume Desmottes2018-08-301-3/+3
| | | | | | Will be needed to implement GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT. https://bugzilla.gnome.org/show_bug.cgi?id=796918
* turn GstOMXComponent to a GstMiniObjectGuillaume Desmottes2018-08-301-1/+1
| | | | | | Will use it for refcounting. https://bugzilla.gnome.org/show_bug.cgi?id=796918
* omx{audio,video}{dec,enc}: sequentially disable ports because buffers are ↵Julien Isorce2017-08-171-7/+18
| | | | | | | | | | | | | | | | | | | | | | | not shared For the history, the parallel disable port has been introduced by: "00be69f omxvideodec: Disable output port when setting a new format" and then replicated to videoenc, audiodec and audioenc. This is only required to do 'parallel' if buffers are shared between ports. But for decoders and encoders the input and output buffer are of different nature by definition (bitstream vs images). So they cannot be shared. Also starting from IL 1.2.0 it is written in the spec that the parallel disable is not allowed and will return an error. Except when buffers are shared. Again here we know in advance that they are not shared so let's always do a sequential disable. Tested on Desktop, rpi and zynqultrascaleplus. https://bugzilla.gnome.org/show_bug.cgi?id=786348
* omxaudioenc: Fix deadlock in error case when drainingSatya Prakash Gupta2017-07-171-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=784967
* omxaudioenc: update local port_def after reopening the componentJulien Isorce2017-07-051-0/+3
| | | | | | | | | gst_omx_audio_enc_open will only update GstOMXAudioEnc->port->port_def. Note that the component is reopen only if the flag GST_OMX_HACK_NO_COMPONENT_RECONFIGURE is set. https://bugzilla.gnome.org/show_bug.cgi?id=782418
* omxaudioenc: set base class format instead of just source pad capsVincent Penquerc'h2017-01-111-1/+1
|
* omxaudioenc: implement GstPreset interfaceAurélien Zanelli2016-06-211-4/+6
| | | | | | | To allow user to use GstPreset to quickly save and load a set of parameters. https://bugzilla.gnome.org/show_bug.cgi?id=767907
* omx: #define OMX_SKIP64BIT on the RPi as required by their APISebastian Dröge2016-06-171-7/+8
| | | | | | | Also add generic support for OMX_SKIP64BIT to gst-omx, in case other implementations also #define that for whatever reason. https://bugzilla.gnome.org/show_bug.cgi?id=766475
* Properly handle drain requests while flushingEnrique Ocaña González2015-11-181-0/+12
| | | | | | | Without this commit the decoder streaming thread stops without ever attending the drain request, leaving the decoder input thread waiting forever. https://bugzilla.gnome.org/show_bug.cgi?id=758274
* omxaudioenc: impossible if statementLuis de Bethencourt2015-03-061-3/+0
| | | | | | | ret is set to GST_STATE_CHANGE_SUCCESS and never touched, so it is impossible for it to be anything else at the if check. Remove the if check. CID #1287053
* omxaudioenc: Implement the hack flag GST_OMX_HACK_NO_COMPONENT_RECONFIGURESebastian Dröge2014-08-281-20/+31
|
* omxaudioenc: Use the base class' open/close vfuncs instead of calling them ↵Sebastian Dröge2014-08-281-6/+9
| | | | ourselves
* omx: Let base classes handle EOSSebastian Dröge2014-08-141-89/+1
| | | | https://bugzilla.gnome.org//show_bug.cgi?id=734774
* omxaudioenc: Implement hack for not disabling the output port after ↵Sebastian Dröge2014-05-151-14/+39
| | | | | | | | set_format until the output format is known Needed on some OMX implementations, e.g. the one from Atmel. It does not send the settings-changed event on the output port if it is disabled.
* omxaudioenc: Correctly scale nTickCount by OMX_TICKS_PER_SECONDSebastian Dröge2014-05-121-0/+3
|
* omxaudioenc: Drain encoder on NULL buffer and don't drain on flushingSebastian Dröge2014-05-101-3/+1
|
* omx: Don't handle FLUSHING and NOT_LINKED as errorsSebastian Dröge2014-01-251-2/+7
| | | | Also don't stop the task on NOT_LINKED. We're not a demuxer.
* omx: Take lock on EOS to update the flow return valueJosep Torra2013-05-201-0/+2
| | | | | | Fixes "GThread-ERROR **: file gthread-posix.c: line 171 (g_mutex_free_posix_impl): error 'Device or resource busy' during 'pthread_mutex_destroy ((pthread_mutex_t *) mutex)'" in _finalize.
* omx: Add pads based on element typejitendra2013-05-061-0/+1
| | | | | | | This allows to later add sources and sink that only have a srcpad or sinkpad. https://bugzilla.gnome.org/show_bug.cgi?id=699754
* omx: more printf format fixesTim-Philipp Müller2013-04-181-6/+6
| | | | | | | | Fix printf formats again, so that gst-omx compiles warning- free on the Raspberry Pi as well. Unfortunately OMX_UINT32 maybe be typedefed to uint32_t or unsigned long, which doesn't work well with our debugging printf format strings, so just use %u for those and cast to guint.
* omx: Disable output port before transition to idle statejitendra2013-04-161-7/+7
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=698109
* omx: fix printf formats in debug messagesTim-Philipp Müller2013-04-081-5/+5
| | | | | OMX_U32 is typedefed to an unsigned long, OMX_TICKS to a 64-bit integer.
* omx: Clarify that loop task is also paused in EOSJosep Torra2013-03-161-1/+1
|
* omx: Stop output port task after drainingSebastian Dröge2013-03-151-0/+1
|
* omx: Handle the OMX_EventBufferFlag to detect EOS tooSebastian Dröge2013-03-141-96/+103
|
* omxaudioenc: Disable output port when setting a new formatSebastian Dröge2013-03-111-5/+10
|
* omx: Catch errors when releasing buffers to a port and handle themSebastian Dröge2013-03-111-8/+43
|
* omx: Fix deadlock in encoders and add explainatory comments.Josep Torra2013-03-091-0/+6
|
* omx: Flush and stop srcpad when configuring new capsSebastian Dröge2013-03-081-0/+2
|
* omx: Add timeout to the flush operation and move buffer populating to a ↵Sebastian Dröge2013-03-071-14/+20
| | | | separate function
* omx: Do number of buffers configuration explicitelySebastian Dröge2013-03-071-4/+4
|
* omxaudioenc: Only enable the output port after we know the output formatSebastian Dröge2013-03-011-6/+12
|
* omx: Return the OMX_ERRORTYPE from gst_omx_port_update_port_definitionSebastian Dröge2013-02-281-2/+4
|
* omx: Add API for allocating a specific number of buffers and using EGLImages ↵Sebastian Dröge2013-02-281-5/+5
| | | | or buffers allocated elsewhere
* omx: Refactor code flow a bit if output port settings have changedSebastian Dröge2013-02-271-40/+43
|
* omx: Clean up port settings change handlingSebastian Dröge2013-02-271-18/+92
|
* omx: Auto-detect the port indizes if possibleSebastian Dröge2013-02-251-4/+29
|
* omx: Refactor waiting for buffers to be released by the component to a ↵Sebastian Dröge2013-02-251-1/+4
| | | | separate function
* omxaudioenc: Rename component variableSebastian Dröge2013-02-251-92/+93
|
* omx: Some minor refactoring and cleanupSebastian Dröge2013-02-121-1/+3
|
* omx: Split enabling/disabling of port into sending the command and waiting ↵Sebastian Dröge2013-02-121-0/+10
| | | | | | for it This allows to do anything necessary after sending the command to actually let it finish
* omx: Fix some memory leaks and suboptimal lockingSebastian Dröge2013-01-141-12/+13
|
* omx: Implement new approach for locking that should solve all deadlocks on RPiSebastian Dröge2013-01-141-4/+6
| | | | | | | | | | No mutex is locked while calling any OpenMAX functions anymore and everything from the OpenMAX callbacks is inserted into a message queue and handled from outside the callbacks. Also there's only a single mutex and condition variable per component now for handling anything from OpenMAX callbacks and a single mutex for keeping our component/port state sane.
* omx: Fix ununsed variable compiler warningSebastian Dröge2012-12-201-2/+1
|
* omx: No need to start the srcpad task in ::start() alreadySebastian Dröge2012-12-201-3/+0
| | | | It will be started properly after the caps are set.
* omx: Improve debug outputSebastian Dröge2012-12-201-0/+20
|
* omx: Update to new GLib thread APISebastian Dröge2012-11-121-17/+17
|
* omx: Fix compilation after gst_pad_start_task() API changesSebastian Dröge2012-06-201-3/+3
|
* Implement a new custom recursive mutex type and fix locking in callbacks so ↵George Kiagiadakis2012-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | that in-context calls are allowed. According to the OMX specification, implementations are allowed to call callbacks in the context of their function calls. However, our callbacks take locks and this causes deadlocks if the unerlying OMX implementation uses this kind of in-context calls. A solution to the problem would be a recursive mutex. However, a normal recursive mutex does not fix the problem because it is not guaranteed that the callbacks are called from the same thread. What we see in Broadcom's implementation for example is: - OMX_Foo is called - OMX_Foo waits on a condition - A callback is executed in a different thread - When the callback returns, its calling function signals the condition that OMX_Foo waits on - OMX_Foo wakes up and returns The solution I came up with here is to take a second lock inside the callback, but only if recursion is expected to happen. Therefore, all calls to OMX functions are guarded by calls to gst_omx_rec_mutex_begin_recursion() / _end_recursion(), which effectively tells the mutex that at this point we want to allow calls to _recursive_lock() to succeed, although we are still holding the master lock.
* omxaudioenc: Use gst_buffer_extract() to copy the input buffer data to the ↵Sebastian Dröge2012-04-161-17/+9
| | | | OpenMAX buffer