Update copyright declarations

Preparing 1.0.0 release

Change-Id: I9894f82eb39c076e393d4995d3d6ffa699594970
Reviewed-on: https://gpro.palm.com/24913
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
configure.ac: Drop 2nd AM_INIT_AUTOMAKE call

:Release Notes:
Fix build with automake-1.14

:Detailed Notes:
With newer automake the build fails in do_configure with:
automake: error: global options already processed
automake: Please contact <bug-automake@gnu.org>.

:Testing Performed:
Only build tested.

:QA Notes:
No change to image.

:Issues Addressed:
[GF-42606] Ongoing metadata improvement/cleanup work

Change-Id: I66b6073d465c720ac815349b9ac0a41d5d5a7fa8
Reviewed-on: https://gpro.palm.com/25014
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
lpbin: Modify a/v resource setting sequence

Audio/video resource is set from upper layer.
The time when a/v resource set is later than past because upper layer logic is
changed.
Thus Lpbin is modified to always passing it to lpsink.

Change-Id: Ie5f1715c14bac7890a3799e637af96e21f313806
Reviewed-on: https://gpro.palm.com/25216
Reviewed-by: HoonHee Lee <hoonhee.lee@lge.com>
Tested-by: Wonchul Lee <wonchul86.lee@lge.com>
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
lpbin: Add stream-unlock mechanism

The stream control point to allocate exact hardware resources is
required when transiting status READY to PAUSED. According to the
legacy procedure, there's no point to estimate how many hardware
resources are required for the stream in current pipeline.
Stream locking mechanism provides a point to block streams before
reaching stream to decoder so that actual hardware will not be enabled
until expicit signal action,strem-unlock, is called.

The "use-stream-lock" property: Perform stream lock
  "use-stream-lock"  gboolean   : Read/Write

The "streams-ready" signal:
  "streams-ready" :  void user_function (GstElement* object,
                                         GPrtArray* vcaps,
                                         GPtrArray* acaps,
                                         GPtrArray* tcaps,
                                         gint cur_vidx,
                                         gint cur_aidx,
                                         gint cur_tidx,
                                         gpointer user_data);
    object:     The lpbin reference
    vcaps:      The video caps pointer array
    acaps:      The audio caps pointer array
    tcaps:      The text caps pointer array
    cur_vidx:   The selected video index
    cur_aidx:   The selected audio index
    cur_tidx:   The selected text index

    - After usage of video/audio/text caps at callback function
      it should be unreferenced each of caps and freed caps pointer arrays
    - This signal may be emitted from the context of a GStreamer
      streaming thread

The "stream-unlock" signal action:
  "stream-unlock" :  gboolean user_function (GstElement* object);
    Returns:    TRUE if the action of lpsink is called

Change-Id: I3a3a9d7397acb6aec85a2be2f871541ead750d1c
DCO-1.0-Signed-off-by: hoonhee.lee <hoonhee.lee@lge.com>
Reviewed-on: https://gpro.palm.com/24532
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
lpsink: Add video and audio channel information

Channel information of video/audio decoder is added from upper-layer.
Each bit meams vdec/adec channel.
For example, if the zero bit sets as 1, vdec/adec channel 0 is required.
if next zero bit sets as 1, vdec/adec channel 1 is required.
Lastly, if zero bit and next zero bit set as 1, vdec/adec channel 0
and channel 1 are required.
But, when multiple streams such as 3D dual stream, vdec channel 0
and channel 1 are required without bit calculation.

:Issues Addressed:
[GF-57923] Dynamic resource allocation for generic pipeline

Change-Id: I33bba4506458a146d534688e3a31ac1f4b6c1349
Reviewed-on: https://gpro.palm.com/24902
Tested-by: HoonHee Lee <hoonhee.lee@lge.com>
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
Revert "lpsink: Add video and audio channel information"

This reverts commit 14234c2ec474cf32bf955e74635da581fae71fa8

Change-Id: Iec63a353947e77676bb618ffca04e0c9e5283a55
Reviewed-on: https://gpro.palm.com/26107
Tested-by: HoonHee Lee <hoonhee.lee@lge.com>
Reviewed-by: Wonchul Lee <wonchul86.lee@lge.com>
lpbin: Fix a/v resource setting sequence

Audio/video resource properties are set from upper layer.
But, audio resource property is set by video resource.
Thus, audio resource property is modified to set by audio resource.

Change-Id: Ib8a8a66e5df827cb55431f6deabeda9c5572248d
Reviewed-on: https://gpro.palm.com/26190
Tested-by: HoonHee Lee <hoonhee.lee@lge.com>
Reviewed-by: WonHo Chun <wonho.chun@lge.com>
lpsink: Prevent pipeline malfunction

In some cases, vdecsink can not handle certain type of media file.
It can cause to construct abnormal pipeline, thus this patch prevent it.

