From: Nicolas Zingilé Date: Wed, 26 Nov 2014 15:18:21 +0000 (+0100) Subject: adapted multimedia suite X-Git-Tag: submit/tizen/20141127.103057^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_common;p=test%2Fcommon%2Fcommon-multimedia-suite.git adapted multimedia suite Change-Id: If98d2860f61359a3253b81baeefc7f4013ecf2dd Signed-off-by: Nicolas Zingilé --- diff --git a/LICENSE.CC-BY-3.0 b/LICENSE.CC-BY-3.0 new file mode 100644 index 0000000..762f3ca --- /dev/null +++ b/LICENSE.CC-BY-3.0 @@ -0,0 +1,214 @@ +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE +("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF +THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF +THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS +YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, +such as a translation, adaptation, derivative work, arrangement of music or other alterations of a +literary or artistic work, or phonogram or performance and includes cinematographic adaptations or +any other form in which the Work may be recast, transformed, or adapted including in any form +recognizably derived from the original, except that a work that constitutes a Collection will not be +considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work +is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with +a moving image ("synching") will be considered an Adaptation for the purpose of this License. + "Collection" means a collection of literary or artistic works, such as encyclopedias and +anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than +works listed in Section 1(f) below, which, by reason of the selection and arrangement of their +contents, constitute intellectual creations, in which the Work is included in its entirety in +unmodified form along with one or more other contributions, each constituting separate and +independent works in themselves, which together are assembled into a collective whole. A work that +constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of +this License. + "Distribute" means to make available to the public the original and copies of the +Work or Adaptation, as appropriate, through sale or other transfer of ownership. + "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the + terms of this License. + "Original Author" means, in the case of a literary or artistic work, the individual, +individuals, entity or entities who created the Work or if no individual or entity can be +identified, the publisher; and in addition (i) in the case of a performance the actors, singers, +musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or +otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a +phonogram the producer being the person or legal entity who first fixes the sounds of a performance +or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the +broadcast. + "Work" means the literary and/or artistic work offered under the terms of this License +including without limitation any production in the literary, scientific and artistic domain, +whatever may be the mode or form of its expression including digital form, such as a book, pamphlet +and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or +dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition +with or without words; a cinematographic work to which are assimilated works expressed by a process +analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or +lithography; a photographic work to which are assimilated works expressed by a process analogous to +photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work +relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; +a compilation of data to the extent it is protected as a copyrightable work; or a work performed by +a variety or circus performer to the extent it is not otherwise considered a literary or artistic +work. + "You" means an individual or entity exercising rights under this License who has not +previously violated the terms of this License with respect to the Work, or who has received express +permission from the Licensor to exercise rights under this License despite a previous violation. +"Publicly Perform" means to perform public recitations of the Work and to communicate to the public +those public recitations, by any means or process, including by wire or wireless means or public +digital performances; to make available to the public Works in such a way that members of the public +may access these Works from a place and at a place individually chosen by them; to perform the Work +to the public by any means or process and the communication to the public of the performances of the +Work, including by public digital performance; to broadcast and rebroadcast the Work by any means +including signs, sounds or images. + "Reproduce" means to make copies of the Work by any means +including without limitation by sound or visual recordings and the right of fixation and reproducing +fixations of the Work, including storage of a protected performance or phonogram in digital form or +other electronic medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses +free from copyright or rights arising from limitations or exceptions that are provided for in +connection with the copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a +worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) +license to exercise the rights in the Work as stated below: + + to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce +the Work as incorporated in the Collections; + to create and Reproduce Adaptations provided that any such Adaptation, including any +translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify +that changes were made to the original Work. For example, a translation could be marked +"The original work was translated from English to Spanish," or a modification could indicate +"The original work has been modified."; + to Distribute and Publicly Perform the Work including as incorporated in Collections; and, to +Distribute and Publicly Perform Adaptations. + + For the avoidance of doubt: + Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect +royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves +the exclusive right to collect such royalties for any exercise by You of the rights granted under this +License; + Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect +royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the +exclusive right to collect such royalties for any exercise by You of the rights granted under this +License; and, + Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually +or, in the event that the Licensor is a member of a collecting society that administers voluntary +licensing schemes, via that society, from any exercise by You of the rights granted under this License. + +The above rights may be exercised in all media and formats whether now known or hereafter devised. +The above rights include the right to make such modifications as are technically necessary to +exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly +granted by Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by +the following restrictions: + + You may Distribute or Publicly Perform the Work only under the terms of this License. You must +include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the +Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that +restrict the terms of this License or the ability of the recipient of the Work to exercise the +rights granted to that recipient under the terms of the License. You may not sublicense the Work. +You must keep intact all notices that refer to this License and to the disclaimer of warranties with +every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform +the Work, You may not impose any effective technological measures on the Work that restrict the +ability of a recipient of the Work from You to exercise the rights granted to that recipient under +the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but +this does not require the Collection apart from the Work itself to be made subject to the terms of +this License. If You create a Collection, upon notice from any Licensor You must, to the extent +practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You +create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from +the Adaptation any credit as required by Section 4(b), as requested. + If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless +a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and +provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author +(or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate +another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution +("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, +the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably +practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI +does not refer to the copyright notice or licensing information for the Work; and (iv) , +consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in +the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based +on original Work by Original Author"). The credit required by this Section 4 (b) may be implemented +in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a +minimum such credit will appear, if a credit for all contributing authors of the Adaptation or +Collection appears, then as part of these credits and in a manner at least as prominent as the +credits for the other contributing authors. For the avoidance of doubt, You may only use the credit +required by this Section for the purpose of attribution in the manner set out above and, by +exercising Your rights under this License, You may not implicitly or explicitly assert or imply any +connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution +Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written +permission of the Original Author, Licensor and/or Attribution Parties. + Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable +law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any +Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in +relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor +agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in +Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, +mutilation, modification or other derogatory action prejudicial to the Original Author's honor and +reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted +by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) +of this License (right to make Adaptations) but not otherwise. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND +MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY +OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A +PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE +PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE +EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL +LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE +OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN +ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + This License and the rights granted hereunder will terminate automatically upon any breach by +You of the terms of this License. Individuals or entities who have received Adaptations or +Collections from You under this License, however, will not have their licenses terminated provided +such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, +and 8 will survive any termination of this License. + + Subject to the above terms and conditions, the +license granted here is perpetual (for the duration of the applicable copyright in the Work). +Notwithstanding the above, Licensor reserves the right to release the Work under different license +terms or to stop distributing the Work at any time; provided, however that any such election will +not serve to withdraw this License (or any other license that has been, or is required to be, +granted under the terms of this License), and this License will continue in full force and effect +unless terminated as stated above. + +8. Miscellaneous + + Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to +the recipient a license to the Work on the same terms and conditions as the license granted to You +under this License. + Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a +license to the original Work on the same terms and conditions as the license granted to You under +this License. + If any provision of this License is invalid or unenforceable under applicable law, it shall not +affect the validity or enforceability of the remainder of the terms of this License, and without +further action by the parties to this agreement, such provision shall be reformed to the minimum +extent necessary to make such provision valid and enforceable. +No term or provision of this License shall be deemed waived and no breach consented to unless such +waiver or consent shall be in writing and signed by the party to be charged with such waiver or +consent. + This License constitutes the entire agreement between the parties with respect to the Work +licensed here. There are no understandings, agreements or representations with respect to the Work +not specified here. Licensor shall not be bound by any additional provisions that may appear in any +communication from You. This License may not be modified without the mutual written agreement of the +Licensor and You. +The rights granted under, and the subject matter referenced, in this License were drafted utilizing +the terminology of the Berne Convention for the Protection of Literary and Artistic Works(as amended +on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO +Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July +24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the +License terms are sought to be enforced according to the corresponding provisions of the +implementation of those treaty provisions in the applicable national law. If the standard suite of +rights granted under applicable copyright law includes additional rights not granted under this +License, such additional rights are deemed to be included in the License; this License is not intended +to restrict the license of any rights under applicable law. diff --git a/Makefile.am b/Makefile.am deleted file mode 100755 index 22fe44b..0000000 --- a/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS = ivi/gst-auto-launch/src -docdir = /usr/share/$(PACKAGE) -dist_doc_DATA = LICENSE ivi/gst-auto-launch/AUTHORS ivi/gst-auto-launch/README diff --git a/TESTDIR/00-common/D0-multimedia/01-lowlevel/QAMETA.json b/TESTDIR/00-common/D0-multimedia/01-lowlevel/QAMETA.json new file mode 100644 index 0000000..65ba483 --- /dev/null +++ b/TESTDIR/00-common/D0-multimedia/01-lowlevel/QAMETA.json @@ -0,0 +1,54 @@ +[ + { + "name": "gst-pulseaudio-plugin", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "The pulseaudio plugin of GStreamer is available", + "description": "Inspect the installed capacities of GStreamer and check that it includes a pulseaudio plugin.", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "", + "exec": "gst-inspect-1.0 pulseaudio", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "", + "service": { + "package": "gstreamer-utils" + }, + "author": "qadmin", + "ctime": "2013-03-20 09:41:13 GMT", + "mtime": "2014-01-31 09:54:24 GMT" + }, + { + "name": "vaapi-installed", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "component for video acceleration are used through va-api", + "description": "use a va-api tool to check that va-api is available", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "", + "exec": "vainfo", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "", + "service": { + "package": "vaapi-tools" + }, + "author": "qadmin", + "ctime": "2014-01-31 09:54:05 GMT", + "mtime": "2014-01-31 11:29:37 GMT" + } +] \ No newline at end of file diff --git a/TESTDIR/00-common/D0-multimedia/02-audio/QAMETA.json b/TESTDIR/00-common/D0-multimedia/02-audio/QAMETA.json new file mode 100644 index 0000000..eb2ef72 --- /dev/null +++ b/TESTDIR/00-common/D0-multimedia/02-audio/QAMETA.json @@ -0,0 +1,122 @@ +[ + { + "name": "wav-test", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "test wav sample with gst-launch", + "description": "check if gst-launch is able to play a wav sound", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "init.sh cigale.wav", + "exec": "runme.sh gst.sh cigale.wav", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "post.sh cigale.wav", + "service": {}, + "author": "qadmin", + "ctime": "2014-01-31 09:54:05 GMT", + "mtime": "2014-05-22 08:23:11 GMT" + }, + { + "name": "ogg-test", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "test ogg sample with gst-launch", + "description": "check if gst-launch is able to play an ogg sound", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "init.sh cigale.ogg", + "exec": "runme.sh gst.sh cigale.ogg", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "post.sh cigale.ogg", + "service": {}, + "author": "qadmin", + "ctime": "2014-01-31 11:31:47 GMT", + "mtime": "2014-05-22 08:23:24 GMT" + }, + { + "name": "aac-test", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "test aac sample with gst-launch", + "description": "check if gst-launch is able to play an aac sound", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "init.sh cigale.aac", + "exec": "runme.sh gst.sh cigale.aac", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "post.sh cigale.aac", + "service": {}, + "author": "qadmin", + "ctime": "2014-01-31 11:32:30 GMT", + "mtime": "2014-05-22 08:23:34 GMT" + }, + { + "name": "flac-test", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "test flac sample with gst-launch", + "description": "check if gst-launch is able to play a flac sound", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "init.sh cigale.flac", + "exec": "runme.sh gst.sh cigale.flac", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "post.sh cigale.flac", + "service": {}, + "author": "qadmin", + "ctime": "2014-01-31 11:33:15 GMT", + "mtime": "2014-05-22 08:23:44 GMT" + }, + { + "name": "mp3-test", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "test mp3 sample with gst-launch", + "description": "check if gst-launch is able to play a mp3 sound", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "init.sh cigale.mp3", + "exec": "runme.sh gst.sh cigale.mp3", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "post.sh cigale.mp3", + "service": {}, + "author": "qadmin", + "ctime": "2014-01-31 11:34:00 GMT", + "mtime": "2014-05-22 08:23:54 GMT" + } +] diff --git a/TESTDIR/00-common/D0-multimedia/02-audio/cigale.aac b/TESTDIR/00-common/D0-multimedia/02-audio/cigale.aac new file mode 100644 index 0000000..744714a Binary files /dev/null and b/TESTDIR/00-common/D0-multimedia/02-audio/cigale.aac differ diff --git a/TESTDIR/00-common/D0-multimedia/02-audio/cigale.flac b/TESTDIR/00-common/D0-multimedia/02-audio/cigale.flac new file mode 100644 index 0000000..2392639 Binary files /dev/null and b/TESTDIR/00-common/D0-multimedia/02-audio/cigale.flac differ diff --git a/TESTDIR/00-common/D0-multimedia/02-audio/cigale.mp3 b/TESTDIR/00-common/D0-multimedia/02-audio/cigale.mp3 new file mode 100644 index 0000000..013a238 Binary files /dev/null and b/TESTDIR/00-common/D0-multimedia/02-audio/cigale.mp3 differ diff --git a/TESTDIR/00-common/D0-multimedia/02-audio/cigale.ogg b/TESTDIR/00-common/D0-multimedia/02-audio/cigale.ogg new file mode 100644 index 0000000..31cf2a6 Binary files /dev/null and b/TESTDIR/00-common/D0-multimedia/02-audio/cigale.ogg differ diff --git a/TESTDIR/00-common/D0-multimedia/02-audio/cigale.wav b/TESTDIR/00-common/D0-multimedia/02-audio/cigale.wav new file mode 100644 index 0000000..57331b5 Binary files /dev/null and b/TESTDIR/00-common/D0-multimedia/02-audio/cigale.wav differ diff --git a/TESTDIR/00-common/D0-multimedia/03-video/QAMETA.json b/TESTDIR/00-common/D0-multimedia/03-video/QAMETA.json new file mode 100644 index 0000000..676ca82 --- /dev/null +++ b/TESTDIR/00-common/D0-multimedia/03-video/QAMETA.json @@ -0,0 +1,98 @@ +[ + { + "name": "avi-test", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "test avi sample with gst-launch", + "description": "check if gst-launch is able to play a avi movie - Video format : MPEG-4, Audio format : MPEG", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "init.sh short-big_buck_bunny_1080p.avi", + "exec": "runme.sh gst.sh short-big_buck_bunny_1080p.avi", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "post.sh short-big_buck_bunny_1080p.avi", + "service": {}, + "author": "qadmin", + "ctime": "2014-01-31 11:33:56 GMT", + "mtime": "2014-05-22 08:24:27 GMT" + }, + { + "name": "flv-test", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "test flv sample with gst-launch", + "description": "check if gst-launch is able to play a flv movie - Video format : Sorenson Spark, ADPCM : MPEG", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "init.sh short-big_buck_bunny_1080p.flv", + "exec": "runme.sh gst.sh short-big_buck_bunny_1080p.flv", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "post.sh short-big_buck_bunny_1080p.flv", + "service": {}, + "author": "qadmin", + "ctime": "2014-01-31 12:00:42 GMT", + "mtime": "2014-05-22 08:24:37 GMT" + }, + { + "name": "mov-test", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "test mov sample with gst-launch", + "description": "check if gst-launch is able to play a mov movie - Video format : AVC, Audio format : AAC", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "init.sh short-big_buck_bunny_1080p.mov", + "exec": "runme.sh gst.sh short-big_buck_bunny_1080p.mov", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "post.sh short-big_buck_bunny_1080p.mov", + "service": {}, + "author": "qadmin", + "ctime": "2014-01-31 12:01:19 GMT", + "mtime": "2014-05-22 08:24:49 GMT" + }, + { + "name": "ogg-test", + "exec_type": "auto", + "priority": "1", + "status": "designed", + "type": "functional_positive", + "subtype": "", + "objective": "test ogg sample with gst-launch", + "description": "check if gst-launch is able to play a ogg movie - Video format : Theora, Audio format : Vorbis", + "pre_condition": "", + "steps": [], + "post_condition": "", + "notes": "", + "bugs": "", + "exec_pre": "init.sh short-big_buck_bunny_1080p.ogg", + "exec": "runme.sh gst.sh short-big_buck_bunny_1080p.ogg", + "exec_expected_retcode": "0", + "exec_kill_timeout": "120", + "exec_post": "post.sh short-big_buck_bunny_1080p.ogg", + "service": {}, + "author": "qadmin", + "ctime": "2014-01-31 12:01:59 GMT", + "mtime": "2014-05-22 08:24:56 GMT" + } +] diff --git a/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.avi b/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.avi new file mode 100644 index 0000000..d936961 Binary files /dev/null and b/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.avi differ diff --git a/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.flv b/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.flv new file mode 100644 index 0000000..73624f3 Binary files /dev/null and b/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.flv differ diff --git a/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.mov b/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.mov new file mode 100644 index 0000000..a1ecc60 Binary files /dev/null and b/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.mov differ diff --git a/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.ogg b/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.ogg new file mode 100644 index 0000000..6520f76 Binary files /dev/null and b/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.ogg differ diff --git a/TESTDIR/00-common/D0-multimedia/gst.sh b/TESTDIR/00-common/D0-multimedia/gst.sh new file mode 100755 index 0000000..b7b8c38 --- /dev/null +++ b/TESTDIR/00-common/D0-multimedia/gst.sh @@ -0,0 +1,38 @@ +#!/bin/bash -x + +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: Ewan Le Bideau-Canevet + +FILE=$1 +UNWANTED="No decoder available" +COMMAND="gst-play-1.0 /$HOME/$FILE" + +tmplog=$(mktemp --tmpdir=/tmp multimedia-XXXXXX.log) +trap "rm -f $tmplog" STOP INT QUIT EXIT +echo $COMMAND +$COMMAND &>$tmplog & +pid=$! +(sleep 5; [ -e /proc/$pid ] && kill $pid;) & +while [ -e /proc/$pid ]; do + sleep 1 + if grep "$UNWANTED" $tmplog ; then + kill $pid + sleep 1 + [ -e /proc/$pid ] && kill -9 $pid + exit 1 + fi +done +exit 0 diff --git a/TESTDIR/00-common/D0-multimedia/init.sh b/TESTDIR/00-common/D0-multimedia/init.sh new file mode 100755 index 0000000..00e639a --- /dev/null +++ b/TESTDIR/00-common/D0-multimedia/init.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Copyright (c) 2013 Intel Corporation. All rights reserved. +# Use of this source code is governed by a LGPL v2.1 license that can be +# found in the LICENSE file in the db directory. +# Author : Ewan le Bideau Canevet + +FILE=$1 +chsmack -a _ ../gst.sh +cp $FILE ~guest +chsmack -a _ ~guest/$FILE + diff --git a/TESTDIR/runme.sh b/TESTDIR/runme.sh new file mode 100755 index 0000000..efe7a33 --- /dev/null +++ b/TESTDIR/runme.sh @@ -0,0 +1,34 @@ +#!/bin/bash -x + +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: Ewan Le Bideau-Canevet + +CMD="$@" +tmpscript=$(mktemp) + +trap "rm -rf $tmpscript" INT QUIT TERM STOP EXIT +echo "#!/bin/bash " > $tmpscript +tr '\0' '\n' > $tmpscript +echo export PATH=$QAPATH:\$PATH >> $tmpscript +#echo env >> $tmpscript +echo $CMD >> $tmpscript +chmod 777 $tmpscript +su - guest -c $tmpscript +if [ $? -eq 0 ]; then + exit 0 +else + exit 1 +fi diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 909c52a..0000000 --- a/autogen.sh +++ /dev/null @@ -1,3 +0,0 @@ -autoreconf -i -touch vala.stamp -touch ivi/gst-auto-launch/src/vala.stamp diff --git a/common/TESTDIR/00-common/D0-multimedia/01-lowlevel/QAMETA.json b/common/TESTDIR/00-common/D0-multimedia/01-lowlevel/QAMETA.json deleted file mode 100644 index 65ba483..0000000 --- a/common/TESTDIR/00-common/D0-multimedia/01-lowlevel/QAMETA.json +++ /dev/null @@ -1,54 +0,0 @@ -[ - { - "name": "gst-pulseaudio-plugin", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "The pulseaudio plugin of GStreamer is available", - "description": "Inspect the installed capacities of GStreamer and check that it includes a pulseaudio plugin.", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "", - "exec": "gst-inspect-1.0 pulseaudio", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "", - "service": { - "package": "gstreamer-utils" - }, - "author": "qadmin", - "ctime": "2013-03-20 09:41:13 GMT", - "mtime": "2014-01-31 09:54:24 GMT" - }, - { - "name": "vaapi-installed", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "component for video acceleration are used through va-api", - "description": "use a va-api tool to check that va-api is available", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "", - "exec": "vainfo", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "", - "service": { - "package": "vaapi-tools" - }, - "author": "qadmin", - "ctime": "2014-01-31 09:54:05 GMT", - "mtime": "2014-01-31 11:29:37 GMT" - } -] \ No newline at end of file diff --git a/common/TESTDIR/00-common/D0-multimedia/02-audio/QAMETA.json b/common/TESTDIR/00-common/D0-multimedia/02-audio/QAMETA.json deleted file mode 100644 index eb2ef72..0000000 --- a/common/TESTDIR/00-common/D0-multimedia/02-audio/QAMETA.json +++ /dev/null @@ -1,122 +0,0 @@ -[ - { - "name": "wav-test", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "test wav sample with gst-launch", - "description": "check if gst-launch is able to play a wav sound", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "init.sh cigale.wav", - "exec": "runme.sh gst.sh cigale.wav", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "post.sh cigale.wav", - "service": {}, - "author": "qadmin", - "ctime": "2014-01-31 09:54:05 GMT", - "mtime": "2014-05-22 08:23:11 GMT" - }, - { - "name": "ogg-test", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "test ogg sample with gst-launch", - "description": "check if gst-launch is able to play an ogg sound", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "init.sh cigale.ogg", - "exec": "runme.sh gst.sh cigale.ogg", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "post.sh cigale.ogg", - "service": {}, - "author": "qadmin", - "ctime": "2014-01-31 11:31:47 GMT", - "mtime": "2014-05-22 08:23:24 GMT" - }, - { - "name": "aac-test", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "test aac sample with gst-launch", - "description": "check if gst-launch is able to play an aac sound", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "init.sh cigale.aac", - "exec": "runme.sh gst.sh cigale.aac", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "post.sh cigale.aac", - "service": {}, - "author": "qadmin", - "ctime": "2014-01-31 11:32:30 GMT", - "mtime": "2014-05-22 08:23:34 GMT" - }, - { - "name": "flac-test", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "test flac sample with gst-launch", - "description": "check if gst-launch is able to play a flac sound", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "init.sh cigale.flac", - "exec": "runme.sh gst.sh cigale.flac", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "post.sh cigale.flac", - "service": {}, - "author": "qadmin", - "ctime": "2014-01-31 11:33:15 GMT", - "mtime": "2014-05-22 08:23:44 GMT" - }, - { - "name": "mp3-test", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "test mp3 sample with gst-launch", - "description": "check if gst-launch is able to play a mp3 sound", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "init.sh cigale.mp3", - "exec": "runme.sh gst.sh cigale.mp3", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "post.sh cigale.mp3", - "service": {}, - "author": "qadmin", - "ctime": "2014-01-31 11:34:00 GMT", - "mtime": "2014-05-22 08:23:54 GMT" - } -] diff --git a/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.aac b/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.aac deleted file mode 100644 index 744714a..0000000 Binary files a/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.aac and /dev/null differ diff --git a/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.flac b/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.flac deleted file mode 100644 index 2392639..0000000 Binary files a/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.flac and /dev/null differ diff --git a/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.mp3 b/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.mp3 deleted file mode 100644 index 013a238..0000000 Binary files a/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.mp3 and /dev/null differ diff --git a/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.ogg b/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.ogg deleted file mode 100644 index 31cf2a6..0000000 Binary files a/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.ogg and /dev/null differ diff --git a/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.wav b/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.wav deleted file mode 100644 index 57331b5..0000000 Binary files a/common/TESTDIR/00-common/D0-multimedia/02-audio/cigale.wav and /dev/null differ diff --git a/common/TESTDIR/00-common/D0-multimedia/03-video/QAMETA.json b/common/TESTDIR/00-common/D0-multimedia/03-video/QAMETA.json deleted file mode 100644 index 676ca82..0000000 --- a/common/TESTDIR/00-common/D0-multimedia/03-video/QAMETA.json +++ /dev/null @@ -1,98 +0,0 @@ -[ - { - "name": "avi-test", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "test avi sample with gst-launch", - "description": "check if gst-launch is able to play a avi movie - Video format : MPEG-4, Audio format : MPEG", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "init.sh short-big_buck_bunny_1080p.avi", - "exec": "runme.sh gst.sh short-big_buck_bunny_1080p.avi", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "post.sh short-big_buck_bunny_1080p.avi", - "service": {}, - "author": "qadmin", - "ctime": "2014-01-31 11:33:56 GMT", - "mtime": "2014-05-22 08:24:27 GMT" - }, - { - "name": "flv-test", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "test flv sample with gst-launch", - "description": "check if gst-launch is able to play a flv movie - Video format : Sorenson Spark, ADPCM : MPEG", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "init.sh short-big_buck_bunny_1080p.flv", - "exec": "runme.sh gst.sh short-big_buck_bunny_1080p.flv", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "post.sh short-big_buck_bunny_1080p.flv", - "service": {}, - "author": "qadmin", - "ctime": "2014-01-31 12:00:42 GMT", - "mtime": "2014-05-22 08:24:37 GMT" - }, - { - "name": "mov-test", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "test mov sample with gst-launch", - "description": "check if gst-launch is able to play a mov movie - Video format : AVC, Audio format : AAC", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "init.sh short-big_buck_bunny_1080p.mov", - "exec": "runme.sh gst.sh short-big_buck_bunny_1080p.mov", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "post.sh short-big_buck_bunny_1080p.mov", - "service": {}, - "author": "qadmin", - "ctime": "2014-01-31 12:01:19 GMT", - "mtime": "2014-05-22 08:24:49 GMT" - }, - { - "name": "ogg-test", - "exec_type": "auto", - "priority": "1", - "status": "designed", - "type": "functional_positive", - "subtype": "", - "objective": "test ogg sample with gst-launch", - "description": "check if gst-launch is able to play a ogg movie - Video format : Theora, Audio format : Vorbis", - "pre_condition": "", - "steps": [], - "post_condition": "", - "notes": "", - "bugs": "", - "exec_pre": "init.sh short-big_buck_bunny_1080p.ogg", - "exec": "runme.sh gst.sh short-big_buck_bunny_1080p.ogg", - "exec_expected_retcode": "0", - "exec_kill_timeout": "120", - "exec_post": "post.sh short-big_buck_bunny_1080p.ogg", - "service": {}, - "author": "qadmin", - "ctime": "2014-01-31 12:01:59 GMT", - "mtime": "2014-05-22 08:24:56 GMT" - } -] diff --git a/common/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.avi b/common/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.avi deleted file mode 100644 index d936961..0000000 Binary files a/common/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.avi and /dev/null differ diff --git a/common/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.flv b/common/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.flv deleted file mode 100644 index 73624f3..0000000 Binary files a/common/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.flv and /dev/null differ diff --git a/common/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.mov b/common/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.mov deleted file mode 100644 index a1ecc60..0000000 Binary files a/common/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.mov and /dev/null differ diff --git a/common/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.ogg b/common/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.ogg deleted file mode 100644 index 6520f76..0000000 Binary files a/common/TESTDIR/00-common/D0-multimedia/03-video/short-big_buck_bunny_1080p.ogg and /dev/null differ diff --git a/common/TESTDIR/00-common/D0-multimedia/gst.sh b/common/TESTDIR/00-common/D0-multimedia/gst.sh deleted file mode 100755 index b7b8c38..0000000 --- a/common/TESTDIR/00-common/D0-multimedia/gst.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -x - -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: Ewan Le Bideau-Canevet - -FILE=$1 -UNWANTED="No decoder available" -COMMAND="gst-play-1.0 /$HOME/$FILE" - -tmplog=$(mktemp --tmpdir=/tmp multimedia-XXXXXX.log) -trap "rm -f $tmplog" STOP INT QUIT EXIT -echo $COMMAND -$COMMAND &>$tmplog & -pid=$! -(sleep 5; [ -e /proc/$pid ] && kill $pid;) & -while [ -e /proc/$pid ]; do - sleep 1 - if grep "$UNWANTED" $tmplog ; then - kill $pid - sleep 1 - [ -e /proc/$pid ] && kill -9 $pid - exit 1 - fi -done -exit 0 diff --git a/common/TESTDIR/00-common/D0-multimedia/init.sh b/common/TESTDIR/00-common/D0-multimedia/init.sh deleted file mode 100755 index 00e639a..0000000 --- a/common/TESTDIR/00-common/D0-multimedia/init.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2013 Intel Corporation. All rights reserved. -# Use of this source code is governed by a LGPL v2.1 license that can be -# found in the LICENSE file in the db directory. -# Author : Ewan le Bideau Canevet - -FILE=$1 -chsmack -a _ ../gst.sh -cp $FILE ~guest -chsmack -a _ ~guest/$FILE - diff --git a/common/TESTDIR/runme.sh b/common/TESTDIR/runme.sh deleted file mode 100755 index efe7a33..0000000 --- a/common/TESTDIR/runme.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -x - -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: Ewan Le Bideau-Canevet - -CMD="$@" -tmpscript=$(mktemp) - -trap "rm -rf $tmpscript" INT QUIT TERM STOP EXIT -echo "#!/bin/bash " > $tmpscript -tr '\0' '\n' > $tmpscript -echo export PATH=$QAPATH:\$PATH >> $tmpscript -#echo env >> $tmpscript -echo $CMD >> $tmpscript -chmod 777 $tmpscript -su - guest -c $tmpscript -if [ $? -eq 0 ]; then - exit 0 -else - exit 1 -fi diff --git a/common/runtest.sh b/common/runtest.sh deleted file mode 100644 index 1a58e6f..0000000 --- a/common/runtest.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: Nicolas Zingilé - -set -e -resdir=/tmp -resfile=$resdir/testkit.result.xml - -echo '## execution script: preparing environment' -rm -rf $resdir/*.result.xml - -timeout 10800 testkit-lite -f /usr/share/tests/common-multimedia-suite/testkit.xml --comm localhost -o $resfile - -echo '## execution script: finished' \ No newline at end of file diff --git a/common/testkit.xml b/common/testkit.xml deleted file mode 100644 index fc15066..0000000 --- a/common/testkit.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/configure.ac b/configure.ac deleted file mode 100755 index d1f7c36..0000000 --- a/configure.ac +++ /dev/null @@ -1,29 +0,0 @@ -AC_INIT([gst-auto-launch], [0.3.21], [tigrux@gmail.com], [gst-auto-launch]) -AC_CONFIG_SRCDIR([Makefile.am]) -AC_CONFIG_HEADERS(config.h) -AM_INIT_AUTOMAKE([foreign]) - -AC_PROG_CC -#AC_PROG_LIBTOOL -#AC_DISABLE_STATIC - -AC_PATH_PROG(VALAC, valac, valac) -AC_SUBST(VALAC) - -AC_SUBST(CFLAGS) -AC_SUBST(CPPFLAGS) -AC_SUBST(LDFLAGS) - -VALAFLAGS="--pkg gstreamer-1.0 --pkg gstreamer-base-1.0 --pkg posix" -AC_SUBST(VALAFLAGS) - -PKG_CHECK_MODULES(PROGRAM, gstreamer-1.0 gstreamer-base-1.0 gthread-2.0) -AC_SUBST(PROGRAM_CFLAGS) -AC_SUBST(PROGRAM_LIBS) - -AC_CONFIG_FILES([ - Makefile - ivi/gst-auto-launch/src/Makefile - ]) - -AC_OUTPUT diff --git a/ivi/gst-auto-launch/AUTHORS b/ivi/gst-auto-launch/AUTHORS deleted file mode 100755 index ad42a18..0000000 --- a/ivi/gst-auto-launch/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -- Sandino Flores - - diff --git a/ivi/gst-auto-launch/README b/ivi/gst-auto-launch/README deleted file mode 100755 index 057413a..0000000 --- a/ivi/gst-auto-launch/README +++ /dev/null @@ -1,49 +0,0 @@ -====== Source ====== - -This code is from https://github.com/tigrux/gst-auto-launch -with version 0.3.21-0-g9f6f92a on Nov 18, 2011 - - -====== Build ====== - -One shall build this package under normal user. -./autogen.sh -./configure --prefix=/usr -make - -Or build rpm package in an rpmbuild environment. -./pack.sh - - -====== Usage ====== - -gst-auto-launch is an improved version of gst-launch that accepts commands. - -Usage: ./gst-auto-launch -Where each command is of the form : - -Supported commands are: - pause: - Change pipeline state to PAUSED - seek: - Seek to the specified time - null: - Change pipeline state to NULL - stop: - Change pipeline state to READY - eos: - Send eos to the source elements - set: - Set properties of an object - quit: - Quit the event loop - ready: - Change pipeline state to READY - play: - Change pipeline state to PLAYING - navigation: - Send the specified navigation event name to an element in the given coords - -Example: -gst-auto-launch videotestsrc ! autovideosink 0:pause 1:play +5:eos -gst-auto-launch videotestsrc ! clockoverlay name=clock ! autovideosink 0:play 2:set:clock:valignment:bottom 5:eos diff --git a/ivi/gst-auto-launch/src/Makefile.am b/ivi/gst-auto-launch/src/Makefile.am deleted file mode 100755 index f0c23c0..0000000 --- a/ivi/gst-auto-launch/src/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -AM_CPPFLAGS = $(PROGRAM_CFLAGS) - -BUILT_SOURCES = vala.stamp - -bin_PROGRAMS = gst-auto-launch - -gst_auto_launch_VALASOURCES = \ - auto-pipeline.vala \ - task-scanner.vala \ - task.vala \ - gst-auto-launch.vala \ - command.vala \ - commands.vala - -gst_auto_launch_SOURCES = \ - $(gst_auto_launch_VALASOURCES:.vala=.c) - -gst_auto_launch_LDADD = \ - $(PROGRAM_LIBS) - -vala.stamp: $(gst_auto_launch_VALASOURCES) - $(VALAC) --thread -C $(VALAFLAGS) $(gst_auto_launch_VALASOURCES) - touch $@ - -bindir=/usr/bin -EXTRA_DIST = $(bin_PROGRAMS) diff --git a/ivi/gst-auto-launch/src/auto-pipeline.c b/ivi/gst-auto-launch/src/auto-pipeline.c deleted file mode 100755 index dd8f2c2..0000000 --- a/ivi/gst-auto-launch/src/auto-pipeline.c +++ /dev/null @@ -1,417 +0,0 @@ -/* auto-pipeline.c generated by valac 0.10.0, the Vala compiler - * generated from auto-pipeline.vala, do not modify */ - - -#include -#include -#include -#include -#include -#include -#include - - -#define TYPE_AUTO_PIPELINE (auto_pipeline_get_type ()) -#define AUTO_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTO_PIPELINE, AutoPipeline)) -#define AUTO_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTO_PIPELINE, AutoPipelineClass)) -#define IS_AUTO_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTO_PIPELINE)) -#define IS_AUTO_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTO_PIPELINE)) -#define AUTO_PIPELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTO_PIPELINE, AutoPipelineClass)) - -typedef struct _AutoPipeline AutoPipeline; -typedef struct _AutoPipelineClass AutoPipelineClass; -typedef struct _AutoPipelinePrivate AutoPipelinePrivate; -#define _fclose0(var) ((var == NULL) ? NULL : (var = (fclose (var), NULL))) -#define _gst_object_unref0(var) ((var == NULL) ? NULL : (var = (gst_object_unref (var), NULL))) -#define _g_free0(var) (var = (g_free (var), NULL)) -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) - -struct _AutoPipeline { - GObject parent_instance; - AutoPipelinePrivate * priv; -}; - -struct _AutoPipelineClass { - GObjectClass parent_class; -}; - -struct _AutoPipelinePrivate { - FILE* log_stream; - gboolean _output_messages_enabled; - gint _return_status; - GstBin* _pipeline; -}; - - -extern AutoPipeline* auto_pipeline; -static gpointer auto_pipeline_parent_class = NULL; - -#define LOG_FILENAME "gst-auto-launch.log" -gint vprintf (const char* format, va_list ap); -gint vfprintf (FILE* stream, const char* format, va_list ap); -GType auto_pipeline_get_type (void) G_GNUC_CONST; -#define AUTO_PIPELINE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_AUTO_PIPELINE, AutoPipelinePrivate)) -enum { - AUTO_PIPELINE_DUMMY_PROPERTY, - AUTO_PIPELINE_RETURN_STATUS, - AUTO_PIPELINE_OUTPUT_MESSAGES_ENABLED, - AUTO_PIPELINE_PIPELINE -}; -void auto_pipeline_log (AutoPipeline* self, const char* format, ...); -static void auto_pipeline_on_bus_message (AutoPipeline* self, GstMessage* message); -static gboolean _lambda0_ (GQuark q, GValue* v, AutoPipeline* self); -static gboolean __lambda0__gst_structure_foreach_func (GQuark field_id, GValue* value, gpointer self); -void auto_pipeline_set_return_status (AutoPipeline* self, gint value); -GstBin* auto_pipeline_get_pipeline (AutoPipeline* self); -gboolean auto_pipeline_set_state (AutoPipeline* self, GstState state); -GstElement* auto_pipeline_get_by_name (AutoPipeline* self, const char* name); -gboolean auto_pipeline_send_eos (AutoPipeline* self); -AutoPipeline* auto_pipeline_new (void); -AutoPipeline* auto_pipeline_construct (GType object_type); -gint auto_pipeline_get_return_status (AutoPipeline* self); -gboolean auto_pipeline_get_output_messages_enabled (AutoPipeline* self); -void auto_pipeline_set_output_messages_enabled (AutoPipeline* self, gboolean value); -void auto_pipeline_set_pipeline (AutoPipeline* self, GstBin* value); -static void _auto_pipeline_on_bus_message_gst_bus_message (GstBus* _sender, GstMessage* message, gpointer self); -static void auto_pipeline_finalize (GObject* obj); -static void auto_pipeline_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void auto_pipeline_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -static int _vala_strcmp0 (const char * str1, const char * str2); - - - -void auto_pipeline_log (AutoPipeline* self, const char* format, ...) { - va_list args_vl; - g_return_if_fail (self != NULL); - g_return_if_fail (format != NULL); - va_start (args_vl, format); - if (self->priv->log_stream != NULL) { - vfprintf (self->priv->log_stream, format, args_vl); - } - vprintf (format, args_vl); - va_end (args_vl); -} - - -static gpointer _gst_object_ref0 (gpointer self) { - return self ? gst_object_ref (self) : NULL; -} - - -static gboolean _lambda0_ (GQuark q, GValue* v, AutoPipeline* self) { - gboolean result = FALSE; - GValue _tmp0_ = {0}; - GValue vs; - vs = (g_value_init (&_tmp0_, G_TYPE_STRING), g_value_set_string (&_tmp0_, ""), _tmp0_); - g_value_transform (v, &vs); - auto_pipeline_log (self, " '%s' : '''%s''',\n", g_quark_to_string (q), g_value_get_string (&vs), NULL); - result = TRUE; - G_IS_VALUE (&vs) ? (g_value_unset (&vs), NULL) : NULL; - return result; -} - - -static gboolean __lambda0__gst_structure_foreach_func (GQuark field_id, GValue* value, gpointer self) { - gboolean result; - result = _lambda0_ (field_id, value, self); - return result; -} - - -static void auto_pipeline_on_bus_message (AutoPipeline* self, GstMessage* message) { - g_return_if_fail (self != NULL); - g_return_if_fail (message != NULL); - if (self->priv->_output_messages_enabled) { - guint32 seqnum; - GstObject* src; - const GstStructure* s; - char* src_name; - GTimeVal tv = {0}; - seqnum = gst_message_get_seqnum (message); - src = message->src; - s = gst_message_get_structure (message); - src_name = NULL; - if (GST_IS_ELEMENT (src)) { - char* _tmp0_; - src_name = (_tmp0_ = g_strdup (gst_object_get_name (src)), _g_free0 (src_name), _tmp0_); - } else { - if (GST_IS_PAD (src)) { - GstPad* pad; - char* pad_name; - GstElement* _tmp1_; - char* _tmp2_; - char* parent_name; - char* _tmp3_; - pad = _gst_object_ref0 (GST_PAD (src)); - pad_name = g_strdup (gst_object_get_name ((GstObject*) pad)); - parent_name = (_tmp2_ = g_strdup (gst_object_get_name ((GstObject*) (_tmp1_ = gst_pad_get_parent_element (pad)))), _gst_object_unref0 (_tmp1_), _tmp2_); - src_name = (_tmp3_ = g_strdup_printf ("%s:%s", parent_name, pad_name), _g_free0 (src_name), _tmp3_); - _g_free0 (parent_name); - _g_free0 (pad_name); - _gst_object_unref0 (pad); - } else { - if (GST_IS_OBJECT (src)) { - char* _tmp4_; - src_name = (_tmp4_ = g_strdup (gst_object_get_name (src)), _g_free0 (src_name), _tmp4_); - } - } - } - auto_pipeline_log (self, " {\n", NULL); - auto_pipeline_log (self, " 'seqnum' : %u,\n", seqnum, NULL); - auto_pipeline_log (self, " 'type' : '%s',\n", gst_message_type_get_name (message->type), NULL); - g_get_current_time (&tv); - auto_pipeline_log (self, " 'time' : %lu.%06lu,\n", tv.tv_sec, tv.tv_usec, NULL); - if (src_name != NULL) { - auto_pipeline_log (self, " 'src' : '%s',\n", src_name, NULL); - } - if (s != NULL) { - auto_pipeline_log (self, " 'structure' : {\n", NULL); - auto_pipeline_log (self, " 'name' : '%s',\n", gst_structure_get_name (s), NULL); - gst_structure_foreach (s, __lambda0__gst_structure_foreach_func, self); - auto_pipeline_log (self, " }\n", NULL); - } - auto_pipeline_log (self, " },\n", NULL); - _g_free0 (src_name); - } - switch (message->type) { - case GST_MESSAGE_ERROR: - { - { - GError* e; - char* s; - GError* _tmp5_ = NULL; - GError* _tmp6_; - char* _tmp7_ = NULL; - char* _tmp8_; - e = NULL; - s = NULL; - (gst_message_parse_error (message, &_tmp5_, &_tmp7_), e = (_tmp6_ = _tmp5_, _g_error_free0 (e), _tmp6_)); - s = (_tmp8_ = _tmp7_, _g_free0 (s), _tmp8_); - g_critical ("auto-pipeline.vala:100: Bus error: %s %s\n", e->message, s); - auto_pipeline_set_return_status (self, 1); - g_signal_emit_by_name (self, "quit"); - _g_free0 (s); - _g_error_free0 (e); - break; - } - } - case GST_MESSAGE_EOS: - { - { - gst_element_set_state ((GstElement*) auto_pipeline_get_pipeline (self), GST_STATE_NULL); - g_signal_emit_by_name (self, "quit"); - break; - } - } - default: - { - break; - } - } -} - - -gboolean auto_pipeline_set_state (AutoPipeline* self, GstState state) { - gboolean result = FALSE; - g_return_val_if_fail (self != NULL, FALSE); - result = gst_element_set_state ((GstElement*) auto_pipeline_get_pipeline (self), state) != GST_STATE_CHANGE_FAILURE; - return result; -} - - -GstElement* auto_pipeline_get_by_name (AutoPipeline* self, const char* name) { - GstElement* result = NULL; - char* _tmp0_; - gboolean _tmp1_; - g_return_val_if_fail (self != NULL, NULL); - g_return_val_if_fail (name != NULL, NULL); - if ((_tmp1_ = _vala_strcmp0 (_tmp0_ = gst_object_get_name ((GstObject*) auto_pipeline_get_pipeline (self)), name) == 0, _g_free0 (_tmp0_), _tmp1_)) { - result = _gst_object_ref0 ((GstElement*) auto_pipeline_get_pipeline (self)); - return result; - } else { - result = gst_bin_get_by_name (auto_pipeline_get_pipeline (self), name); - return result; - } -} - - -gboolean auto_pipeline_send_eos (AutoPipeline* self) { - gboolean result = FALSE; - g_return_val_if_fail (self != NULL, FALSE); - g_print ("Sending EOS to the pipeline\n"); - result = gst_element_send_event ((GstElement*) auto_pipeline_get_pipeline (auto_pipeline), gst_event_new_eos ()); - return result; -} - - -AutoPipeline* auto_pipeline_construct (GType object_type) { - AutoPipeline * self; - self = (AutoPipeline*) g_object_new (object_type, NULL); - return self; -} - - -AutoPipeline* auto_pipeline_new (void) { - return auto_pipeline_construct (TYPE_AUTO_PIPELINE); -} - - -gint auto_pipeline_get_return_status (AutoPipeline* self) { - gint result; - g_return_val_if_fail (self != NULL, 0); - result = self->priv->_return_status; - return result; -} - - -void auto_pipeline_set_return_status (AutoPipeline* self, gint value) { - g_return_if_fail (self != NULL); - self->priv->_return_status = value; - g_object_notify ((GObject *) self, "return-status"); -} - - -gboolean auto_pipeline_get_output_messages_enabled (AutoPipeline* self) { - gboolean result; - g_return_val_if_fail (self != NULL, FALSE); - result = self->priv->_output_messages_enabled; - return result; -} - - -void auto_pipeline_set_output_messages_enabled (AutoPipeline* self, gboolean value) { - gboolean _tmp0_ = FALSE; - g_return_if_fail (self != NULL); - if (!self->priv->_output_messages_enabled) { - _tmp0_ = value; - } else { - _tmp0_ = FALSE; - } - if (_tmp0_) { - FILE* _tmp1_; - self->priv->log_stream = (_tmp1_ = fopen (LOG_FILENAME, "w"), _fclose0 (self->priv->log_stream), _tmp1_); - } - self->priv->_output_messages_enabled = value; - g_object_notify ((GObject *) self, "output-messages-enabled"); -} - - -GstBin* auto_pipeline_get_pipeline (AutoPipeline* self) { - GstBin* result; - g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_pipeline; - return result; -} - - -static void _auto_pipeline_on_bus_message_gst_bus_message (GstBus* _sender, GstMessage* message, gpointer self) { - auto_pipeline_on_bus_message (self, message); -} - - -void auto_pipeline_set_pipeline (AutoPipeline* self, GstBin* value) { - GstBin* _tmp0_; - GstBus* bus; - g_return_if_fail (self != NULL); - self->priv->_pipeline = (_tmp0_ = _gst_object_ref0 (value), _gst_object_unref0 (self->priv->_pipeline), _tmp0_); - bus = _gst_object_ref0 (((GstElement*) self->priv->_pipeline)->bus); - gst_bus_add_signal_watch (bus); - g_signal_connect_object (bus, "message", (GCallback) _auto_pipeline_on_bus_message_gst_bus_message, self, 0); - _gst_object_unref0 (bus); - g_object_notify ((GObject *) self, "pipeline"); -} - - -static void auto_pipeline_class_init (AutoPipelineClass * klass) { - auto_pipeline_parent_class = g_type_class_peek_parent (klass); - g_type_class_add_private (klass, sizeof (AutoPipelinePrivate)); - G_OBJECT_CLASS (klass)->get_property = auto_pipeline_get_property; - G_OBJECT_CLASS (klass)->set_property = auto_pipeline_set_property; - G_OBJECT_CLASS (klass)->finalize = auto_pipeline_finalize; - g_object_class_install_property (G_OBJECT_CLASS (klass), AUTO_PIPELINE_RETURN_STATUS, g_param_spec_int ("return-status", "return-status", "return-status", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); - g_object_class_install_property (G_OBJECT_CLASS (klass), AUTO_PIPELINE_OUTPUT_MESSAGES_ENABLED, g_param_spec_boolean ("output-messages-enabled", "output-messages-enabled", "output-messages-enabled", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); - g_object_class_install_property (G_OBJECT_CLASS (klass), AUTO_PIPELINE_PIPELINE, g_param_spec_object ("pipeline", "pipeline", "pipeline", GST_TYPE_BIN, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); - g_signal_new ("quit", TYPE_AUTO_PIPELINE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -} - - -static void auto_pipeline_instance_init (AutoPipeline * self) { - self->priv = AUTO_PIPELINE_GET_PRIVATE (self); - self->priv->_return_status = 0; -} - - -static void auto_pipeline_finalize (GObject* obj) { - AutoPipeline * self; - self = AUTO_PIPELINE (obj); - _fclose0 (self->priv->log_stream); - _gst_object_unref0 (self->priv->_pipeline); - G_OBJECT_CLASS (auto_pipeline_parent_class)->finalize (obj); -} - - -GType auto_pipeline_get_type (void) { - static volatile gsize auto_pipeline_type_id__volatile = 0; - if (g_once_init_enter (&auto_pipeline_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (AutoPipelineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) auto_pipeline_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AutoPipeline), 0, (GInstanceInitFunc) auto_pipeline_instance_init, NULL }; - GType auto_pipeline_type_id; - auto_pipeline_type_id = g_type_register_static (G_TYPE_OBJECT, "AutoPipeline", &g_define_type_info, 0); - g_once_init_leave (&auto_pipeline_type_id__volatile, auto_pipeline_type_id); - } - return auto_pipeline_type_id__volatile; -} - - -static void auto_pipeline_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { - AutoPipeline * self; - self = AUTO_PIPELINE (object); - switch (property_id) { - case AUTO_PIPELINE_RETURN_STATUS: - g_value_set_int (value, auto_pipeline_get_return_status (self)); - break; - case AUTO_PIPELINE_OUTPUT_MESSAGES_ENABLED: - g_value_set_boolean (value, auto_pipeline_get_output_messages_enabled (self)); - break; - case AUTO_PIPELINE_PIPELINE: - g_value_set_object (value, auto_pipeline_get_pipeline (self)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - - -static void auto_pipeline_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { - AutoPipeline * self; - self = AUTO_PIPELINE (object); - switch (property_id) { - case AUTO_PIPELINE_RETURN_STATUS: - auto_pipeline_set_return_status (self, g_value_get_int (value)); - break; - case AUTO_PIPELINE_OUTPUT_MESSAGES_ENABLED: - auto_pipeline_set_output_messages_enabled (self, g_value_get_boolean (value)); - break; - case AUTO_PIPELINE_PIPELINE: - auto_pipeline_set_pipeline (self, g_value_get_object (value)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - - -static int _vala_strcmp0 (const char * str1, const char * str2) { - if (str1 == NULL) { - return -(str1 != str2); - } - if (str2 == NULL) { - return str1 != str2; - } - return strcmp (str1, str2); -} - - - - diff --git a/ivi/gst-auto-launch/src/auto-pipeline.vala b/ivi/gst-auto-launch/src/auto-pipeline.vala deleted file mode 100755 index 32d732f..0000000 --- a/ivi/gst-auto-launch/src/auto-pipeline.vala +++ /dev/null @@ -1,136 +0,0 @@ -const string LOG_FILENAME = "gst-auto-launch.log"; - -[PrintfFormat] -extern int vprintf(string format, va_list ap); - -[PrintfFormat] -extern int vfprintf(FileStream stream, string format, va_list ap); - - -class AutoPipeline: Object { - - public signal void quit(); - - FileStream log_stream; - - bool _output_messages_enabled; - public int return_status {get; set; default = 0;} - - public bool output_messages_enabled { - set { - if(!_output_messages_enabled && value) - log_stream = FileStream.open(LOG_FILENAME, "w"); - _output_messages_enabled = value; - } - get { - return _output_messages_enabled; - } - } - - public void log(string format, ...) { - va_list args_vl = va_list(); - if(log_stream != null) - vfprintf(log_stream, format, args_vl); - vprintf(format, args_vl); - } - - - Gst.Bin _pipeline; - - public Gst.Bin pipeline { - get { - return _pipeline; - } - - set { - _pipeline = value; - Gst.Bus bus = _pipeline.bus; - bus.add_signal_watch(); - bus.message.connect(on_bus_message); - } - } - - - void on_bus_message(Gst.Message message) { - if(_output_messages_enabled) { - uint32 seqnum = message.get_seqnum(); - unowned Gst.Object src = message.src; - unowned Gst.Structure s = message.get_structure(); - string src_name = null; - - if(src is Gst.Element) - src_name = src.name; - else if(src is Gst.Pad) { - Gst.Pad pad = (Gst.Pad)src; - string pad_name = pad.name; - string parent_name = pad.get_parent_element().name; - src_name = "%s:%s".printf(parent_name, pad_name); - } - else if(src is Gst.Object) - src_name = src.name; - - log(" {\n"); - log(" 'seqnum' : %u,\n", seqnum); - log(" 'type' : '%s',\n", message.type.to_string()); - TimeVal tv = TimeVal(); - log(" 'time' : %lu.%06lu,\n", tv.tv_sec, tv.tv_usec); - if(src_name != null) - log(" 'src' : '%s',\n", src_name); - if(s != null) { - log(" 'structure' : {\n"); - log(" 'name' : '%s',\n", s.get_name()); - s.foreach( - (q, v) => { - Value vs = ""; - v.transform(ref vs); - log(" '%s' : '''%s''',\n", q.to_string(), vs.get_string()); - return true; - }); - log(" }\n"); - } - log(" },\n"); - - } - - switch(message.type) { - case Gst.MessageType.ERROR: { - Error e; - string s; - message.parse_error(out e, out s); - critical("Bus error: %s %s\n", e.message, s); - return_status = 1; - quit(); - break; - } - case Gst.MessageType.EOS: { - pipeline.set_state(Gst.State.NULL); - quit(); - break; - } - default: - break; - } - } - - - public bool set_state(Gst.State state) { - return pipeline.set_state(state) != Gst.StateChangeReturn.FAILURE; - } - - - public Gst.Element? get_by_name(string name) { - if(pipeline.get_name() == name) - return pipeline; - else - return pipeline.get_by_name(name); - } - - - public bool send_eos() { - print("Sending EOS to the pipeline\n"); - return auto_pipeline.pipeline.send_event(new Gst.Event.eos()); - - return true; - } -} - diff --git a/ivi/gst-auto-launch/src/command.c b/ivi/gst-auto-launch/src/command.c deleted file mode 100755 index 56ffd96..0000000 --- a/ivi/gst-auto-launch/src/command.c +++ /dev/null @@ -1,124 +0,0 @@ -/* command.c generated by valac 0.10.0, the Vala compiler - * generated from command.vala, do not modify */ - - -#include -#include -#include -#include - - -#define TYPE_AUTO_PIPELINE (auto_pipeline_get_type ()) -#define AUTO_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTO_PIPELINE, AutoPipeline)) -#define AUTO_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTO_PIPELINE, AutoPipelineClass)) -#define IS_AUTO_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTO_PIPELINE)) -#define IS_AUTO_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTO_PIPELINE)) -#define AUTO_PIPELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTO_PIPELINE, AutoPipelineClass)) - -typedef struct _AutoPipeline AutoPipeline; -typedef struct _AutoPipelineClass AutoPipelineClass; - -#define TYPE_TASK (task_get_type ()) -#define TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TASK, Task)) -#define TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TASK, TaskClass)) -#define IS_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TASK)) -#define IS_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TASK)) -#define TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TASK, TaskClass)) - -typedef struct _Task Task; -typedef struct _TaskClass TaskClass; - -#define TYPE_COMMAND (command_get_type ()) -typedef struct _Command Command; -#define _g_free0(var) (var = (g_free (var), NULL)) - -typedef gint (*CommandFunc) (AutoPipeline* auto_pipeline, Task* task); -struct _Command { - char* name; - char* description; - char* args_desc; - CommandFunc function; -}; - - - -GType auto_pipeline_get_type (void) G_GNUC_CONST; -GType task_get_type (void) G_GNUC_CONST; -GType command_get_type (void) G_GNUC_CONST; -Command* command_dup (const Command* self); -void command_free (Command* self); -void command_copy (const Command* self, Command* dest); -void command_destroy (Command* self); -gchar command_get_arg_desc (Command *self, guint arg_i); -guint command_get_n_args (Command *self); - - - -static glong string_get_length (const char* self) { - glong result; - g_return_val_if_fail (self != NULL, 0L); - result = g_utf8_strlen (self, (gssize) (-1)); - return result; -} - - -gchar command_get_arg_desc (Command *self, guint arg_i) { - gchar result = '\0'; - if (arg_i >= string_get_length ((*self).args_desc)) { - result = (gchar) 0; - return result; - } - result = (gchar) g_utf8_get_char (g_utf8_offset_to_pointer ((*self).args_desc, arg_i)); - return result; -} - - -guint command_get_n_args (Command *self) { - guint result = 0U; - result = (guint) string_get_length ((*self).args_desc); - return result; -} - - -void command_copy (const Command* self, Command* dest) { - dest->name = g_strdup (self->name); - dest->description = g_strdup (self->description); - dest->args_desc = g_strdup (self->args_desc); - dest->function = self->function; -} - - -void command_destroy (Command* self) { - _g_free0 (self->name); - _g_free0 (self->description); - _g_free0 (self->args_desc); -} - - -Command* command_dup (const Command* self) { - Command* dup; - dup = g_new0 (Command, 1); - command_copy (self, dup); - return dup; -} - - -void command_free (Command* self) { - command_destroy (self); - g_free (self); -} - - -GType command_get_type (void) { - static volatile gsize command_type_id__volatile = 0; - if (g_once_init_enter (&command_type_id__volatile)) { - GType command_type_id; - command_type_id = g_boxed_type_register_static ("Command", (GBoxedCopyFunc) command_dup, (GBoxedFreeFunc) command_free); - g_once_init_leave (&command_type_id__volatile, command_type_id); - } - return command_type_id__volatile; -} - - - - diff --git a/ivi/gst-auto-launch/src/command.vala b/ivi/gst-auto-launch/src/command.vala deleted file mode 100755 index 3335a5c..0000000 --- a/ivi/gst-auto-launch/src/command.vala +++ /dev/null @@ -1,21 +0,0 @@ -[CCode (has_target=false)] -delegate int CommandFunc(AutoPipeline auto_pipeline, Task task); - - -struct Command { - string name; - string description; - string args_desc; - CommandFunc function; - - public char get_arg_desc(uint arg_i) { - if(arg_i >= args_desc.length) - return 0; - return (char)args_desc[arg_i]; - } - - public uint get_n_args() { - return (uint)args_desc.length; - } -} - diff --git a/ivi/gst-auto-launch/src/commands.c b/ivi/gst-auto-launch/src/commands.c deleted file mode 100755 index 3643600..0000000 --- a/ivi/gst-auto-launch/src/commands.c +++ /dev/null @@ -1,500 +0,0 @@ -/* commands.c generated by valac 0.10.0, the Vala compiler - * generated from commands.vala, do not modify */ - - -#include -#include -#include -#include -#include -#include -#include - - -#define TYPE_COMMAND (command_get_type ()) - -#define TYPE_AUTO_PIPELINE (auto_pipeline_get_type ()) -#define AUTO_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTO_PIPELINE, AutoPipeline)) -#define AUTO_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTO_PIPELINE, AutoPipelineClass)) -#define IS_AUTO_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTO_PIPELINE)) -#define IS_AUTO_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTO_PIPELINE)) -#define AUTO_PIPELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTO_PIPELINE, AutoPipelineClass)) - -typedef struct _AutoPipeline AutoPipeline; -typedef struct _AutoPipelineClass AutoPipelineClass; - -#define TYPE_TASK (task_get_type ()) -#define TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TASK, Task)) -#define TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TASK, TaskClass)) -#define IS_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TASK)) -#define IS_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TASK)) -#define TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TASK, TaskClass)) - -typedef struct _Task Task; -typedef struct _TaskClass TaskClass; -typedef struct _Command Command; -#define _gst_object_unref0(var) ((var == NULL) ? NULL : (var = (gst_object_unref (var), NULL))) -#define _g_free0(var) (var = (g_free (var), NULL)) -#define _gst_event_unref0(var) ((var == NULL) ? NULL : (var = (gst_event_unref (var), NULL))) - -typedef gint (*CommandFunc) (AutoPipeline* auto_pipeline, Task* task); -struct _Command { - char* name; - char* description; - char* args_desc; - CommandFunc function; -}; - - - -GType command_get_type (void) G_GNUC_CONST; -GType auto_pipeline_get_type (void) G_GNUC_CONST; -GType task_get_type (void) G_GNUC_CONST; -Command* command_dup (const Command* self); -void command_free (Command* self); -void command_copy (const Command* self, Command* dest); -void command_destroy (Command* self); -gint command_play (AutoPipeline* auto_pipeline, Task* task); -static gint _command_play_command_func (AutoPipeline* auto_pipeline, Task* task); -gint command_pause (AutoPipeline* auto_pipeline, Task* task); -static gint _command_pause_command_func (AutoPipeline* auto_pipeline, Task* task); -gint command_ready (AutoPipeline* auto_pipeline, Task* task); -static gint _command_ready_command_func (AutoPipeline* auto_pipeline, Task* task); -gint command_null (AutoPipeline* auto_pipeline, Task* task); -static gint _command_null_command_func (AutoPipeline* auto_pipeline, Task* task); -gint command_eos (AutoPipeline* auto_pipeline, Task* task); -static gint _command_eos_command_func (AutoPipeline* auto_pipeline, Task* task); -gint command_quit (AutoPipeline* auto_pipeline, Task* task); -static gint _command_quit_command_func (AutoPipeline* auto_pipeline, Task* task); -gint command_set (AutoPipeline* auto_pipeline, Task* task); -static gint _command_set_command_func (AutoPipeline* auto_pipeline, Task* task); -gint command_seek (AutoPipeline* auto_pipeline, Task* task); -static gint _command_seek_command_func (AutoPipeline* auto_pipeline, Task* task); -gint command_navigation (AutoPipeline* auto_pipeline, Task* task); -static gint _command_navigation_command_func (AutoPipeline* auto_pipeline, Task* task); -gint command_emit (AutoPipeline* auto_pipeline, Task* task); -static gint _command_emit_command_func (AutoPipeline* auto_pipeline, Task* task); -gboolean auto_pipeline_set_state (AutoPipeline* self, GstState state); -GValueArray* task_get_arguments (Task* self); -GstElement* auto_pipeline_get_by_name (AutoPipeline* self, const char* name); -GstBin* auto_pipeline_get_pipeline (AutoPipeline* self); -gboolean auto_pipeline_send_eos (AutoPipeline* self); -void scanner_register_symbols (GScanner* scanner); -static int _vala_strcmp0 (const char * str1, const char * str2); - -const Command COMMANDS[12] = {{"play", "Change pipeline state to PLAYING", "", _command_play_command_func}, {"pause", "Change pipeline state to PAUSED", "", _command_pause_command_func}, {"ready", "Change pipeline state to READY", "", _command_ready_command_func}, {"stop", "Change pipeline state to READY", "", _command_ready_command_func}, {"null", "Change pipeline state to NULL", "", _command_null_command_func}, {"eos", "Send eos to the source elements", "", _command_eos_command_func}, {"quit", "Quit the event loop", "", _command_quit_command_func}, {"set", "Set properties of an object", "ssv", _command_set_command_func}, {"seek", "Seek to the specified time", "t", _command_seek_command_func}, {"navigation", "Send the specified navigation event name to an element in the given co" \ -"ords", "ssii", _command_navigation_command_func}, {"emit", "Emit a signal to an element", "ss", _command_emit_command_func}, {NULL}}; - - -static gint _command_play_command_func (AutoPipeline* auto_pipeline, Task* task) { - gint result; - result = command_play (auto_pipeline, task); - return result; -} - - -static gint _command_pause_command_func (AutoPipeline* auto_pipeline, Task* task) { - gint result; - result = command_pause (auto_pipeline, task); - return result; -} - - -static gint _command_ready_command_func (AutoPipeline* auto_pipeline, Task* task) { - gint result; - result = command_ready (auto_pipeline, task); - return result; -} - - -static gint _command_null_command_func (AutoPipeline* auto_pipeline, Task* task) { - gint result; - result = command_null (auto_pipeline, task); - return result; -} - - -static gint _command_eos_command_func (AutoPipeline* auto_pipeline, Task* task) { - gint result; - result = command_eos (auto_pipeline, task); - return result; -} - - -static gint _command_quit_command_func (AutoPipeline* auto_pipeline, Task* task) { - gint result; - result = command_quit (auto_pipeline, task); - return result; -} - - -static gint _command_set_command_func (AutoPipeline* auto_pipeline, Task* task) { - gint result; - result = command_set (auto_pipeline, task); - return result; -} - - -static gint _command_seek_command_func (AutoPipeline* auto_pipeline, Task* task) { - gint result; - result = command_seek (auto_pipeline, task); - return result; -} - - -static gint _command_navigation_command_func (AutoPipeline* auto_pipeline, Task* task) { - gint result; - result = command_navigation (auto_pipeline, task); - return result; -} - - -static gint _command_emit_command_func (AutoPipeline* auto_pipeline, Task* task) { - gint result; - result = command_emit (auto_pipeline, task); - return result; -} - - -gint command_play (AutoPipeline* auto_pipeline, Task* task) { - gint result = 0; - gint _tmp0_ = 0; - g_return_val_if_fail (auto_pipeline != NULL, 0); - g_return_val_if_fail (task != NULL, 0); - g_print ("Passing to PLAYING\n"); - if (auto_pipeline_set_state (auto_pipeline, GST_STATE_PLAYING)) { - _tmp0_ = 0; - } else { - _tmp0_ = 1; - } - result = _tmp0_; - return result; -} - - -gint command_pause (AutoPipeline* auto_pipeline, Task* task) { - gint result = 0; - gint _tmp0_ = 0; - g_return_val_if_fail (auto_pipeline != NULL, 0); - g_return_val_if_fail (task != NULL, 0); - g_print ("Passing to PAUSED\n"); - if (auto_pipeline_set_state (auto_pipeline, GST_STATE_PAUSED)) { - _tmp0_ = 0; - } else { - _tmp0_ = 1; - } - result = _tmp0_; - return result; -} - - -gint command_ready (AutoPipeline* auto_pipeline, Task* task) { - gint result = 0; - gint _tmp0_ = 0; - g_return_val_if_fail (auto_pipeline != NULL, 0); - g_return_val_if_fail (task != NULL, 0); - g_print ("Passing to READY\n"); - if (auto_pipeline_set_state (auto_pipeline, GST_STATE_READY)) { - _tmp0_ = 0; - } else { - _tmp0_ = 1; - } - result = _tmp0_; - return result; -} - - -gint command_null (AutoPipeline* auto_pipeline, Task* task) { - gint result = 0; - gint _tmp0_ = 0; - g_return_val_if_fail (auto_pipeline != NULL, 0); - g_return_val_if_fail (task != NULL, 0); - g_print ("Passing to NULL\n"); - if (auto_pipeline_set_state (auto_pipeline, GST_STATE_NULL)) { - _tmp0_ = 0; - } else { - _tmp0_ = 1; - } - result = _tmp0_; - return result; -} - - -gint command_quit (AutoPipeline* auto_pipeline, Task* task) { - gint result = 0; - g_return_val_if_fail (auto_pipeline != NULL, 0); - g_return_val_if_fail (task != NULL, 0); - g_print ("Quitting\n"); - g_signal_emit_by_name (auto_pipeline, "quit"); - result = 0; - return result; -} - - -gint command_set (AutoPipeline* auto_pipeline, Task* task) { - gint result = 0; - GValue _tmp0_; - char* element_name; - GstElement* element; - GValue _tmp1_; - char* prop_name; - GParamSpec* prop_spec; - GType prop_type; - GValue prop_value; - GValue string_value = {0}; - char* value_as_string; - GValue converted_value = {0}; - char* _tmp3_; - g_return_val_if_fail (auto_pipeline != NULL, 0); - g_return_val_if_fail (task != NULL, 0); - element_name = g_strdup (g_value_get_string ((_tmp0_ = task_get_arguments (task)->values[0], &_tmp0_))); - element = auto_pipeline_get_by_name (auto_pipeline, element_name); - if (element == NULL) { - g_printerr ("No element named '%s'\n", element_name); - result = 1; - _gst_object_unref0 (element); - _g_free0 (element_name); - return result; - } - prop_name = g_strdup (g_value_get_string ((_tmp1_ = task_get_arguments (task)->values[1], &_tmp1_))); - prop_spec = g_object_class_find_property (G_OBJECT_GET_CLASS ((GObject*) element), prop_name); - if (prop_spec == NULL) { - g_printerr ("No property '%s' in element '%s'\n", prop_name, element_name); - result = 1; - _g_free0 (prop_name); - _gst_object_unref0 (element); - _g_free0 (element_name); - return result; - } - prop_type = prop_spec->value_type; - prop_value = task_get_arguments (task)->values[2]; - if (G_VALUE_HOLDS (&prop_value, G_TYPE_STRING)) { - char* prop_string; - prop_string = g_strdup (g_value_get_string (&prop_value)); - if (G_TYPE_IS_ENUM (prop_type)) { - GEnumClass* enum_class; - GEnumValue* enum_value; - enum_class = (GEnumClass*) g_type_class_peek (prop_type); - enum_value = g_enum_get_value_by_nick (enum_class, prop_string); - if (enum_value != NULL) { - GValue _tmp2_ = {0}; - prop_value = (g_value_init (&_tmp2_, G_TYPE_INT), g_value_set_int (&_tmp2_, enum_value->value), _tmp2_); - G_IS_VALUE (&_tmp2_) ? (g_value_unset (&_tmp2_), NULL) : NULL; - } else { - g_printerr ("'%s' is not a valid value for enum '%s'\n", prop_string, g_type_name (prop_type)); - result = 1; - _g_free0 (prop_string); - _g_free0 (prop_name); - _gst_object_unref0 (element); - _g_free0 (element_name); - return result; - } - } - _g_free0 (prop_string); - } - g_value_init (&string_value, G_TYPE_STRING); - g_value_transform (&prop_value, &string_value); - value_as_string = g_strdup (g_value_get_string (&string_value)); - g_value_init (&converted_value, prop_type); - if (!g_param_value_convert (prop_spec, &prop_value, &converted_value, TRUE)) { - g_print ("'%s' is not a valid value for property '%s' of type '%s'\n", value_as_string, prop_name, g_type_name (prop_type)); - result = 1; - G_IS_VALUE (&converted_value) ? (g_value_unset (&converted_value), NULL) : NULL; - _g_free0 (value_as_string); - G_IS_VALUE (&string_value) ? (g_value_unset (&string_value), NULL) : NULL; - _g_free0 (prop_name); - _gst_object_unref0 (element); - _g_free0 (element_name); - return result; - } - g_print ("Setting property '%s' of element '%s' to '%s'\n", prop_name, _tmp3_ = gst_object_get_name ((GstObject*) element), value_as_string); - _g_free0 (_tmp3_); - g_object_set_property ((GObject*) element, prop_name, &converted_value); - result = 0; - G_IS_VALUE (&converted_value) ? (g_value_unset (&converted_value), NULL) : NULL; - _g_free0 (value_as_string); - G_IS_VALUE (&string_value) ? (g_value_unset (&string_value), NULL) : NULL; - _g_free0 (prop_name); - _gst_object_unref0 (element); - _g_free0 (element_name); - return result; -} - - -static gpointer _gst_event_ref0 (gpointer self) { - return self ? gst_event_ref (self) : NULL; -} - - -gint command_seek (AutoPipeline* auto_pipeline, Task* task) { - gint result = 0; - GValue position_value = {0}; - GValue _tmp0_; - double position_seconds; - gint64 position_useconds; - GstEvent* seek_event; - gint _tmp1_ = 0; - g_return_val_if_fail (auto_pipeline != NULL, 0); - g_return_val_if_fail (task != NULL, 0); - g_value_init (&position_value, G_TYPE_DOUBLE); - g_value_transform ((_tmp0_ = task_get_arguments (task)->values[0], &_tmp0_), &position_value); - position_seconds = g_value_get_double (&position_value); - position_useconds = (gint64) (position_seconds * GST_SECOND); - seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT, GST_SEEK_TYPE_SET, position_useconds, GST_SEEK_TYPE_NONE, (gint64) 0); - g_print ("Seeking to second %lf\n", position_seconds); - if (gst_element_send_event ((GstElement*) auto_pipeline_get_pipeline (auto_pipeline), _gst_event_ref0 (seek_event))) { - _tmp1_ = 0; - } else { - _tmp1_ = 1; - } - result = _tmp1_; - _gst_event_unref0 (seek_event); - G_IS_VALUE (&position_value) ? (g_value_unset (&position_value), NULL) : NULL; - return result; -} - - -gint command_eos (AutoPipeline* auto_pipeline, Task* task) { - gint result = 0; - gint _tmp0_ = 0; - g_return_val_if_fail (auto_pipeline != NULL, 0); - g_return_val_if_fail (task != NULL, 0); - if (auto_pipeline_send_eos (auto_pipeline)) { - _tmp0_ = 0; - } else { - _tmp0_ = 1; - } - result = _tmp0_; - return result; -} - - -gint command_navigation (AutoPipeline* auto_pipeline, Task* task) { - gint result = 0; - GValue _tmp0_; - char* element_name; - GValue _tmp1_; - char* event_name; - GValue _tmp2_; - gint pointer_x; - GValue _tmp3_; - gint pointer_y; - gint _tmp4_ = 0; - gint button; - GstElement* element; - GstPad* src_pad; - g_return_val_if_fail (auto_pipeline != NULL, 0); - g_return_val_if_fail (task != NULL, 0); - element_name = g_strdup (g_value_get_string ((_tmp0_ = task_get_arguments (task)->values[0], &_tmp0_))); - event_name = g_strdup (g_value_get_string ((_tmp1_ = task_get_arguments (task)->values[1], &_tmp1_))); - pointer_x = g_value_get_int ((_tmp2_ = task_get_arguments (task)->values[2], &_tmp2_)); - pointer_y = g_value_get_int ((_tmp3_ = task_get_arguments (task)->values[3], &_tmp3_)); - if (_vala_strcmp0 (event_name, "mouse-move") != 0) { - _tmp4_ = 1; - } else { - _tmp4_ = 0; - } - button = _tmp4_; - element = auto_pipeline_get_by_name (auto_pipeline, element_name); - if (element == NULL) { - g_printerr ("No element named '%s'\n", element_name); - result = 1; - _gst_object_unref0 (element); - _g_free0 (event_name); - _g_free0 (element_name); - return result; - } - src_pad = gst_element_get_static_pad (element, "src"); - if (src_pad == NULL) { - g_printerr ("No src pad in element %s", element_name); - result = 1; - _gst_object_unref0 (src_pad); - _gst_object_unref0 (element); - _g_free0 (event_name); - _g_free0 (element_name); - return result; - } - gst_pad_send_event (src_pad, gst_event_new_navigation (gst_structure_new ("application/x-gst-navigation", "event", G_TYPE_STRING, event_name, "button", G_TYPE_INT, button, "pointer_x", G_TYPE_DOUBLE, (double) pointer_x, "pointer_y", G_TYPE_DOUBLE, (double) pointer_y, NULL, NULL))); - result = 0; - _gst_object_unref0 (src_pad); - _gst_object_unref0 (element); - _g_free0 (event_name); - _g_free0 (element_name); - return result; -} - - -gint command_emit (AutoPipeline* auto_pipeline, Task* task) { - gint result = 0; - GValue _tmp0_; - char* element_name; - GstElement* element; - GValue _tmp1_; - char* signal_name; - guint signal_id; - g_return_val_if_fail (auto_pipeline != NULL, 0); - g_return_val_if_fail (task != NULL, 0); - element_name = g_strdup (g_value_get_string ((_tmp0_ = task_get_arguments (task)->values[0], &_tmp0_))); - element = auto_pipeline_get_by_name (auto_pipeline, element_name); - if (element == NULL) { - g_printerr ("No element named '%s'\n", element_name); - result = 1; - _gst_object_unref0 (element); - _g_free0 (element_name); - return result; - } - signal_name = g_strdup (g_value_get_string ((_tmp1_ = task_get_arguments (task)->values[1], &_tmp1_))); - signal_id = g_signal_lookup (signal_name, G_TYPE_FROM_CLASS ((GTypeClass*) G_OBJECT_GET_CLASS ((GObject*) element))); - if (signal_id == 0) { - g_printerr ("No signal '%s' in element '%s'\n", signal_name, element_name); - result = 1; - _g_free0 (signal_name); - _gst_object_unref0 (element); - _g_free0 (element_name); - return result; - } - g_signal_emit (element, signal_id, (GQuark) 0, NULL); - result = 0; - _g_free0 (signal_name); - _gst_object_unref0 (element); - _g_free0 (element_name); - return result; -} - - -void scanner_register_symbols (GScanner* scanner) { - g_return_if_fail (scanner != NULL); - { - gint i; - i = 0; - { - gboolean _tmp0_; - _tmp0_ = TRUE; - while (TRUE) { - if (!_tmp0_) { - i++; - } - _tmp0_ = FALSE; - if (!(COMMANDS[i].name != NULL)) { - break; - } - g_scanner_scope_add_symbol (scanner, 0U, COMMANDS[i].name, &COMMANDS[i]); - } - } - } -} - - -static int _vala_strcmp0 (const char * str1, const char * str2) { - if (str1 == NULL) { - return -(str1 != str2); - } - if (str2 == NULL) { - return str1 != str2; - } - return strcmp (str1, str2); -} - - - - diff --git a/ivi/gst-auto-launch/src/commands.vala b/ivi/gst-auto-launch/src/commands.vala deleted file mode 100755 index 8ff1a54..0000000 --- a/ivi/gst-auto-launch/src/commands.vala +++ /dev/null @@ -1,182 +0,0 @@ -const Command[] COMMANDS = { - {"play", "Change pipeline state to PLAYING", "", command_play}, - {"pause", "Change pipeline state to PAUSED", "", command_pause}, - {"ready", "Change pipeline state to READY", "", command_ready}, - {"stop", "Change pipeline state to READY", "", command_ready}, - {"null", "Change pipeline state to NULL", "", command_null}, - {"eos", "Send eos to the source elements", "", command_eos}, - {"quit", "Quit the event loop", "", command_quit}, - {"set", "Set properties of an object", "ssv", command_set}, - {"seek", "Seek to the specified time", "t", command_seek}, - {"navigation", "Send the specified navigation event name to an element in the given coords", "ssii", command_navigation}, - {"emit", "Emit a signal to an element", "ss", command_emit}, - {null} -}; - - -int command_play(AutoPipeline auto_pipeline, Task task) { - print("Passing to PLAYING\n"); - return auto_pipeline.set_state(Gst.State.PLAYING) ? 0 : 1; -} - - -int command_pause(AutoPipeline auto_pipeline, Task task) { - print("Passing to PAUSED\n"); - return auto_pipeline.set_state(Gst.State.PAUSED) ? 0 : 1; -} - - -int command_ready(AutoPipeline auto_pipeline, Task task) { - print("Passing to READY\n"); - return auto_pipeline.set_state(Gst.State.READY) ? 0 : 1; -} - - -int command_null(AutoPipeline auto_pipeline, Task task) { - print("Passing to NULL\n"); - return auto_pipeline.set_state(Gst.State.NULL) ? 0 : 1; -} - - -int command_quit(AutoPipeline auto_pipeline, Task task) { - print("Quitting\n"); - auto_pipeline.quit(); - return 0; -} - - -int command_set(AutoPipeline auto_pipeline, Task task) { - string element_name = task.arguments.values[0].get_string(); - - Gst.Element? element = auto_pipeline.get_by_name(element_name); - if(element == null) { - printerr("No element named '%s'\n", element_name); - return 1; - } - - string prop_name = task.arguments.values[1].get_string(); - weak ParamSpec? prop_spec = element.get_class().find_property(prop_name); - - if(prop_spec == null) { - printerr("No property '%s' in element '%s'\n", prop_name, element_name); - return 1; - } - Type prop_type = prop_spec.value_type; - - weak Value prop_value = task.arguments.values[2]; - if(prop_value.holds(typeof(string))) { - string prop_string = prop_value.get_string(); - if(prop_type.is_enum()) { - weak EnumClass enum_class = (EnumClass)prop_type.class_peek(); - weak EnumValue? enum_value = enum_class.get_value_by_nick(prop_string); - if(enum_value != null) - prop_value = enum_value.value; - else { - printerr("'%s' is not a valid value for enum '%s'\n", - prop_string, prop_type.name()); - return 1; - } - } - } - - Value string_value = Value(typeof(string)); - prop_value.transform(ref string_value); - string value_as_string = string_value.get_string(); - - Value converted_value = Value(prop_type); - - if(!prop_spec.value_convert(prop_value, converted_value, true)) { - print("'%s' is not a valid value for property '%s' of type '%s'\n", - value_as_string, prop_name, prop_type.name()); - return 1; - } - - print("Setting property '%s' of element '%s' to '%s'\n", - prop_name, element.get_name(), value_as_string); - - element.set_property(prop_name, converted_value); - return 0; -} - - -int command_seek(AutoPipeline auto_pipeline, Task task) { - Value position_value = Value(typeof(double)); - task.arguments.values[0].transform(ref position_value); - double position_seconds = position_value.get_double(); - int64 position_useconds = (int64)(position_seconds * Gst.SECOND); - - Gst.Event seek_event = - new Gst.Event.seek( - 1.0, Gst.Format.TIME, - Gst.SeekFlags.FLUSH | Gst.SeekFlags.KEY_UNIT, - Gst.SeekType.SET, position_useconds, - Gst.SeekType.NONE, 0); - - print("Seeking to second %lf\n", position_seconds); - return auto_pipeline.pipeline.send_event(seek_event) ? 0 : 1; -} - - -int command_eos(AutoPipeline auto_pipeline, Task task) { - return auto_pipeline.send_eos() ? 0 : 1; -} - - -int command_navigation(AutoPipeline auto_pipeline, Task task) { - string element_name = task.arguments.values[0].get_string(); - string event_name = task.arguments.values[1].get_string(); - int pointer_x = task.arguments.values[2].get_int(); - int pointer_y = task.arguments.values[3].get_int(); - int button = (event_name != "mouse-move") ? 1 : 0; - - Gst.Element? element = auto_pipeline.get_by_name(element_name); - if(element == null) { - printerr("No element named '%s'\n", element_name); - return 1; - } - - Gst.Pad src_pad = element.get_static_pad("src"); - if(src_pad == null) { - printerr("No src pad in element %s", element_name); - return 1; - } - - src_pad.send_event( - new Gst.Event.navigation( - new Gst.Structure("application/x-gst-navigation", - "event", typeof(string), event_name, - "button", typeof(int), button, - "pointer_x", typeof(double), (double)pointer_x, - "pointer_y", typeof(double), (double)pointer_y, - null))); - return 0; -} - - -int command_emit(AutoPipeline auto_pipeline, Task task) { - string element_name = task.arguments.values[0].get_string(); - - Gst.Element? element = auto_pipeline.get_by_name(element_name); - if(element == null) { - printerr("No element named '%s'\n", element_name); - return 1; - } - - string signal_name = task.arguments.values[1].get_string(); - uint signal_id = Signal.lookup(signal_name, element.get_class().get_type()); - if(signal_id == 0) - { - printerr("No signal '%s' in element '%s'\n", signal_name, element_name); - return 1; - } - - Signal.emit(element, signal_id, 0); - return 0; -} - - -void scanner_register_symbols(Scanner scanner) { - for(int i=0; COMMANDS[i].name != null; i++) - scanner.scope_add_symbol(0U, COMMANDS[i].name, &COMMANDS[i]); -} - diff --git a/ivi/gst-auto-launch/src/gst-auto-launch.c b/ivi/gst-auto-launch/src/gst-auto-launch.c deleted file mode 100755 index fa9ab10..0000000 --- a/ivi/gst-auto-launch/src/gst-auto-launch.c +++ /dev/null @@ -1,501 +0,0 @@ -/* gst-auto-launch.c generated by valac 0.10.0, the Vala compiler - * generated from gst-auto-launch.vala, do not modify */ - - -#include -#include -#include -#include -#include -#include -#include -#include - - -#define TYPE_AUTO_PIPELINE (auto_pipeline_get_type ()) -#define AUTO_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTO_PIPELINE, AutoPipeline)) -#define AUTO_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTO_PIPELINE, AutoPipelineClass)) -#define IS_AUTO_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTO_PIPELINE)) -#define IS_AUTO_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTO_PIPELINE)) -#define AUTO_PIPELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTO_PIPELINE, AutoPipelineClass)) - -typedef struct _AutoPipeline AutoPipeline; -typedef struct _AutoPipelineClass AutoPipelineClass; -#define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL))) -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define TYPE_TASK_SCANNER (task_scanner_get_type ()) -#define TASK_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TASK_SCANNER, TaskScanner)) -#define TASK_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TASK_SCANNER, TaskScannerClass)) -#define IS_TASK_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TASK_SCANNER)) -#define IS_TASK_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TASK_SCANNER)) -#define TASK_SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TASK_SCANNER, TaskScannerClass)) - -typedef struct _TaskScanner TaskScanner; -typedef struct _TaskScannerClass TaskScannerClass; -#define _g_free0(var) (var = (g_free (var), NULL)) - -#define TYPE_TASK (task_get_type ()) -#define TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TASK, Task)) -#define TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TASK, TaskClass)) -#define IS_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TASK)) -#define IS_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TASK)) -#define TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TASK, TaskClass)) - -typedef struct _Task Task; -typedef struct _TaskClass TaskClass; -#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL))) -#define __g_list_free_g_free0(var) ((var == NULL) ? NULL : (var = (_g_list_free_g_free (var), NULL))) -#define __g_list_free_g_object_unref0(var) ((var == NULL) ? NULL : (var = (_g_list_free_g_object_unref (var), NULL))) - -#define TYPE_COMMAND (command_get_type ()) -typedef struct _Command Command; -#define _gst_object_unref0(var) ((var == NULL) ? NULL : (var = (gst_object_unref (var), NULL))) -#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL))) - -typedef gint (*CommandFunc) (AutoPipeline* auto_pipeline, Task* task); -struct _Command { - char* name; - char* description; - char* args_desc; - CommandFunc function; -}; - - -extern gboolean output_messages; -gboolean output_messages = FALSE; -extern gboolean force_eos; -gboolean force_eos = FALSE; -extern guint how_many_control_c_pressed; -guint how_many_control_c_pressed = (guint) 0; -extern AutoPipeline* auto_pipeline; -AutoPipeline* auto_pipeline = NULL; - -GType auto_pipeline_get_type (void) G_GNUC_CONST; -void on_control_c (void); -gboolean auto_pipeline_send_eos (AutoPipeline* self); -gint _vala_main (char** args, int args_length1); -AutoPipeline* auto_pipeline_new (void); -AutoPipeline* auto_pipeline_construct (GType object_type); -static void _on_control_c_sighandler_t (gint signal); -#define LOG_FILENAME "gst-auto-launch.log" -void auto_pipeline_set_output_messages_enabled (AutoPipeline* self, gboolean value); -void auto_pipeline_log (AutoPipeline* self, const char* format, ...); -TaskScanner* task_scanner_new (void); -TaskScanner* task_scanner_construct (GType object_type); -GType task_scanner_get_type (void) G_GNUC_CONST; -void task_scanner_print_description (TaskScanner* self); -GType task_get_type (void) G_GNUC_CONST; -Task* task_scanner_get_task_from_arg (TaskScanner* self, const char* arg); -static void _g_list_free_g_free (GList* self); -static void _g_list_free_g_object_unref (GList* self); -GType command_get_type (void) G_GNUC_CONST; -Command* command_dup (const Command* self); -void command_free (Command* self); -void command_copy (const Command* self, Command* dest); -void command_destroy (Command* self); -Command* task_scanner_lookup_command (TaskScanner* self, const char* command_name); -Task* task_new (double seconds, Command* command); -Task* task_construct (GType object_type, double seconds, Command* command); -void auto_pipeline_set_pipeline (AutoPipeline* self, GstBin* value); -GstBin* auto_pipeline_get_pipeline (AutoPipeline* self); -guint task_exec (Task* self, AutoPipeline* auto_pipeline); -static void _g_main_loop_quit_auto_pipeline_quit (AutoPipeline* _sender, gpointer self); -gint auto_pipeline_get_return_status (AutoPipeline* self); -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); -static gint _vala_array_length (gpointer array); - -const GOptionEntry options[3] = {{"gst-messages", 'm', 0, G_OPTION_ARG_NONE, &output_messages, "Output messages", NULL}, {"eos-on-shutdown", 'e', 0, G_OPTION_ARG_NONE, &force_eos, "Force EOS on sources before shutting the pipeline down", NULL}, {NULL}}; -static GRegex* _tmp9_regex_0 = NULL; - - -void on_control_c (void) { - if (auto_pipeline == NULL) { - return; - } - if (how_many_control_c_pressed == 0) { - auto_pipeline_send_eos (auto_pipeline); - } else { - g_signal_emit_by_name (auto_pipeline, "quit"); - } - how_many_control_c_pressed++; -} - - -static void _on_control_c_sighandler_t (gint signal) { - on_control_c (); -} - - -static gpointer _g_object_ref0 (gpointer self) { - return self ? g_object_ref (self) : NULL; -} - - -static gboolean string_contains (const char* self, const char* needle) { - gboolean result = FALSE; - g_return_val_if_fail (self != NULL, FALSE); - g_return_val_if_fail (needle != NULL, FALSE); - result = strstr (self, needle) != NULL; - return result; -} - - -static inline GRegex* _thread_safe_regex_init (GRegex** re, const gchar * pattern, GRegexMatchFlags match_options) { - if (g_once_init_enter ((volatile gsize*) re)) { - GRegex* val = g_regex_new (pattern, match_options, 0, NULL); - g_once_init_leave ((volatile gsize*) re, (gsize) val); - } - return *re; -} - - -static gpointer _g_regex_ref0 (gpointer self) { - return self ? g_regex_ref (self) : NULL; -} - - -static void _g_list_free_g_free (GList* self) { - g_list_foreach (self, (GFunc) g_free, NULL); - g_list_free (self); -} - - -static void _g_list_free_g_object_unref (GList* self) { - g_list_foreach (self, (GFunc) g_object_unref, NULL); - g_list_free (self); -} - - -static void _g_main_loop_quit_auto_pipeline_quit (AutoPipeline* _sender, gpointer self) { - g_main_loop_quit (self); -} - - -gint _vala_main (char** args, int args_length1) { - gint result = 0; - GOptionContext* opt_context; - AutoPipeline* _tmp1_; - GTimeVal tv = {0}; - TaskScanner* scanner; - GList* tasks; - GList* effective_args_list; - gint i; - gint effective_args_length1; - gint _effective_args_size_; - char** _tmp11_; - gint _tmp10_; - char** effective_args; - char* _tmp13_; - char* pipeline_desc; - GMainLoop* loop; - GError * _inner_error_ = NULL; - opt_context = NULL; - { - GOptionContext* _tmp0_; - opt_context = (_tmp0_ = g_option_context_new ("- Build pipelines and run commands on them"), _g_option_context_free0 (opt_context), _tmp0_); - g_option_context_set_help_enabled (opt_context, TRUE); - g_option_context_add_main_entries (opt_context, options, "messages"); - g_option_context_add_group (opt_context, gst_init_get_option_group ()); - g_option_context_parse (opt_context, &args_length1, &args, &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_OPTION_ERROR) { - goto __catch0_g_option_error; - } - _g_option_context_free0 (opt_context); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return 0; - } - } - goto __finally0; - __catch0_g_option_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_printerr ("Option parsing failed: %s\n", e->message); - result = -1; - _g_error_free0 (e); - _g_option_context_free0 (opt_context); - return result; - } - } - __finally0: - if (_inner_error_ != NULL) { - _g_option_context_free0 (opt_context); - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return 0; - } - auto_pipeline = (_tmp1_ = auto_pipeline_new (), _g_object_unref0 (auto_pipeline), _tmp1_); - if (force_eos) { - signal (SIGINT, _on_control_c_sighandler_t); - } - if (output_messages) { - g_printerr ("Logging message to '%s'\n", LOG_FILENAME); - auto_pipeline_set_output_messages_enabled (auto_pipeline, output_messages); - } - if (output_messages) { - GTimeVal _tmp2_ = {0}; - auto_pipeline_log (auto_pipeline, "{\n", NULL); - tv = (g_get_current_time (&_tmp2_), _tmp2_); - auto_pipeline_log (auto_pipeline, " 'start' : %6lu.%06lu,\n", tv.tv_sec, tv.tv_usec, NULL); - } - scanner = task_scanner_new (); - if (args_length1 < 2) { - char* _tmp3_; - g_printerr ("%s", _tmp3_ = g_option_context_get_help (opt_context, TRUE, NULL)); - _g_free0 (_tmp3_); - g_printerr ("Commands are of the form :\n"); - g_printerr ("Supported commands are:\n"); - task_scanner_print_description (scanner); - g_printerr ("\nExamples:\n"); - g_printerr (" %s videotestsrc ! autovideosink 0:pause 1:play +5:eos\n", args[0]); - g_printerr (" %s videotestsrc ! clockoverlay name=clock ! autovideosink 0:play 2:s" \ -"et:clock:valignment:bottom 5:eos\n", args[0]); - result = 1; - _g_object_unref0 (scanner); - _g_option_context_free0 (opt_context); - return result; - } - tasks = NULL; - effective_args_list = NULL; - { - gint _tmp4_; - char** _tmp5_ = NULL; - char** arg_collection; - int arg_collection_length1; - int arg_it; - arg_collection = (_tmp5_ = args + 1, _tmp4_ = args_length1 - 1, _tmp5_); - arg_collection_length1 = _tmp4_; - for (arg_it = 0; arg_it < _tmp4_; arg_it = arg_it + 1) { - char* arg; - arg = g_strdup (arg_collection[arg_it]); - { - Task* task; - task = task_scanner_get_task_from_arg (scanner, arg); - if (task != NULL) { - tasks = g_list_append (tasks, _g_object_ref0 (task)); - } else { - if (!g_str_has_prefix (arg, "--")) { - gboolean _tmp6_ = FALSE; - if (string_contains (arg, " ")) { - _tmp6_ = string_contains (arg, "="); - } else { - _tmp6_ = FALSE; - } - if (_tmp6_) { - gint parts_length1; - gint _parts_size_; - char** _tmp8_; - char** _tmp7_; - char** parts; - GRegex* _tmp9_; - GRegex* prop_name_regex; - parts = (_tmp8_ = _tmp7_ = g_strsplit (arg, "=", 2), parts_length1 = _vala_array_length (_tmp7_), _parts_size_ = parts_length1, _tmp8_); - prop_name_regex = _g_regex_ref0 (_thread_safe_regex_init (&_tmp9_regex_0, "^[A-Za-z][a-zA-Z0-9_-]+$", 0)); - if (g_regex_match (prop_name_regex, parts[0], 0, NULL)) { - char* new_arg; - new_arg = g_strdup_printf ("%s=\"%s\"", parts[0], parts[1]); - effective_args_list = g_list_append (effective_args_list, g_strdup (new_arg)); - _g_free0 (new_arg); - _g_regex_unref0 (prop_name_regex); - parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL); - _g_object_unref0 (task); - _g_free0 (arg); - continue; - } - _g_regex_unref0 (prop_name_regex); - parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL); - } - effective_args_list = g_list_append (effective_args_list, g_strdup (arg)); - } else { - result = 1; - _g_object_unref0 (task); - _g_free0 (arg); - __g_list_free_g_free0 (effective_args_list); - __g_list_free_g_object_unref0 (tasks); - _g_object_unref0 (scanner); - _g_option_context_free0 (opt_context); - return result; - } - } - _g_object_unref0 (task); - _g_free0 (arg); - } - } - } - if (g_list_length (tasks) == 0) { - char* auto_symbol; - Command* auto_command; - auto_symbol = g_strdup ("play"); - g_printerr ("No commands given, will exec '%s' automatically\n", auto_symbol); - auto_command = task_scanner_lookup_command (scanner, auto_symbol); - if (auto_command != NULL) { - Task* auto_task; - auto_task = task_new ((double) 0, auto_command); - tasks = g_list_append (tasks, _g_object_ref0 (auto_task)); - _g_object_unref0 (auto_task); - } else { - g_printerr ("Could not find a command named '%s'\n", auto_symbol); - } - _g_free0 (auto_symbol); - } - i = 0; - effective_args = (_tmp11_ = g_new0 (char*, (_tmp10_ = g_list_length (effective_args_list) + 1) + 1), effective_args_length1 = _tmp10_, _effective_args_size_ = effective_args_length1, _tmp11_); - { - GList* arg_collection; - GList* arg_it; - arg_collection = effective_args_list; - for (arg_it = arg_collection; arg_it != NULL; arg_it = arg_it->next) { - char* arg; - arg = g_strdup ((const char*) arg_it->data); - { - char* _tmp12_; - effective_args[i] = (_tmp12_ = g_strdup (arg), _g_free0 (effective_args[i]), _tmp12_); - i++; - _g_free0 (arg); - } - } - } - effective_args[i] = (_tmp13_ = NULL, _g_free0 (effective_args[i]), _tmp13_); - pipeline_desc = g_strjoinv (" ", effective_args); - { - GstElement* _tmp15_; - GstElement* _tmp16_; - GstBin* _tmp17_; - if (output_messages) { - GTimeVal _tmp14_ = {0}; - tv = (g_get_current_time (&_tmp14_), _tmp14_); - auto_pipeline_log (auto_pipeline, " 'description' : '%s',\n", pipeline_desc, NULL); - } - _tmp15_ = gst_parse_launch (pipeline_desc, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch1_g_error; - } - auto_pipeline_set_pipeline (auto_pipeline, _tmp17_ = (_tmp16_ = _tmp15_, GST_IS_BIN (_tmp16_) ? ((GstBin*) _tmp16_) : NULL)); - _gst_object_unref0 (_tmp17_); - if (output_messages) { - GTimeVal _tmp18_ = {0}; - tv = (g_get_current_time (&_tmp18_), _tmp18_); - auto_pipeline_log (auto_pipeline, " 'launch' : %6lu.%06lu,\n", tv.tv_sec, tv.tv_usec, NULL); - } - } - goto __finally1; - __catch1_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_printerr ("Error: %s\n", e->message); - if (auto_pipeline_get_pipeline (auto_pipeline) != NULL) { - gst_element_set_state ((GstElement*) auto_pipeline_get_pipeline (auto_pipeline), GST_STATE_NULL); - } - result = 1; - _g_error_free0 (e); - _g_free0 (pipeline_desc); - effective_args = (_vala_array_free (effective_args, effective_args_length1, (GDestroyNotify) g_free), NULL); - __g_list_free_g_free0 (effective_args_list); - __g_list_free_g_object_unref0 (tasks); - _g_object_unref0 (scanner); - _g_option_context_free0 (opt_context); - return result; - } - } - __finally1: - if (_inner_error_ != NULL) { - _g_free0 (pipeline_desc); - effective_args = (_vala_array_free (effective_args, effective_args_length1, (GDestroyNotify) g_free), NULL); - __g_list_free_g_free0 (effective_args_list); - __g_list_free_g_object_unref0 (tasks); - _g_object_unref0 (scanner); - _g_option_context_free0 (opt_context); - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return 0; - } - { - GList* task_collection; - GList* task_it; - task_collection = tasks; - for (task_it = task_collection; task_it != NULL; task_it = task_it->next) { - Task* task; - task = _g_object_ref0 ((Task*) task_it->data); - { - task_exec (task, auto_pipeline); - _g_object_unref0 (task); - } - } - } - loop = g_main_loop_new (NULL, FALSE); - g_signal_connect (auto_pipeline, "quit", (GCallback) _g_main_loop_quit_auto_pipeline_quit, loop); - if (output_messages) { - auto_pipeline_log (auto_pipeline, " 'message' : [\n", NULL); - } - g_main_loop_run (loop); - if (output_messages) { - auto_pipeline_log (auto_pipeline, " ],\n", NULL); - } - gst_element_set_state ((GstElement*) auto_pipeline_get_pipeline (auto_pipeline), GST_STATE_NULL); - if (output_messages) { - GTimeVal _tmp19_ = {0}; - tv = (g_get_current_time (&_tmp19_), _tmp19_); - auto_pipeline_log (auto_pipeline, " 'end' : %6lu.%06lu,\n", tv.tv_sec, tv.tv_usec, NULL); - auto_pipeline_log (auto_pipeline, "}\n", NULL); - } - result = auto_pipeline_get_return_status (auto_pipeline); - _g_main_loop_unref0 (loop); - _g_free0 (pipeline_desc); - effective_args = (_vala_array_free (effective_args, effective_args_length1, (GDestroyNotify) g_free), NULL); - __g_list_free_g_free0 (effective_args_list); - __g_list_free_g_object_unref0 (tasks); - _g_object_unref0 (scanner); - _g_option_context_free0 (opt_context); - return result; -} - - -int main (int argc, char ** argv) { - g_thread_init (NULL); - g_type_init (); - return _vala_main (argv, argc); -} - - -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - -static gint _vala_array_length (gpointer array) { - int length; - length = 0; - if (array) { - while (((gpointer*) array)[length]) { - length++; - } - } - return length; -} - - - - diff --git a/ivi/gst-auto-launch/src/gst-auto-launch.vala b/ivi/gst-auto-launch/src/gst-auto-launch.vala deleted file mode 100755 index 6a90e43..0000000 --- a/ivi/gst-auto-launch/src/gst-auto-launch.vala +++ /dev/null @@ -1,156 +0,0 @@ -bool output_messages; -bool force_eos; - -const OptionEntry[] options = { - { "gst-messages", 'm', 0, OptionArg.NONE, ref output_messages, "Output messages", null }, - { "eos-on-shutdown", 'e', 0, OptionArg.NONE, ref force_eos, "Force EOS on sources before shutting the pipeline down", null }, - {null} -}; - - -uint how_many_control_c_pressed = 0; -AutoPipeline auto_pipeline; - -void on_control_c() { - if(auto_pipeline == null) - return; - if(how_many_control_c_pressed == 0) - auto_pipeline.send_eos(); - else - auto_pipeline.quit(); - how_many_control_c_pressed++; -} - - -int main(string[] args) { - OptionContext opt_context; - try { - opt_context = new OptionContext("- Build pipelines and run commands on them"); - opt_context.set_help_enabled(true); - opt_context.add_main_entries(options, "messages"); - opt_context.add_group(Gst.init_get_option_group()); - opt_context.parse(ref args); - } - catch (OptionError e) { - printerr("Option parsing failed: %s\n", e.message); - return -1; - } - - auto_pipeline = new AutoPipeline(); - - if(force_eos) - Posix.signal(Posix.SIGINT, on_control_c); - - if(output_messages) { - printerr("Logging message to '%s'\n", LOG_FILENAME); - auto_pipeline.output_messages_enabled = output_messages; - } - - TimeVal tv; - - if(output_messages) { - auto_pipeline.log("{\n"); - tv = TimeVal(); - auto_pipeline.log(" 'start' : %6lu.%06lu,\n", tv.tv_sec, tv.tv_usec); - } - - TaskScanner scanner = new TaskScanner(); - - if(args.length < 2) { - printerr(opt_context.get_help(true, null)); - printerr("Commands are of the form :\n"); - printerr("Supported commands are:\n"); - - scanner.print_description(); - - printerr("\nExamples:\n"); - printerr(" %s videotestsrc ! autovideosink 0:pause 1:play +5:eos\n", args[0]); - printerr(" %s videotestsrc ! clockoverlay name=clock ! autovideosink 0:play 2:set:clock:valignment:bottom 5:eos\n", args[0]); - - return 1; - } - - List tasks = new List (); - List effective_args_list = new List (); - - foreach(string arg in args[1:args.length]) { - Task? task = scanner.get_task_from_arg(arg); - if(task != null) - tasks.append(task); - else if(!arg.has_prefix("--")) { - if(" " in arg && "=" in arg) { - string[] parts = arg.split("=", 2); - Regex prop_name_regex = /^[A-Za-z][a-zA-Z0-9_-]+$/; - if(prop_name_regex.match(parts[0])) { - string new_arg = "%s=\"%s\"".printf(parts[0],parts[1]); - effective_args_list.append(new_arg); - continue; - } - } - effective_args_list.append(arg); - } - else - return 1; - } - - if(tasks.length() == 0) { - string auto_symbol = "play"; - printerr("No commands given, will exec '%s' automatically\n", auto_symbol); - weak Command? auto_command = scanner.lookup_command(auto_symbol); - if(auto_command != null) { - Task auto_task = new Task(0, auto_command); - tasks.append(auto_task); - } - else - printerr("Could not find a command named '%s'\n", auto_symbol); - } - - int i = 0; - string[] effective_args = new string[effective_args_list.length()+1]; - foreach(string arg in effective_args_list) { - effective_args[i] = arg; - i++; - } - effective_args[i] = null; - string pipeline_desc = string.joinv(" ", effective_args); - - try { - if(output_messages) { - tv = TimeVal(); - auto_pipeline.log(" 'description' : '%s',\n", pipeline_desc); - } - auto_pipeline.pipeline = Gst.parse_launch(pipeline_desc) as Gst.Bin; - if(output_messages) { - tv = TimeVal(); - auto_pipeline.log(" 'launch' : %6lu.%06lu,\n", tv.tv_sec, tv.tv_usec); - } - - } - catch(Error e) { - printerr("Error: %s\n", e.message); - if(auto_pipeline.pipeline != null) - auto_pipeline.pipeline.set_state(Gst.State.NULL); - return 1; - } - - foreach(Task task in tasks) - task.exec(auto_pipeline); - - MainLoop loop = new MainLoop(); - auto_pipeline.quit.connect(loop.quit); - - if(output_messages) - auto_pipeline.log(" 'message' : [\n"); - loop.run(); - if(output_messages) - auto_pipeline.log(" ],\n"); - auto_pipeline.pipeline.set_state(Gst.State.NULL); - if(output_messages) { - tv = TimeVal(); - auto_pipeline.log(" 'end' : %6lu.%06lu,\n", tv.tv_sec, tv.tv_usec); - auto_pipeline.log("}\n"); - } - - return auto_pipeline.return_status; -} - diff --git a/ivi/gst-auto-launch/src/task-scanner.c b/ivi/gst-auto-launch/src/task-scanner.c deleted file mode 100755 index 0bbcb42..0000000 --- a/ivi/gst-auto-launch/src/task-scanner.c +++ /dev/null @@ -1,468 +0,0 @@ -/* task-scanner.c generated by valac 0.10.0, the Vala compiler - * generated from task-scanner.vala, do not modify */ - - -#include -#include -#include -#include -#include -#include - - -#define TYPE_TASK_SCANNER (task_scanner_get_type ()) -#define TASK_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TASK_SCANNER, TaskScanner)) -#define TASK_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TASK_SCANNER, TaskScannerClass)) -#define IS_TASK_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TASK_SCANNER)) -#define IS_TASK_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TASK_SCANNER)) -#define TASK_SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TASK_SCANNER, TaskScannerClass)) - -typedef struct _TaskScanner TaskScanner; -typedef struct _TaskScannerClass TaskScannerClass; -typedef struct _TaskScannerPrivate TaskScannerPrivate; -#define _g_scanner_destroy0(var) ((var == NULL) ? NULL : (var = (g_scanner_destroy (var), NULL))) - -#define TYPE_TASK (task_get_type ()) -#define TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TASK, Task)) -#define TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TASK, TaskClass)) -#define IS_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TASK)) -#define IS_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TASK)) -#define TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TASK, TaskClass)) - -typedef struct _Task Task; -typedef struct _TaskClass TaskClass; - -#define TYPE_COMMAND (command_get_type ()) - -#define TYPE_AUTO_PIPELINE (auto_pipeline_get_type ()) -#define AUTO_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTO_PIPELINE, AutoPipeline)) -#define AUTO_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTO_PIPELINE, AutoPipelineClass)) -#define IS_AUTO_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTO_PIPELINE)) -#define IS_AUTO_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTO_PIPELINE)) -#define AUTO_PIPELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTO_PIPELINE, AutoPipelineClass)) - -typedef struct _AutoPipeline AutoPipeline; -typedef struct _AutoPipelineClass AutoPipelineClass; -typedef struct _Command Command; -#define _g_free0(var) (var = (g_free (var), NULL)) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -struct _TaskScanner { - GObject parent_instance; - TaskScannerPrivate * priv; -}; - -struct _TaskScannerClass { - GObjectClass parent_class; -}; - -struct _TaskScannerPrivate { - GScanner* scanner; - double last_time_seconds; -}; - -typedef gint (*CommandFunc) (AutoPipeline* auto_pipeline, Task* task); -struct _Command { - char* name; - char* description; - char* args_desc; - CommandFunc function; -}; - - -static gpointer task_scanner_parent_class = NULL; - -GType task_scanner_get_type (void) G_GNUC_CONST; -#define TASK_SCANNER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_TASK_SCANNER, TaskScannerPrivate)) -enum { - TASK_SCANNER_DUMMY_PROPERTY -}; -TaskScanner* task_scanner_new (void); -TaskScanner* task_scanner_construct (GType object_type); -void scanner_register_symbols (GScanner* scanner); -GType task_get_type (void) G_GNUC_CONST; -Task* task_scanner_get_task_from_arg (TaskScanner* self, const char* arg); -static double task_scanner_get_seconds (TaskScanner* self, GTokenType* last_token); -GType command_get_type (void) G_GNUC_CONST; -GType auto_pipeline_get_type (void) G_GNUC_CONST; -Command* command_dup (const Command* self); -void command_free (Command* self); -void command_copy (const Command* self, Command* dest); -void command_destroy (Command* self); -Task* task_new (double seconds, Command* command); -Task* task_construct (GType object_type, double seconds, Command* command); -gchar command_get_arg_desc (Command *self, guint arg_i); -GValueArray* task_get_arguments (Task* self); -static double task_scanner_get_signed_number (TaskScanner* self, GTokenType* last_token); -guint command_get_n_args (Command *self); -static double task_scanner_get_number (TaskScanner* self, GTokenType* last_token, gint* relative); -void task_scanner_print_description (TaskScanner* self); -static void _lambda2_ (void* key, void* val, TaskScanner* self); -static void __lambda2__gh_func (void* key, void* value, gpointer self); -Command* task_scanner_lookup_command (TaskScanner* self, const char* command_name); -static void task_scanner_finalize (GObject* obj); -static int _vala_strcmp0 (const char * str1, const char * str2); - - - -TaskScanner* task_scanner_construct (GType object_type) { - TaskScanner * self; - GScanner* _tmp0_; - self = (TaskScanner*) g_object_new (object_type, NULL); - self->priv->last_time_seconds = (double) 0; - self->priv->scanner = (_tmp0_ = g_scanner_new (NULL), _g_scanner_destroy0 (self->priv->scanner), _tmp0_); - (*self->priv->scanner->config).scan_identifier_1char = TRUE; - (*self->priv->scanner->config).identifier_2_string = TRUE; - scanner_register_symbols (self->priv->scanner); - (*self->priv->scanner->config).cset_identifier_nth = G_CSET_a_2_z G_CSET_A_2_Z " _-0123456789" G_CSET_LATINC G_CSET_LATINS; - return self; -} - - -TaskScanner* task_scanner_new (void) { - return task_scanner_construct (TYPE_TASK_SCANNER); -} - - -static gboolean string_contains (const char* self, const char* needle) { - gboolean result = FALSE; - g_return_val_if_fail (self != NULL, FALSE); - g_return_val_if_fail (needle != NULL, FALSE); - result = strstr (self, needle) != NULL; - return result; -} - - -static glong string_get_length (const char* self) { - glong result; - g_return_val_if_fail (self != NULL, 0L); - result = g_utf8_strlen (self, (gssize) (-1)); - return result; -} - - -Task* task_scanner_get_task_from_arg (TaskScanner* self, const char* arg) { - Task* result = NULL; - GTokenType token = 0; - double number; - gboolean _tmp0_ = FALSE; - Command* command; - Task* task; - guint arg_n; - g_return_val_if_fail (self != NULL, NULL); - g_return_val_if_fail (arg != NULL, NULL); - if (!string_contains (arg, ":")) { - result = NULL; - return result; - } - g_scanner_input_text (self->priv->scanner, arg, (guint) string_get_length (arg)); - number = task_scanner_get_seconds (self, &token); - if (token != G_TOKEN_INT) { - _tmp0_ = token != G_TOKEN_FLOAT; - } else { - _tmp0_ = FALSE; - } - if (_tmp0_) { - result = NULL; - return result; - } - self->priv->last_time_seconds = number; - token = g_scanner_get_next_token (self->priv->scanner); - if (token != ':') { - g_printerr ("Expected ':' between seconds and command\n"); - result = NULL; - return result; - } - token = g_scanner_get_next_token (self->priv->scanner); - if (token != G_TOKEN_SYMBOL) { - g_printerr ("Expected a valid command\n"); - result = NULL; - return result; - } - command = (Command*) self->priv->scanner->value.v_symbol; - task = task_new (number, command); - arg_n = (guint) 0; - while (TRUE) { - gchar arg_desc; - if (!((token = g_scanner_get_next_token (self->priv->scanner)) == ':')) { - break; - } - arg_desc = command_get_arg_desc (command, arg_n); - token = g_scanner_peek_next_token (self->priv->scanner); - if (token == G_TOKEN_STRING) { - char* s; - g_scanner_get_next_token (self->priv->scanner); - s = g_strdup (self->priv->scanner->value.v_string); - if (_vala_strcmp0 (s, "true") == 0) { - GValue _tmp1_ = {0}; - GValue _tmp2_; - g_value_array_append (task_get_arguments (task), (_tmp2_ = (g_value_init (&_tmp1_, G_TYPE_BOOLEAN), g_value_set_boolean (&_tmp1_, TRUE), _tmp1_), &_tmp2_)); - G_IS_VALUE (&_tmp1_) ? (g_value_unset (&_tmp1_), NULL) : NULL; - } else { - if (_vala_strcmp0 (s, "false") == 0) { - GValue _tmp3_ = {0}; - GValue _tmp4_; - g_value_array_append (task_get_arguments (task), (_tmp4_ = (g_value_init (&_tmp3_, G_TYPE_BOOLEAN), g_value_set_boolean (&_tmp3_, FALSE), _tmp3_), &_tmp4_)); - G_IS_VALUE (&_tmp3_) ? (g_value_unset (&_tmp3_), NULL) : NULL; - } else { - GValue _tmp5_ = {0}; - GValue _tmp6_; - g_value_array_append (task_get_arguments (task), (_tmp6_ = (g_value_init (&_tmp5_, G_TYPE_STRING), g_value_set_string (&_tmp5_, s), _tmp5_), &_tmp6_)); - G_IS_VALUE (&_tmp5_) ? (g_value_unset (&_tmp5_), NULL) : NULL; - } - } - _g_free0 (s); - } else { - gboolean _tmp7_ = FALSE; - gboolean _tmp8_ = FALSE; - gboolean _tmp9_ = FALSE; - if (token == G_TOKEN_INT) { - _tmp9_ = TRUE; - } else { - _tmp9_ = token == G_TOKEN_FLOAT; - } - if (_tmp9_) { - _tmp8_ = TRUE; - } else { - _tmp8_ = token == '+'; - } - if (_tmp8_) { - _tmp7_ = TRUE; - } else { - _tmp7_ = token == '-'; - } - if (_tmp7_) { - if (arg_desc == 't') { - GValue _tmp10_ = {0}; - GValue _tmp11_; - number = task_scanner_get_seconds (self, &token); - g_value_array_append (task_get_arguments (task), (_tmp11_ = (g_value_init (&_tmp10_, G_TYPE_DOUBLE), g_value_set_double (&_tmp10_, (double) number), _tmp10_), &_tmp11_)); - G_IS_VALUE (&_tmp10_) ? (g_value_unset (&_tmp10_), NULL) : NULL; - } else { - number = task_scanner_get_signed_number (self, &token); - if (token == G_TOKEN_INT) { - GValue _tmp12_ = {0}; - GValue _tmp13_; - g_value_array_append (task_get_arguments (task), (_tmp13_ = (g_value_init (&_tmp12_, G_TYPE_INT), g_value_set_int (&_tmp12_, (gint) number), _tmp12_), &_tmp13_)); - G_IS_VALUE (&_tmp12_) ? (g_value_unset (&_tmp12_), NULL) : NULL; - } else { - if (token == G_TOKEN_FLOAT) { - GValue _tmp14_ = {0}; - GValue _tmp15_; - g_value_array_append (task_get_arguments (task), (_tmp15_ = (g_value_init (&_tmp14_, G_TYPE_DOUBLE), g_value_set_double (&_tmp14_, (double) number), _tmp14_), &_tmp15_)); - G_IS_VALUE (&_tmp14_) ? (g_value_unset (&_tmp14_), NULL) : NULL; - } - } - } - } - } - arg_n++; - } - if (command_get_n_args (command) != task_get_arguments (task)->n_values) { - g_printerr ("Command '%s' takes %u arguments (got %u)\n", (*command).name, command_get_n_args (command), task_get_arguments (task)->n_values); - result = NULL; - _g_object_unref0 (task); - return result; - } - { - guint arg_i; - arg_i = (guint) 0; - { - gboolean _tmp16_; - _tmp16_ = TRUE; - while (TRUE) { - gchar arg_desc; - GValue arg_value; - if (!_tmp16_) { - arg_i++; - } - _tmp16_ = FALSE; - if (!(arg_i < arg_n)) { - break; - } - arg_desc = command_get_arg_desc (command, arg_i); - arg_value = task_get_arguments (task)->values[arg_i]; - switch (arg_desc) { - case 's': - { - if (!G_VALUE_HOLDS (&arg_value, G_TYPE_STRING)) { - g_printerr ("Argument %u of '%s' must be a string\n", arg_i, (*command).name); - result = NULL; - _g_object_unref0 (task); - return result; - } - break; - } - case 'i': - { - if (!G_VALUE_HOLDS (&arg_value, G_TYPE_INT)) { - g_printerr ("Argument %u of '%s' must be an integer\n", arg_i, (*command).name); - result = NULL; - _g_object_unref0 (task); - return result; - } - break; - } - case 't': - { - if (!G_VALUE_HOLDS (&arg_value, G_TYPE_DOUBLE)) { - g_printerr ("Argument %u of '%s' must be in seconds\n", arg_i, (*command).name); - result = NULL; - _g_object_unref0 (task); - return result; - } - number = g_value_get_double (&arg_value); - if (number < 0.0) { - g_printerr ("Argument %u of '%s' cannot be negative\n", arg_i, (*command).name); - result = NULL; - _g_object_unref0 (task); - return result; - } - break; - } - } - } - } - } - result = task; - return result; -} - - -static double task_scanner_get_seconds (TaskScanner* self, GTokenType* last_token) { - double result = 0.0; - gint relative = 0; - double seconds; - g_return_val_if_fail (self != NULL, 0.0); - seconds = task_scanner_get_number (self, last_token, &relative); - if (relative != 0) { - seconds = seconds + (relative * self->priv->last_time_seconds); - } - result = seconds; - return result; -} - - -static double task_scanner_get_signed_number (TaskScanner* self, GTokenType* last_token) { - double result = 0.0; - gint relative = 0; - double number; - g_return_val_if_fail (self != NULL, 0.0); - number = task_scanner_get_number (self, last_token, &relative); - if (relative == (-1)) { - result = -number; - return result; - } - result = number; - return result; -} - - -static double task_scanner_get_number (TaskScanner* self, GTokenType* last_token, gint* relative) { - double result = 0.0; - double number = 0.0; - GTokenType token; - g_return_val_if_fail (self != NULL, 0.0); - token = g_scanner_get_next_token (self->priv->scanner); - if (token == '+') { - *relative = 1; - } else { - if (token == '-') { - *relative = -1; - } else { - *relative = 0; - } - } - if ((*relative) != 0) { - token = g_scanner_get_next_token (self->priv->scanner); - } - if (token == G_TOKEN_INT) { - number = (double) self->priv->scanner->value.v_int; - } else { - if (token == G_TOKEN_FLOAT) { - number = self->priv->scanner->value.v_float; - } else { - number = (double) 0; - } - } - *last_token = token; - result = number; - return result; -} - - -static void _lambda2_ (void* key, void* val, TaskScanner* self) { - char* name; - Command* command; - name = g_strdup ((const char*) key); - command = (Command*) val; - g_printerr (" %s:\n %s\n", name, (*command).description); - _g_free0 (name); -} - - -static void __lambda2__gh_func (void* key, void* value, gpointer self) { - _lambda2_ (key, value, self); -} - - -void task_scanner_print_description (TaskScanner* self) { - g_return_if_fail (self != NULL); - g_scanner_scope_foreach_symbol (self->priv->scanner, 0U, __lambda2__gh_func, self); -} - - -Command* task_scanner_lookup_command (TaskScanner* self, const char* command_name) { - Command* result = NULL; - g_return_val_if_fail (self != NULL, NULL); - g_return_val_if_fail (command_name != NULL, NULL); - result = (Command*) g_scanner_lookup_symbol (self->priv->scanner, command_name); - return result; -} - - -static void task_scanner_class_init (TaskScannerClass * klass) { - task_scanner_parent_class = g_type_class_peek_parent (klass); - g_type_class_add_private (klass, sizeof (TaskScannerPrivate)); - G_OBJECT_CLASS (klass)->finalize = task_scanner_finalize; -} - - -static void task_scanner_instance_init (TaskScanner * self) { - self->priv = TASK_SCANNER_GET_PRIVATE (self); -} - - -static void task_scanner_finalize (GObject* obj) { - TaskScanner * self; - self = TASK_SCANNER (obj); - _g_scanner_destroy0 (self->priv->scanner); - G_OBJECT_CLASS (task_scanner_parent_class)->finalize (obj); -} - - -GType task_scanner_get_type (void) { - static volatile gsize task_scanner_type_id__volatile = 0; - if (g_once_init_enter (&task_scanner_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (TaskScannerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) task_scanner_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TaskScanner), 0, (GInstanceInitFunc) task_scanner_instance_init, NULL }; - GType task_scanner_type_id; - task_scanner_type_id = g_type_register_static (G_TYPE_OBJECT, "TaskScanner", &g_define_type_info, 0); - g_once_init_leave (&task_scanner_type_id__volatile, task_scanner_type_id); - } - return task_scanner_type_id__volatile; -} - - -static int _vala_strcmp0 (const char * str1, const char * str2) { - if (str1 == NULL) { - return -(str1 != str2); - } - if (str2 == NULL) { - return str1 != str2; - } - return strcmp (str1, str2); -} - - - - diff --git a/ivi/gst-auto-launch/src/task-scanner.vala b/ivi/gst-auto-launch/src/task-scanner.vala deleted file mode 100755 index d3cf6cf..0000000 --- a/ivi/gst-auto-launch/src/task-scanner.vala +++ /dev/null @@ -1,186 +0,0 @@ -class TaskScanner: Object { - Scanner scanner; - double last_time_seconds; - - - public TaskScanner() { - last_time_seconds = 0; - scanner = new Scanner(null); - scanner.config.scan_identifier_1char = true; - scanner.config.identifier_2_string = true; - scanner_register_symbols(scanner); - scanner.config.cset_identifier_nth = - CharacterSet.a_2_z + CharacterSet.A_2_Z + " _-0123456789" + - CharacterSet.LATINC + CharacterSet.LATINS; - } - - - public Task? get_task_from_arg(string arg) { - if(!arg.contains(":")) - return null; - scanner.input_text(arg, (uint)arg.length); - - TokenType token; - - double number = get_seconds(out token); - if(token != TokenType.INT && token != TokenType.FLOAT) - return null; - - last_time_seconds = number; - - token = scanner.get_next_token(); - if(token != ':') { - printerr("Expected ':' between seconds and command\n"); - return null; - } - - token = scanner.get_next_token(); - if(token != TokenType.SYMBOL) { - printerr("Expected a valid command\n"); - return null; - } - - weak Command? command = (Command?)scanner.value.symbol; - Task task = new Task(number, command); - - uint arg_n = 0; - while( (token = scanner.get_next_token()) == ':') { - char arg_desc = command.get_arg_desc(arg_n); - - token = scanner.peek_next_token(); - if(token == TokenType.STRING) { - scanner.get_next_token(); - string s = scanner.value.string; - if(s == "true") - task.arguments.append(true); - else if(s == "false") - task.arguments.append(false); - else - task.arguments.append(s); - } - else - if(token == TokenType.INT || token == TokenType.FLOAT || - token == '+' || token == '-') { - if(arg_desc == 't') { - number = get_seconds(out token); - task.arguments.append((double)number); - } - else { - number = get_signed_number(out token); - if(token == TokenType.INT) - task.arguments.append((int)number); - else - if(token == TokenType.FLOAT) - task.arguments.append((double)number); - } - } - arg_n++; - } - - if(command.get_n_args() != task.arguments.n_values) { - printerr("Command '%s' takes %u arguments (got %u)\n", - command.name, command.get_n_args(), task.arguments.n_values); - return null; - } - - for(uint arg_i = 0; arg_i < arg_n; arg_i++) { - char arg_desc = command.get_arg_desc(arg_i); - unowned Value arg_value = task.arguments.values[arg_i]; - switch(arg_desc) { - case 's': - if(!arg_value.holds(typeof(string))) { - printerr("Argument %u of '%s' must be a string\n", - arg_i, command.name); - return null; - } - break; - case 'i': - if(!arg_value.holds(typeof(int))) { - printerr("Argument %u of '%s' must be an integer\n", - arg_i, command.name); - return null; - } - break; - case 't': - if(!arg_value.holds(typeof(double))) { - printerr("Argument %u of '%s' must be in seconds\n", - arg_i, command.name); - return null; - } - number = arg_value.get_double(); - if(number < 0.0) { - printerr("Argument %u of '%s' cannot be negative\n", - arg_i, command.name); - return null; - } - break; - } - } - - return task; - } - - - double get_seconds(out TokenType last_token) { - int relative; - double seconds = get_number(out last_token, out relative); - - if(relative != 0) - seconds += relative * last_time_seconds; - - return seconds; - } - - - double get_signed_number(out TokenType last_token) { - int relative; - double number = get_number(out last_token, out relative); - - if(relative == -1) - return -number; - return number; - } - - - double get_number(out TokenType last_token, out int relative) { - double number; - TokenType token = scanner.get_next_token(); - - if(token == '+') - relative = 1; - else if(token == '-') - relative = -1; - else - relative = 0; - - if(relative != 0) - token = scanner.get_next_token(); - - if(token == TokenType.INT) - number = scanner.value.int; - else if(token == TokenType.FLOAT) - number = scanner.value.float; - else - number = 0; - - last_token = token; - return number; - } - - - public void print_description() { - scanner.scope_foreach_symbol(0U, - (key, val) => { - string name = (string)key; - weak Command? command = (Command?)val; - printerr(" %s:\n %s\n", name, command.description); - } - ); - } - - - public unowned Command? lookup_command(string command_name) { - return (Command?)scanner.lookup_symbol(command_name); - } -} - diff --git a/ivi/gst-auto-launch/src/task.c b/ivi/gst-auto-launch/src/task.c deleted file mode 100755 index b684b1f..0000000 --- a/ivi/gst-auto-launch/src/task.c +++ /dev/null @@ -1,245 +0,0 @@ -/* task.c generated by valac 0.10.0, the Vala compiler - * generated from task.vala, do not modify */ - - -#include -#include -#include -#include -#include -#include - - -#define TYPE_TASK (task_get_type ()) -#define TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TASK, Task)) -#define TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TASK, TaskClass)) -#define IS_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TASK)) -#define IS_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TASK)) -#define TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TASK, TaskClass)) - -typedef struct _Task Task; -typedef struct _TaskClass TaskClass; -typedef struct _TaskPrivate TaskPrivate; - -#define TYPE_COMMAND (command_get_type ()) - -#define TYPE_AUTO_PIPELINE (auto_pipeline_get_type ()) -#define AUTO_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTO_PIPELINE, AutoPipeline)) -#define AUTO_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTO_PIPELINE, AutoPipelineClass)) -#define IS_AUTO_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTO_PIPELINE)) -#define IS_AUTO_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTO_PIPELINE)) -#define AUTO_PIPELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTO_PIPELINE, AutoPipelineClass)) - -typedef struct _AutoPipeline AutoPipeline; -typedef struct _AutoPipelineClass AutoPipelineClass; -typedef struct _Command Command; -#define _g_value_array_free0(var) ((var == NULL) ? NULL : (var = (g_value_array_free (var), NULL))) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -typedef struct _Block1Data Block1Data; - -struct _Task { - GObject parent_instance; - TaskPrivate * priv; -}; - -struct _TaskClass { - GObjectClass parent_class; -}; - -typedef gint (*CommandFunc) (AutoPipeline* auto_pipeline, Task* task); -struct _Command { - char* name; - char* description; - char* args_desc; - CommandFunc function; -}; - -struct _TaskPrivate { - double _seconds; - Command* _command; - GValueArray* _arguments; -}; - -struct _Block1Data { - int _ref_count_; - Task * self; - AutoPipeline* auto_pipeline; -}; - - -static gpointer task_parent_class = NULL; - -GType task_get_type (void) G_GNUC_CONST; -GType command_get_type (void) G_GNUC_CONST; -GType auto_pipeline_get_type (void) G_GNUC_CONST; -Command* command_dup (const Command* self); -void command_free (Command* self); -void command_copy (const Command* self, Command* dest); -void command_destroy (Command* self); -#define TASK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_TASK, TaskPrivate)) -enum { - TASK_DUMMY_PROPERTY, - TASK_SECONDS, - TASK_ARGUMENTS -}; -Task* task_new (double seconds, Command* command); -Task* task_construct (GType object_type, double seconds, Command* command); -guint task_exec (Task* self, AutoPipeline* auto_pipeline); -double task_get_seconds (Task* self); -static gboolean _lambda1_ (Block1Data* _data1_); -gint auto_pipeline_get_return_status (AutoPipeline* self); -void auto_pipeline_set_return_status (AutoPipeline* self, gint value); -static gboolean __lambda1__gsource_func (gpointer self); -static Block1Data* block1_data_ref (Block1Data* _data1_); -static void block1_data_unref (Block1Data* _data1_); -GValueArray* task_get_arguments (Task* self); -static void task_finalize (GObject* obj); -static void task_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); - - - -Task* task_construct (GType object_type, double seconds, Command* command) { - Task * self; - GValueArray* _tmp0_; - self = (Task*) g_object_new (object_type, NULL); - self->priv->_seconds = seconds; - self->priv->_command = command; - self->priv->_arguments = (_tmp0_ = g_value_array_new ((guint) 0), _g_value_array_free0 (self->priv->_arguments), _tmp0_); - return self; -} - - -Task* task_new (double seconds, Command* command) { - return task_construct (TYPE_TASK, seconds, command); -} - - -static gboolean _lambda1_ (Block1Data* _data1_) { - Task * self; - gboolean result = FALSE; - self = _data1_->self; - if (auto_pipeline_get_return_status (_data1_->auto_pipeline) == 0) { - gint status; - status = (*self->priv->_command).function (_data1_->auto_pipeline, self); - if (status != 0) { - auto_pipeline_set_return_status (_data1_->auto_pipeline, status); - g_signal_emit_by_name (_data1_->auto_pipeline, "quit"); - } - } - result = FALSE; - return result; -} - - -static gboolean __lambda1__gsource_func (gpointer self) { - gboolean result; - result = _lambda1_ (self); - return result; -} - - -static gpointer _g_object_ref0 (gpointer self) { - return self ? g_object_ref (self) : NULL; -} - - -static Block1Data* block1_data_ref (Block1Data* _data1_) { - g_atomic_int_inc (&_data1_->_ref_count_); - return _data1_; -} - - -static void block1_data_unref (Block1Data* _data1_) { - if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) { - _g_object_unref0 (_data1_->self); - _g_object_unref0 (_data1_->auto_pipeline); - g_slice_free (Block1Data, _data1_); - } -} - - -guint task_exec (Task* self, AutoPipeline* auto_pipeline) { - guint result = 0U; - Block1Data* _data1_; - g_return_val_if_fail (self != NULL, 0U); - g_return_val_if_fail (auto_pipeline != NULL, 0U); - _data1_ = g_slice_new0 (Block1Data); - _data1_->_ref_count_ = 1; - _data1_->self = g_object_ref (self); - _data1_->auto_pipeline = _g_object_ref0 (auto_pipeline); - result = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) (task_get_seconds (self) * 1000), __lambda1__gsource_func, block1_data_ref (_data1_), block1_data_unref); - block1_data_unref (_data1_); - return result; -} - - -double task_get_seconds (Task* self) { - double result; - g_return_val_if_fail (self != NULL, 0.0); - result = self->priv->_seconds; - return result; -} - - -GValueArray* task_get_arguments (Task* self) { - GValueArray* result; - g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_arguments; - return result; -} - - -static void task_class_init (TaskClass * klass) { - task_parent_class = g_type_class_peek_parent (klass); - g_type_class_add_private (klass, sizeof (TaskPrivate)); - G_OBJECT_CLASS (klass)->get_property = task_get_property; - G_OBJECT_CLASS (klass)->finalize = task_finalize; - g_object_class_install_property (G_OBJECT_CLASS (klass), TASK_SECONDS, g_param_spec_double ("seconds", "seconds", "seconds", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_class_install_property (G_OBJECT_CLASS (klass), TASK_ARGUMENTS, g_param_spec_boxed ("arguments", "arguments", "arguments", G_TYPE_VALUE_ARRAY, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); -} - - -static void task_instance_init (Task * self) { - self->priv = TASK_GET_PRIVATE (self); -} - - -static void task_finalize (GObject* obj) { - Task * self; - self = TASK (obj); - _g_value_array_free0 (self->priv->_arguments); - G_OBJECT_CLASS (task_parent_class)->finalize (obj); -} - - -GType task_get_type (void) { - static volatile gsize task_type_id__volatile = 0; - if (g_once_init_enter (&task_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (TaskClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) task_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Task), 0, (GInstanceInitFunc) task_instance_init, NULL }; - GType task_type_id; - task_type_id = g_type_register_static (G_TYPE_OBJECT, "Task", &g_define_type_info, 0); - g_once_init_leave (&task_type_id__volatile, task_type_id); - } - return task_type_id__volatile; -} - - -static void task_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { - Task * self; - self = TASK (object); - switch (property_id) { - case TASK_SECONDS: - g_value_set_double (value, task_get_seconds (self)); - break; - case TASK_ARGUMENTS: - g_value_set_boxed (value, task_get_arguments (self)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - - - - diff --git a/ivi/gst-auto-launch/src/task.vala b/ivi/gst-auto-launch/src/task.vala deleted file mode 100755 index ae274c8..0000000 --- a/ivi/gst-auto-launch/src/task.vala +++ /dev/null @@ -1,42 +0,0 @@ -class Task: Object { - double _seconds; - unowned Command? _command; - ValueArray _arguments; - - - public double seconds { - get { - return _seconds; - } - } - - - public ValueArray arguments { - get { - return _arguments; - } - } - - - public Task(double seconds, Command command) { - _seconds = seconds; - _command = command; - _arguments = new ValueArray(0); - } - - - public uint exec(AutoPipeline auto_pipeline) { - return Timeout.add((uint)(seconds*1000), - () => { - if(auto_pipeline.return_status == 0) { - int status = _command.function(auto_pipeline, this); - if(status != 0) { - auto_pipeline.return_status = status; - auto_pipeline.quit(); - } - } - return false; - }); - } -} - diff --git a/ivi/gst-auto-launch/src/vala.stamp b/ivi/gst-auto-launch/src/vala.stamp deleted file mode 100755 index e69de29..0000000 diff --git a/ivi/tts-gstreamer-tests/README b/ivi/tts-gstreamer-tests/README deleted file mode 100644 index bbab26f..0000000 --- a/ivi/tts-gstreamer-tests/README +++ /dev/null @@ -1,30 +0,0 @@ ------------------------ -Introduction ------------------------ -The tts-gstreamer-tests is a test suite to test media playing features of gstreamer. - - ------------------------ -How to Run ------------------------ -Pre-condition: -1. Install gstreamer-utils -2. if you don't have testkit-lite, you can get it from https://github.com/testkit/testkit-lite - -Steps: -1. prepare some media files and configure /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/env.sh --- specify in env.sh -2. launch terminal app in weston UI and play an audio by command "paplay /usr/share/sounds/alsa/Front_Center.wav" to trigger Pulseaudio daemon -3. testkit-lite -f /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/tests.xml --comm localhost -o ./results.xml - - - ----------------------- -Test Environment setup ----------------------- -Some media files are needed, you can configure /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/env.sh to specify -them; e.g. MF_TEST_8K="/usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/data/PCM_16bit_Mono_8KHz_128Kbps_60sec\(1Mb\).wav" - - ------------------------ -TODO ------------------------ diff --git a/ivi/tts-gstreamer-tests/src/cleanup.sh b/ivi/tts-gstreamer-tests/src/cleanup.sh deleted file mode 100755 index e4e98b1..0000000 --- a/ivi/tts-gstreamer-tests/src/cleanup.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# Copyright (C) 2011, Intel Corporation. -# -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. -# -# This program is distributed in the hope it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307 USA. -# -# Authors: -# Zhang, Zhiqiang -# -# DESCR: -# Cleanup process like gst-launch or su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch - - -# try to kill the process for 3 times -rm -rf /tmp/test_result -COUNT=0 -while [ "$COUNT" -lt 3 ]; do - PID=`ps -eaf | grep -E "gst-launch|gst-auto-launch" | grep -v "grep" | awk '{print $2}'` - if [ -z "$PID" ]; then - break; - fi - - echo "Kill $PID" - kill $PID - let "COUNT += 1" -done diff --git a/ivi/tts-gstreamer-tests/src/env.sh b/ivi/tts-gstreamer-tests/src/env.sh deleted file mode 100755 index 02c5430..0000000 --- a/ivi/tts-gstreamer-tests/src/env.sh +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2011 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# -# Authors: -# Zhang, Zhiqiang -# - - -DATA_PATH=$(cd `dirname $0`;pwd)/data -TEST_RESULT="/tmp/test_result" -RET=0 - -## below media files are needed but not include in this package, prepare them before run test ## - -#setup a http server and put some media files on it: -HTTP=http://your.httpserver.com/media - -# used in script:gstreamer_audio_playbin2_http_alaw.sh -## stored in http server -# wav audio: RIFF (little-endian) data, WAVE audio, ITU G.711 A-law, stereo 44100 Hz -GT_HTTP_AUDIO_ALAW="a-LAW_8bit_Stereo_44.1KHz_120sec\(10.1MB\)_AKM.wav" - -# used in script:gstreamer_audio_playbin2_http_imaadpcm.sh -## stored in http server -# wav audio: RIFF (little-endian) data, WAVE audio, IMA ADPCM, stereo 32000 Hz -GT_HTTP_IMAADPCM="IMAADPCM_4bit_Stereo_32KHz_256Kbps_60sec\(1.8Mb\).wav" - -# used in script:gstreamer_audio_playbin2_http_ulaw.sh -## stored in http server -# wav audio: RIFF (little-endian) data, WAVE audio, ITU G.711 mu-law, stereo 44100 Hz -GT_HTTP_AUDIO_ULAW="u-LAW_8bit_Stereo_44.1KHz_120sec\(10MB\)_AKM.wav" - -# used in script:gstreamer_video_http_ogg.sh -## stored in http server -# ogv video: kittens_240p.ogv: Ogg data, Skeleton v4.0 -GT_HTTP_VIDEO_OGV="kittens_240p.ogv" - -# used in script:gstreamer_audio_playbin2_imaadpcm_4bit_stereo_32khz_256kbps.sh -# wav audio: RIFF (little-endian) data, WAVE audio, IMA ADPCM, stereo 32000 Hz -GT_IMAADPCM="/usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/data/IMAADPCM_4bit_Stereo_32KHz_256Kbps_60sec\(1.8Mb\).wav" - -# used in script:gstreamer_audio_playbin2_lpcm_16bit_stereo_44.1khz.sh -# wav audio: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz -GT_AUDIO_LPCM_16="/usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/data/LPCM_16bit_Stereo_44.1KHz_60sec\(10Mb\).wav" - -# used in script:gstreamer_audio_playbin2_lpcm_24bit_stereo_48khz.sh -# wav audio: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 24 bit, stereo 48000 Hz -GT_AUDIO_LPCM_24="/usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/data/LPCM_24bit_Stereo_48KHz_60sec\(16.8Mb\).wav" - -# used in script:gstreamer_audio_playbin2_ogg_vorbis_16bit_mono_8khz_42kbps.sh -# ogg audio: Ogg data, Vorbis audio, mono, 8000 Hz, ~41997 bps -GT_OGG_MONO="/usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/data/OGG_16bit_Mono_8KHz_42Kbps_2min\(0.5MB\).ogg" - -# used in scripts: -# gstreamer_audio_avidemux.sh -# gstreamer_audio_pause_avidemux.sh -# gstreamer_audio_play_avidemux.sh -# gstreamer_audio_playbin2_alaw_8bit_stereo_44.1khz.sh -# gstreamer_audio_resume_avidemux.sh -# gstreamer_audio_resume_avidemux.sh -# gstreamer_audio_seek_avidemux.sh -# gstreamer_audio_stop_avidemux.sh -# avi audio: RIFF (little-endian) data, AVI, 0 x 0, >30 fps -GT_AUDIO_PCM_16="/usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/data/PCM_16bit_Stereo_44.1KHz_1411Kbps_60sec.avi" - -# used in script:gstreamer_image_jpegdec.sh -# jpeg file: JPEG image data, EXIF standard -GT_IMAGE_JPG="/usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/data/butterfly.jpg" - -# used in scripts: -# gstreamer_audio_alsasink.sh -# gstreamer_audio_pause_ogg.sh -# gstreamer_audio_play_ogg.sh -# gstreamer_audio_pulsesink.sh -# gstreamer_audio_resume_ogg.sh -# gstreamer_audio_seek_ogg.sh -# gstreamer_audio_stop_ogg.sh -# gstreamer_audio_vorbisdec.sh -# gstreamer_video_oggdemux.sh -# gstreamer_video_pause_oggdemux.sh -# gstreamer_video_playbin2_ogg_theora_vorbis.sh -# gstreamer_video_play_oggdemux.sh -# gstreamer_video_resume_oggdemux.sh -# gstreamer_video_seek_oggdemux.sh -# gstreamer_video_stop_oggdemux.sh -# gstreamer_video_theoradec.sh -# ogg video: Ogg data, Skeleton v4.0 -GT_KITTENS="/usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/data/kittens.ogg" - -# used in script:gstreamer_image_pngdec.sh -# png file: PNG image data, 640 x 320, 8-bit/color RGB, non-interlaced -GT_IMAGE_PNG="/usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/data/timer2.png" - -# used in script:gstreamer_audio_playbin2_ulaw_8bit_stereo_44.1khz.sh -# wav audio: RIFF (little-endian) data, WAVE audio, ITU G.711 mu-law, stereo 44100 Hz -GT_AUDIO_ULAW="/usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/data/u-LAW_8bit_Stereo_44.1KHz_120sec\(10MB\)_AKM.wav" - -## END ## - -export DISPLAY=:0.0 diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_alawenc.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_alawenc.sh deleted file mode 100755 index 24511a2..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_alawenc.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer a-law encode status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 autoaudiosrc num-buffers=100 ! audioconvert ! alawenc ! wavenc ! filesink location=/tmp/mulawenc.wav &> $TEST_RESULT &" -else - gst-launch-1.0 autoaudiosrc num-buffers=100 ! audioconvert ! alawenc ! wavenc ! filesink location=/tmp/mulawenc.wav &> $TEST_RESULT & -fi - -sleep 5 - -a=$(cat $TEST_RESULT | grep "PLAYING") - - -if [ "$a" = "Setting pipeline to PLAYING ..." ]; then - echo "gstreamer alawenc pass" -else - echo "gstreamer alawenc fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_alsasink.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_alsasink.sh deleted file mode 100755 index 968467a..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_alsasink.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008-2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer and autoaudiosink integration status -# -# TIMEOUT : 200 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 filesrc location="${GT_KITTENS}" num-buffers=30 ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink &> $TEST_RESULT &" - -sleep 5 - -a=$(cat $TEST_RESULT | grep "PLAYING") - - -if [ "$a" = "Setting pipeline to PLAYING ..." ]; then - echo "gstreamer alsasink pass" -else - echo "gstreamer alsasink fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_avidemux.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_avidemux.sh deleted file mode 100755 index 2a23ec9..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_avidemux.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008-2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer avidemux work status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 filesrc location=${GT_AUDIO_PCM_16} num-buffers=30 ! avidemux name=demux demux.audio_0 ! decodebin ! audioconvert ! audioresample ! autoaudiosink &> $TEST_RESULT &" - -sleep 5 - -a=$(cat $TEST_RESULT | grep "PLAYING") - - -if [ "$a" = "Setting pipeline to PLAYING ..." ]; then - echo "gstreamer avidemux pass" -else - echo "gstreamer avidemux fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_mulawenc.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_mulawenc.sh deleted file mode 100755 index f15f108..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_mulawenc.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer u-law encode status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 autoaudiosrc num-buffers=100 ! audioconvert ! mulawenc ! wavenc ! filesink location=/tmp/mulawenc.wav &> $TEST_RESULT &" - -sleep 5 - -a=$(cat $TEST_RESULT | grep "PLAYING") - - -if [ "$a" = "Setting pipeline to PLAYING ..." ]; then - echo "gstreamer alawenc pass" -else - echo "gstreamer alawenc fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_alaw.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_alaw.sh deleted file mode 100755 index 90d061c..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_alaw.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check pause status for audio a-LAW format. -# -# TIMEOUT: 160 -set -x - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/a-LAW_8bit_Stereo_44.1KHz_120sec\(10.1MB\)_AKM.wav num-buffers=200 ! wavparse ! alawdec ! audioconvert ! autoaudiosink 0:play 5:pause 10:play &> $TEST_RESULT &" - -sleep 15 - -a=$(cat $TEST_RESULT | grep "PAUSED") - - -if [ "$a" = "Passing to PAUSED" ]; then - echo "gstreamer pause pass" -else - echo "gstreamer pause fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_avidemux.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_avidemux.sh deleted file mode 100755 index 1a2475f..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_avidemux.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008-2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer avidemux pause status -# -# TIMEOUT: 200 -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_AUDIO_PCM_16} num-buffers=50 ! avidemux name=demux demux.audio_0 ! decodebin ! audioconvert ! audioresample ! autoaudiosink 0:play 0.5:pause 1:play &> $TEST_RESULT &" - -sleep 10 - -a=$(cat $TEST_RESULT | grep "PAUSED") - - -if [ "$a" = "Passing to PAUSED" ]; then - echo "gstreamer avidemux pause pass" -else - echo "gstreamer avidemux pause fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_lpcm.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_lpcm.sh deleted file mode 100755 index 8c47cd6..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_lpcm.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check pause status for audio Linear PCM format. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/LPCM_16bit_Stereo_44.1KHz_60sec\(10Mb\).wav num-buffers=200 ! wavparse ! audioconvert ! autoaudiosink 0:play 2:pause 5:play &> $TEST_RESULT &" - -sleep 10 - -a=$(cat $TEST_RESULT | grep "PAUSED") - - -if [ "$a" = "Passing to PAUSED" ]; then - echo "gstreamer pause pass" -else - echo "gstreamer pause fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_ogg.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_ogg.sh deleted file mode 100755 index 244e0f7..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_ogg.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# Modification: -# Li Cathy Date: 2012-03-07 -# Refine the pipeline -## -# DESCR: -# Check gstreamer play status for ogg codec -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_KITTENS} num-buffers=50 ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink 0:play 5:pause 10:play &> $TEST_RESULT &" - -sleep 15 - -a=$(cat $TEST_RESULT | grep "PAUSED") - - -if [ "$a" = "Passing to PAUSED" ]; then - echo "gstreamer pause pass" -else - echo "gstreamer pause fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_ulaw.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_ulaw.sh deleted file mode 100755 index bc9ef60..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_pause_ulaw.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check pause status for audio u-LAW format. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/u-LAW_8bit_Stereo_44.1KHz_120sec\(10MB\)_AKM.wav num-buffers=200 ! wavparse ! mulawdec ! audioconvert ! autoaudiosink 0:play 5:pause 10:play &> $TEST_RESULT &" - -sleep 15 - -a=$(cat $TEST_RESULT | grep "PAUSED") - - -if [ "$a" = "Passing to PAUSED" ]; then - echo "gstreamer pause pass" -else - echo "gstreamer pause fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_alaw.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_alaw.sh deleted file mode 100755 index 18926e0..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_alaw.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check play status for audio a-LAW format. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/a-LAW_8bit_Stereo_44.1KHz_120sec\(10.1MB\)_AKM.wav num-buffers=50 ! wavparse ! alawdec ! audioconvert ! autoaudiosink 2:play &> $TEST_RESULT &" - -sleep 5 - -a=$(cat $TEST_RESULT | grep "PLAYING") -echo $a - - -if [ "$a" = "Passing to PLAYING" ]; then - echo "gstreamer play pass" -else - echo "gstreamer play fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_avidemux.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_avidemux.sh deleted file mode 100755 index 39e8bb1..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_avidemux.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008-2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer avidemux play status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_AUDIO_PCM_16} num-buffers=30 ! avidemux name=demux demux.audio_00 ! decodebin ! audioconvert ! audioresample ! autoaudiosink 0:play &> $TEST_RESULT &" - -sleep 5 - -a=$(cat $TEST_RESULT | grep "PLAYING") - -if [ "$a" = "Passing to PLAYING" ]; then - echo "gstreamer avidemux play pass" -else - echo "gstreamer avidemux play fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_lpcm.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_lpcm.sh deleted file mode 100755 index c3ddf52..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_lpcm.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check play status for audio Linear PCM format. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/LPCM_16bit_Stereo_44.1KHz_60sec\(10Mb\).wav num-buffers=50 ! wavparse ! audioconvert ! autoaudiosink 0:play &> $TEST_RESULT &" - -sleep 5 - -a=$(cat $TEST_RESULT | grep "PLAYING") - - -if [ "$a" = "Passing to PLAYING" ]; then - echo "gstreamer play pass" -else - echo "gstreamer play fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_ogg.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_ogg.sh deleted file mode 100755 index 17ceca8..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_ogg.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer play status for ogg codec -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_KITTENS} num-buffers=30 ! oggdemux ! vorbisdec ! audioconvert ! autoaudiosink 0:play &> $TEST_RESULT &" - -sleep 5 - -a=$(cat $TEST_RESULT | grep "PLAYING") - - -if [ "$a" = "Passing to PLAYING" ]; then - echo "gstreamer play pass" -else - echo "gstreamer play fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_ulaw.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_ulaw.sh deleted file mode 100755 index ef34aab..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_play_ulaw.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check play status for audio u-LAW format. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/u-LAW_8bit_Stereo_44.1KHz_120sec\(10MB\)_AKM.wav num-buffers=50 ! wavparse ! mulawdec ! audioconvert ! autoaudiosink 0:play &> $TEST_RESULT &" - -sleep 10 - -a=$(cat $TEST_RESULT | grep "PLAYING") - - -if [ "$a" = "Passing to PLAYING" ]; then - echo "gstreamer play pass" -else - echo "gstreamer play fail" - cat $TEST_RESULT - ERT=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_alaw_8bit_stereo_44.1khz.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_alaw_8bit_stereo_44.1khz.sh deleted file mode 100755 index e3e7e4e..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_alaw_8bit_stereo_44.1khz.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011, Intel Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation; either version 2 of the License, -# or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check local audio playback of a-LAW format by gst-launch-1.0 and -# playbin2 with uri only. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - - -$(cd `dirname $0`;pwd)/playbin2.sh "file://${GT_AUDIO_PCM_16}" - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_http_alaw.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_http_alaw.sh deleted file mode 100755 index 31cd38b..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_http_alaw.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011, Intel Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation; either version 2 of the License, -# or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check streamimg audio through http of a-LAW format -# by gst-launch-1.0 and playbin2 with uri only. -# -# TIMEOUT: 300 - - -. $(cd `dirname $0`;pwd)/env.sh - - -$(cd `dirname $0`;pwd)/playbin2.sh "$HTTP/${GT_HTTP_AUDIO_ALAW}" 15 - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_http_imaadpcm.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_http_imaadpcm.sh deleted file mode 100755 index 77af118..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_http_imaadpcm.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011, Intel Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation; either version 2 of the License, -# or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check streamimg audio through http of IMA ADPCM format -# by gst-launch-1.0 and playbin2 with uri only. -# -# TIMEOUT: 300 - - -. $(cd `dirname $0`;pwd)/env.sh - - -$(cd `dirname $0`;pwd)/playbin2.sh "$HTTP/${GT_HTTP_IMAADPCM}" 15 - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_http_lpcm.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_http_lpcm.sh deleted file mode 100755 index 2730e50..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_http_lpcm.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011, Intel Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation; either version 2 of the License, -# or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check streamimg audio through http of Linear PCM format -# by gst-launch-1.0 and playbin2 with uri only. -# -# TIMEOUT: 300 - - -. $(cd `dirname $0`;pwd)/env.sh - - -$(cd `dirname $0`;pwd)/playbin2.sh "$HTTP/Contents/Audio/Linear_PCM/LPCM_16bit_Stereo_44.1KHz_60sec(10Mb).wav" 15 - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_http_ulaw.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_http_ulaw.sh deleted file mode 100755 index d860713..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_http_ulaw.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011, Intel Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation; either version 2 of the License, -# or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check streamimg audio through http of u-LAW format -# by gst-launch-1.0 and playbin2 with uri only. -# -# TIMEOUT: 300 - - -. $(cd `dirname $0`;pwd)/env.sh - - -$(cd `dirname $0`;pwd)/playbin2.sh "$HTTP/${GT_HTTP_AUDIO_ULAW}" 15 - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_imaadpcm_4bit_stereo_32khz_256kbps.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_imaadpcm_4bit_stereo_32khz_256kbps.sh deleted file mode 100755 index 0328def..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_imaadpcm_4bit_stereo_32khz_256kbps.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011, Intel Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation; either version 2 of the License, -# or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check local audio playback of IMA ADPCM format by gst-launch-1.0 and -# playbin2 with uri only. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - - -$(cd `dirname $0`;pwd)/playbin2.sh "file://${GT_IMAADPCM}" - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_lpcm_16bit_stereo_44.1khz.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_lpcm_16bit_stereo_44.1khz.sh deleted file mode 100755 index b72836e..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_lpcm_16bit_stereo_44.1khz.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011, Intel Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation; either version 2 of the License, -# or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check local audio playback of Linear PCM format by gst-launch-1.0 and -# playbin2 with uri only. -# -# TIMEOUT: 90 - - -. $(cd `dirname $0`;pwd)/env.sh - - -$(cd `dirname $0`;pwd)/playbin2.sh "file://${GT_AUDIO_LPCM_16}" - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_lpcm_24bit_stereo_48khz.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_lpcm_24bit_stereo_48khz.sh deleted file mode 100755 index 7f3e658..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_lpcm_24bit_stereo_48khz.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011, Intel Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation; either version 2 of the License, -# or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check local audio playback of Linear PCM format by gst-launch-1.0 and -# playbin2 with uri only. -# -# TIMEOUT: 90 - - -. $(cd `dirname $0`;pwd)/env.sh - - -$(cd `dirname $0`;pwd)/playbin2.sh "file://${GT_AUDIO_LPCM_24}" - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_ogg_vorbis_16bit_mono_8khz_42kbps.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_ogg_vorbis_16bit_mono_8khz_42kbps.sh deleted file mode 100755 index dc560d4..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_ogg_vorbis_16bit_mono_8khz_42kbps.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011, Intel Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation; either version 2 of the License, -# or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check local audio playback of OGG-Vorbis format by gst-launch-1.0 and -# playbin2 with uri only. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - - -$(cd `dirname $0`;pwd)/playbin2.sh "file://${GT_OGG_MONO}" - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_ulaw_8bit_stereo_44.1khz.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_ulaw_8bit_stereo_44.1khz.sh deleted file mode 100755 index ac07a21..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_playbin2_ulaw_8bit_stereo_44.1khz.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011, Intel Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation; either version 2 of the License, -# or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check local audio playback of u-LAW format by gst-launch-1.0 and -# playbin2 with uri only. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - - -$(cd `dirname $0`;pwd)/playbin2.sh "file://${GT_AUDIO_ULAW}" - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_pulsesink.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_pulsesink.sh deleted file mode 100755 index ad46c54..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_pulsesink.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check pulsesink plugins work status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 -v filesrc location=${GT_KITTENS} num-buffers=30 ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! volume volume=0.9 ! pulsesink &> $TEST_RESULT &" -else - gst-launch-1.0 -v filesrc location=${GT_KITTENS} num-buffers=30 ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! volume volume=0.9 ! pulsesink &> $TEST_RESULT & -fi -sleep 10 - -a=$(cat $TEST_RESULT | grep "PLAYING") - - -if [ "$a" = "Setting pipeline to PLAYING ..." ]; then - echo "gstreamer pulsesink pass" -else - echo "gstreamer pulsesink fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_pulsesrc.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_pulsesrc.sh deleted file mode 100755 index 7780f06..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_pulsesrc.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer pulsesrc status, which captures audio -# from a PulseAudio server -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 pulsesrc num-buffers=100 ! audioconvert ! wavenc ! filesink location=/tmp/pulsesrc.wav > $TEST_RESULT" -else - gst-launch-1.0 pulsesrc num-buffers=100 ! audioconvert ! wavenc ! filesink location=/tmp/pulsesrc.wav > $TEST_RESULT -fi - -sleep 10 - -a=$(cat $TEST_RESULT | grep "PLAYING") - - -if [ "$a" = "Setting pipeline to PLAYING ..." ]; then - echo "gstreamer pulsesrc pass" -else - echo "gstreamer pulsesrc fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_alaw.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_alaw.sh deleted file mode 100755 index a058d99..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_alaw.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check resume status for audio a-LAW format. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/a-LAW_8bit_Stereo_44.1KHz_120sec\(10.1MB\)_AKM.wav num-buffers=300 ! wavparse ! alawdec ! audioconvert ! autoaudiosink 0:play 5:stop 6:seek:10 &> $TEST_RESULT &" - -sleep 15 - -a=$(cat $TEST_RESULT | grep "READY") - - -if [ "$a" = "Passing to READY" ]; then - echo "gstreamer resume pass" -else - echo "gstreamer resume fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_avidemux.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_avidemux.sh deleted file mode 100755 index e0a01d7..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_avidemux.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008-2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer avidemux resume status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_AUDIO_PCM_16} num-buffers=60 ! avidemux name=demux demux.audio_0 ! decodebin ! audioconvert ! audioresample ! autoaudiosink 0:play 0.5:stop 1:seek:1.5 &> $TEST_RESULT &" -else - gst-auto-launch filesrc location=${GT_AUDIO_PCM_16} num-buffers=60 ! avidemux name=demux demux.audio_0 ! decodebin ! audioconvert ! audioresample ! autoaudiosink 0:play 0.5:stop 1:seek:1.5 &> $TEST_RESULT & -fi - -sleep 5 - -a=$(cat $TEST_RESULT | grep "READY") - - -if [ "$a" = "Passing to READY" ]; then - echo "gstreamer avidemux resume pass" -else - echo "gstreamer avidemux resume fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_lpcm.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_lpcm.sh deleted file mode 100755 index c1cbb9f..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_lpcm.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check resume status for audio Linear PCM format. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/LPCM_16bit_Stereo_44.1KHz_60sec\(10Mb\).wav num-buffers=300 ! wavparse ! audioconvert ! autoaudiosink 0:play 5:stop 6:seek:10 &> $TEST_RESULT &" - -sleep 15 - -a=$(cat $TEST_RESULT | grep "READY") - - -if [ "$a" = "Passing to READY" ]; then - echo "gstreamer resume pass" -else - echo "gstreamer resume fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_ogg.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_ogg.sh deleted file mode 100755 index e0b2890..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_ogg.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer resume status for ogg codec -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_KITTENS} ! oggdemux ! vorbisdec ! audioconvert ! autoaudiosink 0:play 5:stop 6:seek:10 &> $TEST_RESULT &" - -sleep 15 - -a=$(cat $TEST_RESULT | grep "READY") - - -if [ "$a" = "Passing to READY" ]; then - echo "gstreamer resume pass" -else - echo "gstreamer resume fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_ulaw.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_ulaw.sh deleted file mode 100755 index c695c89..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_resume_ulaw.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check resume status for audio u-LAW format. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/u-LAW_8bit_Stereo_44.1KHz_120sec\(10MB\)_AKM.wav num-buffers=300 ! wavparse ! mulawdec ! audioconvert ! autoaudiosink 0:play 5:stop 6:seek:10 &> $TEST_RESULT &" - -sleep 15 - -a=$(cat $TEST_RESULT | grep "READY") - - -if [ "$a" = "Passing to READY" ]; then - echo "gstreamer resume pass" -else - echo "gstreamer resume fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_alaw.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_alaw.sh deleted file mode 100755 index 1f3f553..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_alaw.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check seek status for audio a-LAW format. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/a-LAW_8bit_Stereo_44.1KHz_120sec\(10.1MB\)_AKM.wav num-buffers=50 ! wavparse ! alawdec ! audioconvert ! autoaudiosink 0:play 1:pause 2:seek:10 12:play &> $TEST_RESULT &" - -sleep 30 - -a=$(cat $TEST_RESULT | grep "Seeking") - - -if [ "$a" = "Seeking to second 10.000000" ]; then - echo "gstreamer seek pass" -else - echo "gstreamer seek fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_avidemux.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_avidemux.sh deleted file mode 100755 index 4735cd0..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_avidemux.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer avidemux seek status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_AUDIO_PCM_16} num-buffers=60 ! avidemux name=demux demux.audio_0 ! decodebin ! audioconvert ! audioresample ! autoaudiosink 0:play 0.5:seek:1 2:play &> $TEST_RESULT &" - -sleep 10 - -a=$(cat $TEST_RESULT | grep "Seeking") - - -if [ "$a" = "Seeking to second 1.000000" ]; then - echo "gstreamer avidemux seek pass" -else - echo "gstreamer avidemux seek fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_lpcm.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_lpcm.sh deleted file mode 100755 index dfde91c..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_lpcm.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check seek status for audio Linear PCM format. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/LPCM_16bit_Stereo_44.1KHz_60sec\(10Mb\).wav num-buffers=50 ! wavparse ! audioconvert ! autoaudiosink 0:play 1:pause 2:seek:10 12:play &> $TEST_RESULT &" - -sleep 15 - -a=$(cat $TEST_RESULT | grep "Seeking") - - -if [ "$a" = "Seeking to second 10.000000" ]; then - echo "gstreamer seek pass" -else - echo "gstreamer seek fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_ogg.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_ogg.sh deleted file mode 100755 index 47321ae..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_ogg.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer seek status for ogg codec -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_KITTENS} num-buffers=50 ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink 0:play 1:pause 2:seek:10 12:play &> $TEST_RESULT &" - -sleep 15 - -a=$(cat $TEST_RESULT | grep "Seeking") - - -if [ "$a" = "Seeking to second 10.000000" ]; then - echo "gstreamer seek pass" -else - echo "gstreamer seek fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_ulaw.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_ulaw.sh deleted file mode 100755 index 6c89806..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_seek_ulaw.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check seek status for audio u-LAW format. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/u-LAW_8bit_Stereo_44.1KHz_120sec\(10MB\)_AKM.wav num-buffers=50 ! wavparse ! mulawdec ! audioconvert ! autoaudiosink 0:play 1:pause 2:seek:10 12:play &> $TEST_RESULT &" - -sleep 15 - -a=$(cat $TEST_RESULT | grep "Seeking") - - -if [ "$a" = "Seeking to second 10.000000" ]; then - echo "gstreamer seek pass" -else - echo "gstreamer seek fail" - cat $TEST_RESULT - exit 1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_alaw.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_alaw.sh deleted file mode 100755 index 60c2ccf..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_alaw.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check stop status for audio a-LAW format. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/a-LAW_8bit_Stereo_44.1KHz_120sec\(10.1MB\)_AKM.wav num-buffers=300 ! wavparse ! alawdec ! audioconvert ! autoaudiosink 0:play 5:stop 6:seek:10 &> $TEST_RESULT &" - -sleep 15 - -a=$(cat $TEST_RESULT | grep "READY") - - -if [ "$a" = "Passing to READY" ]; then - echo "gstreamer stop pass" -else - echo "gstreamer stop fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_avidemux.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_avidemux.sh deleted file mode 100755 index bc1e047..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_avidemux.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer avidemux work status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_AUDIO_PCM_16} num-buffers=50 ! avidemux name=demux demux.audio_0 ! decodebin ! audioconvert ! audioresample ! autoaudiosink 0:play 0.5:stop 1:seek:1.5 &> $TEST_RESULT &" - -sleep 5 - -a=$(cat $TEST_RESULT | grep "READY") - - -if [ "$a" = "Passing to READY" ]; then - echo "gstreamer avidemux stop pass" -else - echo "gstreamer avidemux stop fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_lpcm.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_lpcm.sh deleted file mode 100755 index 56eae16..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_lpcm.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check stop status for audio Linear PCM format. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/LPCM_16bit_Stereo_44.1KHz_60sec\(10Mb\).wav num-buffers=300 ! wavparse ! audioconvert ! autoaudiosink 0:play 5:stop 6:seek:10 &> $TEST_RESULT &" - -sleep 15 - -a=$(cat $TEST_RESULT | grep "READY") - - -if [ "$a" = "Passing to READY" ]; then - echo "gstreamer stop pass" -else - echo "gstreamer stop fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_ogg.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_ogg.sh deleted file mode 100755 index ef5cea5..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_ogg.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer stop status for ogg codec -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_KITTENS} ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink 0:play 5:stop 6:seek:10 &> $TEST_RESULT &" - -sleep 15 - -a=$(cat $TEST_RESULT | grep "READY") - - -if [ "$a" = "Passing to READY" ]; then - echo "gstreamer stop pass" -else - echo "gstreamer stop fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_ulaw.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_ulaw.sh deleted file mode 100755 index 419449b..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_stop_ulaw.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check stop status for audio u-LAW format. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=$DATA_PATH/u-LAW_8bit_Stereo_44.1KHz_120sec\(10MB\)_AKM.wav num-buffers=300 ! wavparse ! mulawdec ! audioconvert ! autoaudiosink 0:play 5:stop 6:seek:10 &> $TEST_RESULT &" - -sleep 15 - -a=$(cat $TEST_RESULT | grep "READY") - - -if [ "$a" = "Passing to READY" ]; then - echo "gstreamer stop pass" -else - echo "gstreamer stop fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_vorbisdec.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_vorbisdec.sh deleted file mode 100755 index 9125a76..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_vorbisdec.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check vorbisdec work status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 filesrc location=${GT_KITTENS} num-buffers=30 ! oggdemux ! vorbisdec ! audioconvert ! autoaudiosink &> $TEST_RESULT &" - -sleep 5 - -a=$(cat $TEST_RESULT | grep "PLAYING") - - -if [ "$a" = "Setting pipeline to PLAYING ..." ]; then - echo "gstreamer vorbisdec pass" -else - echo "gstreamer vorbisdec fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_audio_vorbisenc.sh b/ivi/tts-gstreamer-tests/src/gstreamer_audio_vorbisenc.sh deleted file mode 100755 index d4919eb..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_audio_vorbisenc.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -#DESCR : Check gstreamer vorbis codec encode status -#TIMEOUT : 200 - -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check vorbisenc work status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ -f /tmp/vorbisenc.ogg ];then rm -rf /tmp/vorbisenc.ogg;fi -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 -v pulsesrc num-buffers=100 ! audioconvert ! vorbisenc ! oggmux ! filesink location=/tmp/vorbisenc.ogg &>$TEST_RESULT &" -else - gst-launch-1.0 -v pulsesrc num-buffers=100 ! audioconvert ! vorbisenc ! oggmux ! filesink location=/tmp/vorbisenc.ogg &>$TEST_RESULT & -fi - -#gst-launch-1.0 -v autoaudiosrc num-buffers=100 ! audioconvert ! vorbisenc ! oggmux ! filesink location=/tmp/vorbisenc.ogg &>$TEST_RESULT & - -sleep 5 - -a=$(cat $TEST_RESULT | grep "EOS") - - -if [ "$a" = "Got EOS from element \"pipeline0\"." ]; then - echo "gstreamer vorbisenc pass" -else - echo "gstreamer vorbisenc fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_image_jpegdec.sh b/ivi/tts-gstreamer-tests/src/gstreamer_image_jpegdec.sh deleted file mode 100755 index d62fd28..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_image_jpegdec.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer jpeg decode status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 playbin uri="file://${GT_IMAGE_JPG}" &> $TEST_RESULT" -else - gst-launch-1.0 playbin uri="file://${GT_IMAGE_JPG}" &> $TEST_RESULT -fi -#gst-launch-1.0 filesrc location=$DATA_PATH/butterfly.jpg ! decodebin ! videoconvert ! autovideosink &> $TEST_RESULT -#gst-launch-1.0 filesrc location=$DATA_PATH/butterfly.jpg ! jpegdec ! videoscale ! autovideosink &> $TEST_RESULT - -a=$(cat $TEST_RESULT | grep "EOS") - -#if [ "$a" = "Got EOS from element \"pipeline0\"." ]; then -if [ "$a" = "Got EOS from element \"playbin0\"." ]; then - echo "gstreamer jpegdec pass" -else - echo "gstreamer jpegdec fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_image_jpegenc.sh b/ivi/tts-gstreamer-tests/src/gstreamer_image_jpegenc.sh deleted file mode 100755 index 0691951..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_image_jpegenc.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer JPEG encode status -# -# TIMEOUT: 60 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 v4l2src num-buffers=1 ! jpegenc ! filesink location=/tmp/jpegenc.jpg &> $TEST_RESULT &" -else - gst-launch-1.0 v4l2src num-buffers=1 ! jpegenc ! filesink location=/tmp/jpegenc.jpg &> $TEST_RESULT & -fi - -#gst-launch-1.0 v4l2src num-buffers=1 ! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! jpegenc ! filesink location=/tmp/jpegenc.jpg &> $TEST_RESULT & - -sleep 5 - -a=$(cat $TEST_RESULT | grep "New clock") - - -if [ "$a" = "New clock: GstSystemClock" ]; then - echo "gstreamer jpegenc pass" -else - echo "gstreamer jpegenc fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_image_pngdec.sh b/ivi/tts-gstreamer-tests/src/gstreamer_image_pngdec.sh deleted file mode 100755 index ee5ab98..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_image_pngdec.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer png decode status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 filesrc location=${GT_IMAGE_PNG} ! decodebin ! videoconvert ! autovideosink &> $TEST_RESULT" -else - gst-launch-1.0 filesrc location=${GT_IMAGE_PNG} ! decodebin ! videoconvert ! autovideosink &> $TEST_RESULT -fi -#gst-launch-1.0 filesrc location=$DATA_PATH/timer2.png ! pngdec ! videoscale ! autovideosink &> $TEST_RESULT - -sleep 1 - -a=$(cat $TEST_RESULT | grep "EOS") - - -if [ "$a" = "Got EOS from element \"pipeline0\"." ]; then - echo "gstreamer pngdec pass" -else - echo "gstreamer pngdec fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_image_pngenc.sh b/ivi/tts-gstreamer-tests/src/gstreamer_image_pngenc.sh deleted file mode 100755 index c270fa5..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_image_pngenc.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer PNG encode status -# -# TIMEOUT: 60 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 v4l2src num-buffers=1 ! autovideoconvert ! pngenc ! filesink location=/tmp/pngenc.jpg &> $TEST_RESULT &" -else - gst-launch-1.0 v4l2src num-buffers=1 ! autovideoconvert ! pngenc ! filesink location=/tmp/pngenc.jpg &> $TEST_RESULT & -fi -#gst-launch-1.0 v4l2src num-buffers=1 ! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! pngenc ! filesink location=/tmp/pngenc.jpg &> $TEST_RESULT & - -sleep 5 - -a=$(cat $TEST_RESULT | grep "New clock") - - -if [ "$a" = "New clock: GstSystemClock" ]; then - echo "gstreamer pngenc pass" -else - echo "gstreamer pngenc fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_video_http_ogg.sh b/ivi/tts-gstreamer-tests/src/gstreamer_video_http_ogg.sh deleted file mode 100755 index 5c4e0d3..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_video_http_ogg.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008-2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI < jessica.ji@intel.com > -# Zhiqiang Zhang -# -# DESCR: -# Check http status of OGG Theora Vorbis format -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh - -$(cd `dirname $0`;pwd)/playbin2.sh "$HTTP/${GT_HTTP_VIDEO_OGV}" 15 - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_video_oggdemux.sh b/ivi/tts-gstreamer-tests/src/gstreamer_video_oggdemux.sh deleted file mode 100755 index b1e5a77..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_video_oggdemux.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008-2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer oggdemux work status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 filesrc location=${GT_KITTENS} num-buffers=30 ! oggdemux name=demuxer demuxer. ! queue ! theoradec ! videoscale ! autovideosink demuxer. ! queue ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink &> $TEST_RESULT &" -else - gst-launch-1.0 filesrc location=${GT_KITTENS} num-buffers=30 ! oggdemux name=demuxer demuxer. ! queue ! theoradec ! videoscale ! autovideosink demuxer. ! queue ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink &> $TEST_RESULT & -fi -sleep 10 - -a=$(cat $TEST_RESULT | grep "PLAYING") - - -if [ "$a" = "Setting pipeline to PLAYING ..." ]; then - echo "gstreamer oggdemux pass" -else - echo "gstreamer oggdemux fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_video_pause_oggdemux.sh b/ivi/tts-gstreamer-tests/src/gstreamer_video_pause_oggdemux.sh deleted file mode 100755 index 24fbc1c..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_video_pause_oggdemux.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer oggdemux pause status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_KITTENS} num-buffers=50 ! oggdemux name=demuxer demuxer. ! queue ! theoradec ! videoscale ! autovideosink demuxer. ! queue ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink 0:play 5:pause 10:play &> $TEST_RESULT &" -else - gst-auto-launch filesrc location=${GT_KITTENS} num-buffers=50 ! oggdemux name=demuxer demuxer. ! queue ! theoradec ! videoscale ! autovideosink demuxer. ! queue ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink 0:play 5:pause 10:play &> $TEST_RESULT & -fi - -sleep 12 - -a=$(cat $TEST_RESULT | grep "PAUSED") - - -if [ "$a" = "Passing to PAUSED" ]; then - echo "gstreamer oggdemux pause pass" -else - echo "gstreamer oggdemux pause fail" - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_video_play_oggdemux.sh b/ivi/tts-gstreamer-tests/src/gstreamer_video_play_oggdemux.sh deleted file mode 100755 index 7039329..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_video_play_oggdemux.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008-2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer oggdemux play status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_KITTENS} num-buffers=50 ! oggdemux name=demuxer demuxer. ! queue ! theoradec ! videoscale ! autovideosink demuxer. ! queue ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink 0:play &> $TEST_RESULT &" -else - gst-auto-launch filesrc location=${GT_KITTENS} num-buffers=50 ! oggdemux name=demuxer demuxer. ! queue ! theoradec ! videoscale ! autovideosink demuxer. ! queue ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink 0:play &> $TEST_RESULT & -fi - -sleep 5 - -a=$(cat $TEST_RESULT | grep "PLAYING") -echo $a - - -if [ "$a" = "Passing to PLAYING" ]; then - echo "gstreamer oggdemux play pass" -else - echo "gstreamer oggdemux play fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_video_playbin2_ogg_theora_vorbis.sh b/ivi/tts-gstreamer-tests/src/gstreamer_video_playbin2_ogg_theora_vorbis.sh deleted file mode 100755 index b3921ec..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_video_playbin2_ogg_theora_vorbis.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011, Intel Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation; either version 2 of the License, -# or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Authors: -# Zhang Zhiqiang -# -# DESCR: -# Check local video playback of OGG-Theora-Vorbis format -# by gst-launch-1.0 and playbin2 with uri only. -# -# TIMEOUT: 160 - - -. $(cd `dirname $0`;pwd)/env.sh - - -$(cd `dirname $0`;pwd)/playbin2.sh "file://${GT_KITTENS}" - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_video_resume_oggdemux.sh b/ivi/tts-gstreamer-tests/src/gstreamer_video_resume_oggdemux.sh deleted file mode 100755 index 7026a5b..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_video_resume_oggdemux.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer oggdemux resume status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_KITTENS} num-buffers=50 ! oggdemux name=demuxer demuxer. ! queue ! theoradec ! videoscale ! autovideosink demuxer. ! queue ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink 0:play 5:stop 6:seek:10 &> $TEST_RESULT &" -else - gst-auto-launch filesrc location=${GT_KITTENS} num-buffers=50 ! oggdemux name=demuxer demuxer. ! queue ! theoradec ! videoscale ! autovideosink demuxer. ! queue ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink 0:play 5:stop 6:seek:10 &> $TEST_RESULT & -fi -sleep 15 - -a=$(cat $TEST_RESULT | grep "READY") - - -if [ "$a" = "Passing to READY" ]; then - echo "gstreamer oggdemux resume pass" -else - echo "gstreamer oggav resume fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_video_seek_oggdemux.sh b/ivi/tts-gstreamer-tests/src/gstreamer_video_seek_oggdemux.sh deleted file mode 100755 index 0d36217..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_video_seek_oggdemux.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008-2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer oggdemux seek status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_KITTENS} num-buffers=50 ! oggdemux name=demuxer demuxer. ! queue ! theoradec ! videoscale ! autovideosink demuxer. ! queue ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink 0:play 1:pause 2:seek:10 12:play &>$TEST_RESULT" -else - gst-auto-launch filesrc location=${GT_KITTENS} num-buffers=50 ! oggdemux name=demuxer demuxer. ! queue ! theoradec ! videoscale ! autovideosink demuxer. ! queue ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink 0:play 1:pause 2:seek:10 12:play &>$TEST_RESULT -fi - -sleep 15 - -a=$(cat $TEST_RESULT | grep "Seeking") - - -if [ "$a" = "Seeking to second 10.000000" ]; then - echo "gstreamer oggdemux seek pass" -else - echo "gstreamer oggdemux seek fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_video_stop_oggdemux.sh b/ivi/tts-gstreamer-tests/src/gstreamer_video_stop_oggdemux.sh deleted file mode 100755 index 9e916e4..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_video_stop_oggdemux.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008-2011 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check gstreamer oggdemux stop status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch filesrc location=${GT_KITTENS} num-buffers=50 ! oggdemux name=demuxer demuxer. ! queue ! theoradec ! videoscale ! autovideosink demuxer. ! queue ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink 0:play 5:stop 6:seek:10 &> $TEST_RESULT &" -else - gst-auto-launch filesrc location=${GT_KITTENS} num-buffers=50 ! oggdemux name=demuxer demuxer. ! queue ! theoradec ! videoscale ! autovideosink demuxer. ! queue ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink 0:play 5:stop 6:seek:10 &> $TEST_RESULT & -fi - -sleep 15 - -a=$(cat $TEST_RESULT | grep "READY") - - -if [ "$a" = "Passing to READY" ]; then - echo "gstreamer oggdemux stop pass" -else - echo "gstreamer oggdemux stop fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_video_theoradec.sh b/ivi/tts-gstreamer-tests/src/gstreamer_video_theoradec.sh deleted file mode 100755 index 2a3380d..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_video_theoradec.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check theoradec work status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 filesrc location=${GT_KITTENS} num-buffers=30 ! oggdemux ! theoradec ! videoscale ! autovideosink &> $TEST_RESULT &" -else - gst-launch-1.0 filesrc location=${GT_KITTENS} num-buffers=30 ! oggdemux ! theoradec ! videoscale ! autovideosink &> $TEST_RESULT & -fi - -sleep 5 - -a=$(cat $TEST_RESULT | grep "PLAYING") - - -if [ "$a" = "Setting pipeline to PLAYING ..." ]; then - echo "gstreamer theoradec pass" -else - echo "gstreamer theoradec fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/gstreamer_video_theoraenc.sh b/ivi/tts-gstreamer-tests/src/gstreamer_video_theoraenc.sh deleted file mode 100755 index ff8c6f6..0000000 --- a/ivi/tts-gstreamer-tests/src/gstreamer_video_theoraenc.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# It is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA. -# -# Authors: -# Jessica JI -# Zhang Zhiqiang -# -# DESCR: -# Check theoraenc work status -# -# TIMEOUT: 200 - - -. $(cd `dirname $0`;pwd)/env.sh - -su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 v4l2src num-buffers=20 ! autovideoconvert ! theoraenc ! oggmux ! filesink location=/tmp/theoraenc.ogg &> $TEST_RESULT &" - -sleep 30 - -a=$(cat $TEST_RESULT | grep "New clock") - - -if [ "$a" = "New clock: GstSystemClock" ]; then - echo "gstreamer thenraenc pass" -else - echo "gstreamer thenoraenc fail" - cat $TEST_RESULT - RET=1 -fi - -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - - diff --git a/ivi/tts-gstreamer-tests/src/playbin2.sh b/ivi/tts-gstreamer-tests/src/playbin2.sh deleted file mode 100755 index 2c0cf43..0000000 --- a/ivi/tts-gstreamer-tests/src/playbin2.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011, Intel Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation; either version 2 of the License, -# or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Authors: -# Zhang Zhiqiang -# -# Modificator: -# Li Cathy Date: 2012-02-24 -# -# DESCR: -# Test GStreamer pipeline using playbin2 with uri only. -# - - -# check parameter sanity -if [ $# -lt 1 ]; then - echo "Usage: $0 [TIMEOUT]" - echo " URI is to set playbin uri with protocol FILEE/HTTP/RTSP" - echo " TIMEOUT is the time in seconds you want playbin2 to play the media" - echo "You need to set URI of the media file to play" - exit 1 -fi - - -. $(cd `dirname $0`;pwd)/env.sh - - -# play the media with GStreamer su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch and playbin2 for 10 seconds -# su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-auto-launch playbin2 uri=$1 0:play 10:eos - -# play the media with GStreamer gst-launch and playbin2 -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 && gst-launch-1.0 playbin uri="$1" &> $TEST_RESULT &" -else - gst-launch-1.0 playbin uri=$1 &> $TEST_RESULT & -fi - -# check error message after TIMEOUT or 3 seconds -if [ -n "$2" ]; then - sleep $2 -else - sleep 3 -fi - -ERR=$(cat $TEST_RESULT | grep "ERROR") - -if [ -n "$ERR" ]; then - cat $TEST_RESULT - RET=1 -fi - -# clean up -. $(cd `dirname $0`;pwd)/cleanup.sh -exit $RET - diff --git a/ivi/tts-gstreamer-tests/tests.xml b/ivi/tts-gstreamer-tests/tests.xml deleted file mode 100644 index 61908c9..0000000 --- a/ivi/tts-gstreamer-tests/tests.xml +++ /dev/null @@ -1,1039 +0,0 @@ - - - - - - - - - - - Check streamimg audio through http of IMA ADPCM format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_playbin2_http_imaadpcm.sh - - - Netbook - TV - - - - - - - - - Check local audio playback of IMA ADPCM format by gst-launch-0.10 and playbin2 with uri only. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_playbin2_imaadpcm_4bit_stereo_32khz_256kbps.sh - - - Netbook - TV - - - - - - - - - - - Check gstreamer and alsa plugins integration status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_alsasink.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer pause status for ogg codec - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_pause_ogg.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer play status for ogg codec - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_play_ogg.sh - - - IVI - Netbook - TV - - - - - - - - - Check local audio playback of OGG-Vorbis format by gst-launch-0.10 and playbin2 with uri only. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_playbin2_ogg_vorbis_16bit_mono_8khz_42kbps.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer resume status for ogg codec - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_resume_ogg.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer seek status for ogg codec - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_seek_ogg.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer stop status for ogg codec - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_stop_ogg.sh - - - IVI - Netbook - TV - - - - - - - - - Check vorbisdec work status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_vorbisdec.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer vorbis codec encode status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_vorbisenc.sh - - - IVI - Netbook - TV - - - - - - - - - - Check gstreamer http plugins work status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_video_http_ogg.sh - - - IVI - Netbook - TV - - - - - - - - - Check oggdemux work status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_video_oggdemux.sh - - - IVI - Netbook - TV - - - - - - - - - - Check gstreamer oggdemux for pause status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_video_pause_oggdemux.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer oggdemux for play status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_video_play_oggdemux.sh - - - IVI - Netbook - TV - - - - - - - - - Check local video playback of OGG-Theora-Vorbis format by gst-launch-0.10 and playbin2 with uri only. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_video_playbin2_ogg_theora_vorbis.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer oggdemux for resume status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_video_resume_oggdemux.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer oggdemux for seek status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_video_seek_oggdemux.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer oggdemux for stop status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_video_stop_oggdemux.sh - - - IVI - Netbook - TV - - - - - - - - - Check theoradec plugins work status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_video_theoradec.sh - - - Netbook - TV - IVI - - - - - - - - - Check gstreamer theora codec encode status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_video_theoraenc.sh - - - Netbook - TV - IVI_Crossville - - - - - - - - - - - Check alawenc plugins work status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_alawenc.sh - - - IVI - Netbook - TV - - - - - - - - - Check avidemux plugins work status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_avidemux.sh - - - IVI - Netbook - TV - - - - - - - - - Check mulawsrc plugins work status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_mulawenc.sh - - - IVI - Netbook - TV - - - - - - - - - Check pause status for audio a-LAW format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_pause_alaw.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer avidemux for pause status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_pause_avidemux.sh - - - IVI - Netbook - TV - - - - - - - - - Check pause status for audio Linear PCM format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_pause_lpcm.sh - - - IVI - Netbook - TV - - - - - - - - - Check pause status for audio u-LAW format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_pause_ulaw.sh - - - IVI - Netbook - TV - - - - - - - - - Check play status for audio a-LAW format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_play_alaw.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer avidemux for play status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_play_avidemux.sh - - - IVI - Netbook - TV - - - - - - - - - Check play status for audio Linear PCM format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_play_lpcm.sh - - - IVI - Netbook - TV - - - - - - - - - Check play status for audio u-LAW format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_play_ulaw.sh - - - IVI - Netbook - TV - - - - - - - - - Check local audio playback of a-LAW format by gst-launch-0.10 and playbin2 with uri only. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_playbin2_alaw_8bit_stereo_44.1khz.sh - - - IVI - Netbook - TV - - - - - - - - - Check streamimg audio through http of a-LAW format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_playbin2_http_alaw.sh - - - IVI - Netbook - TV - - - - - - - - - Check streamimg audio through http of Linear PCM format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_playbin2_http_lpcm.sh - - - IVI - Netbook - TV - - - - - - - - - Check streamimg audio through http of u-LAW format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_playbin2_http_ulaw.sh - - - IVI - Netbook - TV - - - - - - - - - Check local audio playback of Linear PCM format by gst-launch-0.10 and playbin2 with uri only. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_playbin2_lpcm_16bit_stereo_44.1khz.sh - - - IVI - Netbook - TV - - - - - - - - - Check local audio playback of Linear PCM format by gst-launch-0.10 and playbin2 with uri only. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_playbin2_lpcm_24bit_stereo_48khz.sh - - - IVI - Netbook - TV - - - - - - - - - Check local audio playback of u-LAW format by gst-launch-0.10 and playbin2 with uri only. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_playbin2_ulaw_8bit_stereo_44.1khz.sh - - - IVI - Netbook - TV - - - - - - - - - Check pulsesink plugins work status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_pulsesink.sh - - - IVI - Netbook - TV - - - - - - - - - Check pulsesrc plugins work status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_pulsesrc.sh - - - IVI - Netbook - TV - - - - - - - - - Check resume status for audio a-LAW format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_resume_alaw.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer avidemux for resume status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_resume_avidemux.sh - - - IVI - Netbook - TV - - - - - - - - - Check resume status for audio Linear PCM format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_resume_lpcm.sh - - - IVI - Netbook - TV - - - - - - - - - Check resume status for audio u-LAW format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_resume_ulaw.sh - - - IVI - Netbook - TV - - - - - - - - - Check seek status for audio a-LAW format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_seek_alaw.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer avidemux for seek status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_seek_avidemux.sh - - - IVI - Netbook - TV - - - - - - - - - Check seek status for audio Linear PCM format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_seek_lpcm.sh - - - IVI - Netbook - TV - - - - - - - - - Check seek status for audio u-LAW format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_seek_ulaw.sh - - - IVI - Netbook - TV - - - - - - - - - Check stop status for audio a-LAW format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_stop_alaw.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer avidemux for stop status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_stop_avidemux.sh - - - IVI - Netbook - TV - - - - - - - - - Check stop status for audio Linear PCM format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_stop_lpcm.sh - - - IVI - Netbook - TV - - - - - - - - - Check stop status for audio u-LAW format. - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_audio_stop_ulaw.sh - - - IVI - Netbook - TV - - - - - - - - - - Check gstreamer jpeg decode status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_image_jpegdec.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer jpeg encode status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_image_jpegenc.sh - - - Netbook - TV - IVI_Crossville - - - - - - - - - Check gstreamer png decode status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_image_pngdec.sh - - - IVI - Netbook - TV - - - - - - - - - Check gstreamer png encode status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-gstreamer-tests/gstreamer_image_pngenc.sh - - - Netbook - TV - IVI_Crossville - - - - - - diff --git a/ivi/tts-pulseaudio-tests/README b/ivi/tts-pulseaudio-tests/README deleted file mode 100644 index fe8cc85..0000000 --- a/ivi/tts-pulseaudio-tests/README +++ /dev/null @@ -1,34 +0,0 @@ ------------------------ - Introduction ------------------------ -tts-pulseaudio-tests is a test suite for pulseaudio. -Pulseaudio is an open source audio server under Linux. - -The auto test cases cover the basic sink & source query, -sink & source load/unload, setup default sink & source, -playback sample file etc. - - - ------------------------ -How to Run ------------------------ -Pre-condition: -1. if you don't have testkit-lite, you can get it from https://github.com/testkit/testkit-lite - -Steps: -1. prepare some media files and configure /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/env.sh --- specify in env.sh -2. launch terminal app in weston UI and play an audio by command "paplay /usr/share/sounds/alsa/Front_Center.wav" to trigger Pulseaudio daemon -3. testkit-lite -f /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/tests.xml --comm localhost -o ./results.xml - - ----------------------- -Test Environment setup ----------------------- -Some audio files are needed(WAVE files), you can configure /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/env.sh to specify -them; e.g. MF_TEST_8K="/usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/data/PCM_16bit_Mono_8KHz_128Kbps_60sec\(1Mb\).wav" - - ------------------------ -TODO ------------------------ diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Check_daemon_status.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Check_daemon_status.sh deleted file mode 100755 index 469f456..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Check_daemon_status.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# Copyright (C) 2010 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Chen, Hao -# - -# Modifications: -# Modificator: shuang.wan@intel.com Date: 2010-07-09 -# Content of Modification -# 1) Supplement the comments to the script file -# 2) Move the environment variables initlization to env.sh - -# Modificator: cathy.li@intel.com Date: 2012-05-24 -# Update the code of check pulseaudio daemon -#DESCR: Check PulseAudio daemon - -DAEMON="pulseaudio" - -# Setup the execution environment -. $(cd `dirname $0`;pwd)/env.sh - -#pulseaudio --check - -if ps -ef |grep -v "grep" |grep "$DAEMON" >/dev/null 2>&1 -then - echo "Success: $DAEMON daemon is running" -else - echo "Fail: $DAEMON daemon is not running" - exit 1 -fi - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Check_default_settings.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Check_default_settings.sh deleted file mode 100755 index 6a2f93f..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Check_default_settings.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# Copyright (C) 2010 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Chen, Hao -# -# Modifications: -# Modificator: shuang.wan@intel.com Date: 2010-07-09 -# Content of Modification -# 1) Supplement the comments to the script file -# 2) Move the environment variables initlization to env.sh - -# Check default settings - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pulseaudio --dump-conf" -else - pulseaudio --dump-conf -fi -if [ $? -ne 0 ]; then - echo "Failed to pulseaudio --dump-conf" - exit 1 -fi -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pulseaudio --dump-modules" -else - pulseaudio --dump-modules -fi -if [ $? -ne 0 ]; then - echo "Failed to pulseaudio --dump-modules" - exit 1 -fi - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Check_loaded_statistics.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Check_loaded_statistics.sh deleted file mode 100755 index bff563a..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Check_loaded_statistics.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# Copyright (C) 2010 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Chen, Hao -# -# PulseAudio Statistics & all current loaded modules, available sinks, sources, streams and clients - -# Modifications: -# Modificator: shuang.wan@intel.com Date: 2010-07-09 -# Content of Modification -# 1) Supplement the comments to the script file -# 2) Move the environment variables initlization to env.sh - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c 'XDG_RUNTIME_DIR=/run/user/5000 pactl stat' -else - pactl stat -fi - -if [ $? -ne 0 ]; then - echo "Failed to pactl stat" - exit 1 -fi -if [ $UID = 0 ];then - su - app -c 'XDG_RUNTIME_DIR=/run/user/5000 pactl list' -else - pactl list -fi - -if [ $? -ne 0 ]; then - echo "Failed to pactl list" - exit 1 -fi diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Check_sample_cache.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Check_sample_cache.sh deleted file mode 100755 index 80755f4..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Check_sample_cache.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -# Copyright (C) 2010 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Chen, Hao -# -# load sample, play sample, unload sample - -# Modifications: -# Modificator: shuang.wan@intel.com Date: 2010-07-09 -# Content of Modification -# 1) Supplement the comments to the script file -# 2) Move the environment variables initlization to env.sh - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pactl upload-sample ${MF_TEST_WAV} test_sample" -else - pactl upload-sample ${MF_TEST_WAV} test_sample -fi -if [ $? -ne 0 ]; then - echo "Failed to upload-sample" - exit 1 -fi - -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pactl play-sample test_sample" -else - pactl play-sample test_sample -fi -if [ $? -ne 0 ]; then - echo "Failed to play sample" - exit 1 -fi - -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pactl remove-sample test_sample" -else - pactl remove-sample test_sample -fi -if [ $? -ne 0 ]; then - echo "Failed to unload modules" - exit 1 -fi - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Load_unload_module.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Load_unload_module.sh deleted file mode 100755 index b777192..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Load_unload_module.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -# Copyright (C) 2010 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Chen, Hao -# -# load module, unload module - -# Modifications: -# Modificator: shuang.wan@intel.com Date: 2010-07-09 -# Content of Modification -# 1) Supplement the comments to the script file -# 2) Move the environment variables initlization to env.sh - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cm load module-null-sink sink_name=pa_test_sink > /tmp/test_result" -else - pa_query_control -cm load module-null-sink sink_name=pa_test_sink > "$TEST_RESULT" -fi - -if [ $? -ne 0 ]; then - echo "Failed to load module" - exit 1 -fi -cat "$TEST_RESULT" - -index=`cat "$TEST_RESULT" | awk -F= '{print $2}'` -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qm" -else - pa_query_control -qm -fi - -if [ $? -ne 0 ]; then - echo "Failed to query modules" - exit 1 -fi -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cm unload `cat /tmp/test_result|awk -F= '{print $2}'`" -else - pa_query_control -cm unload $index -fi - -if [ $? -ne 0 ]; then - echo "Failed to unload modules" - exit 1 - -fi - -rm "$TEST_RESULT" diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_16bit_Mono_8KHz.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_16bit_Mono_8KHz.sh deleted file mode 100755 index c385a26..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_16bit_Mono_8KHz.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# Copyright (C) 2011 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Zhang, Zhiqiang -# -# DESCR: -# Play a mono raw PCM audio file by paplay with default settings -# -# TIMEOUT: 90 - -. $(cd `dirname $0`;pwd)/env.sh - -#DATA="$DATA_PATH/PCM_16bit_Mono_8KHz_128Kbps_60sec(1Mb).wav" -#if ! [ -f $DATA ]; then -# echo "Error: not exist the file $DATA" -# exit 1 -#fi - -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 paplay ${MF_TEST_8K}" -else - paplay ${MF_TEST_8K} -fi -if [ $? -ne 0 ]; then - echo "Failed to play the sample" - exit 1 -fi - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_16bit_Multichannel_48KHz.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_16bit_Multichannel_48KHz.sh deleted file mode 100755 index 739d53f..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_16bit_Multichannel_48KHz.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# Copyright (C) 2011 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Zhang, Zhiqiang -# -# DESCR: -# Play a multichannel raw PCM audio file by paplay with default settings -# -# TIMEOUT: 70 - - -. $(cd `dirname $0`;pwd)/env.sh - -#DATA="$DATA_PATH/PCM_16bit_5.1(Discrete)_48KHz_4608Kbps_38sec(21MB).wav" -#if ! [ -f $DATA ]; then -# echo "Error: not exist the file $DATA" -# exit 1 -#fi - -if [ $UID = 0 ];then - echo $MF_TEST_48K - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 paplay ${MF_TEST_48K}" -else - paplay $MF_TEST_48K -fi -if [ $? -ne 0 ]; then - echo "Failed to play the sample" - exit 1 -fi - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_16bit_Stereo_44.1KHz.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_16bit_Stereo_44.1KHz.sh deleted file mode 100755 index 12e6f7a..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_16bit_Stereo_44.1KHz.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# Copyright (C) 2011 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Zhang, Zhiqiang -# -# DESCR: -# Play a stereo raw PCM audio file by paplay with default settings -# -# TIMEOUT: 20 - - -. $(cd `dirname $0`;pwd)/env.sh - -#DATA="$DATA_PATH/PCM_16bit_Stereo_44.1KHz_1411Kbps_10s(1.6Mb).WAV" -#if ! [ -f $DATA ]; then -# echo "Error: not exist the file $DATA" -# exit 1 -#fi - -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 paplay ${MF_TEST_44K_1}" -else - paplay ${MF_TEST_44K_1} -fi - -if [ $? -ne 0 ]; then - echo "Failed to play the sample" - exit 1 -fi - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_2_streams.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_2_streams.sh deleted file mode 100755 index fa6a55c..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_2_streams.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# Copyright (C) 2011 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Zhang, Zhiqiang -# -# DESCR: -# Play 2 PCM audio files by paplay simultaneously with default settings -# -# TIMEOUT: 90 - - -. $(cd `dirname $0`;pwd)/env.sh - -#DATA1="$DATA_PATH/PCM_16bit_Stereo_44.1KHz_1411Kbps_10s(1.6Mb).WAV" -#if ! [ -f $DATA1 ]; then -# echo "Error: not exist the file $DATA1" -# exit 1 -#fi -# -#DATA2="$DATA_PATH/PCM_16bit_Stereo_44.1KHz_1412.2Kbps_60sec(10Mb).wav" -#if ! [ -f $DATA2 ]; then -# echo "Error: not exist the file $DATA2" -# exit 1 -#fi - -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 paplay ${MF_TEST_44K_1}" & su app -c "XDG_RUNTIME_DIR=/run/user/5000 paplay ${MF_TEST_44K_2}" -else - paplay ${MF_TEST_44K_1} & paplay ${MF_TEST_44K_2} -fi -if [ $? -ne 0 ]; then - echo "Failed to play the sample" - exit 1 -fi - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_stress_repeat.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_stress_repeat.sh deleted file mode 100755 index 70d22d0..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Play_PCM_stress_repeat.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -# Copyright (C) 2011 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Zhang, Zhiqiang -# -# DESCR: -# Play a raw PCM audio file by paplay repeat for 100 times with default settings -# -# TIMEOUT: 1500 - - -. $(cd `dirname $0`;pwd)/env.sh - -#DATA="$DATA_PATH/test.wav" -#if ! [ -f $DATA ]; then -# echo "Error: not exist the file $DATA" -# exit 1 -#fi - -count=1 -while [ "$count" -le 100 ] -do - echo "$count time(s) played." - if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 paplay ${MF_TEST_WAV}" - else - paplay ${MF_TEST_WAV} - fi - if [ $? -ne 0 ]; then - echo "Failed to paplay : $count" - exit 1 - fi - let "count += 1" # increase count -done - - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_loaded_clients.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_loaded_clients.sh deleted file mode 100755 index 0550ac7..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_loaded_clients.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -# Copyright (C) 2010 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Chen, Hao -# -# query loaded clients -# Modifications: -# Modificator: shuang.wan@intel.com Date: 2010-07-09 -# Content of Modification -# 1) Supplement the comments to the script file -# 2) Move the environment variables initlization to env.sh - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qc" -else - pa_query_control -qc -fi - -if [ $? -ne 0 ]; then - echo "Failed to query loaded clients" - exit 1 -fi - - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_loaded_sinks.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_loaded_sinks.sh deleted file mode 100755 index 8064159..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_loaded_sinks.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# Copyright (C) 2010 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Chen, Hao -# -# query loaded sinks - -# Modifications: -# Modificator: shuang.wan@intel.com Date: 2010-07-09 -# Content of Modification -# 1) Supplement the comments to the script file -# 2) Move the environment variables initlization to env.sh - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qs" -else - pa_query_control -qs -fi -if [ $? -ne 0 ]; then - echo "Failed to query loaded sinks" - exit 1 -fi - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_loaded_sources.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_loaded_sources.sh deleted file mode 100755 index 9341eb8..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_loaded_sources.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# Copyright (C) 2010 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Chen, Hao -# -# query loaded sources - -# Modifications: -# Modificator: shuang.wan@intel.com Date: 2010-07-09 -# Content of Modification -# 1) Supplement the comments to the script file -# 2) Move the environment variables initlization to env.sh - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qo" -else - pa_query_control -qo -fi - -if [ $? -ne 0 ]; then - echo "Failed to query loaded sources" - exit 1 -fi - - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_memory_statistics.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_memory_statistics.sh deleted file mode 100755 index 36e3db2..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_memory_statistics.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# Copyright (C) 2010 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Chen, Hao -# -# query memory block statistics - -# Modifications: -# Modificator: shuang.wan@intel.com Date: 2010-07-09 -# Content of Modification -# 1) Supplement the comments to the script file -# 2) Move the environment variables initlization to env.sh - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pacmd stat" -else - pacmd stat -fi -if [ $? -ne 0 ]; then - echo "Failed to pacmd stat" - exit 1 -fi diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_server_info.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_server_info.sh deleted file mode 100755 index 3f17570..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_server_info.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# Copyright (C) 2010 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Chen, Hao -# -# query server information - -# Modifications: -# Modificator: shuang.wan@intel.com Date: 2010-07-09 -# Content of Modification -# 1) Supplement the comments to the script file -# 2) Move the environment variables initlization to env.sh - -. $(cd `dirname $0`;pwd)/env.sh - -#pa_query_control -qi -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pacmd info" -else - pacmd info -fi -if [ $? -ne 0 ]; then - echo "Failed to query server information" - exit 1 -fi - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_sink_inputs.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_sink_inputs.sh deleted file mode 100755 index 09716c9..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Query_sink_inputs.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -# Copyright (C) 2010 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Chen, Hao -# -# query sink inputs - -# Modifications: -# Modificator: shuang.wan@intel.com Date: 2010-07-09 -# Content of Modification -# 1) Supplement the comments to the script file -# 2) Move the environment variables initlization to env.sh - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qI" -else - pa_query_control -qI -fi - -if [ $? -ne 0 ]; then - echo "Failed to query sink inputs" - exit 1 -fi - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Record_PCM_default.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Record_PCM_default.sh deleted file mode 100755 index d55d0dd..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Record_PCM_default.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -# Copyright (C) 2011 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Zhang, Zhiqiang -# -# DESCR: -# Record a raw PCM audio file by parec with default settings -# -# TIMEOUT: 90 - - -DATA=/tmp/parec.wav - -# Record a raw PCM audio/noise -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 parec --record /tmp/parec.wav &" -else - parec --record $DATA & -fi - -# Stop recording after 10 seconds -sleep 10 - -COUNT=0 -while [ "$COUNT" -lt 3 ] # try 3 times -do - PID=`ps -eaf | grep parec | grep -v "grep" | awk '{print $2}'` - if [ -z "$PID" ]; then - break; - fi - kill $PID - let "COUNT += 1" # increase COUNT -done - -# Check the recorded audio file -if ! [ -s $DATA ]; then - echo "Error: failed to record voice by parec with default settings" - exit 1 -fi - -rm -f $DATA -exit 0 diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Record_PCM_long_lasting.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Record_PCM_long_lasting.sh deleted file mode 100755 index b40682a..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Record_PCM_long_lasting.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -# Copyright (C) 2011 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Zhang, Zhiqiang -# Modification: -# Li Cathy -# Date: 2012-01-18 -# Update description and record time -# -# DESCR: -# Record a raw PCM audio file by parec long time with default settings, and -# play the recorded audio file by paplay -# -# TIMEOUT: 2000 - - -DATA=/tmp/parec.wav - -# Record a raw PCM audio/noise -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 parec --record /tmp/parec.wav &" -else - parec --record $DATA & -fi - -# Last for 900 seconds -sleep 900 - -COUNT=0 -while [ "$COUNT" -lt 3 ] # try 3 times -do - PID=`ps -eaf | grep parec | grep -v "grep" | awk '{print $2}'` - if [ -z "$PID" ]; then - break; - fi - kill $PID - let "COUNT += 1" # increase COUNT -done - -# Check the recorded audio file -if ! [ -s $DATA ]; then - echo "Error: failed to record voice by parec with default settings" - exit 1 -fi - -# Play the recorded audio file -if [ $UID = 0 ];then - su - app -c 'XDG_RUNTIME_DIR=/run/user/5000 paplay --raw /tmp/parec.wav' -else - paplay --raw $DATA -fi - -if [ $? -ne 0 ]; then - echo "Error: failed to play the recorded audio file" - exit 1 -fi - -rm -f $DATA -exit 0 diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Record_play_PCM_default.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Record_play_PCM_default.sh deleted file mode 100755 index fa45ff3..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Record_play_PCM_default.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -# Copyright (C) 2011 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Zhang, Zhiqiang -# -# DESCR: -# Record a raw PCM audio file by parec with default settings, and -# play the recorded audio file by paplay -# -# TIMEOUT: 120 - - -DATA=/tmp/parec.wav - -# Record a raw PCM audio/noise -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 parec --record /tmp/parec.wav &" -else - parec --record $DATA & -fi - -# Stop recording after 10 seconds -sleep 10 - -COUNT=0 -while [ "$COUNT" -lt 3 ] # try 3 times -do - PID=`ps -eaf | grep parec | grep -v "grep" | awk '{print $2}'` - if [ -z "$PID" ]; then - break; - fi - kill $PID - let "COUNT += 1" # increase COUNT -done - -# Check the recorded audio file -if ! [ -s $DATA ]; then - echo "Error: failed to record voice by parec with default settings" - exit 1 -fi - -# Play the recorded audio file -if [ $UID = 0 ];then - su - app -c 'XDG_RUNTIME_DIR=/run/user/5000 paplay --raw /tmp/parec.wav' -else - paplay --raw $DATA -fi -if [ $? -ne 0 ]; then - echo "Error: failed to play the recorded audio file" - exit 1 -fi - -rm -f $DATA -exit 0 diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_default_sink.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_default_sink.sh deleted file mode 100755 index 0cb8e00..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_default_sink.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -# Copyright (C) 2010 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Chen, Hao -# -# Set default sink - -# Modifications: -# Modificator: shuang.wan@intel.com Date: 2010-07-09 -# Content of Modification -# 1) Supplement the comments to the script file -# 2) Move the environment variables initlization to env.sh - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cm load module-null-sink sink_name=pa_test_sink > /tmp/test_result" -else - pa_query_control -cm load module-null-sink sink_name=pa_test_sink > "$TEST_RESULT" -fi - -if [ $? -ne 0 ]; then - echo "Failed to load module" - exit 1 -fi -cat "$TEST_RESULT" -index=`cat "$TEST_RESULT" | awk -F= '{print $2}'` -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cd sink pa_test_sink" -else - pa_query_control -cd sink pa_test_sink -fi - -if [ $? -ne 0 ]; then - echo "Failed to set default sink" - exit 1 -fi - -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cm unload `cat /tmp/test_result|awk -F= '{print $2}'`" -else - pa_query_control -cm unload $index -fi - -if [ $? -ne 0 ]; then - echo "Failed to unload module" - exit 1 -fi - -rm -f $TEST_RESULT -exit 0 diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_default_source.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_default_source.sh deleted file mode 100755 index 00315b1..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_default_source.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -# Copyright (C) 2010 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Chen, Hao -# -# Set default source - -# Modifications: -# Modificator: shuang.wan@intel.com Date: 2010-07-09 -# Content of Modification -# 1) Supplement the comments to the script file -# 2) Move the environment variables initlization to env.sh - -. $(cd `dirname $0`;pwd)/env.sh -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cm load module-pipe-source source_name=test_source > /tmp/test_result" -else - pa_query_control -cm load module-pipe-source source_name=test_source > "$TEST_RESULT" -fi - -if [ $? -ne 0 ]; then - echo "Failed to load module" - exit 1 -fi -cat "$TEST_RESULT" -index=`cat "$TEST_RESULT" | awk -F= '{print $2}'` -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cd source test_source" -else - pa_query_control -cd source test_source -fi - -if [ $? -ne 0 ]; then - echo "Failed to set default source" - exit 1 -fi - -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cm unload `cat /tmp/test_result|awk -F= '{print $2}'`" -else - pa_query_control -cm unload $index -fi - -if [ $? -ne 0 ]; then - echo "Failed to unload module" - exit 1 -fi - -rm -f "$TEST_RESULT" diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_sink_mute.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_sink_mute.sh deleted file mode 100755 index ca6c498..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_sink_mute.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash -# Copyright (C) 2011 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Zhang, Zhiqiang -# -# DESCR: -# Set default sink mute -# TIMEOUT: 30 - - -. $(cd `dirname $0`;pwd)/env.sh - -# Find the sink name and mute status -if [ $UID = 0 ];then - SINK_NAME=`su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qs"|head -n 1 | awk -F, '{print $2}' | cut -d "=" -f2` - MUTED=`su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qs" | head -n 1 | awk -F, '{print $5}' | cut -d "=" -f2` -else - SINK_NAME=`pa_query_control -qs | awk -F, '{print $2}' | cut -d "=" -f2` - MUTED=`pa_query_control -qs | awk -F, '{print $5}' | cut -d "=" -f2` -fi - -if [ $? -ne 0 ]; then - echo "Error: failed to find sink mute status" - echo "Please check that if pulseaudio is running or if proper permission is granted" - exit 1 -fi - -# Set sink muted -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cu sink $SINK_NAME 1" -else - pa_query_control -cu sink $SINK_NAME 1 -fi - -if [ $? -ne 0 ]; then - echo "Error: failed to set sink <$SINK_NAME> mute" - exit 1 -fi - -# Check sink mute status -if [ $UID = 0 ];then - SETED=`su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qs" | head -n 1 | awk -F, '{print $5}' | cut -d "=" -f2` -else - SETED=`pa_query_control -qs | awk -F, '{print $5}' | cut -d "=" -f2` -fi -if [ $SETED != "1" ]; then - echo "Error: not set sink mute" - exit 1 -fi - -# Post: set back the sink mute status -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cu sink $SINK_NAME $MUTED" -else - pa_query_control -cu sink $SINK_NAME $MUTED -fi -exit 0 - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_sink_unmute.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_sink_unmute.sh deleted file mode 100755 index a4f51c3..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_sink_unmute.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -# Copyright (C) 2011 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Zhang, Zhiqiang -# -# DESCR: -# Set default sink unmute -# TIMEOUT: 30 - - -. $(cd `dirname $0`;pwd)/env.sh - -# Find the sink name and mute status -if [ $UID = 0 ];then - SINK_NAME=`su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qs" |grep -i 'alsa_output' | awk -F, '{print $2}' | cut -d "=" -f2` - MUTED=`su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qs" |grep -i 'alsa_output' | awk -F, '{print $5}' | cut -d "=" -f2` -else - SINK_NAME=`pa_query_control -qs | awk -F, '{print $2}' | cut -d "=" -f2` - MUTED=`pa_query_control -qs | awk -F, '{print $5}' | cut -d "=" -f2` -fi - -if [ $? -ne 0 ]; then - echo "Error: failed to find sink mute status" - echo "Please check that if pulseaudio is running or if proper permission is granted" - exit 1 -fi - -# Set sink unmute -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cu sink $SINK_NAME 0" -else - pa_query_control -cu sink $SINK_NAME 0 -fi - -if [ $? -ne 0 ]; then - echo "Error: failed to set sink <$SINK_NAME> unmute" - exit 1 -fi - -# Check sink mute status -if [ $UID = 0 ];then - SETED=`su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qs" |grep -i 'alsa_output' | awk -F, '{print $5}' | cut -d "=" -f2` -else - SETED=`pa_query_control -qs | awk -F, '{print $5}' | head -n 1 |cut -d "=" -f2` -fi - -if [ "X$SETED" != "X0" ]; then - echo "Error: not set sink unmute" - exit 1 -fi - -# Post: set back the sink mute status -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cu sink $SINK_NAME $MUTED" -else - pa_query_control -cu sink $SINK_NAME $MUTED -fi -exit 0 - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_sink_volume.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_sink_volume.sh deleted file mode 100755 index 916804c..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_sink_volume.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -# Copyright (C) 2011 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Zhang, Zhiqiang -# -# DESCR: -# Set default sink vloume value -# TIMEOUT: 30 - - -. $(cd `dirname $0`;pwd)/env.sh - -# Find the sink name and volume value -if [ $UID = 0 ];then - SINK_NAME=`su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qs" | head -n 1 | awk -F, '{print $2}' | cut -d "=" -f2` - VOLUME=`su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qs" | head -n 1| awk -F, '{print $4}' | cut -d "=" -f2 | awk '{print $2}'` -else - SINK_NAME=`pa_query_control -qs | head -n 1 | awk -F, '{print $2}' | cut -d "=" -f2` - VOLUME=`pa_query_control -qs | head -n 1| awk -F, '{print $4}' | cut -d "=" -f2 | awk '{print $2}'` -fi - -if [ $? -ne 0 ]; then - echo "Error: failed to find sink volume value" - echo "Please check that if pulseaudio is running or if proper permission is granted" - exit 1 -fi - -# Set sink volume value for the 1st channel -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cv sink $SINK_NAME 1 0" - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cv sink $SINK_NAME 1 1000" - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cv sink $SINK_NAME 1 30000" - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cv sink $SINK_NAME 1 65536" -else - pa_query_control -cv sink $SINK_NAME 1 0 - pa_query_control -cv sink $SINK_NAME 1 1000 - pa_query_control -cv sink $SINK_NAME 1 30000 - pa_query_control -cv sink $SINK_NAME 1 65536 -fi - -if [ $? -ne 0 ]; then - echo "Error: failed to set sink <$SINK_NAME> volume value" - exit 1 -fi - -# Post: set back the sink volume value -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cv sink $SINK_NAME 1 $VOLUME" -else - pa_query_control -cv sink $SINK_NAME 1 $VOLUME -fi -exit 0 - diff --git a/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_source_volume.sh b/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_source_volume.sh deleted file mode 100755 index 7924cac..0000000 --- a/ivi/tts-pulseaudio-tests/src/PulseAudio_Set_source_volume.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -# Copyright (C) 2011 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Authors: -# Zhang, Zhiqiang -# -# DESCR: -# Set default source vloume value -# TIMEOUT: 30 - - -. $(cd `dirname $0`;pwd)/env.sh - -# Find the source name and volume value -if [ $UID = 0 ];then - SOURCE_NAME=`su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qo" | head -n 1 | awk -F, '{print $2}' | cut -d "=" -f2` - VOLUME=`su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -qo" | head -n 1 | awk -F, '{print $4}' | cut -d "=" -f2 | awk '{print $2}'` -else - SOURCE_NAME=`pa_query_control -qo | head -n 1 | awk -F, '{print $2}' | cut -d "=" -f2` - VOLUME=`pa_query_control -qo | head -n 1 | awk -F, '{print $4}' | cut -d "=" -f2 | awk '{print $2}'` -fi - -if [ $? -ne 0 ]; then - echo "Error: failed to find source volume value" - echo "Please check that if pulseaudio is running or if proper permission is granted" - exit 1 -fi - -# Set source volume value for the 1st channel -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cv source $SOURCE_NAME 1 65536" - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cv source $SOURCE_NAME 1 40000" - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cv source $SOURCE_NAME 1 8000" - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cv source $SOURCE_NAME 1 0" -else - pa_query_control -cv source $SOURCE_NAME 1 65536 - pa_query_control -cv source $SOURCE_NAME 1 40000 - pa_query_control -cv source $SOURCE_NAME 1 8000 - pa_query_control -cv source $SOURCE_NAME 1 0 -fi - -if [ $? -ne 0 ]; then - echo "Error: failed to set source <$SOURCE_NAME> volume value" - exit 1 -fi - -# Post: set back the source volume value -if [ $UID = 0 ];then - su - app -c "XDG_RUNTIME_DIR=/run/user/5000 pa_query_control -cv source $SOURCE_NAME 1 $VOLUME" -else - pa_query_control -cv source $SOURCE_NAME 1 $VOLUME -fi -exit 0 - diff --git a/ivi/tts-pulseaudio-tests/src/env.sh b/ivi/tts-pulseaudio-tests/src/env.sh deleted file mode 100755 index 8ae94ff..0000000 --- a/ivi/tts-pulseaudio-tests/src/env.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2010 Intel Corporation -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# -# Authors: -# Wan Shuang -# Date Created: 2010/07/08 -# -# Modifications: -# Modificator Date -# Content of Modification -# - -DATA_PATH=$(cd `dirname $0`;pwd)/data -TEST_RESULT="/tmp/test_result" - -## below media files are needed but not include in this package, prepare them before run test ## - -# used in script: PulseAudio_Play_PCM_16bit_Multichannel_48KHz.sh -# wav audio: RIFF (little-endian) data, WAVE audio, 6 channels 48000 Hz -MF_TEST_48K="/usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/data/PCM_16bit_5.1_48KHz_4608Kbps_38sec.wav" - -# used in script: PulseAudio_Play_PCM_16bit_Mono_8KHz.sh -# wav audio: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz -MF_TEST_8K="/usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/data/PCM_16bit_Mono_8KHz_128Kbps_60sec.wav" - -# used in script: PulseAudio_Play_PCM_16bit_Stereo_44.1KHz.sh/PulseAudio_Play_PCM_2_streams.sh -# wav audio: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz -MF_TEST_44K_1="/usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/data/PCM_16bit_Stereo_44.1KHz_1411Kbps_10s.WAV" - -# used in script: PulseAudio_Play_PCM_2_streams.sh -# wav audio: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz -MF_TEST_44K_2="/usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/data/PCM_16bit_Stereo_44.1KHz_1412.2Kbps_60sec.wav" - -# used in script: PulseAudio_Check_sample_cache.sh/PulseAudio_Play_PCM_stress_repeat.sh -# wav audio: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz -MF_TEST_WAV="/usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/data/test.wav" - -## END ## - -export PATH=$PATH:/sbin/:/usr/sbin/ diff --git a/ivi/tts-pulseaudio-tests/src/pa_query_control b/ivi/tts-pulseaudio-tests/src/pa_query_control deleted file mode 100755 index e3fa83b..0000000 Binary files a/ivi/tts-pulseaudio-tests/src/pa_query_control and /dev/null differ diff --git a/ivi/tts-pulseaudio-tests/tests.xml b/ivi/tts-pulseaudio-tests/tests.xml deleted file mode 100644 index 32f532b..0000000 --- a/ivi/tts-pulseaudio-tests/tests.xml +++ /dev/null @@ -1,460 +0,0 @@ - - - - - - - - - - Play a raw PCM audio file by paplay repeat for 100 times with default settings - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Play_PCM_stress_repeat.sh - - - Netbook - TV - - - - - - - - - Play a multichannel raw PCM audio file by paplay with default settings - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Play_PCM_16bit_Multichannel_48KHz.sh - - - Netbook - TV - - - - - - - - - Play a stereo raw PCM audio file by paplay with default settings - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Play_PCM_16bit_Stereo_44.1KHz.sh - - - IVI - Netbook - TV - - - - - - - - - Play 2 PCM audio files by paplay simultaneously with default settings - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Play_PCM_2_streams.sh - - - IVI - Netbook - TV - - - - - - - - - Play a mono raw PCM audio file by paplay with default settings - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Play_PCM_16bit_Mono_8KHz.sh - - - IVI - Netbook - TV - - - - - - - - - - - Query loaded sources - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Query_loaded_sources.sh - - - IVI - Netbook - TV - - - - - - - - - Query loaded sinks - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Query_loaded_sinks.sh - - - IVI - Netbook - TV - - - - - - - - - Query server information - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Query_server_info.sh - - - Netbook - TV - - - - - - - - - Query sink inputs - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Query_sink_inputs.sh - - - IVI - Netbook - TV - - - - - - - - - Query memory block statistics - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Query_memory_statistics.sh - - - Netbook - TV - - - - - - - - - Query loaded clients - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Query_loaded_clients.sh - - - IVI - Netbook - TV - - - - - - - - - - - Record a raw PCM audio file by parec with default settings - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Record_PCM_default.sh - - - IVI - Netbook - TV - - - - - - - - - Record a raw PCM audio file by parec with default settings, and play the recorded audio file by paplay - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Record_play_PCM_default.sh - - - IVI - Netbook - TV - - - - - - - - - Record a raw PCM audio file by parec long time with default settings, and play the recorded audio file by paplay - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Record_PCM_long_lasting.sh - - - IVI - Netbook - TV - - - - - - - - - - - PulseAudio Statistics; all current loaded modules, available sinks, sources, streams and clients - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Check_loaded_statistics.sh - - - IVI - Netbook - TV - - - - - - - - - Check PulseAudio daemon status - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Check_daemon_status.sh - - - IVI - Netbook - TV - - - - - - - - - Check default settings - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Check_default_settings.sh - - - IVI - Netbook - TV - - - - - - - - - Load sample, play sample, unload sample - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Check_sample_cache.sh - - - IVI - Netbook - TV - - - - - - - - - - - Set default sink - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Set_default_sink.sh - - - IVI - Netbook - TV - - - - - - - - - Set default sink unmute - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Set_sink_unmute.sh - - - IVI - Netbook - TV - - - - - - - - - Set default source vloume value - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Set_source_volume.sh - - - IVI - Netbook - TV - - - - - - - - - Set default source - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Set_default_source.sh - - - IVI - Netbook - TV - - - - - - - - - Set default sink mute - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Set_sink_mute.sh - - - IVI - Netbook - TV - - - - - - - - - Load module, unload module - 0 - - - /usr/share/tests/ivi-multimedia-tests/tts-pulseaudio-tests/PulseAudio_Load_unload_module.sh - - - IVI - Netbook - TV - - - - - - - - - Set default sink vloume value - 0 - - - /usr/share/tests/ivi-multimedia-tests/ivi-multimedia-teststts-pulseaudio-tests/PulseAudio_Set_sink_volume.sh - - - IVI - Netbook - TV - - - - - diff --git a/packaging/common-multimedia-suite.spec b/packaging/common-multimedia-suite.spec index 76b0352..6115475 100755 --- a/packaging/common-multimedia-suite.spec +++ b/packaging/common-multimedia-suite.spec @@ -1,39 +1,23 @@ -Name: common-multimedia-suite -Summary: Multimedia suite for Tizen Common -Version: 1.0.0 -Release: 1 -License: GPL-2.0 -Group: Development/Testing -Source0: %{name}-%{version}.tar.gz -Source1001: %{name}.manifest -BuildRequires: pkgconfig(gstreamer-1.0) -BuildRequires: pkgconfig(gstreamer-base-1.0) -BuildRequires: pkgconfig(gthread-2.0) -Requires: common-suite-launcher -Requires: testkit-lite - -%description -The common-multimedia-suite validates the multimedia features of the Tizen Common image : audio and video playing of media files of different formats with gstreamer - - -%package -n ivi-multimedia-tests -Summary: IVI multimedia test suite -Group: Development/Testing -Requires: gstreamer-utils -Requires: pulseaudio-utils -Requires: testkit-lite - -%description -n ivi-multimedia-tests -IVI multimedia test suite. Validates gstreamer and pulseaudio features +Name: common-multimedia-suite +Summary: Multimedia suite for Tizen Common +Version: 1.1 +Release: 0 +License: GPL-2.0 +Group: Development/Testing +Source0: %{name}-%{version}.tar.gz +Source1001: %{name}.manifest +BuildRequires: pkgconfig(gstreamer-1.0) +BuildRequires: pkgconfig(gthread-2.0) +Requires: common-suite-launcher +Requires: gst-plugins-base +Requires: gstreamer-utils +Requires: testkit-lite +BuildArch: noarch - -%package -n gst-auto-launch -Summary: Improved version of gst-launch -Group: Development/Testing -Requires: gstreamer-utils - -%description -n gst-auto-launch -gst-auto-launch is an improved version of gst-launch that accepts commands +%description +The common-multimedia-suite validates the multimedia features of the +Tizen Common image : audio and video playing of media files of different +formats with gstreamer %prep @@ -42,45 +26,19 @@ cp %{SOURCE1001} . %build -%autogen -%configure \ - --prefix=/usr -make %{?_smp_mflags} %install -%make_install -# common-multimedia-suite package -install -d %{buildroot}/%{_datadir}/tests/%{name} -install -m 0755 common/runtest.sh %{buildroot}/%{_datadir}/tests/%{name} -install -m 0644 common/*.xml %{buildroot}/%{_datadir}/tests/%{name} -install -m 0644 LICENSE %{buildroot}/%{_datadir}/tests/%{name} -cp -r common/TESTDIR %{buildroot}/%{_datadir}/tests/%{name} +install -d %{buildroot}/%{_datadir}/tests/common/%{name} +install -m 0755 runtest %{buildroot}/%{_datadir}/tests/common/%{name} +install -m 0644 *.xml %{buildroot}/%{_datadir}/tests/common/%{name} +cp -r TESTDIR %{buildroot}/%{_datadir}/tests/common/%{name} -# ivi-multimedia-tests package -install -d %{buildroot}/%{_datadir}/tests/ivi-multimedia-tests/tts-gstreamer-tests -install -d %{buildroot}/%{_datadir}/tests/ivi-multimedia-tests/tts-pulseaudio-tests -install -m 0755 ivi/tts-gstreamer-tests/src/* %{buildroot}/%{_datadir}/tests/ivi-multimedia-tests/tts-gstreamer-tests -install -m 0644 ivi/tts-gstreamer-tests/tests.xml %{buildroot}/%{_datadir}/tests/ivi-multimedia-tests/tts-gstreamer-tests -install -m 0644 ivi/tts-gstreamer-tests/README %{buildroot}/%{_datadir}/tests/ivi-multimedia-tests/tts-gstreamer-tests -install -m 0755 ivi/tts-pulseaudio-tests/src/*.sh %{buildroot}/%{_datadir}/tests/ivi-multimedia-tests/tts-pulseaudio-tests -install -m 0644 ivi/tts-pulseaudio-tests/tests.xml %{buildroot}/%{_datadir}/tests/ivi-multimedia-tests/tts-pulseaudio-tests -install -m 0644 ivi/tts-pulseaudio-tests/README %{buildroot}/%{_datadir}/tests/ivi-multimedia-tests/tts-pulseaudio-tests -install -m 0644 LICENSE %{buildroot}/%{_datadir}/tests/ivi-multimedia-tests -%files +%files %manifest %{name}.manifest %defattr(-,root,root) -%{_datadir}/tests/%{name} - - -%files -n ivi-multimedia-tests -%defattr(-,root,root) -%{_datadir}/tests/ivi-multimedia-tests - - -%files -n gst-auto-launch -%defattr(-,root,root) -%{_bindir}/gst-auto-launch -%{_datadir}/gst-auto-launch +%license LICENSE +%license LICENSE.CC-BY-3.0 +%{_datadir}/tests/common/%{name} diff --git a/runtest b/runtest new file mode 100644 index 0000000..252b8d7 --- /dev/null +++ b/runtest @@ -0,0 +1,35 @@ +#!/bin/bash +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Authors: Nicolas Zingilé + +set -e + +resdir="" + +if [[ ! -z $1 ]]; then + resdir=$1 +else + exit 1 +fi + +resfile=$resdir/$(basename $(pwd)).result.xml + +rm -rf $resdir/*.result.xml + +timeout 10800 testkit-lite -f /usr/share/tests/common/common-multimedia-suite/testkit.xml --comm tizenlocal -o $resfile + +echo -e '\n## execution script: finished' diff --git a/testkit.xml b/testkit.xml new file mode 100644 index 0000000..c53155d --- /dev/null +++ b/testkit.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +