base_videodec: add a hook function for state transition

This function allows to describe extra preparation or
finalization especially for video decoder since it could be
invoked whenever the state would be changed.
base_videodec: fix missing uiomux_unregister() to prevent a memory leak

uiomux_register() allocates a small region for recording an address
mapping and it remains in memory while a process is alive.
This moves the registration into the timing when the state is
changed from NULL to READY. And then unregisters the entry when
the state is changed from PAUSE to READY.
base_filter: fix missing gst_caps_unref() to prevent a memory leak

The caps that is returned from gst_pad_get_negotiated_caps() must be
passed to gst_caps_unref() to decrease the reference count, otherwise
it will cause a memory leak.
wmvdec: support decoding VC-1 field interlaced images

This change searches a start code present before a field picture data
and split a frame into the field pictures. The field interlaced mode
is only supported in the advanced profile. So this parsing processing
is performed when the advanced profile is detected by retrieving
the codec_data in caps.
base_videodec: free caps in setting_changed_cb()

This patch fixes caps reference counting issue in setting_changed_cb().
Without this patch, the caps reference count will be increased each time
a video is played.

To fix the issue, call gst_caps_unref() to reduce the reference count of
the caps.
wmvdec: free caps in gst_omx_wmvdec_sink_setcaps()

This patch fixes caps reference counting issue in gst_omx_wmvdec_sink_setcaps().
Without this patch, the caps reference count will be increased each time
a video is played.

To fix the issue, call gst_caps_unref() to reduce the reference count of
the caps.
wmvdec: improve field start code search processing

This change optimizes the start code search processing by accessing
memory that is aligned on a four byte boundary. The optimization can
increace the efficiency of memory reads from the processor.
mpeg4dec: concatenate codec_data with the first frame

When a mpeg4 stream is demuxed, codec_data may have some
decoder configuration information (DCI). The DCI contains
some data that is necessary for decoding the stream that follows it.
According to the REL OMXIL spec, the DCI must be concatenated with the
first frame and pushed with EmptyThisBuffer() when the packed bitstream
is specified.
The DCI information is appended even if the same data already exists
within the first frame, since the OMXIL will silently discard the
duplicate DCI data.
mpeg4dec: retrieve DCI from codec_data

The REL OMXIL requires a pointer to the first byte in the DCI data
when it is present in the avi extra data field. The client must
determine whether DCI data is present and/or where the first byte
is located and pass that data to the OMXIL.