Change-Id: I163db7cf75b18aa5100f9e00c89039533c8b0e70
Reviewed-on: https://gpro.palm.com/26532
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
Revert "lpsink: Prevent pipeline malfunction"

This reverts commit 7f2f151ad30982b3dbfb006fc92b7e35fe269080.
tests: support standard testing framework

Change-Id: I38aeeb9d4028f10e9b4a46258d37cc35a2707a36
Reviewed-on: https://gpro.palm.com/26649
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
Reviewed-by: HoonHee Lee <hoonhee.lee@lge.com>
Reviewed-by: Wonchul Lee <wonchul86.lee@lge.com>
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
tests: Implement lpbin unit test code using gstcheck

Applied unit test code for lpbin using gstcheck.
Thus, It is possible to run unit tests using below commands,
in order to confirm that an element works fine without memory leakage.

make elements/streamiddemux.check
make elements/streamiddemux.valgrind
make elements/lpbin.check
make elements/lpbin.valgrind

[GF-58059] Implement lpbin unit tests using gstcheck

Change-Id: Icc07fa4b14af9818f25d76a33347076e195e29dd
Reviewed-on: https://gpro.palm.com/26729
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
tests: Update test environment

To support libraries of gst-plugins-lp in test program,
Added top build directory of gst-plugins-lp in test environment.
Also, unnecessary scripts are removed.

Change-Id: If1b70dda14af4d30db856fad73fba3e0d675bafc
Reviewed-on: https://gpro.palm.com/26735
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
examples: add examples directory for the future purpose

Change-Id: I689eaa5d59e23e446639d1343cdc6e2df0a07412
Reviewed-on: https://gpro.palm.com/26925
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
lpsink: Prevent to construct abnormal pipeline

Some of HEVC contents can not be played.
At that time, pipeline status goes wrong and it affects next pipeline.
If video-sink failed to create sinkpad, it means video-sink can not handle
this stream properly, lpbin will prevent to construct a pipeline

:Issues addressed:
[GF-59224] prevent construction pipeline at HEVC stream case

Change-Id: I05ce5ac1e8f09ed9949f0c44089a886cd41a56fb
Reviewed-on: https://gpro.palm.com/26835
Tested-by: Wonchul Lee <wonchul86.lee@lge.com>
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
lpsink: Add video and audio channel information

A/V channel information for hardware decoders can be acquired by 
only the upper layer's logic. 

Each bit of channel properties has meaning of port number.
For example, if the zero bit is set as 1, the channel 0 is required.
If first and second bits are set as 1, both channels, 0 and 1, are 
required. 

Dual streaming is only exceptional case because the lower layer will
control the channel information.

:Issues Addressed:
[GF-57923] Dynamic resource allocation for generic pipeline

Change-Id: I33bba4506458a146d534688e3a31ac1f4b6c1349
Reviewed-on: https://gpro.palm.com/24902
Tested-by: HoonHee Lee <hoonhee.lee@lge.com>
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
Reviewed-on: https://gpro.palm.com/26927
Remove an unnecessary directory

Change-Id: Ie16615bbe53b1f9463081a118a1c20dacbc2f3d8
Reviewed-on: https://gpro.palm.com/27266
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
lpsink: Ignore async message from audio sink

Audio sink element run as async-disable status.
However after doing seek, it emit async done message by itself.
Thus this patch will prevent it by drop async message at lpsink.

Change-Id: I6b2fb5332f7da39110b5bfc87d39874452bdd059
Reviewed-on: https://gpro.palm.com/27639
Tested-by: Wonchul Lee <wonchul86.lee@lge.com>
Reviewed-by: HoonHee Lee <hoonhee.lee@lge.com>
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
fcbin: Add mutex lock when changing state

When removing reference count for pads, the thread-safety should be
assured.

Change-Id: Idffb8fb35c53fea16dd15511128729066b493b39
Reviewed-on: https://gpro.palm.com/27811
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Wonchul Lee <wonchul86.lee@lge.com>
Reviewed-by: Wonchul Lee <wonchul86.lee@lge.com>
Revert "lpsink: Ignore async message from audio sink"

This reverts commit ee3da16a2b284029c5c590a118fbf61b0d60496c.

When seeking repeatedly, sound is muted frequently.

Change-Id: I408c6eb917f170f9ac04af7d10d9103418be4180
Reviewed-on: https://gpro.palm.com/27821
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>
lpsink: Ignore async message from audio sink

Audio sink element run as async-disable status.
However after doing seek, it emit async done message by itself.
Thus this patch will prevent it by drop async message at lpsink.

Change-Id: I6b2fb5332f7da39110b5bfc87d39874452bdd059
Reviewed-on: https://gpro.palm.com/27639
Tested-by: Wonchul Lee <wonchul86.lee@lge.com>
Reviewed-by: HoonHee Lee <hoonhee.lee@lge.com>
Reviewed-by: Jeongseok Kim <jeongseok.kim@lge.com>
Tested-by: Jeongseok Kim <jeongseok.kim@lge.com>