From 29d6678fd546377459ef75cf54abeef5b969b5cf Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 27 Aug 2010 15:14:24 +0100 Subject: Major layout change to the packages directory Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie --- meta-extras/packages/cx3110x/cx3110x_1.1.bb | 21 + meta-extras/packages/cx3110x/cx3110x_2.0.15.bb | 23 + .../packages/cx3110x/files/no-linux-config.patch | 12 + meta-extras/packages/helix/helix-libs.bb | 49 + .../packages/helix/helix-libs/add-clutter.patch | 12668 +++++++++++++++++++ .../packages/helix/helix-libs/helix-player.pc | 11 + meta-extras/packages/helix/helix-libs/hxclient.pc | 11 + meta-extras/packages/helix/ribosome.bb | 43 + meta-extras/packages/helix/ribosome/buildrc | 4 + meta-extras/packages/helix/ribosome/clutter.bif | 68 + .../packages/lirc/files/lirc_sir-sa1100.patch | 10 + meta-extras/packages/lirc/files/lircd.conf_nslu2 | 1886 +++ meta-extras/packages/lirc/files/lircd.init | 39 + meta-extras/packages/lirc/files/lircexec.init | 37 + meta-extras/packages/lirc/files/lircmd.init | 38 + meta-extras/packages/lirc/files/lircrc_nslu2 | 113 + .../packages/lirc/files/split-hauppauge.patch | 141 + meta-extras/packages/lirc/lirc-config.inc | 13 + meta-extras/packages/lirc/lirc-modules_0.8.3.bb | 33 + meta-extras/packages/lirc/lirc_0.8.3.bb | 31 + .../llvm/llvm-native/fix_ldflags_export.patch | 26 + meta-extras/packages/llvm/llvm-native_svn.bb | 13 + .../packages/maemo/nokia770-init/fixup-770.sh | 26 + meta-extras/packages/maemo/nokia770-init_1.0.bb | 38 + meta-extras/packages/maemo/xpext/auxdir.patch | 13 + meta-extras/packages/maemo/xpext_1.0-5.bb | 22 + meta-extras/packages/maemo/xsp_1.0.0-8.bb | 12 + meta-extras/packages/osc/osc-native_svn.bb | 28 + .../packages/tasks/task-poky-x11-netbook.bb | 28 + .../packages/yum/createrepo-native/pathfix.patch | 81 + .../packages/yum/createrepo-native_0.9.8.bb | 17 + meta-extras/packages/yum/files/98_yum | 1 + .../packages/yum/files/extract-postinst.awk | 11 + meta-extras/packages/yum/files/fix | 18 + meta-extras/packages/yum/files/hacks.patch | 81 + meta-extras/packages/yum/files/paths.patch | 106 + meta-extras/packages/yum/files/paths2.patch | 35 + .../packages/yum/files/yum-install-recommends.py | 39 + meta-extras/packages/yum/yum_3.2.27.bb | 46 + 39 files changed, 15892 insertions(+) create mode 100644 meta-extras/packages/cx3110x/cx3110x_1.1.bb create mode 100644 meta-extras/packages/cx3110x/cx3110x_2.0.15.bb create mode 100644 meta-extras/packages/cx3110x/files/no-linux-config.patch create mode 100644 meta-extras/packages/helix/helix-libs.bb create mode 100644 meta-extras/packages/helix/helix-libs/add-clutter.patch create mode 100644 meta-extras/packages/helix/helix-libs/helix-player.pc create mode 100644 meta-extras/packages/helix/helix-libs/hxclient.pc create mode 100644 meta-extras/packages/helix/ribosome.bb create mode 100644 meta-extras/packages/helix/ribosome/buildrc create mode 100755 meta-extras/packages/helix/ribosome/clutter.bif create mode 100644 meta-extras/packages/lirc/files/lirc_sir-sa1100.patch create mode 100644 meta-extras/packages/lirc/files/lircd.conf_nslu2 create mode 100755 meta-extras/packages/lirc/files/lircd.init create mode 100755 meta-extras/packages/lirc/files/lircexec.init create mode 100755 meta-extras/packages/lirc/files/lircmd.init create mode 100644 meta-extras/packages/lirc/files/lircrc_nslu2 create mode 100644 meta-extras/packages/lirc/files/split-hauppauge.patch create mode 100644 meta-extras/packages/lirc/lirc-config.inc create mode 100644 meta-extras/packages/lirc/lirc-modules_0.8.3.bb create mode 100644 meta-extras/packages/lirc/lirc_0.8.3.bb create mode 100644 meta-extras/packages/llvm/llvm-native/fix_ldflags_export.patch create mode 100644 meta-extras/packages/llvm/llvm-native_svn.bb create mode 100644 meta-extras/packages/maemo/nokia770-init/fixup-770.sh create mode 100644 meta-extras/packages/maemo/nokia770-init_1.0.bb create mode 100644 meta-extras/packages/maemo/xpext/auxdir.patch create mode 100644 meta-extras/packages/maemo/xpext_1.0-5.bb create mode 100644 meta-extras/packages/maemo/xsp_1.0.0-8.bb create mode 100755 meta-extras/packages/osc/osc-native_svn.bb create mode 100644 meta-extras/packages/tasks/task-poky-x11-netbook.bb create mode 100644 meta-extras/packages/yum/createrepo-native/pathfix.patch create mode 100644 meta-extras/packages/yum/createrepo-native_0.9.8.bb create mode 100644 meta-extras/packages/yum/files/98_yum create mode 100644 meta-extras/packages/yum/files/extract-postinst.awk create mode 100644 meta-extras/packages/yum/files/fix create mode 100644 meta-extras/packages/yum/files/hacks.patch create mode 100644 meta-extras/packages/yum/files/paths.patch create mode 100644 meta-extras/packages/yum/files/paths2.patch create mode 100755 meta-extras/packages/yum/files/yum-install-recommends.py create mode 100644 meta-extras/packages/yum/yum_3.2.27.bb (limited to 'meta-extras') diff --git a/meta-extras/packages/cx3110x/cx3110x_1.1.bb b/meta-extras/packages/cx3110x/cx3110x_1.1.bb new file mode 100644 index 0000000000..95bbc35086 --- /dev/null +++ b/meta-extras/packages/cx3110x/cx3110x_1.1.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "cx3110x wifi support as found in the Nokia 770/800" +SECTION = "kernel/modules" +LICENSE = "GPL" +PR = "r1" +PACKAGES = "${PN}" + +COMPATIBLE_MACHINE = "(nokia770|nokia800)" + +export KERNEL_SRC_DIR = ${STAGING_KERNEL_DIR} +export LDFLAGS = "" + +SRC_URI = "https://garage.maemo.org/frs/download.php/939/cx3110x-1.1.tar.gz" + +S = "${WORKDIR}/cx3110x-${PV}" + +inherit module + +do_compile() { + oe_runmake modules +} + diff --git a/meta-extras/packages/cx3110x/cx3110x_2.0.15.bb b/meta-extras/packages/cx3110x/cx3110x_2.0.15.bb new file mode 100644 index 0000000000..c952b2a94d --- /dev/null +++ b/meta-extras/packages/cx3110x/cx3110x_2.0.15.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "cx3110x wifi support as found in the Nokia 770/N800/N810" +SECTION = "kernel/modules" +LICENSE = "GPL" +PACKAGES = "${PN}" +PR = "r1" + +COMPATIBLE_MACHINE = "(nokia800)" + +export KERNEL_SRC_DIR = ${STAGING_KERNEL_DIR} +export LDFLAGS = "" + +DEFAULT_PREFERENCE_nokia770 = "-1" + +SRC_URI = "http://repository.maemo.org/pool/os2008/free/source/c/cx3110x-module-src/cx3110x-module-src_2.0.15-1.tar.gz \ + file://no-linux-config.patch;patch=1" + +S = "${WORKDIR}/cx3110x-module-src-${PV}" + +inherit module + +do_compile() { + oe_runmake modules +} diff --git a/meta-extras/packages/cx3110x/files/no-linux-config.patch b/meta-extras/packages/cx3110x/files/no-linux-config.patch new file mode 100644 index 0000000000..e6ab317249 --- /dev/null +++ b/meta-extras/packages/cx3110x/files/no-linux-config.patch @@ -0,0 +1,12 @@ +Index: cx3110x-module-src-2.0.15/src/sm_drv_spi.c +=================================================================== +--- cx3110x-module-src-2.0.15.orig/src/sm_drv_spi.c 2008-02-08 13:52:28.000000000 +0100 ++++ cx3110x-module-src-2.0.15/src/sm_drv_spi.c 2008-02-08 13:52:40.000000000 +0100 +@@ -36,7 +36,6 @@ + #include + #include + #include +-#include + #if !defined(CONFIG_FW_LOADER) && !defined(CONFIG_FW_LOADER_MODULE) + #error No Firmware Loading configured in the kernel ! + #endif diff --git a/meta-extras/packages/helix/helix-libs.bb b/meta-extras/packages/helix/helix-libs.bb new file mode 100644 index 0000000000..9fcbd4b67f --- /dev/null +++ b/meta-extras/packages/helix/helix-libs.bb @@ -0,0 +1,49 @@ +DESCRIPTION = "Helix Client Libraries" +SECTION = "base" +DEPENDS = "ribosome gtk+ libxv" +HOMEPAGE = "http://helixcommunity.org" +LICENSE = "RPSL" + +_SNAPSHOT = "atlas310_11212008" +_TARBALL_SERVER = "http://git.moblin.org/repos/users/rusty" + +PV="r0" + +SRC_URI = "${_TARBALL_SERVER}/helix-libs_${_SNAPSHOT}.tar.bz2 \ + file://helix-libs/helix-player.pc \ + file://helix-libs/add-clutter.patch;patch=1" +S = "${WORKDIR}/helix-libs_${_SNAPSHOT}" + +export BUILD_ROOT=${STAGING_DIR_HOST}${libdir}/ribosome +export BUILDRC=${BUILD_ROOT}/buildrc +export SYSTEM_ID=linux-2.2-libc6-gcc32-i586 +export BUILD=$BUILD_ROOT/bin/build.py + +COMPATIBLE_HOST = '(i.86.*-linux)' + +do_compile() { + ${BUILD} -k -trelease -mclutter -Phelix-client-all-defines clutter +} + +do_install() { + mkdir -p ${D}/opt/helix/lib + mkdir -p ${D}/opt/helix/include + mkdir -p ${D}${libdir}/pkgconfig + + install -m 0644 clientapps/clutter/player.h ${D}/opt/helix/include/ + install -m 0644 ../helix-libs/helix-player.pc ${D}${libdir}/pkgconfig + + install -m 0644 release/*.so ${D}/opt/helix/lib + + install -d ${D}${libdir} + install -m 0644 release/libhelix-player.so ${D}${libdir} +} + +sysroot_stage_all_append() { + sysroot_stage_dir ${D}/opt/helix ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/helix +} + +FILES_${PN} = "/usr/lib/libhelix-player.so" +FILES_${PN} += "/opt/helix/lib" +FILES_${PN}-dev = "/usr/lib/pkgconfig" +FILES_${PN}-dev += "/opt/helix/include" diff --git a/meta-extras/packages/helix/helix-libs/add-clutter.patch b/meta-extras/packages/helix/helix-libs/add-clutter.patch new file mode 100644 index 0000000000..eb545ff73f --- /dev/null +++ b/meta-extras/packages/helix/helix-libs/add-clutter.patch @@ -0,0 +1,12668 @@ +Index: helix-libs/clientapps/clutter/LICENSE.txt +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/LICENSE.txt 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,30 @@ ++ Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. ++ ++ The contents of this directory, and (except where otherwise ++ indicated) the directories included within this directory, are ++ subject to the current version of the RealNetworks Public Source ++ License (the "RPSL") available at RPSL.txt in this directory, unless ++ you have licensed the directory under the current version of the ++ RealNetworks Community Source License (the "RCSL") available at ++ RCSL.txt in this directory, in which case the RCSL will apply. You ++ may also obtain the license terms directly from RealNetworks. You ++ may not use the files in this directory except in compliance with the ++ RPSL or, if you have a valid RCSL with RealNetworks applicable to ++ this directory, the RCSL. Please see the applicable RPSL or RCSL for ++ the rights, obligations and limitations governing use of the contents ++ of the directory. ++ ++ This directory is part of the Helix DNA Technology. RealNetworks is ++ the developer of the Original Code and owns the copyrights in the ++ portions it created. ++ ++ This directory, and the directories included with this directory, are ++ distributed and made available on an 'AS IS' basis, WITHOUT WARRANTY ++ OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY ++ DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY ++ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, ++ QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ ++ Technology Compatibility Kit Test Suite(s) Location: ++ http://www.helixcommunity.org/content/tck ++ +Index: helix-libs/clientapps/clutter/RCSL.txt +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/RCSL.txt 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,948 @@ ++The RCSL is made up of a base agreement and a few Attachments. ++ ++For Research and Development use, you agree to the terms of the ++RCSL R&D License (base RCSL and Attachments A, B, and C) ++ ++For Commercial Use (either distribution or internal commercial ++deployment) of the Helix DNA with or without support for RealNetworks' ++RealAudio and RealVideo Add-on Technology, you agree to the ++terms of the same RCSL R&D license ++and execute one or more additional Commercial Use License attachments ++. ++ ++------------------------------------------------------------------------ ++ ++ ++ REALNETWORKS COMMUNITY SOURCE LICENSE ++ ++Version 1.2 (Rev. Date: January 22, 2003). ++ ++ ++ RECITALS ++ ++Original Contributor has developed Specifications, Source Code ++implementations and Executables of certain Technology; and ++ ++Original Contributor desires to license the Technology to a large ++community to facilitate research, innovation and product development ++while maintaining compatibility of such products with the Technology as ++delivered by Original Contributor; and ++ ++Original Contributor desires to license certain Trademarks for the ++purpose of branding products that are compatible with the relevant ++Technology delivered by Original Contributor; and ++ ++You desire to license the Technology and possibly certain Trademarks ++from Original Contributor on the terms and conditions specified in this ++License. ++ ++In consideration for the mutual covenants contained herein, You and ++Original Contributor agree as follows: ++ ++ ++ AGREEMENT ++ ++*1. Introduction.* ++ ++The RealNetworks Community Source License ("RCSL") and effective ++attachments ("License") may include five distinct licenses: ++ ++i) Research Use license -- License plus Attachments A, B and C only. ++ ++ii) Commercial Use and Trademark License, which may be for Internal ++Deployment Use or external distribution, or both -- License plus ++Attachments A, B, C, and D. ++ ++iii) Technology Compatibility Kit (TCK) license -- Attachment C. ++ ++iv) Add-On Technology License (Executable) Commercial Use License ++-Attachment F. ++ ++v) Add-On Technology Source Code Porting and Optimization ++License-Attachment G. ++ ++The Research Use license is effective when You click and accept this ++License. The TCK is effective when You click and accept this License, ++unless otherwise specified in the TCK attachments. The Commercial Use ++and Trademark, Add-On Technology License, and the Add-On Technology ++Source Code Porting and Optimization licenses must each be signed by You ++and Original Contributor to become effective. Once effective, these ++licenses and the associated requirements and responsibilities are ++cumulative. Capitalized terms used in this License are defined in the ++Glossary. ++ ++*2. License Grants.* ++ ++2.1 Original Contributor Grant. ++ ++Subject to Your compliance with Sections 3, 8.10 and Attachment A of ++this License, Original Contributor grants to You a worldwide, ++royalty-free, non-exclusive license, to the extent of Original ++Contributor's Intellectual Property Rights covering the Original Code, ++Upgraded Code and Specifications, to do the following: ++ ++(a) Research Use License: ++ ++(i) use, reproduce and modify the Original Code, Upgraded Code and ++Specifications to create Modifications and Reformatted Specifications ++for Research Use by You; ++ ++(ii) publish and display Original Code, Upgraded Code and Specifications ++with, or as part of Modifications, as permitted under Section 3.1(b) below; ++ ++(iii) reproduce and distribute copies of Original Code and Upgraded Code ++to Licensees and students for Research Use by You; ++ ++(iv) compile, reproduce and distribute Original Code and Upgraded Code ++in Executable form, and Reformatted Specifications to anyone for ++Research Use by You. ++ ++(b) Other than the licenses expressly granted in this License, Original ++Contributor retains all right, title, and interest in Original Code and ++Upgraded Code and Specifications. ++ ++2.2 Your Grants. ++ ++(a) To Other Licensees. You hereby grant to each Licensee a license to ++Your Error Corrections and Shared Modifications, of the same scope and ++extent as Original Contributor's licenses under Section 2.1 a) above ++relative to Research Use and Attachment D relative to Commercial Use. ++ ++(b) To Original Contributor. You hereby grant to Original Contributor a ++worldwide, royalty-free, non-exclusive, perpetual and irrevocable ++license, to the extent of Your Intellectual Property Rights covering ++Your Error Corrections, Shared Modifications and Reformatted ++Specifications, to use, reproduce, modify, display and distribute Your ++Error Corrections, Shared Modifications and Reformatted Specifications, ++in any form, including the right to sublicense such rights through ++multiple tiers of distribution. ++ ++(c) Other than the licenses expressly granted in Sections 2.2(a) and (b) ++above, and the restrictions set forth in Section 3.1(d)(iv) below, You ++retain all right, title, and interest in Your Error Corrections, Shared ++Modifications and Reformatted Specifications. ++ ++2.3 Contributor Modifications. ++ ++You may use, reproduce, modify, display and distribute Contributor Error ++Corrections, Shared Modifications and Reformatted Specifications, ++obtained by You under this License, to the same scope and extent as with ++Original Code, Upgraded Code and Specifications. ++ ++2.4 Subcontracting. ++ ++You may deliver the Source Code of Covered Code to other Licensees ++having at least a Research Use license, for the sole purpose of ++furnishing development services to You in connection with Your rights ++granted in this License. All such Licensees must execute appropriate ++documents with respect to such work consistent with the terms of this ++License, and acknowledging their work-made-for-hire status or assigning ++exclusive right to the work product and associated Intellectual Property ++Rights to You. ++ ++*3. Requirements and Responsibilities*. ++ ++3.1 Research Use License. ++ ++As a condition of exercising the rights granted under Section 2.1(a) ++above, You agree to comply with the following: ++ ++(a) Your Contribution to the Community. All Error Corrections and Shared ++Modifications which You create or contribute to are automatically ++subject to the licenses granted under Section 2.2 above. You are ++encouraged to license all of Your other Modifications under Section 2.2 ++as Shared Modifications, but are not required to do so. You agree to ++notify Original Contributor of any errors in the Specification. ++ ++(b) Source Code Availability. You agree to provide all Your Error ++Corrections to Original Contributor as soon as reasonably practicable ++and, in any event, prior to Internal Deployment Use or Commercial Use, ++if applicable. Original Contributor may, at its discretion, post Source ++Code for Your Error Corrections and Shared Modifications on the ++Community Webserver. You may also post Error Corrections and Shared ++Modifications on a web-server of Your choice; provided, that You must ++take reasonable precautions to ensure that only Licensees have access to ++such Error Corrections and Shared Modifications. Such precautions shall ++include, without limitation, a password protection scheme limited to ++Licensees and a click-on, download certification of Licensee status ++required of those attempting to download from the server. An example of ++an acceptable certification is attached as Attachment A-2. ++ ++(c) Notices. All Error Corrections and Shared Modifications You create ++or contribute to must include a file documenting the additions and ++changes You made and the date of such additions and changes. You must ++also include the notice set forth in Attachment A-1 in the file header. ++If it is not possible to put the notice in a particular Source Code file ++due to its structure, then You must include the notice in a location ++(such as a relevant directory file), where a recipient would be most ++likely to look for such a notice. ++ ++(d) Redistribution. ++ ++(i) Source. Covered Code may be distributed in Source Code form only to ++another Licensee (except for students as provided below). You may not ++offer or impose any terms on any Covered Code that alter the rights, ++requirements, or responsibilities of such Licensee. You may distribute ++Covered Code to students for use in connection with their course work ++and research projects undertaken at accredited educational institutions. ++Such students need not be Licensees, but must be given a copy of the ++notice set forth in Attachment A-3 and such notice must also be included ++in a file header or prominent location in the Source Code made available ++to such students. ++ ++(ii) Executable. You may distribute Executable version(s) of Covered ++Code to Licensees and other third parties only for the purpose of ++evaluation and comment in connection with Research Use by You and under ++a license of Your choice, but which limits use of such Executable ++version(s) of Covered Code only to that purpose. ++ ++(iii) Modified Class, Interface and Package Naming. In connection with ++Research Use by You only, You may use Original Contributor's class, ++Interface and package names only to accurately reference or invoke the ++Source Code files You modify. Original Contributor grants to You a ++limited license to the extent necessary for such purposes. ++ ++(iv) You expressly agree that any distribution, in whole or in part, of ++Modifications developed by You shall only be done pursuant to the terms ++and conditions of this License. ++ ++(e) Extensions. ++ ++(i) Covered Code. You may not include any Source Code of Community Code ++in any Extensions. You may include the compiled Header Files of ++Community Code in an Extension provided that Your use of the Covered ++Code, including Heading Files, complies with the Commercial Use License, ++the TCK and all other terms of this License. ++ ++(ii) Publication. No later than the date on which You first distribute ++such Extension for Commercial Use, You must publish to the industry, on ++a non-confidential basis and free of all copyright restrictions with ++respect to reproduction and use, an accurate and current specification ++for any Extension. In addition, You must make available an appropriate ++test suite, pursuant to the same rights as the specification, ++sufficiently detailed to allow any third party reasonably skilled in the ++technology to produce implementations of the Extension compatible with ++the specification. Such test suites must be made available as soon as ++reasonably practicable but, in no event, later than ninety (90) days ++after Your first Commercial Use of the Extension. You must use ++reasonable efforts to promptly clarify and correct the specification and ++the test suite upon written request by Original Contributor. ++ ++(iii) Open. You agree to refrain from enforcing any Intellectual ++Property Rights You may have covering any interface(s) of Your ++Extension, which would prevent the implementation of such interface(s) ++by Original Contributor or any Licensee. This obligation does not ++prevent You from enforcing any Intellectual Property Right You have that ++would otherwise be infringed by an implementation of Your Extension. ++ ++(iv) Interface Modifications and Naming. You may not modify or add to ++the GUID space * * "xxxxxxxx-0901-11d1-8B06-00A024406D59" or any other ++GUID space designated by Original Contributor. You may not modify any ++Interface prefix provided with the Covered Code or any other prefix ++designated by Original Contributor.* * ++ ++* * ++ ++(f) You agree that any Specifications provided to You by Original ++Contributor are confidential and proprietary information of Original ++Contributor. You must maintain the confidentiality of the Specifications ++and may not disclose them to any third party without Original ++Contributor's prior written consent. You may only use the Specifications ++under the terms of this License and only for the purpose of implementing ++the terms of this License with respect to Covered Code. You agree not ++use, copy or distribute any such Specifications except as provided in ++writing by Original Contributor. ++ ++3.2 Commercial Use License. ++ ++You may not make Commercial Use of any Covered Code unless You and ++Original Contributor have executed a copy of the Commercial Use and ++Trademark License attached as Attachment D. ++ ++*4. Versions of the License.* ++ ++4.1 License Versions. ++ ++Original Contributor may publish revised versions of the License from ++time to time. Each version will be given a distinguishing version number. ++ ++4.2 Effect. ++ ++Once a particular version of Covered Code has been provided under a ++version of the License, You may always continue to use such Covered Code ++under the terms of that version of the License. You may also choose to ++use such Covered Code under the terms of any subsequent version of the ++License. No one other than Original Contributor has the right to ++promulgate License versions. ++ ++4.3 Multiple-Licensed Code. ++ ++Original Contributor may designate portions of the Covered Code as ++"Multiple-Licensed." "Multiple-Licensed" means that the Original ++Contributor permits You to utilize those designated portions of the ++Covered Code under Your choice of this License or the alternative ++license(s), if any, specified by the Original Contributor in an ++Attachment to this License. ++ ++*5. Disclaimer of Warranty.* ++ ++5.1 COVERED CODE PROVIDED AS IS. ++ ++COVERED CODE IS PROVIDED UNDER THIS LICENSE "AS IS," WITHOUT WARRANTY OF ++ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ++WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT ++FOR A PARTICULAR PURPOSE OR NON-INFRINGING. YOU AGREE TO BEAR THE ENTIRE ++RISK IN CONNECTION WITH YOUR USE AND DISTRIBUTION OF COVERED CODE UNDER ++THIS LICENSE. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART ++OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER ++EXCEPT SUBJECT TO THIS DISCLAIMER. ++ ++5.2 Not Designed for High Risk Activities. ++ ++You acknowledge that Original Code, Upgraded Code and Specifications are ++not designed or intended for use in high risk activities including, but ++not limited to: (i) on-line control of aircraft, air traffic, aircraft ++navigation or aircraft communications; or (ii) in the design, ++construction, operation or maintenance of any nuclear facility. Original ++Contributor disclaims any express or implied warranty of fitness for ++such uses. ++ ++*6. Termination.* ++ ++6.1 By You. ++ ++You may terminate this Research Use license at anytime by providing ++written notice to Original Contributor. ++ ++6.2 By Original Contributor. ++ ++This License and the rights granted hereunder will terminate: ++ ++(i) automatically if You fail to comply with the terms of this License ++and fail to cure such breach within 30 days of receipt of written notice ++of the breach; ++ ++(ii) immediately in the event of circumstances specified in Sections 7.1 ++and 8.4; or ++ ++(iii) at Original Contributor's discretion upon any action initiated by ++You (including by cross-claim or counter claim) alleging that use or ++distribution by Original Contributor or any Licensee, of Original Code, ++Upgraded Code, Error Corrections, Shared Modifications or Specifications ++infringe a patent owned or controlled by You. ++ ++6.3 Effective of Termination. ++ ++Upon termination, You agree to discontinue use of and destroy all copies ++of Covered Code in Your possession. All sublicenses to the Covered Code ++which You have properly granted shall survive any termination of this ++License. Provisions that, by their nature, should remain in effect ++beyond the termination of this License shall survive including, without ++limitation, Sections 2.2, 3, 5, 7 and 8. ++ ++6.4 No Compensation. ++ ++Each party waives and releases the other from any claim to compensation ++or indemnity for permitted or lawful termination of the business ++relationship established by this License. ++ ++*7. Liability.* ++ ++7.1 Infringement. Should any of the Original Code, Upgraded Code, TCK or ++Specifications ("Materials") become the subject of a claim of ++infringement, Original Contributor may, at its sole option, (i) attempt ++to procure the rights necessary for You to continue using the Materials, ++(ii) modify the Materials so that they are no longer infringing, or ++(iii) terminate Your right to use the Materials, immediately upon ++written notice, and refund to You the amount, if any, having then ++actually been paid by You to Original Contributor for the Original Code, ++Upgraded Code and TCK, depreciated on a straight line, five year basis. ++ ++7.2 LIMITATION OF LIABILITY. TO THE FULL EXTENT ALLOWED BY APPLICABLE ++LAW, ORIGINAL CONTRIBUTOR'S LIABILITY TO YOU FOR CLAIMS RELATING TO THIS ++LICENSE, WHETHER FOR BREACH OR IN TORT, SHALL BE LIMITED TO ONE HUNDRED ++PERCENT (100%) OF THE AMOUNT HAVING THEN ACTUALLY BEEN PAID BY YOU TO ++ORIGINAL CONTRIBUTOR FOR ALL COPIES LICENSED HEREUNDER OF THE PARTICULAR ++ITEMS GIVING RISE TO SUCH CLAIM, IF ANY, DURING THE TWELVE MONTHS ++PRECEDING THE CLAIMED BREACH. IN NO EVENT WILL YOU (RELATIVE TO YOUR ++SHARED MODIFICATIONS OR ERROR CORRECTIONS) OR ORIGINAL CONTRIBUTOR BE ++LIABLE FOR ANY INDIRECT, PUNITIVE, SPECIAL, INCIDENTAL OR CONSEQUENTIAL ++DAMAGES IN CONNECTION WITH OR RISING OUT OF THIS LICENSE (INCLUDING, ++WITHOUT LIMITATION, LOSS OF PROFITS, USE, DATA, OR OTHER ECONOMIC ++ADVANTAGE), HOWEVER IT ARISES AND ON ANY THEORY OF LIABILITY, WHETHER IN ++AN ACTION FOR CONTRACT, STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE) ++OR OTHERWISE, WHETHER OR NOT YOU OR ORIGINAL CONTRIBUTOR HAS BEEN ++ADVISED OF THE POSSIBILITY OF SUCH DAMAGE AND NOTWITHSTANDING THE ++FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. ++ ++*8. Miscellaneous.* ++ ++8.1 Trademark. ++ ++You shall not use any Trademark unless You and Original Contributor ++execute a copy of the Commercial Use and Trademark License Agreement ++attached hereto as Attachment D. Except as expressly provided in the ++License, You are granted no right, title or license to, or interest in, ++any Trademarks. Whether or not You and Original Contributor enter into ++the Trademark License, You agree not to (i) challenge Original ++Contributor's ownership or use of Trademarks; (ii) attempt to register ++any Trademarks, or any mark or logo substantially similar thereto; or ++(iii) incorporate any Trademarks into Your own trademarks, product ++names, service marks, company names, or domain names. ++ ++8.2 Integration. ++ ++This License represents the complete agreement concerning the subject ++matter hereof. ++ ++8.3 Assignment. ++ ++Original Contributor may assign this License, and its rights and ++obligations hereunder, in its sole discretion. You may assign the ++Research Use portions of this License and the TCK license to a third ++party upon prior written notice to Original Contributor (which may be ++provided electronically via the Community Web-Server). You may not ++assign the Commercial Use and Trademark license, the Add-On Technology ++License, or the Add-On Technology Source Code Porting License, including ++by way of merger (regardless of whether You are the surviving entity) or ++acquisition, without Original Contributor's prior written consent. ++ ++8.4 Severability. ++ ++If any provision of this License is held to be unenforceable, such ++provision shall be reformed only to the extent necessary to make it ++enforceable. Notwithstanding the foregoing, if You are prohibited by law ++from fully and specifically complying with Sections 2.2 or 3, this ++License will immediately terminate and You must immediately discontinue ++any use of Covered Code. ++ ++8.5 Governing Law. ++ ++This License shall be governed by the laws of the United States and the ++State of Washington, as applied to contracts entered into and to be ++performed in Washington between Washington residents. The application of ++the United Nations Convention on Contracts for the International Sale of ++Goods is expressly excluded. You agree that the state and federal courts ++located in Seattle, Washington have exclusive jurisdiction over any ++claim relating to the License, including contract and tort claims. ++ ++8.6 Dispute Resolution. ++ ++a) Arbitration. Any dispute arising out of or relating to this License ++shall be finally settled by arbitration as set out herein, except that ++either party may bring any action, in a court of competent jurisdiction ++(which jurisdiction shall be exclusive), with respect to any dispute ++relating to such party's Intellectual Property Rights or with respect to ++Your compliance with the TCK license. Arbitration shall be administered: ++(i) by the American Arbitration Association (AAA), (ii) in accordance ++with the rules of the United Nations Commission on International Trade ++Law (UNCITRAL) (the "Rules") in effect at the time of arbitration as ++modified herein; and (iii) the arbitrator will apply the substantive ++laws of Washington and the United States. Judgment upon the award ++rendered by the arbitrator may be entered in any court having ++jurisdiction to enforce such award. ++ ++b) Arbitration language, venue and damages. All arbitration proceedings ++shall be conducted in English by a single arbitrator selected in ++accordance with the Rules, who must be fluent in English and be either a ++retired judge or practicing attorney having at least ten (10) years ++litigation experience and be reasonably familiar with the technology ++matters relative to the dispute. Unless otherwise agreed, arbitration ++venue shall be in Seattle, Washington. The arbitrator may award monetary ++damages only and nothing shall preclude either party from seeking ++provisional or emergency relief from a court of competent jurisdiction. ++The arbitrator shall have no authority to award damages in excess of ++those permitted in this License and any such award in excess is void. ++All awards will be payable in U.S. dollars and may include, for the ++prevailing party (i) pre-judgment award interest, (ii) reasonable ++attorneys' fees incurred in connection with the arbitration, and (iii) ++reasonable costs and expenses incurred in enforcing the award. The ++arbitrator will order each party to produce identified documents and ++respond to no more than twenty-five single question interrogatories. ++ ++8.7 Construction. ++ ++Any law or regulation, which provides that the language of a contract ++shall be construed against the drafter, shall not apply to this License. ++ ++8.8 U.S. Government End Users. ++ ++The Covered Code is a "commercial item," as that term is defined in 48 ++C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" ++and "commercial computer software documentation," as such terms are used ++in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and ++48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government ++End Users acquire Covered Code with only those rights set forth herein. ++You agree to pass this notice to our licensees. ++ ++8.9 Marketing Activities. ++ ++Licensee hereby grants Original Contributor a non-exclusive, ++non-transferable, limited license to use the Licensee's company name and ++logo ("Licensee Marks") in any presentations, press releases, or ++marketing materials solely for the purpose of identifying Licensee as a ++member of the Helix Community. Licensee shall provide samples of ++Licensee Marks to Original Contributor upon request by Original ++Contributor. Original Contributor acknowledges that the Licensee Marks ++are the trademarks of Licensee. Original Contributor shall not use the ++Licensee Marks in a way that may imply that Original Contributor is an ++agency or branch of Licensee. Original Contributor understands and ++agrees that the use of any Licensee Marks in connection with this ++Agreement shall not create any right, title or interest, in, or to the ++Licensee Marks or any Licensee trademarks and that all such use and ++goodwill associated with any such trademarks will inure to the benefit ++of Licensee. Further the Original Contributor will stop usage of the ++Licensee Marks upon Licensee's request. ++ ++8.10 Press Announcements. ++ ++You may make press announcements or other public statements regarding ++this License without the prior written consent of the Original ++Contributor, if Your statement is limited to announcing the licensing of ++the Covered Code or the availability of Your Product and its ++compatibility with the Covered Code. All other public announcements ++regarding this license require the prior written consent of the Original ++Contributor. Consent requests are welcome at press@helixcommunity.org. ++ ++8.11 International Use. ++ ++a) Export/Import laws. Covered Code is subject to U.S. export control ++laws and may be subject to export or import regulations in other ++countries. Each party agrees to comply strictly with all such laws and ++regulations and acknowledges their responsibility to obtain such ++licenses to export, re-export, or import as may be required. You agree ++to pass these obligations to Your licensees. ++ ++b) Intellectual Property Protection. Due to limited intellectual ++property protection and enforcement in certain countries, You agree not ++to redistribute the Original Code, Upgraded Code, TCK and Specifications ++to any country on the list of restricted countries on the Community Web ++Server. ++ ++8.12 Language. ++ ++This License is in the English language only, which language shall be ++controlling in all respects, and all versions of this License in any ++other language shall be for accommodation only and shall not be binding ++on the parties to this License. All communications and notices made or ++given pursuant to this License, and all documentation and support to be ++provided, unless otherwise noted, shall be in the English language. ++ ++PLEASE READ THE TERMS OF THIS LICENSE CAREFULLY. BY CLICKING ON THE ++"ACCEPT" BUTTON BELOW YOU ARE ACCEPTING AND AGREEING TO THE TERMS AND ++CONDITIONS OF THIS LICENSE WITH REALNETWORKS, INC. IF YOU ARE AGREEING ++TO THIS LICENSE ON BEHALF OF A COMPANY, YOU REPRESENT THAT YOU ARE ++AUTHORIZED TO BIND THE COMPANY TO SUCH A LICENSE. WHETHER YOU ARE ACTING ++ON YOUR OWN BEHALF, OR REPRESENTING A COMPANY, YOU MUST BE OF MAJORITY ++AGE AND BE OTHERWISE COMPETENT TO ENTER INTO CONTRACTS. IF YOU DO NOT ++MEET THIS CRITERIA OR YOU DO NOT AGREE TO ANY OF THE TERMS AND ++CONDITIONS OF THIS LICENSE, CLICK ON THE REJECT BUTTON TO EXIT. ++ ++ ++ GLOSSARY ++ ++1. *"Added Value"* means code which: ++ ++(i) has a principal purpose which is substantially different from that ++of the stand-alone Technology; ++ ++(ii) represents a significant functional and value enhancement to the ++Technology; ++ ++(iii) operates in conjunction with the Technology; and ++ ++(iv) is not marketed as a technology which replaces or substitutes for ++the Technology ++ ++2. "*Applicable Patent Rights*" mean: (a) in the case where Original ++Contributor is the grantor of rights, claims of patents that (i) are now ++or hereafter acquired, owned by or assigned to Original Contributor and ++(ii) are necessarily infringed by using or making the Original Code or ++Upgraded Code, including Modifications provided by Original Contributor, ++alone and not in combination with other software or hardware; and (b) in ++the case where Licensee is the grantor of rights, claims of patents that ++(i) are now or hereafter acquired, owned by or assigned to Licensee and ++(ii) are infringed (directly or indirectly) by using or making ++Licensee's Modifications or Error Corrections, taken alone or in ++combination with Covered Code. ++ ++3. "*Application Programming Interfaces (APIs)"* means the interfaces, ++associated header files, service provider interfaces, and protocols that ++enable a device, application, Operating System, or other program to ++obtain services from or make requests of (or provide services in ++response to requests from) other programs, and to use, benefit from, or ++rely on the resources, facilities, and capabilities of the relevant ++programs using the APIs. APIs includes the technical documentation ++describing the APIs, the Source Code constituting the API, and any ++Header Files used with the APIs. ++ ++4. "*Commercial Use*" means any use (internal or external), copying, ++sublicensing or distribution (internal or external), directly or ++indirectly of Covered Code by You other than Your Research Use of ++Covered Code within Your business or organization or in conjunction with ++other Licensees with equivalent Research Use rights. Commercial Use ++includes any use of the Covered Code for direct or indirect commercial ++or strategic gain, advantage or other business purpose. Any Commercial ++Use requires execution of Attachment D by You and Original Contributor. ++ ++5. "*Community Code*" means the Original Code, Upgraded Code, Error ++Corrections, Shared Modifications, or any combination thereof. ++ ++6. "*Community Webserver(s)"* means the webservers designated by ++Original Contributor for access to the Original Code, Upgraded Code, TCK ++and Specifications and for posting Error Corrections and Shared ++Modifications. ++ ++7. "*Compliant Covered Code*" means Covered Code that complies with the ++requirements of the TCK. ++ ++8. "*Contributor*" means each Licensee that creates or contributes to ++the creation of any Error Correction or Shared Modification. ++ ++9. "*Covered Code*" means the Original Code, Upgraded Code, ++Modifications, or any combination thereof. ++ ++10. "*Error Correction*" means any change made to Community Code which ++conforms to the Specification and corrects the adverse effect of a ++failure of Community Code to perform any function set forth in or ++required by the Specifications. ++ ++11. "*Executable*" means Covered Code that has been converted from ++Source Code to the preferred form for execution by a computer or digital ++processor (e.g. binary form). ++ ++12. "*Extension(s)"* means any additional Interfaces developed by or for ++You which: (i) are designed for use with the Technology; (ii) constitute ++an API for a library of computing functions or services; and (iii) are ++disclosed or otherwise made available to third party software developers ++for the purpose of developing software which invokes such additional ++Interfaces. The foregoing shall not apply to software developed by Your ++subcontractors to be exclusively used by You. ++ ++13. "*Header File(s)"* means that portion of the Source Code that ++provides the names and types of member functions, data members, class ++definitions, and interface definitions necessary to implement the APIs ++for the Covered Code. Header Files include, files specifically ++designated by Original Contributor as Header Files. Header Files do not ++include the code necessary to implement the functionality underlying the ++Interface. ++ ++14. *"Helix DNA Server Technology"* means the program(s) that implement ++the Helix Universal Server streaming engine for the Technology as ++defined in the Specification. ++ ++15. *"Helix DNA Client Technology"* means the Covered Code that ++implements the RealOne Player engine as defined in the Specification. ++ ++16. *"Helix DNA Producer Technology"* means the Covered Code that ++implements the Helix Producer engine as defined in the Specification. ++ ++17. *"Helix DNA Technology"* means the Helix DNA Server Technology, the ++Helix DNA Client Technology, the Helix DNA Producer Technology and other ++Helix technologies designated by Original Contributor. ++ ++18. "*Intellectual Property Rights*" means worldwide statutory and ++common law rights associated solely with (i) Applicable Patent Rights; ++(ii) works of authorship including copyrights, copyright applications, ++copyright registrations and "moral rights"; (iii) the protection of ++trade and industrial secrets and confidential information; and (iv) ++divisions, continuations, renewals, and re-issuances of the foregoing ++now existing or acquired in the future. ++ ++19. *"Interface*" means interfaces, functions, properties, class ++definitions, APIs, Header Files, GUIDs, V-Tables, and/or protocols ++allowing one piece of software, firmware or hardware to communicate or ++interoperate with another piece of software, firmware or hardware. ++ ++20. "*Internal Deployment Use*" means use of Compliant Covered Code ++(excluding Research Use) within Your business or organization only by ++Your employees and/or agents on behalf of Your business or organization, ++but not to provide services, including content distribution, to third ++parties, subject to execution of Attachment D by You and Original ++Contributor, if required. ++ ++21. "*Licensee*" means any party that has entered into and has in effect ++a version of this License with Original Contributor. ++ ++22. "*MIME type*" means a description of what type of media or other ++content is in a file, including by way of example but not limited to ++'audio/x-pn-realaudio-plugin.' ++ ++23. "*Modification(s)"* means (i) any addition to, deletion from and/or ++change to the substance and/or structure of the Covered Code, including ++Interfaces; (ii) the combination of any Covered Code and any previous ++Modifications; (iii) any new file or other representation of computer ++program statements that contains any portion of Covered Code; and/or ++(iv) any new Source Code implementing any portion of the Specifications. ++ ++24. "*MP3 Patents*" means any patents necessary to make, use or sell ++technology implementing any portion of the specification developed by ++the Moving Picture Experts Group known as MPEG-1 Audio Layer-3 or MP3, ++including but not limited to all past and future versions, profiles, ++extensions, parts and amendments relating to the MP3 specification. ++ ++25. "*MPEG-4 Patents*" means any patents necessary to make, use or sell ++technology implementing any portion of the specification developed by ++the Moving Pictures Experts Group known as MPEG-4, including but not ++limited to all past and future versions, profiles, extensions, parts and ++amendments relating to the MPEG-4 specification. ++ ++26. "*Original Code*" means the initial Source Code for the Technology ++as described on the Community Web Server. ++ ++27. "*Original Contributor*" means RealNetworks, Inc., its affiliates ++and its successors and assigns. ++ ++28. "*Original Contributor MIME Type*" means the MIME registry, browser ++preferences, or local file/protocol associations invoking any Helix DNA ++Client-based application, including the RealOne Player, for playback of ++RealAudio, RealVideo, other RealMedia MIME types or datatypes (e.g., ++.ram, .rnx, .rpm, .ra, .rm, .rp, .rt, .rf, .prx, .mpe, .rmp, .rmj, .rav, ++.rjs, .rmx, .rjt, .rms), and any other Original Contributor-specific or ++proprietary MIME types that Original Contributor may introduce in the ++future. ++ ++29. "*Personal Use*" means use of Covered Code by an individual solely ++for his or her personal, private and non-commercial purposes. An ++individual's use of Covered Code in his or her capacity as an officer, ++employee, member, independent contractor or agent of a corporation, ++business or organization (commercial or non-commercial) does not qualify ++as Personal Use. ++ ++30. "*RealMedia File Format*" means the file format designed and ++developed by RealNetworks for storing multimedia data and used to store ++RealAudio and RealVideo encoded streams. Valid RealMedia File Format ++extensions include: .rm, .rmj, .rmc, .rmvb, .rms. ++ ++31. "*RCSL Webpage*" means the RealNetworks Community Source License ++webpage located at https://www.helixcommunity.org/content/rcsl or such ++other URL that Original Contributor may designate from time to time. ++ ++32. "*Reformatted Specifications*" means any revision to the ++Specifications which translates or reformats the Specifications (as for ++example in connection with Your documentation) but which does not alter, ++subset or superset * *the functional or operational aspects of the ++Specifications. ++ ++33. "*Research Use*" means use and distribution of Covered Code only for ++Your Personal Use, research or development use and expressly excludes ++Internal Deployment Use and Commercial Use. Research Use also includes ++use of Covered Code to teach individuals how to use Covered Code. ++ ++34. "*Shared Modifications*" means Modifications that You distribute or ++use for a Commercial Use, in addition to any Modifications provided by ++You, at Your option, pursuant to Section 2.2, or received by You from a ++Contributor pursuant to Section 2.3. ++ ++35. "*Source Code*" means the preferred form of the Covered Code for ++making modifications to it, including all modules it contains, plus any ++associated interface definition files, scripts used to control ++compilation and installation of an Executable, or source code ++differential comparisons against either the Original Code or another ++well known, available Covered Code of the Contributor's choice. The ++Source Code can be in a compressed or archival form, provided the ++appropriate decompression or de-archiving software is widely available ++for no charge. ++ ++36. "*Specifications*" means the specifications for the Technology and ++other documentation, as designated on the Community Web Server, as may ++be revised by Original Contributor from time to time. ++ ++37. "*Trademarks*" means Original Contributor's trademarks and logos, ++including, but not limited to, RealNetworks, RealAudio, RealVideo, ++RealOne, RealSystem, SureStream, Helix, Helix DNA and other trademarks ++whether now used or adopted in the future. ++ ++38. "*Technology*" means the technology described in Attachment B, and ++Upgrades. ++ ++39. "*Technology Compatibility Kit"* or *"TCK*" means the test programs, ++procedures, acceptance criteria and/or other requirements, designated by ++Original Contributor for use in verifying compliance of Covered Code ++with the Specifications, in conjunction with the Original Code and ++Upgraded Code. Original Contributor may, in its sole discretion and from ++time to time, revise a TCK to correct errors and/or omissions and in ++connection with Upgrades. ++ ++40. "*Upgrade(s)"* means new versions of Technology designated ++exclusively by Original Contributor as an "Upgrade" and released by ++Original Contributor from time to time under the terms of the License. ++ ++41. "*Upgraded Code*" means the Source Code and/or Executables for ++Upgrades, possibly including Modifications made by Contributors. ++ ++42. *"User's Guide"* means the users guide for the TCK which Original ++Contributor makes available to You to provide direction in how to run ++the TCK and properly interpret the results, as may be revised by ++Original Contributor from time to time. ++ ++43. "*You(r)*" means an individual, or a legal entity acting by and ++through an individual or individuals, exercising rights either under ++this License or under a future version of this License issued pursuant ++to Section 4.1. For legal entities, "You(r)" includes any entity that by ++majority voting interest controls, is controlled by, or is under common ++control with You. ++ ++44. "*Your Products*" means any (i) hardware products You distribute ++integrating the Covered Code; (ii) any software products You distribute ++with the Covered Code that utilize the APIs of the Covered Code; or ++(iii) any services You provide using the Covered Code. ++ ++ ++ ATTACHMENT A ++ ++REQUIRED NOTICES ++ ++ ++ ATTACHMENT A-1 ++ ++REQUIRED IN ALL CASES ++ ++Notice to be included in header file of all Error Corrections and Shared ++Modifications: ++ ++Portions Copyright 1994-2003 © RealNetworks, Inc. All rights reserved. ++ ++The contents of this file, and the files included with this file, are ++subject to the current version of RealNetworks Community Source License ++Version 1.1 (the "License"). You may not use this file except in ++compliance with the License executed by both You and RealNetworks. You ++may obtain a copy of the License at * ++https://www.helixcommunity.org/content/rcsl.* You may also obtain a copy ++of the License by contacting RealNetworks directly. Please see the ++License for the rights, obligations and limitations governing use of the ++contents of the file. ++ ++This file is part of the Helix DNA technology. RealNetworks, Inc., is ++the developer of the Original code and owns the copyrights in the ++portions it created. ++ ++This file, and the files included with this file, are distributed on an ++'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, ++AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT ++LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR ++PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ ++Contributor(s): ++ ++_______________________________________________ ++ ++Technology Compatibility Kit Test Suite(s) Location: ++ ++________________________________ ++ ++ ++ ATTACHMENT A-2 ++ ++SAMPLE LICENSEE CERTIFICATION ++ ++"By clicking the `Agree' button below, You certify that You are a ++Licensee in good standing under the RealNetworks Community Source ++License, ("License") and that Your access, use and distribution of code ++and information You may obtain at this site is subject to the License. ++If You are not a Licensee under the RealNetworks Community Source ++License You agree not to download, copy or use the Helix DNA technology. ++ ++ ++ ATTACHMENT A-3 ++ ++REQUIRED STUDENT NOTIFICATION ++ ++"This software and related documentation has been obtained by Your ++educational institution subject to the RealNetworks Community Source ++License. You have been provided access to the software and related ++documentation for use only in connection with your course work and ++research activities as a matriculated student of Your educational ++institution. Any other use is expressly prohibited. ++ ++THIS SOFTWARE AND RELATED DOCUMENTATION CONTAINS PROPRIETARY MATERIAL OF ++REALNETWORKS, INC, WHICH ARE PROTECTED BY VARIOUS INTELLECTUAL PROPERTY ++RIGHTS. ++ ++You may not use this file except in compliance with the License. You may ++obtain a copy of the License on the web at ++https://www.helixcommunity.org/content/rcsl. ++ ++* ++* ++ ++ ++ ATTACHMENT B ++ ++Description of Technology ++ ++Helix DNA, which consists of Helix DNA Client, Helix DNA Server and ++Helix DNA Producer. ++ ++Description of "Technology" ++ ++Helix DNA Technology v1.0 as described on the Community Web Server. ++ ++ ++ ATTACHMENT C ++ ++TECHNOLOGY COMPATIBILITY KIT LICENSE ++ ++The following license is effective for the *Helix DNA* Technology ++Compatibility Kit - as described on the Community Web Server. The ++Technology Compatibility Kit(s) for the Technology specified in ++Attachment B may be accessed at the Community Web Server. ++ ++1. TCK License. ++ ++1.1 Grants to use TCK ++ ++Subject to the terms and restrictions set forth below and the ++RealNetworks Community Source License, and the Research Use license, ++Original Contributor grants to You a worldwide, non-exclusive, ++non-transferable license, to the extent of Original Contributor's ++Intellectual Property Rights in the TCK (without the right to ++sublicense), to use the TCK to develop and test Covered Code. ++ ++1.2 TCK Use Restrictions. ++ ++You are not authorized to create derivative works of the TCK or use the ++TCK to test any implementation of the Specification that is not Covered ++Code. You may not publish Your test results or make claims of ++comparative compatibility with respect to other implementations of the ++Specification. In consideration for the license grant in Section 1.1 ++above You agree not to develop Your own tests that are intended to ++validate conformation with the Specification. ++ ++2. Test Results. ++ ++You agree to provide to Original Contributor or the third party test ++facility if applicable, Your test results that demonstrate that Covered ++Code is Compliant Covered Code and that Original Contributor may publish ++or otherwise distribute such test results. ++ ++PLEASE READ THE TERMS OF THIS LICENSE CAREFULLY. BY CLICKING ON THE ++"ACCEPT" BUTTON BELOW YOU ARE ACCEPTING AND AGREEING TO THE TERMS AND ++CONDITIONS OF THIS LICENSE WITH THE ORIGINAL CONTRIBUTOR, REALNETWORKS, ++INC. IF YOU ARE AGREEING TO THIS LICENSE ON BEHALF OF A COMPANY, YOU ++REPRESENT THAT YOU ARE AUTHORIZED TO BIND THE COMPANY TO SUCH A LICENSE. ++WHETHER YOU ARE ACTING ON YOUR OWN BEHALF, OR REPRESENTING A COMPANY, ++YOU MUST BE OF MAJORITY AGE AND BE OTHERWISE COMPETENT TO ENTER INTO ++CONTRACTS. IF YOU DO NOT MEET THIS CRITERIA OR YOU DO NOT AGREE TO ANY ++OF THE TERMS AND CONDITIONS OF THIS LICENSE, CLICK ON THE REJECT BUTTON ++TO EXIT. ++ ++*ACCEPT / REJECT ++* ++ ++* ++* ++ ++*To agree to the R&D/academic terms of this license, please register ++ on the site -- ++you will then be given a chance to agree to the clickwrap RCSL ++ ++R&D License ++ ++and gain access to the RCSL-licensed source code. To build or deploy ++commercial applications based on the RCSL, you will need to agree to the ++Commercial Use license attachments ++* ++ ++ ++ +Index: helix-libs/clientapps/clutter/RPSL.txt +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/RPSL.txt 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,518 @@ ++RealNetworks Public Source License Version 1.0 ++(Rev. Date October 28, 2002) ++ ++1. General Definitions. This License applies to any program or other work which ++RealNetworks, Inc., or any other entity that elects to use this license, ++("Licensor") makes publicly available and which contains a notice placed by ++Licensor identifying such program or work as "Original Code" and stating that it ++is subject to the terms of this RealNetworks Public Source License version 1.0 ++(or subsequent version thereof) ("License"). You are not required to accept this ++License. However, nothing else grants You permission to use, copy, modify or ++distribute the software or its derivative works. These actions are prohibited by ++law if You do not accept this License. Therefore, by modifying, copying or ++distributing the software (or any work based on the software), You indicate your ++acceptance of this License to do so, and all its terms and conditions. In ++addition, you agree to the terms of this License by clicking the Accept button ++or downloading the software. As used in this License: ++ ++1.1 "Applicable Patent Rights" mean: (a) in the case where Licensor is the ++grantor of rights, claims of patents that (i) are now or hereafter acquired, ++owned by or assigned to Licensor and (ii) are necessarily infringed by using or ++making the Original Code alone and not in combination with other software or ++hardware; and (b) in the case where You are the grantor of rights, claims of ++patents that (i) are now or hereafter acquired, owned by or assigned to You and ++(ii) are infringed (directly or indirectly) by using or making Your ++Modifications, taken alone or in combination with Original Code. ++ ++1.2 "Compatible Source License" means any one of the licenses listed on Exhibit ++B or at https://www.helixcommunity.org/content/complicense or other licenses ++specifically identified by Licensor in writing. Notwithstanding any term to the ++contrary in any Compatible Source License, any code covered by any Compatible ++Source License that is used with Covered Code must be made readily available in ++Source Code format for royalty-free use under the terms of the Compatible Source ++License or this License. ++ ++1.3 "Contributor" means any person or entity that creates or contributes to the ++creation of Modifications. ++ ++1.4 "Covered Code" means the Original Code, Modifications, the combination of ++Original Code and any Modifications, and/or any respective portions thereof. ++ ++1.5 "Deploy" means to use, sublicense or distribute Covered Code other than for ++Your internal research and development (R&D) and/or Personal Use, and includes ++without limitation, any and all internal use or distribution of Covered Code ++within Your business or organization except for R&D use and/or Personal Use, as ++well as direct or indirect sublicensing or distribution of Covered Code by You ++to any third party in any form or manner. ++ ++1.6 "Derivative Work" means either the Covered Code or any derivative work under ++United States copyright law, and including any work containing or including any ++portion of the Covered Code or Modifications, either verbatim or with ++modifications and/or translated into another language. Derivative Work also ++includes any work which combines any portion of Covered Code or Modifications ++with code not otherwise governed by the terms of this License. ++ ++1.7 "Externally Deploy" means to Deploy the Covered Code in any way that may be ++accessed or used by anyone other than You, used to provide any services to ++anyone other than You, or used in any way to deliver any content to anyone other ++than You, whether the Covered Code is distributed to those parties, made ++available as an application intended for use over a computer network, or used to ++provide services or otherwise deliver content to anyone other than You. ++ ++1.8. "Interface" means interfaces, functions, properties, class definitions, ++APIs, header files, GUIDs, V-Tables, and/or protocols allowing one piece of ++software, firmware or hardware to communicate or interoperate with another piece ++of software, firmware or hardware. ++ ++1.9 "Modifications" mean any addition to, deletion from, and/or change to, the ++substance and/or structure of the Original Code, any previous Modifications, the ++combination of Original Code and any previous Modifications, and/or any ++respective portions thereof. When code is released as a series of files, a ++Modification is: (a) any addition to or deletion from the contents of a file ++containing Covered Code; and/or (b) any new file or other representation of ++computer program statements that contains any part of Covered Code. ++ ++1.10 "Original Code" means (a) the Source Code of a program or other work as ++originally made available by Licensor under this License, including the Source ++Code of any updates or upgrades to such programs or works made available by ++Licensor under this License, and that has been expressly identified by Licensor ++as such in the header file(s) of such work; and (b) the object code compiled ++from such Source Code and originally made available by Licensor under this ++License. ++ ++1.11 "Personal Use" means use of Covered Code by an individual solely for his or ++her personal, private and non-commercial purposes. An individual's use of ++Covered Code in his or her capacity as an officer, employee, member, independent ++contractor or agent of a corporation, business or organization (commercial or ++non-commercial) does not qualify as Personal Use. ++ ++1.12 "Source Code" means the human readable form of a program or other work that ++is suitable for making modifications to it, including all modules it contains, ++plus any associated interface definition files, scripts used to control ++compilation and installation of an executable (object code). ++ ++1.13 "You" or "Your" means an individual or a legal entity exercising rights ++under this License. For legal entities, "You" or "Your" includes any entity ++which controls, is controlled by, or is under common control with, You, where ++"control" means (a) the power, direct or indirect, to cause the direction or ++management of such entity, whether by contract or otherwise, or (b) ownership of ++fifty percent (50%) or more of the outstanding shares or beneficial ownership of ++such entity. ++ ++2. Permitted Uses; Conditions & Restrictions. Subject to the terms and ++conditions of this License, Licensor hereby grants You, effective on the date ++You accept this License (via downloading or using Covered Code or otherwise ++indicating your acceptance of this License), a worldwide, royalty-free, ++non-exclusive copyright license, to the extent of Licensor's copyrights cover ++the Original Code, to do the following: ++ ++2.1 You may reproduce, display, perform, modify and Deploy Covered Code, ++provided that in each instance: ++ ++(a) You must retain and reproduce in all copies of Original Code the copyright ++and other proprietary notices and disclaimers of Licensor as they appear in the ++Original Code, and keep intact all notices in the Original Code that refer to ++this License; ++ ++(b) You must include a copy of this License with every copy of Source Code of ++Covered Code and documentation You distribute, and You may not offer or impose ++any terms on such Source Code that alter or restrict this License or the ++recipients' rights hereunder, except as permitted under Section 6; ++ ++(c) You must duplicate, to the extent it does not already exist, the notice in ++Exhibit A in each file of the Source Code of all Your Modifications, and cause ++the modified files to carry prominent notices stating that You changed the files ++and the date of any change; ++ ++(d) You must make Source Code of all Your Externally Deployed Modifications ++publicly available under the terms of this License, including the license grants ++set forth in Section 3 below, for as long as you Deploy the Covered Code or ++twelve (12) months from the date of initial Deployment, whichever is longer. You ++should preferably distribute the Source Code of Your Deployed Modifications ++electronically (e.g. download from a web site); and ++ ++(e) if You Deploy Covered Code in object code, executable form only, You must ++include a prominent notice, in the code itself as well as in related ++documentation, stating that Source Code of the Covered Code is available under ++the terms of this License with information on how and where to obtain such ++Source Code. You must also include the Object Code Notice set forth in Exhibit A ++in the "about" box or other appropriate place where other copyright notices are ++placed, including any packaging materials. ++ ++2.2 You expressly acknowledge and agree that although Licensor and each ++Contributor grants the licenses to their respective portions of the Covered Code ++set forth herein, no assurances are provided by Licensor or any Contributor that ++the Covered Code does not infringe the patent or other intellectual property ++rights of any other entity. Licensor and each Contributor disclaim any liability ++to You for claims brought by any other entity based on infringement of ++intellectual property rights or otherwise. As a condition to exercising the ++rights and licenses granted hereunder, You hereby assume sole responsibility to ++secure any other intellectual property rights needed, if any. For example, if a ++third party patent license is required to allow You to make, use, sell, import ++or offer for sale the Covered Code, it is Your responsibility to acquire such ++license(s). ++ ++2.3 Subject to the terms and conditions of this License, Licensor hereby grants ++You, effective on the date You accept this License (via downloading or using ++Covered Code or otherwise indicating your acceptance of this License), a ++worldwide, royalty-free, perpetual, non-exclusive patent license under ++Licensor's Applicable Patent Rights to make, use, sell, offer for sale and ++import the Covered Code, provided that in each instance you comply with the ++terms of this License. ++ ++3. Your Grants. In consideration of, and as a condition to, the licenses granted ++to You under this License: ++ ++(a) You grant to Licensor and all third parties a non-exclusive, perpetual, ++irrevocable, royalty free license under Your Applicable Patent Rights and other ++intellectual property rights owned or controlled by You, to make, sell, offer ++for sale, use, import, reproduce, display, perform, modify, distribute and ++Deploy Your Modifications of the same scope and extent as Licensor's licenses ++under Sections 2.1 and 2.2; and ++ ++(b) You grant to Licensor and its subsidiaries a non-exclusive, worldwide, ++royalty-free, perpetual and irrevocable license, under Your Applicable Patent ++Rights and other intellectual property rights owned or controlled by You, to ++make, use, sell, offer for sale, import, reproduce, display, perform, ++distribute, modify or have modified (for Licensor and/or its subsidiaries), ++sublicense and distribute Your Modifications, in any form and for any purpose, ++through multiple tiers of distribution. ++ ++(c) You agree not use any information derived from Your use and review of the ++Covered Code, including but not limited to any algorithms or inventions that may ++be contained in the Covered Code, for the purpose of asserting any of Your ++patent rights, or assisting a third party to assert any of its patent rights, ++against Licensor or any Contributor. ++ ++4. Derivative Works. You may create a Derivative Work by combining Covered Code ++with other code not otherwise governed by the terms of this License and ++distribute the Derivative Work as an integrated product. In each such instance, ++You must make sure the requirements of this License are fulfilled for the ++Covered Code or any portion thereof, including all Modifications. ++ ++4.1 You must cause any Derivative Work that you distribute, publish or ++Externally Deploy, that in whole or in part contains or is derived from the ++Covered Code or any part thereof, to be licensed as a whole at no charge to all ++third parties under the terms of this License and no other license except as ++provided in Section 4.2. You also must make Source Code available for the ++Derivative Work under the same terms as Modifications, described in Sections 2 ++and 3, above. ++ ++4.2 Compatible Source Licenses. Software modules that have been independently ++developed without any use of Covered Code and which contain no portion of the ++Covered Code, Modifications or other Derivative Works, but are used or combined ++in any way wtih the Covered Code or any Derivative Work to form a larger ++Derivative Work, are exempt from the conditions described in Section 4.1 but ++only to the extent that: the software module, including any software that is ++linked to, integrated with, or part of the same applications as, the software ++module by any method must be wholly subject to one of the Compatible Source ++Licenses. Notwithstanding the foregoing, all Covered Code must be subject to the ++terms of this License. Thus, the entire Derivative Work must be licensed under a ++combination of the RPSL (for Covered Code) and a Compatible Source License for ++any independently developed software modules within the Derivative Work. The ++foregoing requirement applies even if the Compatible Source License would ++ordinarily allow the software module to link with, or form larger works with, ++other software that is not subject to the Compatible Source License. For ++example, although the Mozilla Public License v1.1 allows Mozilla code to be ++combined with proprietary software that is not subject to the MPL, if ++MPL-licensed code is used with Covered Code the MPL-licensed code could not be ++combined or linked with any code not governed by the MPL. The general intent of ++this section 4.2 is to enable use of Covered Code with applications that are ++wholly subject to an acceptable open source license. You are responsible for ++determining whether your use of software with Covered Code is allowed under Your ++license to such software. ++ ++4.3 Mere aggregation of another work not based on the Covered Code with the ++Covered Code (or with a work based on the Covered Code) on a volume of a storage ++or distribution medium does not bring the other work under the scope of this ++License. If You deliver the Covered Code for combination and/or integration with ++an application previously provided by You (for example, via automatic updating ++technology), such combination and/or integration constitutes a Derivative Work ++subject to the terms of this License. ++ ++5. Exclusions From License Grant. Nothing in this License shall be deemed to ++grant any rights to trademarks, copyrights, patents, trade secrets or any other ++intellectual property of Licensor or any Contributor except as expressly stated ++herein. No right is granted to the trademarks of Licensor or any Contributor ++even if such marks are included in the Covered Code. Nothing in this License ++shall be interpreted to prohibit Licensor from licensing under different terms ++from this License any code that Licensor otherwise would have a right to ++license. Modifications, Derivative Works and/or any use or combination of ++Covered Code with other technology provided by Licensor or third parties may ++require additional patent licenses from Licensor which Licensor may grant in its ++sole discretion. No patent license is granted separate from the Original Code or ++combinations of the Original Code with other software or hardware. ++ ++5.1. Trademarks. This License does not grant any rights to use the trademarks or ++trade names owned by Licensor ("Licensor Marks" defined in Exhibit C) or to any ++trademark or trade name belonging to any Contributor. No Licensor Marks may be ++used to endorse or promote products derived from the Original Code other than as ++permitted by the Licensor Trademark Policy defined in Exhibit C. ++ ++6. Additional Terms. You may choose to offer, and to charge a fee for, warranty, ++support, indemnity or liability obligations and/or other rights consistent with ++the scope of the license granted herein ("Additional Terms") to one or more ++recipients of Covered Code. However, You may do so only on Your own behalf and ++as Your sole responsibility, and not on behalf of Licensor or any Contributor. ++You must obtain the recipient's agreement that any such Additional Terms are ++offered by You alone, and You hereby agree to indemnify, defend and hold ++Licensor and every Contributor harmless for any liability incurred by or claims ++asserted against Licensor or such Contributor by reason of any such Additional ++Terms. ++ ++7. Versions of the License. Licensor may publish revised and/or new versions of ++this License from time to time. Each version will be given a distinguishing ++version number. Once Original Code has been published under a particular version ++of this License, You may continue to use it under the terms of that version. You ++may also choose to use such Original Code under the terms of any subsequent ++version of this License published by Licensor. No one other than Licensor has ++the right to modify the terms applicable to Covered Code created under this ++License. ++ ++8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part ++pre-release, untested, or not fully tested works. The Covered Code may contain ++errors that could cause failures or loss of data, and may be incomplete or ++contain inaccuracies. You expressly acknowledge and agree that use of the ++Covered Code, or any portion thereof, is at Your sole and entire risk. THE ++COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ++ANY KIND AND LICENSOR AND LICENSOR'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS ++"LICENSOR" FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY ++DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT ++NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, OF ++SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, OF QUIET ++ENJOYMENT, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. LICENSOR AND EACH ++CONTRIBUTOR DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE ++COVERED CODE, THAT THE FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR ++REQUIREMENTS, THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR ++ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL OR ++WRITTEN DOCUMENTATION, INFORMATION OR ADVICE GIVEN BY LICENSOR, A LICENSOR ++AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY. You ++acknowledge that the Covered Code is not intended for use in high risk ++activities, including, but not limited to, the design, construction, operation ++or maintenance of nuclear facilities, aircraft navigation, aircraft ++communication systems, or air traffic control machines in which case the failure ++of the Covered Code could lead to death, personal injury, or severe physical or ++environmental damage. Licensor disclaims any express or implied warranty of ++fitness for such uses. ++ ++9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT ++SHALL LICENSOR OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, ++INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR ++YOUR USE OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER ++UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE OR STRICT ++LIABILITY), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF LICENSOR OR SUCH ++CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND ++NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. SOME ++JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF INCIDENTAL OR ++CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY TO YOU. In no event ++shall Licensor's total liability to You for all damages (other than as may be ++required by applicable law) under this License exceed the amount of ten dollars ++($10.00). ++ ++10. Ownership. Subject to the licenses granted under this License, each ++Contributor retains all rights, title and interest in and to any Modifications ++made by such Contributor. Licensor retains all rights, title and interest in and ++to the Original Code and any Modifications made by or on behalf of Licensor ++("Licensor Modifications"), and such Licensor Modifications will not be ++automatically subject to this License. Licensor may, at its sole discretion, ++choose to license such Licensor Modifications under this License, or on ++different terms from those contained in this License or may choose not to ++license them at all. ++ ++11. Termination. ++ ++11.1 Term and Termination. The term of this License is perpetual unless ++terminated as provided below. This License and the rights granted hereunder will ++terminate: ++ ++(a) automatically without notice from Licensor if You fail to comply with any ++term(s) of this License and fail to cure such breach within 30 days of becoming ++aware of such breach; ++ ++(b) immediately in the event of the circumstances described in Section 12.5(b); ++or ++ ++(c) automatically without notice from Licensor if You, at any time during the ++term of this License, commence an action for patent infringement against ++Licensor (including by cross-claim or counter claim in a lawsuit); ++ ++(d) upon written notice from Licensor if You, at any time during the term of ++this License, commence an action for patent infringement against any third party ++alleging that the Covered Code itself (excluding combinations with other ++software or hardware) infringes any patent (including by cross-claim or counter ++claim in a lawsuit). ++ ++11.2 Effect of Termination. Upon termination, You agree to immediately stop any ++further use, reproduction, modification, sublicensing and distribution of the ++Covered Code and to destroy all copies of the Covered Code that are in your ++possession or control. All sublicenses to the Covered Code which have been ++properly granted prior to termination shall survive any termination of this ++License. Provisions which, by their nature, should remain in effect beyond the ++termination of this License shall survive, including but not limited to Sections ++3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other for ++compensation, indemnity or damages of any sort solely as a result of terminating ++this License in accordance with its terms, and termination of this License will ++be without prejudice to any other right or remedy of any party. ++ ++12. Miscellaneous. ++ ++12.1 Government End Users. The Covered Code is a "commercial item" as defined in ++FAR 2.101. Government software and technical data rights in the Covered Code ++include only those rights customarily provided to the public as defined in this ++License. This customary commercial license in technical data and software is ++provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer ++Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical ++Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software ++or Computer Software Documentation). Accordingly, all U.S. Government End Users ++acquire Covered Code with only those rights set forth herein. ++ ++12.2 Relationship of Parties. This License will not be construed as creating an ++agency, partnership, joint venture or any other form of legal association ++between or among You, Licensor or any Contributor, and You will not represent to ++the contrary, whether expressly, by implication, appearance or otherwise. ++ ++12.3 Independent Development. Nothing in this License will impair Licensor's ++right to acquire, license, develop, have others develop for it, market and/or ++distribute technology or products that perform the same or similar functions as, ++or otherwise compete with, Modifications, Derivative Works, technology or ++products that You may develop, produce, market or distribute. ++ ++12.4 Waiver; Construction. Failure by Licensor or any Contributor to enforce any ++provision of this License will not be deemed a waiver of future enforcement of ++that or any other provision. Any law or regulation which provides that the ++language of a contract shall be construed against the drafter will not apply to ++this License. ++ ++12.5 Severability. (a) If for any reason a court of competent jurisdiction finds ++any provision of this License, or portion thereof, to be unenforceable, that ++provision of the License will be enforced to the maximum extent permissible so ++as to effect the economic benefits and intent of the parties, and the remainder ++of this License will continue in full force and effect. (b) Notwithstanding the ++foregoing, if applicable law prohibits or restricts You from fully and/or ++specifically complying with Sections 2 and/or 3 or prevents the enforceability ++of either of those Sections, this License will immediately terminate and You ++must immediately discontinue any use of the Covered Code and destroy all copies ++of it that are in your possession or control. ++ ++12.6 Dispute Resolution. Any litigation or other dispute resolution between You ++and Licensor relating to this License shall take place in the Seattle, ++Washington, and You and Licensor hereby consent to the personal jurisdiction of, ++and venue in, the state and federal courts within that District with respect to ++this License. The application of the United Nations Convention on Contracts for ++the International Sale of Goods is expressly excluded. ++ ++12.7 Export/Import Laws. This software is subject to all export and import laws ++and restrictions and regulations of the country in which you receive the Covered ++Code and You are solely responsible for ensuring that You do not export, ++re-export or import the Covered Code or any direct product thereof in violation ++of any such restrictions, laws or regulations, or without all necessary ++authorizations. ++ ++12.8 Entire Agreement; Governing Law. This License constitutes the entire ++agreement between the parties with respect to the subject matter hereof. This ++License shall be governed by the laws of the United States and the State of ++Washington. ++ ++Where You are located in the province of Quebec, Canada, the following clause ++applies: The parties hereby confirm that they have requested that this License ++and all related documents be drafted in English. Les parties ont exigé ++que le présent contrat et tous les documents connexes soient ++rédigés en anglais. ++ ++ EXHIBIT A. ++ ++"Copyright © 1995-2002 ++RealNetworks, Inc. and/or its licensors. All Rights Reserved. ++ ++The contents of this file, and the files included with this file, are subject to ++the current version of the RealNetworks Public Source License Version 1.0 (the ++"RPSL") available at https://www.helixcommunity.org/content/rpsl unless you have ++licensed the file under the RealNetworks Community Source License Version 1.0 ++(the "RCSL") available at https://www.helixcommunity.org/content/rcsl, in which ++case the RCSL will apply. You may also obtain the license terms directly from ++RealNetworks. You may not use this file except in compliance with the RPSL or, ++if you have a valid RCSL with RealNetworks applicable to this file, the RCSL. ++Please see the applicable RPSL or RCSL for the rights, obligations and ++limitations governing use of the contents of the file. ++ ++This file is part of the Helix DNA Technology. RealNetworks is the developer of ++the Original code and owns the copyrights in the portions it created. ++ ++This file, and the files included with this file, is distributed and made ++available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR ++IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING ++WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR ++PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ ++Contributor(s): ____________________________________ ++ ++Technology Compatibility Kit Test ++Suite(s) Location (if licensed under the RCSL): ______________________________ ++ ++Object Code Notice: Helix DNA Client technology included. Copyright (c) ++RealNetworks, Inc., 1995-2002. All rights reserved. ++ ++ ++ EXHIBIT B ++ ++Compatible Source Licenses for the RealNetworks Public Source License. The ++following list applies to the most recent version of the license as of October ++25, 2002, unless otherwise indicated. ++ ++* Academic Free License ++* Apache Software License ++* Apple Public Source License ++* Artistic license ++* Attribution Assurance Licenses ++* BSD license ++* Common Public License (1) ++* Eiffel Forum License ++* GNU General Public License (GPL) (1) ++* GNU Library or "Lesser" General Public License (LGPL) (1) ++* IBM Public License ++* Intel Open Source License ++* Jabber Open Source License ++* MIT license ++* MITRE Collaborative Virtual Workspace License (CVW License) ++* Motosoto License ++* Mozilla Public License 1.0 (MPL) ++* Mozilla Public License 1.1 (MPL) ++* Nokia Open Source License ++* Open Group Test Suite License ++* Python Software Foundation License ++* Ricoh Source Code Public License ++* Sun Industry Standards Source License (SISSL) ++* Sun Public License ++* University of Illinois/NCSA Open Source License ++* Vovida Software License v. 1.0 ++* W3C License ++* X.Net License ++* Zope Public License ++* zlib/libpng license ++ ++(1) Note: because this license contains certain reciprocal licensing terms that ++purport to extend to independently developed code, You may be prohibited under ++the terms of this otherwise compatible license from using code licensed under ++its terms with Covered Code because Covered Code may only be licensed under the ++RealNetworks Public Source License. Any attempt to apply non RPSL license terms, ++including without limitation the GPL, to Covered Code is expressly forbidden. ++You are responsible for ensuring that Your use of Compatible Source Licensed ++code does not violate either the RPSL or the Compatible Source License. ++ ++The latest version of this list can be found at: ++https://www.helixcommunity.org/content/complicense ++ ++ EXHIBIT C ++ ++RealNetworks' Trademark policy. ++ ++RealNetworks defines the following trademarks collectively as "Licensor ++Trademarks": "RealNetworks", "RealPlayer", "RealJukebox", "RealSystem", ++"RealAudio", "RealVideo", "RealOne Player", "RealMedia", "Helix" or any other ++trademarks or trade names belonging to RealNetworks. ++ ++RealNetworks "Licensor Trademark Policy" forbids any use of Licensor Trademarks ++except as permitted by and in strict compliance at all times with RealNetworks' ++third party trademark usage guidelines which are posted at ++http://www.realnetworks.com/info/helixlogo.html. ++ +Index: helix-libs/clientapps/clutter/Umakefil +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/Umakefil 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,325 @@ ++# ++# ***** BEGIN LICENSE BLOCK ***** ++# Version: RCSL 1.0/RPSL 1.0 ++# ++# Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++# ++# The contents of this file, and the files included with this file, are ++# subject to the current version of the RealNetworks Public Source License ++# Version 1.0 (the "RPSL") available at ++# http://www.helixcommunity.org/content/rpsl unless you have licensed ++# the file under the RealNetworks Community Source License Version 1.0 ++# (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++# in which case the RCSL will apply. You may also obtain the license terms ++# directly from RealNetworks. You may not use this file except in ++# compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++# applicable to this file, the RCSL. Please see the applicable RPSL or ++# RCSL for the rights, obligations and limitations governing use of the ++# contents of the file. ++# ++# This file is part of the Helix DNA Technology. RealNetworks is the ++# developer of the Original Code and owns the copyrights in the portions ++# it created. ++# ++# This file, and the files included with this file, is distributed and made ++# available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++# EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++# FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++# ++# Technology Compatibility Kit Test Suite(s) Location: ++# http://www.helixcommunity.org/content/tck ++# ++# Contributor(s): ++# ++# ***** END LICENSE BLOCK ***** ++# ++ ++UmakefileVersion(2,2) ++ ++project.AddModuleIncludes("common/include", ++ "common/runtime/pub", ++ "client/include", ++ "client/common/system/pub", ++ "client/common/container/pub", ++ "client/audiosvc/pub", ++ "common/container/pub", ++ "video/sitelib/pub", ++ "video/colconverter/pub", ++ "video/sitelib/pub/platform/unix", ++ "video/sitelib", ++ "datatype/rm/include", ++ "client/core") ++ ++project.AddSources("player.cpp", ++ "excontxt.cpp", ++ "exsite.cpp", ++ "exroot.cpp", ++ "exadvsnk.cpp", ++ "exerror.cpp", ++ "iids.cpp", ++ "exstateadvsnk.cpp", ++ "excallback.cpp", ++ "print.cpp") ++ ++project.AddModuleLibraries( ++ "common/runtime[runtlib]", ++ "common/system[syslib]", ++ "common/container[contlib]", ++ "common/runtime[runtlib]", ++ "client/common/system[sysclntlib]", ++ "common/dbgtool[debuglib]", ++ "common/util[utillib]", ++ "video/sitelib[sitelib]", ++ "video/sitelib[sitecreatelib]", ++ "common/log/logutil[logutillib]", ++ "video/vidutil[vidutillib]" ++ ) ++project.AddSystemLibraries('Xv', 'Xext') ++ ++if project.IsDefined("HELIX_FEATURE_PREFERENCES"): ++ project.AddSources("preflist.cpp") ++ ++if project.IsDefined("HELIX_FEATURE_AUTHENTICATION"): ++ project.AddSources("exaumgr.cpp") ++ ++if project.IsDefined("HELIX_FEATURE_VIDEO"): ++ project.AddSources("exsitsup.cpp", ++ "fivemmap.cpp") ++ project.AddModuleIncludes('video/include') ++ if project.IsDefined("HELIX_FEATURE_PNG"): ++ project.AddModuleIncludes('datatype/image/png/common/pub') ++ project.AddModuleLibraries("common/import/zlib[zlib]", ++ "datatype/image/png/import/libpng[libpng]", ++ "datatype/image/png/common[pngcomlib]") ++ ++if project.IsDefined("HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS"): ++ project.AddSources("exprdnld.cpp") ++ ++if project.BuildOption("nodll"): ++ ## Client core ++ static_plugin_list = ["clntcore"] ++ project.AddModuleLibraries("common/runtime[runtlib]", ++ "common/fileio[fileiolib]", ++ "client/common/system[sysclntlib]", ++ "client/common/container[contclntlib]", ++ "client/core[clntcorelib]") ++ if not project.IsDefined("HELIX_FEATURE_LOGLEVEL_NONE"): ++ project.AddModuleLibraries("common/log/logutil[logutillib]") ++ if not project.IsDefined("HELIX_CONFIG_MINIMIZE_SIZE"): ++ project.AddModuleLibraries("client/common/util[utlclntlib]") ++ ## Client core libraries ++ if project.IsDefined("HELIX_FEATURE_AUDIO"): ++ project.AddModuleLibraries("audio/device[auddevlib]", ++ "client/audiosvc[audsvclib]") ++ if ('HELIX_FEATURE_VOLUME' in project.defines): ++ project.AddModuleLibraries("audio/gaintool[audgainlib]" ) ++ if ('HELIX_FEATURE_VOLUME' in project.defines): ++ project.AddModuleLibraries("audio/crossfade[audxfadelib]") ++ if project.IsDefined("HELIX_FEATURE_MIXER"): ++ project.AddModuleLibraries("audio/mixer[audmixlib]") ++ if project.IsDefined("HELIX_FEATURE_RESAMPLER"): ++ project.AddModuleLibraries("audio/resampler[audresamplib]") ++ if project.IsDefined("HELIX_FEATURE_LIMITER"): ++ project.AddModuleLibraries("audio/limiter[audlimiter]") ++ ++ if project.IsDefined("HELIX_FEATURE_VIDEO"): ++ project.AddModuleLibraries("client/videosvc[vidsvclib]", ++ "protocol/sdp[sdplib]") ++ if project.IsDefined("HELIX_FEATURE_PLAYBACK_NET"): ++ project.AddModuleLibraries("client/netwksvc[netsvclib]", ++ "common/netio[netiolib]", ++ "client/common/netio[netioclntlib]", ++ "protocol/transport/common/system[systranlib]", ++ "protocol/transport/rtp[rtptranlib]", ++ "protocol/common/util[protutillib]", ++ "protocol/rtsp[rtsplib]") ++ if project.IsDefined("HELIX_FEATURE_RDT"): ++ project.AddLibraries(GetSDKPath("prtclrdt_lib")) ++ project.AddModuleLibraries("protocol/transport/rdt[rdttranlib]") ++ if project.IsDefined("HELIX_FEATURE_PNA"): ++ project.AddLibraries(GetSDKPath("prtclpna_lib")) ++ if project.IsDefined("HELIX_FEATURE_XMLPARSER"): ++ project.AddModuleLibraries("common/lang/xml[xmllib]") ++ ## Add RAM file format and renderer ++ if project.IsDefined("HELIX_FEATURE_META"): ++ static_plugin_list[-1:-1] = ["ramfformat", "ramrender"] ++ project.AddModuleLibraries("datatype/ram/renderer[ramrendrlib]") ++ ## Add local file system ++ if project.IsDefined("HELIX_FEATURE_PLAYBACK_LOCAL"): ++ static_plugin_list[-1:-1] = ["smplfsys"] ++ project.AddModuleLibraries("common/fileio[fileiolib]") ++ ## Add http file system ++ if project.IsDefined("HELIX_FEATURE_PLAYBACK_NET"): ++ static_plugin_list[-1:-1] = ["hxsdp", "httpfsys"] ++ project.AddModuleLibraries("protocol/http[httplib]", ++ "protocol/common/util[protutillib]", ++ "protocol/sdp[sdplib]", ++ "filesystem/data[datafsys]", ++ "common/fileio[fileiolib]", ++ "common/import/zlib[zlib]") ++ ## Add realmedia file format ++ if project.IsDefined("HELIX_FEATURE_PLAYBACK_LOCAL") and \ ++ (project.IsDefined("HELIX_FEATURE_AUDIO_REAL") or \ ++ project.IsDefined("HELIX_FEATURE_VIDEO_REAL")): ++ static_plugin_list[-1:-1] = ["rmfformat"] ++ project.AddModuleLibraries("datatype/common/util[dtutillib]", ++ "datatype/common/container[dtcomcontlib]") ++ project.AddLibraries(GetSDKPath("rmcom_lib"), ++ GetSDKPath("rmacom_lib"), ++ GetSDKPath("rmff_lib"), ++ GetSDKPath("rmvidpyld_lib")) ++ ++ ## Add realmedia renderer ++ if project.IsDefined("HELIX_FEATURE_AUDIO_REAL"): ++ static_plugin_list[-1:-1] = ["rarender"] ++ project.AddModuleLibraries("datatype/rm/audio/payload[rapayld]") ++ project.AddLibraries(GetSDKPath("rmarend_lib"), ++ GetSDKPath("rmacom_lib")) ++ ## Add mp3 file format and renderer ++ if project.IsDefined("HELIX_FEATURE_AUDIO_MPA_LAYER3") or \ ++ project.IsDefined("HELIX_FEATURE_AUDIO_MPA_LAYER2") or \ ++ project.IsDefined("HELIX_FEATURE_AUDIO_MPA_LAYER1"): ++ static_plugin_list[-1:-1] = ["mp3render"] ++ project.AddModuleLibraries("datatype/mp3/codec/fltpt[mp3codecfltpt]", ++ "datatype/mp3/common[mp3lib]", ++ "datatype/mp3/payload[mp3payld]", ++ "datatype/common/util[dtutillib]") ++ if project.IsDefined("HELIX_FEATURE_PLAYBACK_LOCAL"): ++ static_plugin_list[-1:-1] = ["mp3fformat"] ++ project.AddModuleLibraries("datatype/mp3/common[mp3lib]") ++ ## Add gecko realmedia codec ++ if project.IsDefined("HELIX_FEATURE_AUDIO_CODEC_GECKO"): ++ static_plugin_list[-1:-1] = ["cook"] ++ if not project.IsDefined("HELIX_CONFIG_FIXEDPOINT"): ++ project.AddLibraries(GetSDKPath("ra8lbrdec_flt_lib")) ++ else: ++ project.AddLibraries(GetSDKPath("ra8lbrdec_fix_lib")) ++ project.AddModuleLibraries("datatype/rm/audio/codec/common[racompat]") ++ ## Add RAAC codec ++ if project.IsDefined("HELIX_FEATURE_AUDIO_CODEC_RAAC"): ++ static_plugin_list[-1:-1] = ["raac"] ++ project.AddModuleLibraries("datatype/mp4/common[mp4comlib]", ++ "datatype/aac/codec/fixpt/decoder/hxwrap[aacdeclib]") ++ ## Add sipro realmedia codec ++ ## (Right now this only works for floating-point platforms) ++ if project.IsDefined("HELIX_FEATURE_AUDIO_CODEC_SIPRO"): ++ static_plugin_list[-1:-1] = ["sipr"] ++ project.AddLibraries(GetSDKPath("sipro_flt_backend_lib")) ++ ## Add tokyo realmedia codec ++ if project.IsDefined("HELIX_FEATURE_AUDIO_CODEC_TOKYO"): ++ static_plugin_list[-1:-1] = ["atrc"] ++ project.AddLibraries(GetSDKPath("ra8hbr_lib")) ++ ## ++ if project.IsDefined("HELIX_FEATURE_VIDEO"): ++ static_plugin_list[-1:-1] = ["vidsite"] ++ static_plugin_list[-1:-1] = ["hxltcolor"] ++ project.AddModuleLibraries("datatype/common/vidrend[vidrend]", ++ "video/sitelib[sitelib]", ++ "video/site[vidsite]", ++ "video/colconverter[hxltcolor]", ++ "datatype/rm/common[rmcomlib]", ++ "video/vidutil[vidutillib]") ++ ++ if (project.IsDefined('HELIX_FEATURE_ALTERNATE_SITE_CREATE_LIB')): ++ project.AddLibraries(GetSDKPath("sitecreate_lib")) ++ else: ++ project.AddModuleLibraries('video/sitelib[sitecreatelib]') ++ ++ ## Add realvideo renderer ++ if project.IsDefined("HELIX_FEATURE_VIDEO_REAL"): ++ project.AddModuleLibraries("datatype/rm/video/renderer[rvxrendlib]") ++ project.AddLibraries(GetSDKPath("rmvidcom_lib"), ++ GetSDKPath("rmvidpyld_lib"), ++ GetSDKPath("rvcodcom_lib")) ++ project.AddModuleLibraries("datatype/common/util[dtutillib]") ++ static_plugin_list[-1:-1] = ["rvrender"] ++ ++ ## Add mpeg4 file format ++ if project.IsDefined("HELIX_FEATURE_PLAYBACK_LOCAL")and \ ++ (project.IsDefined("HELIX_FEATURE_VIDEO_H263") or \ ++ project.IsDefined("HELIX_FEATURE_VIDEO_MPEG4") or \ ++ project.IsDefined("HELIX_FEATURE_AUDIO_MPEG4")): ++ static_plugin_list[-1:-1] = ["mp4fformat"] ++ project.AddModuleLibraries("datatype/common/util[dtutillib]", ++ "datatype/common/audrend", ++ "datatype/mp4/common[mp4comlib]", ++ "datatype/mp4/payload[mp4pyldlib]", ++ "datatype/mp4/fileformat[mp4fformatlib]") ++ if not project.IsDefined("HELIX_FEATURE_MP4_FILEFORMAT_M4A_ONLY"): ++ project.AddModuleLibraries("protocol/sdp[sdplib]", ++ "protocol/rtsp[rtsplib]", ++ "protocol/common/util[protutillib]", ++ "datatype/rm/common[rmcomlib]", ++ "datatype/amr/common[amrcomlib]") ++ ## Add h.263 renderer ++ if project.IsDefined("HELIX_FEATURE_VIDEO_H263"): ++ project.AddModuleLibraries("datatype/h263/payload[h263pyldlib]") ++ static_plugin_list[-1:-1] = ["h263render"] ++ ## Add MPEG4 renderer ++# if project.IsDefined("HELIX_FEATURE_VIDEO_MPEG4"): ++# static_plugin_list[-1:-1] = ["mp4xrender"] ++ ## Add mpeg 4 audio renderer ++ if project.IsDefined("HELIX_FEATURE_AUDIO_MPEG4"): ++ static_plugin_list[-1:-1] = ["mp4arender"] ++ project.AddModuleLibraries("datatype/mp4/audio/renderer[mp4arenderlib]") ++ if not project.IsDefined("HELIX_FEATURE_MP4_FILEFORMAT_M4A_ONLY"): ++ project.AddModuleLibraries("datatype/amr/common[amrcomlib]") ++ ## Add RV10 codec ++ if project.IsDefined("HELIX_FEATURE_VIDEO_CODEC_RV10"): ++ project.AddLibraries(GetSDKPath("rv1dec_libs")+"[rv10lib]", ++ GetSDKPath("rv1dec_libs")+"[drv1lib]") ++ static_plugin_list[-1:-1] = ["rv10", "drv1"] ++ ## Add RV20 codec ++ if project.IsDefined("HELIX_FEATURE_VIDEO_CODEC_RV20"): ++ project.AddLibraries(GetSDKPath("rvg2dec_libs")+"[rv20lib]", ++ GetSDKPath("rvg2dec_libs")+"[drv2lib]") ++ static_plugin_list[-1:-1] = ["rv20", "drv2"] ++ ++ if project.IsDefined("HELIX_FEATURE_VIDEO_CODEC_RV30") or \ ++ project.IsDefined("HELIX_FEATURE_VIDEO_CODEC_RV40"): ++ static_plugin_list[-1:-1] = ["drvc"] ++ if project.IsDefined("HELIX_FEATURE_ANSIC_RV89COMBO"): ++ project.AddLibraries(GetSDKPath("rv89combo_c_libs")+"[drvc]") ++ else: ++ project.AddLibraries(GetSDKPath("rv89combo_libs")+"[drvclib]") ++ ++ if project.IsDefined("HELIX_FEATURE_VIDEO_CODEC_RV30"): ++ static_plugin_list[-1:-1] = ["rv30"] ++ project.AddLibraries(GetSDKPath("rv89combo_libs")+"[rv3xlib]") ++ project.AddModuleLibraries("datatype/rm/video/codec/rv89combo[rv30]") ++ ++ if project.IsDefined("HELIX_FEATURE_VIDEO_CODEC_RV40"): ++ static_plugin_list[-1:-1] = ["rv40"] ++ project.AddLibraries(GetSDKPath("rv89combo_libs")+"[rv4xlib]") ++ project.AddModuleLibraries("datatype/rm/video/codec/rv89combo[rv40]") ++ ++# if project.IsDefined("HELIX_FEATURE_AUDIO_CODEC_AAC"): ++# static_plugin_list[-1:-1] = ["aac4"] ++ ++ CreateStaticPluginTable(static_plugin_list) ++ ++project.ExportFunction("init_main", "void") ++project.ExportFunction("deinit_main", "void") ++project.ExportFunction("get_player", "void **ppPlayer", ++ "on_buffering_cb_t on_buffering_cb", ++ "on_pos_length_cb_t on_pos_length_cb") ++project.ExportFunction("player_openurl", "void *pPlayerHandle", ++ "char *pszRawURL") ++project.ExportFunction("put_player", "void *pPlayerHandle") ++project.ExportFunction("player_geturl", "void *pPlayerHandle", "char **pszURL") ++project.ExportFunction("player_begin", "void *pPlayerHandle") ++project.ExportFunction("player_stop", "void *pPlayerHandle") ++project.ExportFunction("player_pause", "void *pPlayerHandle") ++project.ExportFunction("player_seek", "void *pPlayerHandle", "int pos") ++project.ExportFunction("get_curr_playtime", "void *pPlayerHandle") ++project.ExportFunction("player_getvolume", "void *pPlayerHandle") ++project.ExportFunction("player_canseek", "void *pPlayerHandle") ++project.ExportFunction("player_setvolume", "void *pPlayerHandle", "unsigned short volumn") ++ ++ ++ ++DLLTarget('libhelix-player') ++ ++DependTarget() ++ +Index: helix-libs/clientapps/clutter/exabd.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exabd.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,245 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include ++ ++#include "hxtypes.h" ++ ++#include "hxcom.h" ++#include "hxcomm.h" ++#include "hxmon.h" ++#include "hxcore.h" ++#include "hxengin.h" ++#include "chxpckts.h" ++#include "hxclsnk.h" ++#include "hxstrutl.h" ++#include "exabd.h" ++ ++#include "print.h" ++ ++#include "globals.h" ++ ++struct _stGlobals*& GetGlobal(); //in main.cpp ++ ++ExampleABD::ExampleABD(IUnknown* pUnknown) ++ : m_lRefCount (0) ++ , m_pUnknown (NULL) ++ , m_ulABDStartTime(0) ++ , m_ulABDResult(0) ++ , m_bABDDone(FALSE) ++{ ++ if (pUnknown) ++ { ++ m_pUnknown = pUnknown; ++ m_pUnknown->AddRef(); ++ } ++} ++ ++ExampleABD::~ExampleABD(void) ++{ ++ HX_RELEASE(m_pUnknown); ++} ++ ++ ++// *** IUnknown methods *** ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::QueryInterface ++// Purpose: ++// Implement this to export the interfaces supported by your ++// object. ++// ++STDMETHODIMP ExampleABD::QueryInterface(REFIID riid, void** ppvObj) ++{ ++ if (IsEqualIID(riid, IID_IUnknown)) ++ { ++ AddRef(); ++ *ppvObj = (IUnknown*)(IHXAutoBWCalibrationAdviseSink*)this; ++ return HXR_OK; ++ } ++ else if (IsEqualIID(riid, IID_IHXAutoBWCalibrationAdviseSink)) ++ { ++ AddRef(); ++ *ppvObj = (IHXAutoBWCalibrationAdviseSink*)this; ++ return HXR_OK; ++ } ++ ++ *ppvObj = NULL; ++ return HXR_NOINTERFACE; ++} ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::AddRef ++// Purpose: ++// Everyone usually implements this the same... feel free to use ++// this implementation. ++// ++STDMETHODIMP_(ULONG32) ExampleABD::AddRef() ++{ ++ return InterlockedIncrement(&m_lRefCount); ++} ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::Release ++// Purpose: ++// Everyone usually implements this the same... feel free to use ++// this implementation. ++// ++STDMETHODIMP_(ULONG32) ExampleABD::Release() ++{ ++ if (InterlockedDecrement(&m_lRefCount) > 0) ++ { ++ return m_lRefCount; ++ } ++ ++ delete this; ++ return 0; ++} ++ ++/* ++ * IHXAutoBWCalibrationAdviseSink methods ++ */ ++STDMETHODIMP ++ExampleABD::AutoBWCalibrationStarted (const char* pszServer) ++{ ++ if (pszServer) ++ { ++ STDOUT("ABD: contacting %s\n", pszServer); ++ } ++ ++ return HXR_OK; ++} ++ ++STDMETHODIMP ++ExampleABD::AutoBWCalibrationDone(HX_RESULT status, ++ UINT32 ulBW) ++{ ++ m_bABDDone = TRUE; ++ ++ if (HXR_OK == status) ++ { ++ m_ulABDResult = ulBW; ++ STDOUT("ABD: %lu(Kbps) %lu(ms)\n", ulBW, GetTickCount() - m_ulABDStartTime); ++ } ++ else ++ { ++ STDOUT("ABD failed: %lu\n", status); ++ } ++ ++ return HXR_OK; ++} ++ ++HX_RESULT ++ExampleABD::DoABD(const char* pszServer, ++ UINT32 mode, ++ UINT32 packetSize, ++ UINT32 packetNum) ++{ ++ HX_RESULT rc = HXR_OK; ++ UINT32 length = 0; ++ IHXAutoBWCalibration* pABD = NULL; ++ IHXValues* pValues = NULL; ++ IHXBuffer* pBuffer = NULL; ++ ++ m_ulABDStartTime = GetTickCount(); ++ m_ulABDResult = 0; ++ m_bABDDone = FALSE; ++ ++ if (m_pUnknown && ++ HXR_OK == m_pUnknown->QueryInterface(IID_IHXAutoBWCalibration, (void**)&pABD)) ++ { ++ pValues = (IHXValues*) new CHXHeader(); ++ pValues->AddRef(); ++ ++ pBuffer = (IHXBuffer*) new CHXBuffer(); ++ pBuffer->AddRef(); ++ ++ pBuffer->Set((UCHAR*)pszServer, strlen(pszServer)+1); ++ pValues->SetPropertyCString("ABDServers", pBuffer); ++ ++ pValues->SetPropertyULONG32("AutoBWDetectionMode", mode); ++ pValues->SetPropertyULONG32("AutoBWDetectionPacketSize", packetSize); ++ pValues->SetPropertyULONG32("AutoBWDetectionPackets", packetNum); ++ ++ pABD->AddAutoBWCalibrationSink((IHXAutoBWCalibrationAdviseSink*)this); ++ pABD->InitAutoBWCalibration(pValues); ++ ++ pABD->StartAutoBWCalibration(); ++ ++ while (!m_bABDDone) ++ { ++ MSG msg; ++ DWORD starttime, endtime, i; ++ BOOL sleep = TRUE; ++ static const int checkinterval = 10; ++ ++ starttime = GetTickCount(); ++ endtime = starttime + (20); ++ i = 0; ++ while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) ++ { ++ DispatchMessage(&msg); ++ if ((i % checkinterval) == 0) ++ { ++ if (GetTickCount() > endtime) ++ break; ++ ++i; ++ } ++ sleep = FALSE; ++ } ++ ++ if (sleep) ++ Sleep(10); ++ } ++ } ++ ++cleanup: ++ ++ if (pABD) ++ { ++ pABD->RemoveAutoBWCalibrationSink((IHXAutoBWCalibrationAdviseSink*)this); ++ } ++ ++ HX_RELEASE(pBuffer); ++ HX_RELEASE(pValues); ++ HX_RELEASE(pABD); ++ ++ return rc; ++} ++ ++ +Index: helix-libs/clientapps/clutter/exabd.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exabd.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,85 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef _EXAMPLEABD_ ++#define _EXAMPLEABD_ ++ ++struct IHXAutoBWCalibrationAdviseSink; ++struct IUnknown; ++ ++class ExampleABD : public IHXAutoBWCalibrationAdviseSink ++{ ++ private: ++ LONG32 m_lRefCount; ++ IUnknown* m_pUnknown; ++ UINT32 m_ulABDStartTime; ++ UINT32 m_ulABDResult; ++ BOOL m_bABDDone; ++ ++ ~ExampleABD(); ++ ++ public: ++ ++ ExampleABD(IUnknown* /*IN*/ pUnknown); ++ ++ /* ++ * IUnknown methods ++ */ ++ STDMETHOD(QueryInterface) (THIS_ ++ REFIID riid, ++ void** ppvObj); ++ ++ STDMETHOD_(ULONG32,AddRef) (THIS); ++ ++ STDMETHOD_(ULONG32,Release) (THIS); ++ ++ /* ++ * IHXAutoBWCalibrationAdviseSink methods ++ */ ++ STDMETHOD(AutoBWCalibrationStarted) (THIS_ ++ const char* pszServer); ++ STDMETHOD(AutoBWCalibrationDone) (THIS_ ++ HX_RESULT status, ++ UINT32 ulBW); ++ ++ HX_RESULT DoABD(const char* pszServer, ++ UINT32 mode, ++ UINT32 packetSize, ++ UINT32 packetNum); ++ ++ UINT32 GetABD(void) { return m_ulABDResult; }; ++}; ++ ++#endif /* _EXAMPLEABDSNK_ */ +Index: helix-libs/clientapps/clutter/exadvsnk.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exadvsnk.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,1116 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include ++ ++#include "hxtypes.h" ++ ++#include "hxcom.h" ++#include "hxcomm.h" ++#include "hxmon.h" ++#include "hxcore.h" ++#include "hxengin.h" ++#include "hxclsnk.h" ++#include "hxgroup.h" ++#include "hxstrutl.h" ++#include "exadvsnk.h" ++#include "hxstring.h" ++#include "hxprefs.h" ++#include "excontxt.h" ++ ++#include "print.h" ++ ++#include "globals.h" ++#include "player.h" ++ ++struct _stGlobals*& GetGlobal(); //in main.cpp ++ ++#ifdef __TCS__ ++extern unsigned long gStreamTime; ++ ++static int iOpened = 0; ++ ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif /* defined(__cplusplus) */ ++ ++typedef enum hookBuffering { ++ eContacting = 0, ++ eConnecting = 1, ++ eBuffering = 2, ++ ePlaying = 3 ++}hookBuffering; ++ ++void hookRealAudio_Buffering(hookBuffering connectState, int pct); ++ ++void hookRealAudio_PlayPosition(unsigned long current,unsigned long duration); ++ ++typedef enum hookState { ++ ePlay = 0, ++ ePause = 1, ++ eStop = 2, ++ eResume = 3, ++ eComplete // Clip is done playing ++}hookState; ++void hookRealAudio_State(hookState newState); ++ ++ ++#if defined(__cplusplus) ++} ++#endif /* defined(__cplusplus) */ ++ ++#endif // __TCS__ ++ ++void PrintBuffer(const char* pszName,const unsigned char* pbBuf, unsigned int dwBytes); ++ ++ExampleClientAdviceSink::ExampleClientAdviceSink(IUnknown* pUnknown, LONG32 lClientIndex, on_buffering_cb_t on_buffering_cb, on_pos_length_cb_t on_pos_length_cb, void *context) ++ : m_lRefCount (0) ++ , m_lClientIndex (lClientIndex) ++ , m_pUnknown (NULL) ++ , m_pRegistry (NULL) ++ , m_pScheduler (NULL) ++ , m_lCurrentBandwidth(0) ++ , m_lAverageBandwidth(0) ++ , m_bOnStop(0) ++ , m_pPlayer(0) ++ , m_bWaitForTrackStart(0) ++ , m_on_buffering_cb(on_buffering_cb) ++ , m_on_pos_length_cb(on_pos_length_cb) ++ , m_context(context) ++{ ++ if (pUnknown) ++ { ++ m_pUnknown = pUnknown; ++ m_pUnknown->AddRef(); ++ ++ if (HXR_OK != m_pUnknown->QueryInterface(IID_IHXRegistry, (void**)&m_pRegistry)) ++ { ++ m_pRegistry = NULL; ++ } ++ ++ if (HXR_OK != m_pUnknown->QueryInterface(IID_IHXScheduler, (void**)&m_pScheduler)) ++ { ++ m_pScheduler = NULL; ++ } ++ ++ IHXPlayer* pPlayer; ++ if(HXR_OK == m_pUnknown->QueryInterface(IID_IHXPlayer, ++ (void**)&pPlayer)) ++ { ++ m_pPlayer = pPlayer; ++ ++ IHXGroupManager* pGroupMgr = NULL; ++ if(HXR_OK == m_pPlayer->QueryInterface(IID_IHXGroupManager, ++ (void**)&pGroupMgr)) ++ { ++ pGroupMgr->AddSink((IHXGroupSink*)this); ++ pGroupMgr->Release(); ++ } ++ ++ pPlayer->AddAdviseSink(this); ++ ++ } ++ } ++ ++#ifdef __TCS__ ++ bEnableAdviceSink = TRUE; ++ iOpened = 0; ++#endif ++} ++ ++ExampleClientAdviceSink::~ExampleClientAdviceSink(void) ++{ ++ if (m_pScheduler) ++ { ++ m_pScheduler->Release(); ++ m_pScheduler = NULL; ++ } ++ ++ if (m_pRegistry) ++ { ++ m_pRegistry->Release(); ++ m_pRegistry = NULL; ++ } ++ ++ if (m_pPlayer) ++ { ++ m_pPlayer->Release(); ++ m_pPlayer = NULL; ++ } ++ if (m_pUnknown) ++ { ++ m_pUnknown->Release(); ++ m_pUnknown = NULL; ++ } ++} ++ ++ ++// *** IUnknown methods *** ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::QueryInterface ++// Purpose: ++// Implement this to export the interfaces supported by your ++// object. ++// ++STDMETHODIMP ExampleClientAdviceSink::QueryInterface(REFIID riid, void** ppvObj) ++{ ++ if (IsEqualIID(riid, IID_IUnknown)) ++ { ++ AddRef(); ++ *ppvObj = (IUnknown*)(IHXClientAdviseSink*)this; ++ return HXR_OK; ++ } ++ else if (IsEqualIID(riid, IID_IHXClientAdviseSink)) ++ { ++ AddRef(); ++ *ppvObj = (IHXClientAdviseSink*)this; ++ return HXR_OK; ++ } ++ else if (IsEqualIID(riid, IID_IHXGroupSink)) ++ { ++ AddRef(); ++ *ppvObj = (IHXGroupSink*)this; ++ return HXR_OK; ++ } ++ ++ *ppvObj = NULL; ++ return HXR_NOINTERFACE; ++} ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::AddRef ++// Purpose: ++// Everyone usually implements this the same... feel free to use ++// this implementation. ++// ++STDMETHODIMP_(ULONG32) ExampleClientAdviceSink::AddRef() ++{ ++ return InterlockedIncrement(&m_lRefCount); ++} ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::Release ++// Purpose: ++// Everyone usually implements this the same... feel free to use ++// this implementation. ++// ++STDMETHODIMP_(ULONG32) ExampleClientAdviceSink::Release() ++{ ++ if (InterlockedDecrement(&m_lRefCount) > 0) ++ { ++ return m_lRefCount; ++ } ++ ++ delete this; ++ return 0; ++} ++ ++/* ++ * IHXClientAdviseSink methods ++ */ ++ ++/************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnPosLength ++ * Purpose: ++ * Called to advise the client that the position or length of the ++ * current playback context has changed. ++ */ ++ ++#ifdef __TCS__ ++static long lastPosition = -1; ++#endif ++ ++STDMETHODIMP ++ExampleClientAdviceSink::OnPosLength(UINT32 ulPosition, ++ UINT32 ulLength) ++{ ++ // Are we doing a multi-seek? ++ if (GetGlobal()->g_bMultiSeek) ++ { ++ // Have we run out of seek times? ++ if (GetGlobal()->g_ulMultiSeekIndex < GetGlobal()->g_ulNumMultiSeeks) ++ { ++ STDOUT("Multi-seeking the first player to %lu\n", ++ GetGlobal()->g_ulMultiSeekTime[GetGlobal()->g_ulMultiSeekIndex]); ++ GetGlobal()->g_Players[0]->Seek(GetGlobal()->g_ulMultiSeekTime[GetGlobal()->g_ulMultiSeekIndex++]); ++ } ++ else ++ { ++ // We've run out - stop the multi-seek ++ GetGlobal()->g_bMultiSeek = FALSE; ++ GetGlobal()->g_ulNumMultiSeeks = 0; ++ GetGlobal()->g_ulMultiSeekIndex = 0; ++ } ++ } ++ ++ if (m_on_pos_length_cb) ++ m_on_pos_length_cb(ulPosition, ulLength, m_context); ++ ++ return HXR_OK; ++} ++ ++/************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnPresentationOpened ++ * Purpose: ++ * Called to advise the client a presentation has been opened. ++ */ ++STDMETHODIMP ExampleClientAdviceSink::OnPresentationOpened() ++{ ++#ifdef __TCS__ ++ iOpened = 1; ++ lastPosition = -1; ++#else ++ if (GetGlobal()->bEnableAdviceSink) ++ { ++ STDOUT("OnPresentationOpened()\n"); ++ } ++#if defined(HELIX_FEATURE_PLAYBACK_VELOCITY) ++ // Try to get the IHXPlaybackVelocity interface ++ // from the first player ++ if (GetGlobal()->g_nPlayers > 0 && GetGlobal()->g_Players[0]) ++ { ++ IHXPlaybackVelocity* pVel = NULL; ++ HX_RESULT rv = GetGlobal()->g_Players[0]->QueryInterface(IID_IHXPlaybackVelocity, (void**) &pVel); ++ if (SUCCEEDED(rv)) ++ { ++ // Get the capabilities object from the player ++ rv = pVel->QueryVelocityCaps(GetGlobal()->g_pVelocityCaps); ++ if (SUCCEEDED(rv) && GetGlobal()->bEnableAdviceSink) ++ { ++ STDOUT("Available Velocity Ranges:"); ++ UINT32 ulNumRanges = GetGlobal()->g_pVelocityCaps->GetNumRanges(); ++ for (UINT32 i = 0; i < ulNumRanges && SUCCEEDED(rv); i++) ++ { ++ INT32 lMin = 0; ++ INT32 lMax = 0; ++ rv = GetGlobal()->g_pVelocityCaps->GetRange(i, lMin, lMax); ++ if (SUCCEEDED(rv)) ++ { ++ STDOUT(" [%ld,%ld]", lMin, lMax); ++ } ++ } ++ STDOUT("\n"); ++ } ++ } ++ HX_RELEASE(pVel); ++ } ++#endif /* #if defined(HELIX_FEATURE_PLAYBACK_VELOCITY) */ ++#endif ++ ++ UINT32 sourceCount = m_pPlayer->GetSourceCount(); ++ for (UINT32 sourceID = 0; sourceID < sourceCount; sourceID ++) ++ { ++ // get HXSource ++ IUnknown* pUnkSource = NULL; ++ IHXStreamSource* pStreamSrc = NULL; ++ ++ if (HXR_OK != m_pPlayer->GetSource (sourceID, pUnkSource)) ++ { ++ continue; ++ } ++ ++ pUnkSource->QueryInterface(IID_IHXStreamSource, (void **)&pStreamSrc); ++ ++ HX_RELEASE(pUnkSource); ++ ++ if (!pStreamSrc) ++ { ++ continue; ++ } ++ ++ UINT32 num_streams = pStreamSrc->GetStreamCount(); ++ ++ // get information from Streams ++ for (UINT32 streamID = 0; streamID < num_streams ; streamID++) ++ { ++ IUnknown* pUnkStream = NULL; ++ ++ if (HXR_OK == pStreamSrc->GetStream(streamID, pUnkStream)) ++ { ++ IHXStream* pStream = NULL; ++ ++ if (HXR_OK == pUnkStream->QueryInterface(IID_IHXStream, ++ (void**)&pStream)) ++ { ++ const char* pMimeType = pStream->GetStreamType(); ++ if( 0 == strcmp(pMimeType, "application/ram")) ++ { ++ m_bWaitForTrackStart = TRUE; ++ } ++ else ++ { ++ m_bWaitForTrackStart = FALSE; ++ } ++ } ++ HX_RELEASE(pStream); ++ } ++ HX_RELEASE(pUnkStream); ++ if (!m_bWaitForTrackStart) ++ { ++ break; ++ } ++ } ++ ++ if (!m_bWaitForTrackStart) ++ { ++ break; ++ } ++ HX_RELEASE(pStreamSrc); ++ } ++ ++ if (!m_bWaitForTrackStart) ++ { ++ STDOUT("----------------clip info--------------------\n"); ++ if(m_pScheduler) { ++ m_hCallback = m_pScheduler->RelativeEnter(this,50); ++ } ++ } ++ return HXR_OK; ++} ++ ++ ++/************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnPresentationClosed ++ * Purpose: ++ * Called to advise the client a presentation has been closed. ++ */ ++STDMETHODIMP ExampleClientAdviceSink::OnPresentationClosed() ++{ ++#ifdef __TCS__ ++ iOpened = 0; ++ lastPosition = -1; ++#else ++ if (GetGlobal()->bEnableAdviceSink) ++ { ++ STDOUT("OnPresentationClosed()\n"); ++ } ++#endif ++ ++ return HXR_OK; ++} ++ ++void ExampleClientAdviceSink::GetStatistics (char* pszRegistryKey) ++{ ++ char szRegistryValue[MAX_DISPLAY_NAME] = {0}; /* Flawfinder: ignore */ ++ INT32 lValue = 0; ++ INT32 i = 0; ++ INT32 lStatistics = 8; ++ UINT32 *plValue; ++ ++#ifdef __TCS__ ++ return; // DISABLED FOR NOW ++#endif ++ ++ // collect statistic ++ for (i = 0; i < lStatistics; i++) ++ { ++ plValue = NULL; ++ switch (i) ++ { ++ case 0: ++ SafeSprintf(szRegistryValue, MAX_DISPLAY_NAME, "%s.Normal", pszRegistryKey); ++ break; ++ case 1: ++ SafeSprintf(szRegistryValue, MAX_DISPLAY_NAME, "%s.Recovered", pszRegistryKey); ++ break; ++ case 2: ++ SafeSprintf(szRegistryValue, MAX_DISPLAY_NAME, "%s.Received", pszRegistryKey); ++ break; ++ case 3: ++ SafeSprintf(szRegistryValue, MAX_DISPLAY_NAME, "%s.Lost", pszRegistryKey); ++ break; ++ case 4: ++ SafeSprintf(szRegistryValue, MAX_DISPLAY_NAME, "%s.Late", pszRegistryKey); ++ break; ++ case 5: ++ SafeSprintf(szRegistryValue, MAX_DISPLAY_NAME, "%s.ClipBandwidth", pszRegistryKey); ++ break; ++ case 6: ++ SafeSprintf(szRegistryValue, MAX_DISPLAY_NAME, "%s.AverageBandwidth", pszRegistryKey); ++ plValue = &m_lAverageBandwidth; ++ break; ++ case 7: ++ SafeSprintf(szRegistryValue, MAX_DISPLAY_NAME, "%s.CurrentBandwidth", pszRegistryKey); ++ plValue = &m_lCurrentBandwidth; ++ break; ++ default: ++ break; ++ } ++ ++ m_pRegistry->GetIntByName(szRegistryValue, lValue); ++ if (plValue) ++ { ++ if (m_bOnStop || lValue == 0) ++ { ++ lValue = *plValue; ++ } ++ else ++ { ++ *plValue = lValue; ++ } ++ } ++ if (GetGlobal()->bEnableAdviceSink || (GetGlobal()->bEnableVerboseMode && m_bOnStop)) ++ { ++ STDOUT("%s = %ld\n", szRegistryValue, lValue); ++ } ++ } ++} ++ ++void ExampleClientAdviceSink::GetAllStatistics(void) ++{ ++ UINT32 unPlayerIndex = 0; ++ UINT32 unSourceIndex = 0; ++ UINT32 unStreamIndex = 0; ++ ++ char* pszRegistryPrefix = "Statistics"; ++ char szRegistryName[MAX_DISPLAY_NAME] = {0}; /* Flawfinder: ignore */ ++ ++#ifdef __TCS__ ++ return; // DISABLED FOR NOW ++#endif ++ ++ // display the content of whole statistic registry ++ if (m_pRegistry) ++ { ++ // ok, let's start from the top (player) ++ SafeSprintf(szRegistryName, MAX_DISPLAY_NAME, "%s.Player%ld", pszRegistryPrefix, m_lClientIndex); ++ if (PT_COMPOSITE == m_pRegistry->GetTypeByName(szRegistryName)) ++ { ++ // display player statistic ++ GetStatistics(szRegistryName); ++ ++ SafeSprintf(szRegistryName, MAX_DISPLAY_NAME, "%s.Source%ld", szRegistryName, unSourceIndex); ++ while (PT_COMPOSITE == m_pRegistry->GetTypeByName(szRegistryName)) ++ { ++ // display source statistic ++ GetStatistics(szRegistryName); ++ ++ SafeSprintf(szRegistryName, MAX_DISPLAY_NAME, "%s.Stream%ld", szRegistryName, unStreamIndex); ++ while (PT_COMPOSITE == m_pRegistry->GetTypeByName(szRegistryName)) ++ { ++ // display stream statistic ++ GetStatistics(szRegistryName); ++ ++ unStreamIndex++; ++ ++ SafeSprintf(szRegistryName, MAX_DISPLAY_NAME, "%s.Player%ld.Source%ld.Stream%ld", ++ pszRegistryPrefix, unPlayerIndex, unSourceIndex, unStreamIndex); ++ } ++ ++ unSourceIndex++; ++ ++ SafeSprintf(szRegistryName, MAX_DISPLAY_NAME, "%s.Player%ld.Source%ld", ++ pszRegistryPrefix, unPlayerIndex, unSourceIndex); ++ } ++ ++ unPlayerIndex++; ++ ++ SafeSprintf(szRegistryName, MAX_DISPLAY_NAME, "%s.Player%ld", pszRegistryPrefix, unPlayerIndex); ++ } ++ } ++} ++ ++/************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnStatisticsChanged ++ * Purpose: ++ * Called to advise the client that the presentation statistics ++ * have changed. ++ */ ++STDMETHODIMP ExampleClientAdviceSink::OnStatisticsChanged(void) ++{ ++ char szBuff[1024]; /* Flawfinder: ignore */ ++ HX_RESULT res = HXR_OK; ++ UINT16 uPlayer = 0; ++ ++#ifdef __TCS__ ++ return HXR_OK; // DISABLED FOR NOW ++#endif ++ ++ if(GetGlobal()->bEnableAdviceSink) ++ { ++ STDOUT("OnStatisticsChanged():\n"); ++ ++ SafeSprintf(szBuff, 1024, "Statistics"); ++ res = DumpRegTree( szBuff ); ++ } ++ ++ return HXR_OK; ++} ++ ++HX_RESULT ExampleClientAdviceSink::DumpRegTree(const char* pszTreeName ) ++{ ++ const char* pszName = NULL; ++ ULONG32 ulRegID = 0; ++ HX_RESULT res = HXR_OK; ++ INT32 nVal = 0; ++ IHXBuffer* pBuff = NULL; ++ IHXValues* pValues = NULL; ++ ++ //See if the name exists in the reg tree. ++ res = m_pRegistry->GetPropListByName( pszTreeName, pValues); ++ if( HXR_OK!=res || !pValues ) ++ return HXR_FAIL; ++ ++ //make sure this is a PT_COMPOSITE type reg entry. ++ if( PT_COMPOSITE != m_pRegistry->GetTypeByName(pszTreeName)) ++ return HXR_FAIL; ++ ++ //Print out the value of each member of this tree. ++ res = pValues->GetFirstPropertyULONG32( pszName, ulRegID ); ++ while( HXR_OK == res ) ++ { ++ //We have at least one entry. See what type it is. ++ HXPropType pt = m_pRegistry->GetTypeById(ulRegID); ++ switch(pt) ++ { ++ case PT_COMPOSITE: ++ DumpRegTree(pszName); ++ break; ++ case PT_INTEGER : ++ nVal = 0; ++ m_pRegistry->GetIntById( ulRegID, nVal ); ++ STDOUT("%s : %d\n", pszName, nVal ); ++ break; ++ case PT_INTREF : ++ nVal = 0; ++ m_pRegistry->GetIntById( ulRegID, nVal ); ++ STDOUT("%s : %d\n", pszName, nVal ); ++ break; ++ case PT_STRING : ++ pBuff = NULL; ++ m_pRegistry->GetStrById( ulRegID, pBuff ); ++ STDOUT("%s : \"", pszName ); ++ if( pBuff ) ++ STDOUT("%s", (const char *)(pBuff->GetBuffer()) ); ++ STDOUT("\"\n" ); ++ HX_RELEASE(pBuff); ++ break; ++ case PT_BUFFER : ++ STDOUT("%s : BUFFER TYPE NOT SHOWN\n", ++ pszName, nVal ); ++ break; ++ case PT_UNKNOWN: ++ STDOUT("%s Unkown registry type entry\n", pszName ); ++ break; ++ default: ++ STDOUT("%s Unkown registry type entry\n", pszName ); ++ break; ++ } ++ res = pValues->GetNextPropertyULONG32( pszName, ulRegID); ++ } ++ ++ HX_RELEASE( pValues ); ++ ++ return HXR_OK; ++} ++ ++ ++/************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnPreSeek ++ * Purpose: ++ * Called by client engine to inform the client that a seek is ++ * about to occur. The render is informed the last time for the ++ * stream's time line before the seek, as well as the first new ++ * time for the stream's time line after the seek will be completed. ++ * ++ */ ++STDMETHODIMP ExampleClientAdviceSink::OnPreSeek( ULONG32 ulOldTime, ++ ULONG32 ulNewTime) ++{ ++#if !defined(__TCS__) ++ if (GetGlobal()->bEnableAdviceSink) ++ { ++ STDOUT("OnPreSeek(%ld, %ld)\n", ulOldTime, ulNewTime); ++ } ++#endif ++ ++ return HXR_OK; ++} ++ ++ ++/************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnPostSeek ++ * Purpose: ++ * Called by client engine to inform the client that a seek has ++ * just occured. The render is informed the last time for the ++ * stream's time line before the seek, as well as the first new ++ * time for the stream's time line after the seek. ++ * ++ */ ++STDMETHODIMP ExampleClientAdviceSink::OnPostSeek( ULONG32 ulOldTime, ++ ULONG32 ulNewTime) ++{ ++#ifdef __TCS__ ++ lastPosition = -1; ++#else ++ if (GetGlobal()->bEnableAdviceSink) ++ { ++ STDOUT("OnPostSeek(%ld, %ld)\n", ulOldTime, ulNewTime); ++ } ++#endif ++ ++ return HXR_OK; ++} ++ ++ ++/************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnStop ++ * Purpose: ++ * Called by client engine to inform the client that a stop has ++ * just occured. ++ * ++ */ ++STDMETHODIMP ExampleClientAdviceSink::OnStop(void) ++{ ++ HXTimeval now; ++ ++#ifdef __TCS__ ++ hookRealAudio_State(eStop); ++#else ++ if (GetGlobal()->bEnableAdviceSink) ++ { ++ STDOUT("OnStop()\n"); ++ } ++ ++ if (GetGlobal()->bEnableVerboseMode) ++ { ++ STDOUT("Player %ld stopped.\n", m_lClientIndex); ++ m_bOnStop = TRUE; ++ GetAllStatistics(); ++ } ++#endif ++ ++ // Find out the current time and subtract the beginning time to ++ // figure out how many seconds we played ++ now = m_pScheduler->GetCurrentSchedulerTime(); ++ m_ulStopTime = now.tv_sec; ++ ++ GetGlobal()->g_ulNumSecondsPlayed = m_ulStopTime - m_ulStartTime; ++ ++ return HXR_OK; ++} ++ ++/************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnPause ++ * Purpose: ++ * Called by client engine to inform the client that a pause has ++ * just occured. The render is informed the last time for the ++ * stream's time line before the pause. ++ * ++ */ ++STDMETHODIMP ExampleClientAdviceSink::OnPause(ULONG32 ulTime) ++{ ++#ifdef __TCS__ ++ hookRealAudio_State(ePause); ++#else ++ if (GetGlobal()->bEnableAdviceSink) ++ { ++ STDOUT("OnPause(%ld)\n", ulTime); ++ } ++#endif ++ ++ return HXR_OK; ++} ++ ++ ++/************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnBegin ++ * Purpose: ++ * Called by client engine to inform the client that a begin or ++ * resume has just occured. The render is informed the first time ++ * for the stream's time line after the resume. ++ * ++ */ ++STDMETHODIMP ExampleClientAdviceSink::OnBegin(ULONG32 ulTime) ++{ ++ HXTimeval now; ++ ++#if !defined(__TCS__) ++ if (GetGlobal()->bEnableAdviceSink) ++ { ++ STDOUT("OnBegin(%ld)\n", ulTime); ++ } ++ ++ if (GetGlobal()->bEnableVerboseMode) ++ { ++ STDOUT("Player %ld beginning playback...\n", m_lClientIndex); ++ } ++#endif ++ ++ GetGlobal()->g_bOnBeginOccurred = TRUE; ++ ++ // Record the current time, so we can figure out many seconds we played ++ now = m_pScheduler->GetCurrentSchedulerTime(); ++ m_ulStartTime = now.tv_sec; ++ ++ return HXR_OK; ++} ++ ++ ++/************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnBuffering ++ * Purpose: ++ * Called by client engine to inform the client that buffering ++ * of data is occuring. The render is informed of the reason for ++ * the buffering (start-up of stream, seek has occured, network ++ * congestion, etc.), as well as percentage complete of the ++ * buffering process. ++ * ++ */ ++STDMETHODIMP ExampleClientAdviceSink::OnBuffering(ULONG32 ulFlags, ++ UINT16 unPercentComplete) ++{ ++#ifdef __TCS__ ++static UINT16 lastPct = 0; ++ if (unPercentComplete > 0) ++ { ++ UINT16 nextPct = lastPct + 10; ++ if (unPercentComplete < lastPct) ++ { ++ lastPct = 0; ++ nextPct = lastPct + 10; ++ } ++ if (unPercentComplete >= nextPct) ++ { ++ lastPct = (unPercentComplete / 10) * 10; ++ nextPct = lastPct + 10; ++ hookRealAudio_Buffering(eBuffering,lastPct); ++ } ++ } ++#else ++ if (GetGlobal()->bEnableAdviceSink) ++ { ++ STDOUT("OnBuffering(%ld, %d)\n", ulFlags, unPercentComplete); ++ } ++#endif ++ if (m_on_buffering_cb) ++ m_on_buffering_cb(ulFlags, unPercentComplete, m_context); ++ ++ return HXR_OK; ++} ++ ++ ++/************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnContacting ++ * Purpose: ++ * Called by client engine to inform the client is contacting ++ * hosts(s). ++ * ++ */ ++STDMETHODIMP ExampleClientAdviceSink::OnContacting(const char* pHostName) ++{ ++#ifdef __TCS__ ++ printf("Contacting\n"); ++ hookRealAudio_Buffering(eContacting,0); ++#else ++ if (GetGlobal()->bEnableAdviceSink) ++ { ++ STDOUT("OnContacting(\"%s\")\n", pHostName); ++ } ++#endif ++ ++ return HXR_OK; ++} ++ ++void ExampleClientAdviceSink::PrintPropName( IHXValues* pHeader ) ++{ ++ if ( pHeader == NULL ) ++ { ++ return ; ++ } ++ ++ const char *pChar; ++ ULONG32 pValue; ++ if(HXR_OK == pHeader->GetFirstPropertyULONG32(pChar, pValue)) ++ { ++ do ++ { ++ STDOUT("%s %d\n", pChar, pValue); ++ } ++ while(HXR_OK == pHeader->GetNextPropertyULONG32(pChar, pValue)); ++ } ++ ++ IHXBuffer *pBuffer; ++ ++ if(HXR_OK == pHeader->GetFirstPropertyBuffer(pChar, pBuffer)) ++ { ++ do ++ { ++ STDOUT("%s %s\n", pChar, (const char *) ( pBuffer->GetBuffer() )); ++ PrintBuffer(pChar, pBuffer->GetBuffer() ,pBuffer->GetSize()); ++ HX_RELEASE(pBuffer); ++ } while(HXR_OK == pHeader->GetNextPropertyBuffer(pChar, pBuffer )); ++ } ++ ++ if(HXR_OK == pHeader->GetFirstPropertyCString(pChar, pBuffer)) ++ { ++ do ++ { ++ STDERR("%s %s\n", pChar, (const char *) ( pBuffer->GetBuffer() )); ++ HX_RELEASE(pBuffer); ++ } while(HXR_OK == pHeader->GetNextPropertyCString(pChar, pBuffer )); ++ } ++ ++ fflush(stdout); ++} ++ ++ ++void ExampleClientAdviceSink::SetClipInfo( IHXPlayer* m_pRMAPlayer) ++{ ++ bool bSendOnClipInfo = false; ++ ++ // Get HXSource and try to get clip infor. ++ UINT32 sourceCount = m_pRMAPlayer->GetSourceCount(); ++ for (UINT32 sourceID = 0; sourceID < sourceCount; sourceID ++) ++ { ++ // get HXSource ++ STDOUT("========Source %d========\n",sourceID); ++ IUnknown* pUnkSource = NULL; ++ IHXStreamSource* pStreamSrc = NULL; ++ ++ if (HXR_OK != m_pRMAPlayer->GetSource (sourceID, pUnkSource)) ++ { ++ continue; ++ } ++ ++ pUnkSource->QueryInterface(IID_IHXStreamSource, (void **)&pStreamSrc); ++ ++ HX_RELEASE(pUnkSource); ++ ++ if (!pStreamSrc) ++ { ++ continue; ++ } ++ ++ UINT32 num_streams = pStreamSrc->GetStreamCount(); ++ ++ STDOUT("====File Header====\n"); ++ ++ IHXValues* pFileHdr = NULL; ++ pStreamSrc->QueryInterface(IID_IHXValues, (void**)&pFileHdr); ++ ++ if ( pFileHdr) ++ { ++ PrintPropName(pFileHdr); ++ } ++ HX_RELEASE(pFileHdr); ++ ++ // get information from Streams ++ for (UINT32 streamID = 0; streamID < num_streams ; streamID++) ++ { ++ STDOUT("====Stream %d====\n",streamID); ++ IUnknown* pUnkStream = NULL; ++ ++ if (HXR_OK == pStreamSrc->GetStream(streamID, pUnkStream)) ++ { ++ IHXStream* pStream = NULL; ++ ++ if (HXR_OK == pUnkStream->QueryInterface(IID_IHXStream, ++ (void**)&pStream)) ++ { ++ IHXValues* pStreamHdr = pStream->GetHeader(); ++ if (pStreamHdr) ++ { ++ PrintPropName(pStreamHdr); ++ } ++ HX_RELEASE(pStreamHdr); ++ } ++ HX_RELEASE(pStream); ++ } ++ HX_RELEASE(pUnkStream); ++ } ++ STDOUT("---------------------------------------------\n"); ++ ++ HX_RELEASE(pStreamSrc); ++ } ++} ++ ++ ++STDMETHODIMP ExampleClientAdviceSink::Func() ++{ ++ m_hCallback = 0; ++ ++ // set clip info ++ if(m_pPlayer) ++ SetClipInfo(m_pPlayer); ++ ++ return HXR_OK; ++} ++ ++void PrintBuffer(const char* pszName,const unsigned char* pbBuf, unsigned int dwBytes) ++{ ++ if(pszName == NULL || pbBuf == NULL) ++ return; ++ ++ STDOUT(" "); ++ for(unsigned int i= 0; iRelativeEnter(this,50); ++ } ++ m_bWaitForTrackStart = FALSE; ++ } ++ return HXR_OK; ++} ++ ++/************************************************************************ ++ * Method: ++ * IHXGroupSink::TrackStopped ++ * Purpose: ++ * Notification of a track being stopped ++ * ++ */ ++STDMETHODIMP ExampleClientAdviceSink::TrackStopped( UINT16 /*IN*/ uGroupIndex, ++ UINT16 /*IN*/ uTrackIndex, ++ IHXValues* /*IN*/ pTrack) ++{ ++ return HXR_OK; ++} ++ ++/************************************************************************ ++ * Method: ++ * IHXGroupSink::CurrentGroupSet ++ * Purpose: ++ * This group is being currently played in the presentation. ++ */ ++STDMETHODIMP ExampleClientAdviceSink::CurrentGroupSet( UINT16 /*IN*/ uGroupIndex, ++ IHXGroup* /*IN*/ pGroup) ++{ ++ return HXR_OK; ++} ++ +Index: helix-libs/clientapps/clutter/exadvsnk.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exadvsnk.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,324 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef _EXAMPLECLSNK_ ++#define _EXAMPLECLSNK_ ++ ++#include "player.h" ++ ++struct IHXClientAdviseSink; ++struct IHXGroupSink; ++struct IUnknown; ++struct IHXRegistry; ++struct IHXScheduler; ++struct IHXCallback; ++struct IHXPlayer; ++struct IHXGroup; ++ ++class ExampleClientAdviceSink : public IHXClientAdviseSink, ++ public IHXGroupSink, ++ public IHXCallback ++{ ++ private: ++ LONG32 m_lRefCount; ++ LONG32 m_lClientIndex; ++ ++ IUnknown* m_pUnknown; ++ IHXRegistry* m_pRegistry; ++ IHXScheduler* m_pScheduler; ++ ++ UINT32 m_ulStartTime; ++ UINT32 m_ulStopTime; ++ ++ UINT32 m_lCurrentBandwidth; ++ UINT32 m_lAverageBandwidth; ++ HXBOOL m_bOnStop; ++ ++ HXBOOL m_bWaitForTrackStart; ++ ++ on_buffering_cb_t m_on_buffering_cb; ++ on_pos_length_cb_t m_on_pos_length_cb; ++ void *m_context; /* a argument passed by texture-helix lib */ ++ ++ // IHXCallback ++ IHXPlayer* m_pPlayer; ++ ULONG32 m_hCallback; ++ ~ExampleClientAdviceSink(); ++ HX_RESULT DumpRegTree(const char* pszTreeName ); ++ ++ ++ void GetStatistics (char* /*IN*/ pszRegistryKey); ++ void GetAllStatistics (void); ++ void SetClipInfo( IHXPlayer* m_pRMAPlayer); ++ void PrintPropName( IHXValues* pHeader ); ++ ++ public: ++ ++ ExampleClientAdviceSink(IUnknown* /*IN*/ pUnknown, LONG32 /*IN*/ lClientIndex, on_buffering_cb_t on_buffer_cb, on_pos_length_cb_t on_pos_length_cb, void *context); ++ ++ /* ++ * IUnknown methods ++ */ ++ STDMETHOD(QueryInterface) (THIS_ ++ REFIID riid, ++ void** ppvObj); ++ ++ STDMETHOD_(ULONG32,AddRef) (THIS); ++ ++ STDMETHOD_(ULONG32,Release) (THIS); ++ ++ /* ++ * IHXClientAdviseSink methods ++ */ ++ ++ /************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnPosLength ++ * Purpose: ++ * Called to advise the client that the position or length of the ++ * current playback context has changed. ++ */ ++ STDMETHOD(OnPosLength) (THIS_ ++ UINT32 ulPosition, ++ UINT32 ulLength); ++ ++ /************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnPresentationOpened ++ * Purpose: ++ * Called to advise the client a presentation has been opened. ++ */ ++ STDMETHOD(OnPresentationOpened) (THIS); ++ ++ /************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnPresentationClosed ++ * Purpose: ++ * Called to advise the client a presentation has been closed. ++ */ ++ STDMETHOD(OnPresentationClosed) (THIS); ++ ++ /************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnStatisticsChanged ++ * Purpose: ++ * Called to advise the client that the presentation statistics ++ * have changed. ++ */ ++ STDMETHOD(OnStatisticsChanged) (THIS); ++ ++ /************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnPreSeek ++ * Purpose: ++ * Called by client engine to inform the client that a seek is ++ * about to occur. The render is informed the last time for the ++ * stream's time line before the seek, as well as the first new ++ * time for the stream's time line after the seek will be completed. ++ * ++ */ ++ STDMETHOD (OnPreSeek) (THIS_ ++ ULONG32 ulOldTime, ++ ULONG32 ulNewTime); ++ ++ /************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnPostSeek ++ * Purpose: ++ * Called by client engine to inform the client that a seek has ++ * just occured. The render is informed the last time for the ++ * stream's time line before the seek, as well as the first new ++ * time for the stream's time line after the seek. ++ * ++ */ ++ STDMETHOD (OnPostSeek) (THIS_ ++ ULONG32 ulOldTime, ++ ULONG32 ulNewTime); ++ ++ /************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnStop ++ * Purpose: ++ * Called by client engine to inform the client that a stop has ++ * just occured. ++ * ++ */ ++ STDMETHOD (OnStop) (THIS); ++ ++ /************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnPause ++ * Purpose: ++ * Called by client engine to inform the client that a pause has ++ * just occured. The render is informed the last time for the ++ * stream's time line before the pause. ++ * ++ */ ++ STDMETHOD (OnPause) (THIS_ ++ ULONG32 ulTime); ++ ++ /************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnBegin ++ * Purpose: ++ * Called by client engine to inform the client that a begin or ++ * resume has just occured. The render is informed the first time ++ * for the stream's time line after the resume. ++ * ++ */ ++ STDMETHOD (OnBegin) (THIS_ ++ ULONG32 ulTime); ++ ++ /************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnBuffering ++ * Purpose: ++ * Called by client engine to inform the client that buffering ++ * of data is occuring. The render is informed of the reason for ++ * the buffering (start-up of stream, seek has occured, network ++ * congestion, etc.), as well as percentage complete of the ++ * buffering process. ++ * ++ */ ++ STDMETHOD (OnBuffering) (THIS_ ++ ULONG32 ulFlags, ++ UINT16 unPercentComplete); ++ ++ ++ /************************************************************************ ++ * Method: ++ * IHXClientAdviseSink::OnContacting ++ * Purpose: ++ * Called by client engine to inform the client is contacting ++ * hosts(s). ++ * ++ */ ++ STDMETHOD (OnContacting) (THIS_ ++ const char* pHostName); ++ ++ // IHXCallback ++ STDMETHOD(Func) (THIS); ++ ++ /* ++ * IHXGroupSink methods ++ */ ++ /************************************************************************ ++ * Method: ++ * IHXGroupSink::GroupAdded ++ * Purpose: ++ * Notification of a new group being added to the presentation. ++ */ ++ STDMETHOD(GroupAdded) (THIS_ ++ UINT16 /*IN*/ uGroupIndex, ++ IHXGroup* /*IN*/ pGroup); ++ ++ /************************************************************************ ++ * Method: ++ * IHXGroupSink::GroupRemoved ++ * Purpose: ++ * Notification of a group being removed from the presentation. ++ */ ++ STDMETHOD(GroupRemoved) (THIS_ ++ UINT16 /*IN*/ uGroupIndex, ++ IHXGroup* /*IN*/ pGroup); ++ ++ /************************************************************************ ++ * Method: ++ * IHXGroupSink::AllGroupsRemoved ++ * Purpose: ++ * Notification that all groups have been removed from the ++ * current presentation. ++ */ ++ STDMETHOD(AllGroupsRemoved) (THIS); ++ ++ /************************************************************************ ++ * Method: ++ * IHXGroupSink::TrackAdded ++ * Purpose: ++ * Notification of a new track being added to a group. ++ */ ++ STDMETHOD(TrackAdded) (THIS_ ++ UINT16 /*IN*/ uGroupIndex, ++ UINT16 /*IN*/ uTrackIndex, ++ IHXValues* /*IN*/ pTrack); ++ ++ /************************************************************************ ++ * Method: ++ * IHXGroupSink::TrackRemoved ++ * Purpose: ++ * Notification of a track being removed from a group. ++ */ ++ STDMETHOD(TrackRemoved) (THIS_ ++ UINT16 /*IN*/ uGroupIndex, ++ UINT16 /*IN*/ uTrackIndex, ++ IHXValues* /*IN*/ pTrack); ++ ++ /************************************************************************ ++ * Method: ++ * IHXGroupSink::TrackStarted ++ * Purpose: ++ * Notification of a track being started (to get duration, for ++ * instance...) ++ */ ++ STDMETHOD (TrackStarted) (THIS_ ++ UINT16 /*IN*/ uGroupIndex, ++ UINT16 /*IN*/ uTrackIndex, ++ IHXValues* /*IN*/ pTrack) ; ++ ++ /************************************************************************ ++ * Method: ++ * IHXGroupSink::TrackStopped ++ * Purpose: ++ * Notification of a track being stopped ++ * ++ */ ++ STDMETHOD(TrackStopped) (THIS_ ++ UINT16 /*IN*/ uGroupIndex, ++ UINT16 /*IN*/ uTrackIndex, ++ IHXValues* /*IN*/ pTrack); ++ ++ /************************************************************************ ++ * Method: ++ * IHXGroupSink::CurrentGroupSet ++ * Purpose: ++ * This group is being currently played in the presentation. ++ */ ++ STDMETHOD(CurrentGroupSet) (THIS_ ++ UINT16 /*IN*/ uGroupIndex, ++ IHXGroup* /*IN*/ pGroup); ++ ++}; ++ ++#endif /* _EXAMPLECLSNK_ */ +Index: helix-libs/clientapps/clutter/exaumgr.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exaumgr.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,137 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include ++#include "hxtypes.h" ++#include "hxcom.h" ++#include "hxauth.h" ++#include "hxstrutl.h" ++#include "exaumgr.h" ++#include ++#include "print.h" ++ ++ ++#include "globals.h" ++struct _stGlobals*& GetGlobal(); //in main.cpp ++ ++ ++ ++ExampleAuthenticationManager::ExampleAuthenticationManager() : ++ m_lRefCount(0), ++ m_bSentPassword(FALSE) ++{ ++} ++ ++ExampleAuthenticationManager::~ExampleAuthenticationManager() ++{ ++} ++ ++STDMETHODIMP ++ExampleAuthenticationManager::QueryInterface(REFIID riid, void**ppvObj) ++{ ++ if(IsEqualIID(riid, IID_IUnknown)) ++ { ++ AddRef(); ++ *ppvObj = (IUnknown*)(IHXAuthenticationManager*)this; ++ return HXR_OK; ++ } ++ else if(IsEqualIID(riid, IID_IHXAuthenticationManager)) ++ { ++ AddRef(); ++ *ppvObj = (IHXAuthenticationManager*)this; ++ return HXR_OK; ++ } ++ *ppvObj = NULL; ++ return HXR_NOINTERFACE; ++} ++ ++STDMETHODIMP_(UINT32) ++ExampleAuthenticationManager::AddRef() ++{ ++ return InterlockedIncrement(&m_lRefCount); ++} ++ ++STDMETHODIMP_(UINT32) ++ExampleAuthenticationManager::Release() ++{ ++ if (InterlockedDecrement(&m_lRefCount) > 0) ++ { ++ return m_lRefCount; ++ } ++ ++ delete this; ++ return 0; ++} ++ ++STDMETHODIMP ++ExampleAuthenticationManager::HandleAuthenticationRequest(IHXAuthenticationManagerResponse* pResponse) ++{ ++ char username[1024] = ""; /* Flawfinder: ignore */ ++ char password[1024] = ""; /* Flawfinder: ignore */ ++ HX_RESULT res = HXR_FAIL; ++ ++ if( !m_bSentPassword ) ++ { ++ res = HXR_OK; ++ if (GetGlobal()->bEnableVerboseMode) ++ STDOUT("\nSending Username and Password...\n"); ++ ++ SafeStrCpy(username, GetGlobal()->g_pszUsername, 1024); ++ SafeStrCpy(password, GetGlobal()->g_pszPassword, 1024); ++ ++ //strip trailing whitespace ++ char* c; ++ for(c = username + strlen(username) - 1; ++ c > username && isspace(*c); ++ c--) ++ ; ++ *(c+1) = 0; ++ ++ for(c = password + strlen(password) - 1; ++ c > password && isspace(*c); ++ c--) ++ ; ++ *(c+1) = 0; ++ ++ m_bSentPassword = TRUE; ++ } ++ ++ if (GetGlobal()->bEnableVerboseMode && FAILED(res) ) ++ STDOUT("\nInvalid Username and/or Password.\n"); ++ ++ pResponse->AuthenticationRequestDone(res, username, password); ++ return res; ++} ++ +Index: helix-libs/clientapps/clutter/exaumgr.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exaumgr.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,56 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef _EXAUMGR_H_ ++#define _EXAUMGR_H_ ++ ++#include "hxauth.h" ++ ++class ExampleAuthenticationManager : public IHXAuthenticationManager ++{ ++private: ++ INT32 m_lRefCount; ++ HXBOOL m_bSentPassword; ++ ~ExampleAuthenticationManager(); ++ ++public: ++ ExampleAuthenticationManager(); ++ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj); ++ STDMETHOD_(UINT32,AddRef) (THIS); ++ STDMETHOD_(UINT32,Release) (THIS); ++ ++ STDMETHOD(HandleAuthenticationRequest) (IHXAuthenticationManagerResponse* pResponse); ++}; ++#endif +Index: helix-libs/clientapps/clutter/excallback.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/excallback.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,38 @@ ++#include "excallback.h" ++ ++STDMETHODIMP ExCallback::QueryInterface(REFIID riid, void** ppvObj) ++{ ++ if (IsEqualIID(riid, IID_IHXCallback)) ++ { ++ AddRef(); ++ *ppvObj = (IHXCallback*)this; ++ return HXR_OK; ++ } ++ else if (IsEqualIID(riid, IID_IUnknown)) ++ { ++ AddRef(); ++ *ppvObj = this; ++ return HXR_OK; ++ } ++ ++ *ppvObj = NULL; ++ return HXR_NOINTERFACE; ++} ++ ++STDMETHODIMP_(ULONG32) ExCallback::AddRef() ++{ ++ return HXR_OK; ++} ++ ++STDMETHODIMP_(ULONG32) ExCallback::Release() ++{ ++ return HXR_OK; ++} ++ ++STDMETHODIMP ExCallback::Func(void) ++{ ++ UINT32 sleepTime = 0; ++ m_pKicker->Kick(HXGetCurrentThreadID, &sleepTime); ++ printf("Get called, sleeptime:%d\n", sleepTime); ++ m_pScheduler->RelativeEnter(this, sleepTime/1000); ++} +Index: helix-libs/clientapps/clutter/excallback.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/excallback.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,32 @@ ++#ifndef _EX_CALLBACK_H_ ++#define _EX_CALLBACK_H_ ++ ++#include "hxcom.h" ++#include "hxengin.h" ++#include "ihxmedpltfm.h" ++#include "thrdutil.h" ++ ++class ExCallback : public IHXCallback ++{ ++ public: ++ ExCallback(IHXScheduler *pIHXScheduler, IHXMediaPlatformKicker *pKicker) : m_pScheduler(pIHXScheduler), m_pKicker(pKicker){}; ++ ++ /* ++ * * IUnknown methods ++ * */ ++ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj); ++ STDMETHOD_(ULONG32,AddRef) (THIS); ++ STDMETHOD_(ULONG32,Release) (THIS); ++ ++ /* ++ * * IHXCallback methods ++ * */ ++ STDMETHOD(Func) (THIS); ++ private: ++ IHXScheduler *m_pScheduler; ++ IHXMediaPlatformKicker* m_pKicker; ++ ++}; ++ ++ ++#endif +Index: helix-libs/clientapps/clutter/excontxt.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/excontxt.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,315 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "hxtypes.h" ++ ++#include "hxwintyp.h" ++#include "hxcom.h" ++#include "hxcomm.h" ++#include "hxwin.h" ++#include "fivemmap.h" ++ ++#include "hxbuffer.h" ++#include "hxmangle.h" ++ ++#include "hxclsnk.h" ++#include "hxgroup.h" ++#include "hxerror.h" ++#include "hxprefs.h" ++#include "hxstrutl.h" ++ ++#include "exadvsnk.h" ++#include "exstateadvsnk.h" ++#include "exerror.h" ++#include "exsitsup.h" ++#include "exaumgr.h" ++#include "hxprdnld.h" ++#include "exprdnld.h" ++ ++#include "excontxt.h" ++ ++extern HXBOOL bEnableAdviceSink; ++ ++ ++ExampleClientContext::ExampleClientContext(LONG32 lClientIndex) ++ : m_lRefCount(0) ++ , m_lClientIndex(lClientIndex) ++ , m_pClientSink(NULL) ++ , m_pClientStateSink(NULL) ++ , m_pErrorSink(NULL) ++ , m_pAuthMgr(NULL) ++ , m_pSiteSupplier(NULL) ++ , m_pDefaultPrefs(NULL) ++#if defined(HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS) ++ , m_pPrgDnldStatusObserver(NULL) ++#endif // /HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS. ++{ ++} ++ ++ ++ExampleClientContext::~ExampleClientContext() ++{ ++ Close(); ++}; ++ ++void ExampleClientContext::Init(IUnknown* /*IN*/ pUnknown, ++ IHXPreferences* /*IN*/ pPreferences, ++ char* /*IN*/ pszGUID, ++ on_buffering_cb_t on_buffering_cb, ++ on_pos_length_cb_t on_pos_length_cb, ++ on_state_change_cb_t on_state_change_cb, ++ on_new_frame_cb_t on_new_frame_cb, ++ void *context) ++{ ++ char* pszCipher = NULL; ++ ++ ++ m_pClientSink = new ExampleClientAdviceSink(pUnknown, m_lClientIndex, on_buffering_cb, on_pos_length_cb, context); ++ ++ m_pClientStateSink = new ExampleClientStateAdviceSink(pUnknown, m_lClientIndex, on_state_change_cb, context); ++ m_pErrorSink = new ExampleErrorSink(pUnknown); ++#if defined(HELIX_FEATURE_AUTHENTICATION) ++ m_pAuthMgr = new ExampleAuthenticationManager(); ++ if(m_pAuthMgr) ++ { ++ m_pAuthMgr->AddRef(); ++ } ++ ++#endif /* #if defined(HELIX_FEATURE_AUTHENTICATION) */ ++#if defined(HELIX_FEATURE_VIDEO) ++ m_pSiteSupplier = new ExampleSiteSupplier(pUnknown, on_new_frame_cb, context); ++#endif ++ ++#if defined(HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS) ++ m_pPrgDnldStatusObserver = new ExamplePDStatusObserver(pUnknown); ++#endif // /HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS. ++ ++ if (m_pClientSink) ++ { ++ m_pClientSink->AddRef(); ++ } ++ ++ if (m_pErrorSink) ++ { ++ m_pErrorSink->AddRef(); ++ } ++ ++ if (m_pClientStateSink) ++ m_pClientStateSink->AddRef(); ++ ++ if(m_pSiteSupplier) ++ { ++ m_pSiteSupplier->AddRef(); ++ } ++ ++ if (pPreferences) ++ { ++ m_pDefaultPrefs = pPreferences; ++ m_pDefaultPrefs->AddRef(); ++ } ++ ++ if (pszGUID && *pszGUID) ++ { ++ // Encode GUID ++ pszCipher = Cipher(pszGUID); ++ SafeStrCpy(m_pszGUID, pszCipher, 256); ++ } ++ else ++ { ++ m_pszGUID[0] = '\0'; ++ } ++} ++ ++void ExampleClientContext::Close() ++{ ++ HX_RELEASE(m_pClientSink); ++ HX_RELEASE(m_pClientStateSink); ++ HX_RELEASE(m_pErrorSink); ++#if defined(HELIX_FEATURE_AUTHENTICATION) ++ HX_RELEASE(m_pAuthMgr); ++#endif /* #if defined(HELIX_FEATURE_AUTHENTICATION) */ ++ HX_RELEASE(m_pSiteSupplier); ++ HX_RELEASE(m_pDefaultPrefs); ++#if defined(HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS) ++ HX_RELEASE(m_pPrgDnldStatusObserver); ++#endif // /HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS. ++} ++ ++ ++ ++// *** IUnknown methods *** ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::QueryInterface ++// Purpose: ++// Implement this to export the interfaces supported by your ++// object. ++// ++STDMETHODIMP ExampleClientContext::QueryInterface(REFIID riid, void** ppvObj) ++{ ++ if (IsEqualIID(riid, IID_IUnknown)) ++ { ++ AddRef(); ++ *ppvObj = this; ++ return HXR_OK; ++ } ++ else if (IsEqualIID(riid, IID_IHXPreferences)) ++ { ++ AddRef(); ++ *ppvObj = (IHXPreferences*)this; ++ return HXR_OK; ++ } ++ else if (m_pClientSink && ++ m_pClientSink->QueryInterface(riid, ppvObj) == HXR_OK) ++ { ++ return HXR_OK; ++ } ++ else if (m_pErrorSink && ++ m_pErrorSink->QueryInterface(riid, ppvObj) == HXR_OK) ++ { ++ return HXR_OK; ++ } ++ else if (m_pClientStateSink && ++ m_pClientStateSink->QueryInterface(riid, ppvObj) == HXR_OK) ++ { ++ return HXR_OK; ++ } ++#if defined(HELIX_FEATURE_AUTHENTICATION) ++ else if(m_pAuthMgr && ++ m_pAuthMgr->QueryInterface(riid, ppvObj) == HXR_OK) ++ { ++ return HXR_OK; ++ } ++#endif /* #if defined(HELIX_FEATURE_AUTHENTICATION) */ ++ else if(m_pSiteSupplier && ++ m_pSiteSupplier->QueryInterface(riid, ppvObj) == HXR_OK) ++ { ++ return HXR_OK; ++ } ++ *ppvObj = NULL; ++ return HXR_NOINTERFACE; ++} ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::AddRef ++// Purpose: ++// Everyone usually implements this the same... feel free to use ++// this implementation. ++// ++STDMETHODIMP_(ULONG32) ExampleClientContext::AddRef() ++{ ++ return InterlockedIncrement(&m_lRefCount); ++} ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::Release ++// Purpose: ++// Everyone usually implements this the same... feel free to use ++// this implementation. ++// ++STDMETHODIMP_(ULONG32) ExampleClientContext::Release() ++{ ++ if (InterlockedDecrement(&m_lRefCount) > 0) ++ { ++ return m_lRefCount; ++ } ++ ++ delete this; ++ return 0; ++} ++ ++ ++// *** IUnknown methods *** ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IHXPreferences::ReadPref ++// Purpose: ++// Read a Preference from the registry. ++// ++STDMETHODIMP ++ExampleClientContext::ReadPref(const char* pref_key, IHXBuffer*& buffer) ++{ ++ HX_RESULT hResult = HXR_OK; ++ char* pszCipher = NULL; ++ ++ if ((stricmp(pref_key, CLIENT_GUID_REGNAME) == 0) && ++ (*m_pszGUID)) ++ { ++ // Create a Buffer ++ buffer = new CHXBuffer(); ++ buffer->AddRef(); ++ ++ // Copy the encoded GUID into the buffer ++ buffer->Set((UCHAR*)m_pszGUID, strlen(m_pszGUID) + 1); ++ } ++ else if (m_pDefaultPrefs) ++ { ++ hResult = m_pDefaultPrefs->ReadPref(pref_key, buffer); ++ } ++ else ++ { ++ hResult = HXR_NOTIMPL; ++ } ++ ++ return hResult; ++} ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IHXPreferences::WritePref ++// Purpose: ++// Write a Preference to the registry. ++// ++STDMETHODIMP ++ExampleClientContext::WritePref(const char* pref_key, IHXBuffer* buffer) ++{ ++ if (m_pDefaultPrefs) ++ { ++ return m_pDefaultPrefs->WritePref(pref_key, buffer); ++ } ++ else ++ { ++ return HXR_OK; ++ } ++} ++ ++EHXClientState ExampleClientContext::GetState() ++{ ++ return m_pClientStateSink->GetState(); ++}; +Index: helix-libs/clientapps/clutter/excontxt.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/excontxt.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,106 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++#ifndef _EXCONTXT_H_ ++#define _EXCONTXT_H_ ++ ++#include "exerror.h" ++#include "exsitsup.h" ++#include "hxprefs.h" ++#include "player.h" ++#include "hxclsnk.h" ++ ++struct IUnknown; ++struct IHXPreferences; ++class ExampleClientAdviceSink; ++class ExampleClientStateAdviceSink; ++class ExampleErrorMessages; ++class ExampleAuthenticationManager; ++class ExamplePDStatusObserver; ++ ++ ++class ExampleClientContext : public IHXPreferences ++{ ++private: ++ LONG32 m_lRefCount; ++ LONG32 m_lClientIndex; ++ ++ ExampleClientAdviceSink* m_pClientSink; ++ ExampleClientStateAdviceSink* m_pClientStateSink; ++ ExampleErrorSink* m_pErrorSink; ++ ExampleAuthenticationManager* m_pAuthMgr; ++ ++ ExampleSiteSupplier* m_pSiteSupplier; ++ ExamplePDStatusObserver* m_pPrgDnldStatusObserver; ++ IHXPreferences* m_pDefaultPrefs; ++ char m_pszGUID[256]; /* Flawfinder: ignore */ ++ ++ ++public: ++ ++ ExampleClientContext(LONG32 /*IN*/ lClientIndex); ++ ~ExampleClientContext(); ++ ++ void Init(IUnknown* /*IN*/ pUnknown, ++ IHXPreferences* /*IN*/ pPreferences, ++ char* /*IN*/ pszGUID, ++ on_buffering_cb_t on_buffering_cb = NULL, ++ on_pos_length_cb_t on_pos_length_cb = NULL, ++ on_state_change_cb_t on_state_change_cb = NULL, ++ on_new_frame_cb_t on_new_frame_cb = NULL, ++ void *context = NULL); ++ void Close(); ++ ++ EHXClientState GetState(); ++ ++ /* ++ * IUnknown methods ++ */ ++ STDMETHOD(QueryInterface) (THIS_ ++ REFIID riid, ++ void** ppvObj); ++ ++ STDMETHOD_(ULONG32,AddRef) (THIS); ++ STDMETHOD_(ULONG32,Release) (THIS); ++ ++ /* ++ * IHXPreferences methods ++ */ ++ STDMETHOD(ReadPref) (THIS_ const char* pref_key, ++ IHXBuffer*& buffer); ++ STDMETHOD(WritePref) (THIS_ const char* pref_key, ++ IHXBuffer* buffer); ++}; ++ ++#endif +Index: helix-libs/clientapps/clutter/exerror.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exerror.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,230 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "hxtypes.h" ++ ++#include "hxcom.h" ++#include "hxcomm.h" ++#include "hxerror.h" ++#include "hxstrutl.h" ++#include "hxcore.h" ++#include "hxassert.h" ++#include "hxbuffer.h" ++ ++#ifdef __TCS__ ++#include "hxresult.h" ++#endif ++ ++#if !defined(HELIX_CONFIG_MINIMIZE_SIZE) ++#include "HXErrorCodeStrings.h" ++#endif ++ ++#include "exerror.h" ++ ++#include ++#include "print.h" ++ ++#include "globals.h" ++struct _stGlobals*& GetGlobal(); //in main.cpp ++ ++#ifdef __TCS__ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++void hookRealAudio_ReportError(int err, long errVal); ++ ++#ifdef __cplusplus ++} ++#endif ++#endif ++ ++ExampleErrorSink::ExampleErrorSink(IUnknown* pUnknown) ++ : m_lRefCount(0), ++ m_pPlayer(NULL) ++{ ++ IHXClientEngine* pEngine = NULL; ++ pUnknown->QueryInterface(IID_IHXClientEngine, (void**)&pEngine ); ++ if( pEngine ) ++ { ++ IUnknown* pTmp = NULL; ++ pEngine->GetPlayer(0, pTmp); ++ m_pPlayer = (IHXPlayer*)pTmp; ++ } ++ ++ HX_RELEASE( pEngine ); ++ HX_ASSERT(m_pPlayer); ++} ++ ++ExampleErrorSink::~ExampleErrorSink() ++{ ++ HX_RELEASE(m_pPlayer); ++} ++ ++// *** IUnknown methods *** ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::QueryInterface ++// Purpose: ++// Implement this to export the interfaces supported by your ++// object. ++// ++STDMETHODIMP ExampleErrorSink::QueryInterface(REFIID riid, void** ppvObj) ++{ ++ if (IsEqualIID(riid, IID_IUnknown)) ++ { ++ AddRef(); ++ *ppvObj = (IUnknown*)(IHXErrorSink*)this; ++ return HXR_OK; ++ } ++ else if (IsEqualIID(riid, IID_IHXErrorSink)) ++ { ++ AddRef(); ++ *ppvObj = (IHXErrorSink*) this; ++ return HXR_OK; ++ } ++ ++ *ppvObj = NULL; ++ return HXR_NOINTERFACE; ++} ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::AddRef ++// Purpose: ++// Everyone usually implements this the same... feel free to use ++// this implementation. ++// ++STDMETHODIMP_(ULONG32) ExampleErrorSink::AddRef() ++{ ++ return InterlockedIncrement(&m_lRefCount); ++} ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::Release ++// Purpose: ++// Everyone usually implements this the same... feel free to use ++// this implementation. ++// ++STDMETHODIMP_(ULONG32) ExampleErrorSink::Release() ++{ ++ if (InterlockedDecrement(&m_lRefCount) > 0) ++ { ++ return m_lRefCount; ++ } ++ ++ delete this; ++ return 0; ++} ++ ++/* ++ * IHXErrorSink methods ++ */ ++ ++STDMETHODIMP ++ExampleErrorSink::ErrorOccurred(const UINT8 unSeverity, ++ const ULONG32 ulHXCode, ++ const ULONG32 ulUserCode, ++ const char* pUserString, ++ const char* pMoreInfoURL ++ ) ++{ ++ char HXDefine[256]; /* Flawfinder: ignore */ ++ ++ // Store the code, so we can return it from main() ++ GetGlobal()->g_Error = ulHXCode; ++ ++ ConvertErrorToString(ulHXCode, HXDefine, 256); ++ ++#ifdef __TCS__ ++ hookRealAudio_ReportError(ulHXCode,ulUserCode); ++#else ++ STDOUT("Report(%d, %ld, \"%s\", %ld, \"%s\", \"%s\")\n", ++ unSeverity, ++ ulHXCode, ++ (pUserString && *pUserString) ? pUserString : "(NULL)", ++ ulUserCode, ++ (pMoreInfoURL && *pMoreInfoURL) ? pMoreInfoURL : "(NULL)", ++ HXDefine); ++#endif ++ ++ return HXR_OK; ++} ++ ++void ++ExampleErrorSink::ConvertErrorToString(const ULONG32 ulHXCode, char* pszBuffer, UINT32 ulBufLen) ++{ ++ IHXErrorMessages* pErrMsg = NULL; ++ ++ if( !pszBuffer) ++ return; ++ ++ pszBuffer[0]='\0'; ++ ++ HX_ASSERT(m_pPlayer); ++ if( m_pPlayer) ++ { ++ m_pPlayer->QueryInterface(IID_IHXErrorMessages, (void**)&pErrMsg); ++ if( pErrMsg ) ++ { ++ IHXBuffer* pMessage = pErrMsg->GetErrorText(ulHXCode); ++ if( pMessage ) ++ { ++ SafeStrCpy( pszBuffer, (const char*)pMessage->GetBuffer(), ulBufLen); ++ pMessage->Release(); ++ } ++ } ++ HX_RELEASE(pErrMsg); ++ } ++ ++ if( strlen(pszBuffer)==0 ) ++ { ++#if !defined(HELIX_CONFIG_MINIMIZE_SIZE) ++ const char* pszHXCodeString = HXErrorCodeToString(ulHXCode); ++ if (pszHXCodeString) ++ { ++ SafeSprintf( pszBuffer, ulBufLen, "%s", pszHXCodeString); ++ } ++ else ++#endif ++ { ++ HX_ASSERT(FALSE); ++ SafeSprintf( pszBuffer, ulBufLen, "Can't convert error code %p - make sure it's defined in common/util/HXErrorCodeStrings.c", ulHXCode ); ++ } ++ } ++} ++ +Index: helix-libs/clientapps/clutter/exerror.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exerror.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,92 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef _EXAMPLEERRORMESSAGES_ ++#define _EXAMPLEERRORMESSAGES_ ++ ++#include "hxerror.h" ++ ++struct IUnknown; ++struct IHXErrorMessages; ++struct IHXPlayer; ++ ++class ExampleErrorSink : public IHXErrorSink ++{ ++public: ++ ++ ExampleErrorSink(IUnknown* pUnknown); ++ ~ExampleErrorSink(); ++ ++ /* ++ * IUnknown methods ++ */ ++ STDMETHOD(QueryInterface) (THIS_ ++ REFIID riid, ++ void** ppvObj); ++ ++ STDMETHOD_(ULONG32,AddRef) (THIS); ++ ++ STDMETHOD_(ULONG32,Release) (THIS); ++ ++ /* ++ * IHXErrorSink methods ++ */ ++ ++ /************************************************************************ ++ * Method: ++ * IHXErrorSink::ErrorOccurred ++ * Purpose: ++ * After you have registered your error sink with an IHXErrorSinkControl ++ * (either in the server or player core) this method will be called to ++ * report an error, event, or status message. ++ * ++ * The meaning of the arguments is exactly as described in ++ * hxerror.h ++ */ ++ STDMETHOD(ErrorOccurred) (THIS_ ++ const UINT8 unSeverity, ++ const ULONG32 ulHXCode, ++ const ULONG32 ulUserCode, ++ const char* pUserString, ++ const char* pMoreInfoURL ++ ); ++ ++protected: ++ LONG32 m_lRefCount; ++ IHXPlayer* m_pPlayer; ++ ++ void ConvertErrorToString (const ULONG32 ulHXCode, char* pszBuffer, UINT32 ulBufLen); ++}; ++#endif /*_EXAMPLEERRORMESSAGES_*/ +Index: helix-libs/clientapps/clutter/exprdnld.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exprdnld.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,468 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "hxcom.h" ++#include "hxtypes.h" ++#include "hxcore.h" ++#include "hxprdnld.h" ++#include "exprdnld.h" ++#include "print.h" ++ ++#include "globals.h" ++struct _stGlobals*& GetGlobal(); ++ ++UINT32 GetTime(); // /In main.cpp. ++ ++// /#if defined(HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS) ++/************************************************************************ ++ * Method: ++ * Constructor ++ */ ++ExamplePDStatusObserver::ExamplePDStatusObserver(IUnknown* pUnkPlayer) ++ : m_lRefCount(0) ++ , m_pPrgDnldStatusMgr(NULL) ++ , m_pUnkPlayer(pUnkPlayer) ++ , m_pHXPlayer(NULL) ++ , m_bPlayerIsPausedByThis(FALSE) ++ , m_bFirstPDStatusMessage(TRUE) ++ , m_ulTotalDurReported(HX_PROGDOWNLD_UNKNOWN_DURATION) ++ , m_ulDurSoFar(HX_PROGDOWNLD_UNKNOWN_DURATION) ++ , m_ulCurStatusUpdateGranularity( ++ HX_PROGDOWNLD_DEFAULT_STATUSREPORT_INTERVAL_MSEC) ++ , m_bInitialPrerollUpateGranularitySet(FALSE) ++ , m_bDownloadIsComplete(FALSE) ++{ ++ if (m_pUnkPlayer) ++ { ++ m_pUnkPlayer->QueryInterface(IID_IHXPlayer, ++ (void**)&m_pHXPlayer); ++ ++ m_pUnkPlayer->QueryInterface(IID_IHXPDStatusMgr, ++ (void**)&m_pPrgDnldStatusMgr); ++ ++ if (m_pPrgDnldStatusMgr) ++ { ++ // /Add ourselves as an observer of progressive download playback: ++ m_pPrgDnldStatusMgr->AddObserver(this); ++ // /Set granularity of status reports to 10 per second until we ++ // know enough about the situation to go back to getting reports ++ // at the default interval (every 5 seconds). Do that as soon ++ // as we receive the first progress report: ++ m_ulCurStatusUpdateGranularity = 100; ++ } ++ ++ m_pUnkPlayer->AddRef(); ++ } ++}; ++ ++/************************************************************************ ++ * Method: ++ * Destructor ++ */ ++ExamplePDStatusObserver::~ExamplePDStatusObserver() ++{ ++ if (m_pPrgDnldStatusMgr) ++ { ++ m_pPrgDnldStatusMgr->RemoveObserver(this); ++ } ++ HX_RELEASE(m_pPrgDnldStatusMgr); ++ HX_RELEASE(m_pHXPlayer); ++ HX_RELEASE(m_pUnkPlayer); ++} ++ ++/************************************************************************ ++ * Method: ++ * IUnknown::QueryInterface ++ */ ++STDMETHODIMP ++ExamplePDStatusObserver::QueryInterface(REFIID riid, void** ppvObj) ++{ ++ if (IsEqualIID(riid, IID_IUnknown)) ++ { ++ AddRef(); ++ *ppvObj = (IUnknown*)(IHXPDStatusObserver*)this; ++ return HXR_OK; ++ } ++ else if (IsEqualIID(riid, IID_IHXPDStatusObserver)) ++ { ++ AddRef(); ++ *ppvObj = (IHXPDStatusObserver*)this; ++ return HXR_OK; ++ } ++ ++ *ppvObj = NULL; ++ return HXR_NOINTERFACE; ++} ++ ++/************************************************************************ ++ * Method: ++ * IUnknown::AddRef ++ */ ++STDMETHODIMP_(ULONG32) ++ExamplePDStatusObserver::AddRef() ++{ ++ return InterlockedIncrement(&m_lRefCount); ++} ++ ++/************************************************************************ ++ * Method: ++ * IUnknown::Release ++ */ ++STDMETHODIMP_(ULONG32) ++ExamplePDStatusObserver::Release() ++{ ++ if (InterlockedDecrement(&m_lRefCount) > 0) ++ { ++ return m_lRefCount; ++ } ++ ++ delete this; ++ return 0; ++} ++ ++ ++/* ++ * IHXPDStatusObserver methods ++ */ ++ ++/************************************************************************ ++ * Method: ++ * IHXPDStatusObserver::OnDownloadProgress ++ * ++ * Purpose: ++ * Notification from IHXPDStatusMgr of download progress when ++ * file size changes. ++ * ++ * lTimeSurplus: ++ * - When negative, the absolute value of it is the estimated number ++ * of milliseconds of wall-clock time that need to pass while ++ * downloading continues before reaching the point at which playback ++ * can resume and play the remainder of the stream without having to ++ * buffer, assuming that playback is paused and remains so during ++ * that period. ++ * - When positive, it is the estimated number of milliseconds of ++ * wall-clock time between when the download should complete and when ++ * the natural content play-out duration will be reached, assuming ++ * playback is currently progressing and that no pause will occur. ++ * ++ * Note: ulNewDurSoFar can be HX_PROGDOWNLD_UNKNOWN_DURATION if the ++ * IHXMediaBytesToMediaDur was not available to, or was unable to ++ * convert the bytes to a duration for the IHXPDStatusMgr calling this: ++ */ ++STDMETHODIMP ++ExamplePDStatusObserver::OnDownloadProgress( ++ IHXStreamSource* /*IN*/ /*NULL is valid value*/ pStreamSource, ++ UINT32 /*IN*/ ulNewDurSoFar, ++ UINT32 /*IN*/ ulNewBytesSoFar, ++ INT32 /*IN*/ lTimeSurplus) ++{ ++ m_ulDurSoFar = ulNewDurSoFar; ++ ++ if (m_ulCurStatusUpdateGranularity < ++ HX_PROGDOWNLD_DEFAULT_STATUSREPORT_INTERVAL_MSEC) ++ { ++ if (m_bInitialPrerollUpateGranularitySet) ++ { ++ if (HX_PROGDOWNLD_UNKNOWN_DURATION != ulNewDurSoFar && ++ // /Preroll is done, so reset update interval back to default: ++ GetGlobal()->g_bOnBeginOccurred) ++ { ++ m_ulCurStatusUpdateGranularity = ++ HX_PROGDOWNLD_DEFAULT_STATUSREPORT_INTERVAL_MSEC; ++ m_pPrgDnldStatusMgr->SetStatusUpdateGranularityMsec( ++ m_ulCurStatusUpdateGranularity); ++ } ++ } ++ else if (!GetGlobal()->g_bOnBeginOccurred) ++ { ++ if (HXR_OK == m_pPrgDnldStatusMgr->SetStatusUpdateGranularityMsec( ++ m_ulCurStatusUpdateGranularity)) ++ { ++ m_bInitialPrerollUpateGranularitySet = TRUE; ++ } ++ } ++ } ++ ++ UINT32 ulCurPlayTime = 0; ++ ++ HXBOOL bPauseWasAttempted = FALSE; ++ HXBOOL bPauseOccurred = FALSE; ++ HXBOOL bResumeWasAttempted = FALSE; ++ HXBOOL bResumeOccurred = FALSE; ++ ++ ++ if (m_pHXPlayer) ++ { ++ ulCurPlayTime = m_pHXPlayer->GetCurrentPlayTime(); ++ ++ if (GetGlobal()->g_bEnableSlowStart && ++ lTimeSurplus != HX_PROGDOWNLD_UNKNOWN_TIME_SURPLUS) ++ { ++ // /"slow start" is enabled so if we have run dry of data, ++ // pause and wait for more data: ++ if (!m_bPlayerIsPausedByThis) ++ { ++ if (!m_bDownloadIsComplete && lTimeSurplus<0) ++ { ++ // /Use a 1000-millisecond allowance for variation: ++ if (lTimeSurplus < -1000) ++ { ++ bPauseWasAttempted = TRUE; ++ bPauseOccurred = m_bPlayerIsPausedByThis = ++ (HXR_OK == m_pHXPlayer->Pause()); ++ } ++ } ++ } ++ else // /paused; see if we can resume yet: ++ { ++ if (lTimeSurplus > 0) ++ { ++ // /Use a 1000-millisecond allowance for variation: ++ if (lTimeSurplus > 1000) ++ { ++ bResumeWasAttempted = TRUE; ++ bResumeOccurred = (HXR_OK == m_pHXPlayer->Begin()); ++ m_bPlayerIsPausedByThis = !bResumeOccurred; ++ } ++ } ++ } ++ } ++ } ++ ++ if (GetGlobal()->bEnableVerboseMode && !m_bDownloadIsComplete) ++ { ++ STDOUT("\nDownload progress: (play time=%lu,", ++ ulCurPlayTime); ++ if (HX_PROGDOWNLD_UNKNOWN_TIME_SURPLUS == lTimeSurplus) ++ { ++ STDOUT(" UNKNOWN surplus|deficit)"); ++ } ++ else if (HX_PROGDOWNLD_MIN_TIME_SURPLUS == lTimeSurplus) ++ { ++ STDOUT(" deficit exceeds maximum"); ++ } ++ else if (HX_PROGDOWNLD_MAX_TIME_SURPLUS == lTimeSurplus) ++ { ++ STDOUT(" surplus exceeds maximum)"); ++ } ++ else ++ { ++ STDOUT(" surplus=%ld milliseconds)", lTimeSurplus); ++ } ++ if (HX_PROGDOWNLD_UNKNOWN_DURATION == ulNewDurSoFar) ++ { ++ STDOUT("\n\thave UNKNOWN"); ++ } ++ else ++ { ++ STDOUT("\n\thave %lu", ulNewDurSoFar); ++ } ++ ++ if (HX_PROGDOWNLD_UNKNOWN_DURATION != m_ulTotalDurReported) ++ { ++ STDOUT(" of %lu msec", m_ulTotalDurReported); ++ } ++ else ++ { ++ STDOUT(" of UNKNOWN msec of media"); ++ } ++ if (HX_PROGDOWNLD_UNKNOWN_FILE_SIZE != ulNewBytesSoFar) ++ { ++ STDOUT(" (%lu", ulNewBytesSoFar); ++ } ++ else ++ { ++ STDOUT(" (UNKNOWN"); ++ } ++ STDOUT(" bytes downloaded so far)\n", ulNewBytesSoFar); ++ ++ if (bPauseOccurred || bPauseWasAttempted) ++ { ++ STDOUT("# Waiting for more data: %splayback.\n " ++ " Should take %ld milliseconds before playback resumes.\n", ++ bPauseOccurred? "Pausing " : ++ (bPauseWasAttempted? "Failed attempting to pause " ++ : " "), -lTimeSurplus); ++ } ++ if (bResumeOccurred || bResumeWasAttempted) ++ { ++ STDOUT("# Data available: %splayback\n " ++ " Time surplus is now %ld", ++ bResumeOccurred? "Resuming " : ++ (bResumeWasAttempted? "Failed attempting to resume " ++ : " "), lTimeSurplus); ++ } ++ } ++ ++ m_bFirstPDStatusMessage = FALSE; ++ ++ return HXR_OK; ++} ++ ++/************************************************************************ ++ * Method: ++ * IHXPDStatusObserver::OnTotalDurChanged ++ * Purpose: ++ * This is a notification if the total file duration becomes known ++ * or becomes better-known during download/playback ++ * ++ * Note: pStreamSource can be NULL. This will be true when ++ * IHXPDStatusMgr calling this is upstream of the IHXStreamSource ++ * object. ++ */ ++STDMETHODIMP ++ExamplePDStatusObserver::OnTotalDurChanged( ++ IHXStreamSource* /*IN*/ /*NULL is valid value*/ pStreamSource, ++ UINT32 ulNewTotalDur) ++{ ++ m_ulTotalDurReported = ulNewTotalDur; ++ ++ if (GetGlobal()->bEnableVerboseMode) ++ { ++ STDOUT("\nOnTotalDurChanged(): to %lu milliseconds\n", ulNewTotalDur); ++ } ++ ++ return HXR_OK; ++} ++ ++/************************************************************************ ++ * Method: ++ * IHXPDStatusObserver::OnDownloadComplete ++ * ++ * Purpose: ++ * Notification that the entire file has been downloaded. ++ * ++ * Note: pStreamSource can be NULL. This will be true when ++ * IHXPDStatusMgr calling this is upstream of the IHXStreamSource ++ * object. ++ * ++ */ ++STDMETHODIMP ++ExamplePDStatusObserver::OnDownloadComplete( ++ IHXStreamSource* /*IN*/ /*NULL is valid value*/ pStreamSource) ++{ ++ m_bDownloadIsComplete = TRUE; ++ ++ HXBOOL bResumeWasAttempted = FALSE; ++ HXBOOL bResumeOccurred = FALSE; ++ ++ // /In case we're paused, resume now that there is no more data to get: ++ if (m_pHXPlayer && m_bPlayerIsPausedByThis) ++ { ++ bResumeWasAttempted = TRUE; ++ bResumeOccurred = (HXR_OK == m_pHXPlayer->Begin()); ++ m_bPlayerIsPausedByThis = !bResumeOccurred; ++ } ++ ++ if (GetGlobal()->bEnableVerboseMode) ++ { ++ STDOUT("\nOnDownloadComplete()\n"); ++ if (bResumeOccurred || bResumeWasAttempted) ++ { ++ STDOUT("\n%splayback now that bytes are available for " ++ "uninterrupted playback\n", ++ bResumeOccurred? "Resuming " : ++ (bResumeWasAttempted? "Failed attempting to resume " ++ : " ")); ++ } ++ } ++ ++ return HXR_OK; ++} ++ ++/************************************************************************ ++ * Method: ++ * IHXPDStatusObserver::SrcClaimsSeekSupport ref: hxprdnld.h ++ * Purpose: ++ * Passes along notification from file sys that seek support ++ * is or is not claimed to be available (although sometimes HTTP ++ * server claims this when it doesn't actually support it). ++ */ ++STDMETHODIMP ++ExamplePDStatusObserver::SrcClaimsSeekSupport(IHXStreamSource* pStreamSource, ++ HXBOOL bClaimsSupport) ++{ ++ if (GetGlobal()->bEnableVerboseMode) ++ { ++ STDOUT("\nSrcClaimsSeekSupport(%sE)\n", bClaimsSupport?"TRU":"FALS"); ++ } ++ return HXR_OK; ++} ++ ++ ++/************************************************************************ ++ * Method: ++ * IHXPDStatusObserver::OnDownloadPause ++ * Purpose: ++ * Notification that the file-download process has purposefully ++ * and temporarily halted downloading of the file ++ * ++ * Note: pStreamSource can be NULL. This will be true when ++ * IHXPDStatusMgr calling this is upstream of the IHXStreamSource ++ * object. ++ */ ++STDMETHODIMP ++ExamplePDStatusObserver::OnDownloadPause( ++ IHXStreamSource* /*IN*/ /*NULL is valid value*/ pStreamSource) ++{ ++ if (GetGlobal()->bEnableVerboseMode) ++ { ++ STDOUT("\nOnDownloadPause()\n"); ++ } ++ return HXR_OK; ++} ++ ++/************************************************************************ ++ * Method: ++ * IHXPDStatusObserver::OnDownloadResume ++ * Purpose: ++ * Notification that the file-download process has resumed ++ * the process of downloading the remainder of the file ++ * ++ * Note: pStreamSource can be NULL. This will be true when ++ * IHXPDStatusMgr calling this is upstream of the IHXStreamSource ++ * object. ++ */ ++STDMETHODIMP ++ExamplePDStatusObserver::OnDownloadResume( ++ IHXStreamSource* /*IN*/ /*NULL is valid value*/ pStreamSource) ++{ ++ if (GetGlobal()->bEnableVerboseMode) ++ { ++ STDOUT("\nOnDownloadResume()\n"); ++ } ++ return HXR_OK; ++} ++// /#endif // /HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS. +Index: helix-libs/clientapps/clutter/exprdnld.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exprdnld.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,196 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef _EXPRDNLD_H_ ++#define _EXPRDNLD_H_ ++ ++// /#if defined(HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS) ++ ++/**************************************************************************** ++ * ++ * Class: ++ * ++ * ExamplePDStatusObserver ++ * ++ * Purpose: ++ * ++ * Implementation for IHXPDStatusObserver which receives progressive- ++ * download status reports: ++ * ++ */ ++class ExamplePDStatusObserver : ++ public IHXPDStatusObserver ++{ ++private: ++ INT32 m_lRefCount; ++ IHXPDStatusMgr* m_pPrgDnldStatusMgr; ++ IUnknown* m_pUnkPlayer; ++ IHXPlayer* m_pHXPlayer; ++ HXBOOL m_bPlayerIsPausedByThis; ++ HXBOOL m_bFirstPDStatusMessage; ++ UINT32 m_ulTotalDurReported; ++ UINT32 m_ulDurSoFar; ++ UINT32 m_ulCurStatusUpdateGranularity; ++ HXBOOL m_bInitialPrerollUpateGranularitySet; ++ HXBOOL m_bDownloadIsComplete; ++ ++ ExamplePDStatusObserver(); ++ ~ExamplePDStatusObserver(); ++ ++public: ++ ExamplePDStatusObserver(IUnknown* pUnkPlayer); ++ ++ /* ++ * IUnknown methods ++ */ ++ STDMETHOD(QueryInterface) (THIS_ ++ REFIID riid, ++ void** ppvObj); ++ ++ STDMETHOD_(ULONG32,AddRef) (THIS); ++ ++ STDMETHOD_(ULONG32,Release) (THIS); ++ ++ /* ++ * IHXPDStatusObserver methods ++ */ ++ ++ /************************************************************************ ++ * Method: ++ * IHXPDStatusObserver::OnDownloadProgress ++ * ++ * Purpose: ++ * Notification from IHXPDStatusMgr of download progress when ++ * file size changes. ++ * ++ * lTimeSurplus: ++ * - When negative, the absolute value of it is the estimated number ++ * of milliseconds of wall-clock time that need to pass while ++ * downloading continues before reaching the point at which playback ++ * can resume and play the remainder of the stream without having to ++ * buffer, assuming that playback is paused and remains so during ++ * that period. ++ * - When positive, it is the estimated number of milliseconds of ++ * wall-clock time between when the download should complete and when ++ * the natural content play-out duration will be reached, assuming ++ * playback is currently progressing and that no pause will occur. ++ * ++ * Note: ulNewDurSoFar can be HX_PROGDOWNLD_UNKNOWN_DURATION if the ++ * IHXMediaBytesToMediaDurConverter was not available to, or was ++ * unable to convert the bytes to a duration for the IHXPDStatusMgr ++ * calling this: ++ */ ++ STDMETHOD(OnDownloadProgress) (THIS_ ++ IHXStreamSource* /*IN*/ /*NULL is valid value*/ pStreamSource, ++ UINT32 /*IN*/ ulNewDurSoFar, ++ UINT32 /*IN*/ ulNewBytesSoFar, ++ INT32 /*IN*/ lTimeSurplus); ++ ++ /************************************************************************ ++ * Method: ++ * IHXPDStatusObserver::OnTotalDurChanged ++ * Purpose: ++ * This is a notification if the total file duration becomes known ++ * or becomes better-known during download/playback ++ * ++ * Note: pStreamSource can be NULL. This will be true when ++ * IHXPDStatusMgr calling this is upstream of the IHXStreamSource ++ * object. ++ */ ++ STDMETHOD(OnTotalDurChanged) (THIS_ ++ IHXStreamSource* /*IN*/ /*NULL is valid value*/ pStreamSource, ++ UINT32 /*IN*/ ulNewDur); ++ ++ /************************************************************************ ++ * Method: ++ * IHXPDStatusObserver::OnDownloadComplete ++ * ++ * Purpose: ++ * Notification that the entire file has been downloaded. ++ * ++ * Note: pStreamSource can be NULL. This will be true when ++ * IHXPDStatusMgr calling this is upstream of the IHXStreamSource ++ * object. ++ * ++ */ ++ STDMETHOD(OnDownloadComplete) (THIS_ ++ IHXStreamSource* /*IN*/ /*NULL is valid value*/ pStreamSource); ++ ++ /************************************************************************ ++ * Method: ++ * IHXPDStatusObserver::SrcClaimsSeekSupport ++ * ++ * Purpose: ++ * Passes along notification from file sys that seek support ++ * is claimed to be available (although sometimes HTTP server ++ * claims this when it doesn't actually support it). ++ * ++ */ ++ STDMETHOD(SrcClaimsSeekSupport) (THIS_ ++ IHXStreamSource* pStreamSource, ++ HXBOOL /*IN*/ bSrcClaimsSeekSupport); ++ ++ /************************************************************************ ++ * Method: ++ * IHXPDStatusObserver::OnDownloadPause ++ * Purpose: ++ * Notification that the file-download process has purposefully ++ * and temporarily halted downloading of the file ++ * ++ * Note: pStreamSource can be NULL. This will be true when ++ * IHXPDStatusMgr calling this is upstream of the IHXStreamSource ++ * object. ++ */ ++ STDMETHOD(OnDownloadPause) (THIS_ ++ IHXStreamSource* /*IN*/ /*NULL is valid value*/ pStreamSource); ++ ++ /************************************************************************ ++ * Method: ++ * IHXPDStatusObserver::OnDownloadResume ++ * Purpose: ++ * Notification that the file-download process has resumed ++ * the process of downloading the remainder of the file ++ * ++ * Note: pStreamSource can be NULL. This will be true when ++ * IHXPDStatusMgr calling this is upstream of the IHXStreamSource ++ * object. ++ */ ++ STDMETHOD(OnDownloadResume) (THIS_ ++ IHXStreamSource* /*IN*/ /*NULL is valid value*/ pStreamSource); ++}; ++// /#endif // /HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS. ++ ++#endif // _EXPRDNLD_H_ ++ +Index: helix-libs/clientapps/clutter/exroot.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exroot.cpp 2008-10-13 06:54:08.000000000 -0700 +@@ -0,0 +1,672 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Source last modified: $Id: unixroot.cpp,v 1.9 2007/07/06 20:54:01 jfinnecy Exp $ ++ * ++ * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, ++ * are subject to the current version of the RealNetworks Public ++ * Source License (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the current version of the RealNetworks Community ++ * Source License (the "RCSL") available at ++ * http://www.helixcommunity.org/content/rcsl, in which case the RCSL ++ * will apply. You may also obtain the license terms directly from ++ * RealNetworks. You may not use this file except in compliance with ++ * the RPSL or, if you have a valid RCSL with RealNetworks applicable ++ * to this file, the RCSL. Please see the applicable RPSL or RCSL for ++ * the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * Alternatively, the contents of this file may be used under the ++ * terms of the GNU General Public License Version 2 (the ++ * "GPL") in which case the provisions of the GPL are applicable ++ * instead of those above. If you wish to allow use of your version of ++ * this file only under the terms of the GPL, and not to allow others ++ * to use your version of this file under the terms of either the RPSL ++ * or RCSL, indicate your decision by deleting the provisions above ++ * and replace them with the notice and other provisions required by ++ * the GPL. If you do not delete the provisions above, a recipient may ++ * use your version of this file under the terms of any one of the ++ * RPSL, the RCSL or the GPL. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the ++ * portions it created. ++ * ++ * This file, and the files included with this file, is distributed ++ * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY ++ * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ++ * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ++ * ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++// for shared memory ++#include ++#include ++#include ++#include ++ ++#include "hxcom.h" ++#include "hxwintyp.h" ++#include "hxvsurf.h" ++#include "hxslist.h" ++#include "colormap.h" ++#include "hxprefs.h" ++#include "hxtick.h" ++#include "hxthread.h" ++#include "basesite.h" ++#include "exroot.h" ++#include "exsite.h" ++#include "unixcmap.h" ++#include "shmhelp.h" ++ ++// #ifdef _DEBUG ++// #include //for debug video sync rates.. ++// #endif ++ ++//Work around AIX problem. ++#ifdef _AIX ++# define MAX_SHARED_REGIONS ((UINT32)1) ++#else ++# define MAX_SHARED_REGIONS ((UINT32)9999) ++#endif ++ ++CExRootSurf::CExRootSurf(IUnknown* pContext, CHXBaseSite* pSite, on_new_frame_cb_t on_new_frame_cb, void *context ) ++ : CBaseRootSurface(pContext, pSite) ++ , m_bUseShm(FALSE) ++ , m_nShmId(0) ++ , m_pDisplay(NULL) ++ , m_GC(0) ++ , m_nScreenNumber(0) ++ , m_pXImage(NULL) ++ , m_pVisual(NULL) ++ , m_unDepth(0) ++ , m_pScreen(NULL) ++ , m_pYUVScratchBits(NULL) ++ , m_nYUVScratchPitch(0) ++ , m_pScratchBits(NULL) ++ , m_nScratchPitch(0) ++ , m_nBitsPerPixel(0) ++ , m_nCompositionSize(0) ++ , m_on_new_frame_cb(on_new_frame_cb) ++ , m_context(context) ++{ ++} ++ ++HX_RESULT CExRootSurf::Init() ++{ ++ //get window and display from main Site. ++ HXxWindow* pWindow = m_pSite->GetWindow(); ++ HX_ASSERT(pWindow); ++ ++ m_pDisplay = (Display*)pWindow->display; ++ m_window = (Window)pWindow->window; ++ ++ HX_ASSERT( m_pDisplay ); ++ HX_ASSERT( m_window ); ++ ++ // ++ // Now see if our X11 server supports the Shared Memory extension. ++ // ++ // ShmHelp::Init(m_pDisplay); ++ // m_bUseShm = ShmHelp::ShmAvailable(); ++ ++ //Create the graphics context ++ XGCValues values; ++ ++ XLockDisplay(m_pDisplay); ++ m_GC = XCreateGC(m_pDisplay, m_window, 0, &values); ++ ++ //Get X window attributes & visual ++ XWindowAttributes attr; ++ XGetWindowAttributes(m_pDisplay, m_window, &attr); ++ XUnlockDisplay(m_pDisplay); ++ m_pVisual = attr.visual; ++ ++ // get visual info & depth ++ int nv=0; ++ XVisualInfo visInfo; ++ memset(&visInfo, 0, sizeof(XVisualInfo)); ++ XLockDisplay(m_pDisplay); ++ visInfo.visualid = XVisualIDFromVisual(m_pVisual); ++ XVisualInfo* pVisualInfo = XGetVisualInfo (m_pDisplay, VisualIDMask, &visInfo, &nv); ++// m_unDepth = pVisualInfo->depth; ++ m_unDepth = 24; ++ m_nScreenNumber = DefaultScreen(m_pDisplay); ++ m_pScreen = XScreenOfDisplay(m_pDisplay, m_nScreenNumber); ++ XUnlockDisplay(m_pDisplay); ++ m_colormap = HXGetXColormap(m_pDisplay, m_window); ++ ++ // get pixmap (blt) information for the best depth we can display ++ int i=0; ++ int nNum=0; ++ XLockDisplay(m_pDisplay); ++ XPixmapFormatValues *pixmap_formats = XListPixmapFormats(m_pDisplay, &nNum); ++ XUnlockDisplay(m_pDisplay); ++ if(pixmap_formats) ++ { ++ for (i=0 ; ired_mask; ++ m_bmiSave.un.dwBitMask[1] = pVisualInfo->green_mask; ++ m_bmiSave.un.dwBitMask[2] = pVisualInfo->blue_mask; ++#else ++ /* Fake a RGB24 */ ++ m_nBitsPerPixel = 24; ++ m_bmiSave.bmiHeader.biBitCount = m_nBitsPerPixel; ++ m_bmiSave.bmiHeader.biCompression = BI_RGB; ++#endif ++ //Set primary surface CID. ++ m_nCompositionSurfaceCID = GetBitmapColor(&m_bmiSave); ++ XFree( pVisualInfo ); ++ ++// #ifdef _DEBUG ++// //Lets find out what Hsync and Vsync rates we have for this display. ++// //Ripped from xvidtune.c ++// XF86VidModeModeLine mode_line; ++// int scrn=0; ++// int dot_clock; ++// double vsync_hz, HSyncRate,HTotal, VTotal, PixelClock; ++// if(XF86VidModeGetModeLine(m_pDisplay, scrn, &dot_clock, &mode_line)) ++// { ++// PixelClock=dot_clock; ++// HTotal = mode_line.htotal; ++// VTotal = mode_line.vtotal; ++// HSyncRate = PixelClock*1000.0/HTotal; ++// vsync_hz = HSyncRate/VTotal; ++// fprintf( stderr, "This Display's Hsync rate is: %f and Vsync: %f\n", ++// HSyncRate, vsync_hz ); ++// } ++ ++// #endif ++ ++ return HXR_OK; ++} ++ ++CExRootSurf::~CExRootSurf() ++{ ++ _DestroyCompositionSurface(); ++ ++ if( m_GC ) ++ { ++ XLockDisplay(m_pDisplay); ++ XFreeGC( m_pDisplay, m_GC ); ++ XUnlockDisplay(m_pDisplay); ++ m_GC=0; ++ } ++ if (m_pVisual) ++ { ++ /* PJG: don't have to free visuals */ ++ m_pVisual = NULL; ++ } ++ ++ if(m_bUseShm) ++ { ++ if( m_pCompositionSurface != NULL ) ++ ShmHelp::DetachSharedRegion(&m_pCompositionSurface, &m_shmInfo); ++ } ++ else ++ { ++ HX_DELETE(m_pCompositionSurface); ++ m_nCompositionSize=0; ++ m_bCompositionSurfaceCreated=FALSE; ++ } ++ ++ //XXXgfw any more clean up for these two? ++ HX_VECTOR_DELETE( m_pScratchBits ); ++ HX_VECTOR_DELETE( m_pYUVScratchBits ); ++ ++} ++ ++HX_RESULT CExRootSurf::_ResizeVideoBuffer( INT32 nSize) ++{ ++ HX_RESULT retVal=HXR_OK; ++ ++ if(nSize <= m_nCompositionSize) ++ return retVal; ++ ++ if(m_bUseShm) ++ { ++ if( m_pCompositionSurface != NULL ) ++ retVal = ShmHelp::DetachSharedRegion(&m_pCompositionSurface, &m_shmInfo); ++ if( retVal==HXR_OK ) ++ { ++ retVal = ShmHelp::CreateSharedRegion( nSize, ++ &m_pCompositionSurface, ++ &m_nShmId, ++ &m_shmInfo ++ ); ++ ++ } ++ if( retVal != HXR_OK ) ++ { ++ m_bCompositionSurfaceCreated = FALSE; ++ m_nCompositionSize = 0; ++ m_bUseShm = FALSE; ++ } ++ else ++ { ++ //It all worked ++ m_nCompositionSize = nSize; ++ m_bCompositionSurfaceCreated = TRUE; ++ return retVal; ++ } ++ ++ } ++ ++ //We need to fall through here so that if the shared memory stuff ++ //above fails we can create it the old fashioned way. ++ if(m_pCompositionSurface == NULL) ++ { ++ m_pCompositionSurface = (UCHAR*) malloc(nSize); ++ } ++ else ++ { ++ m_pCompositionSurface = (UCHAR*) realloc(m_pCompositionSurface, nSize); ++ } ++ if( m_pCompositionSurface ) ++ { ++ m_nCompositionSize = nSize; ++ } ++ else ++ { ++ HX_ASSERT("We can't alloc the composition surface." == NULL ); ++ m_nCompositionSize = 0; ++ } ++ ++ return retVal; ++} ++ ++HX_RESULT CExRootSurf::_DebugBlt( UCHAR* pImageData, HXBitmapInfoHeader* pBitmapInfo, ++ HXxRect& rDestRect, HXxRect& rSrcRect) ++{ ++ HX_ASSERT( m_window ); ++ HX_ASSERT( m_pDisplay ); ++ HX_ASSERT( m_GC ); ++ XLockDisplay(m_pDisplay); ++ XSetForeground( m_pDisplay, m_GC, WhitePixel(m_pDisplay, 0 )); ++ XSetBackground( m_pDisplay, m_GC, BlackPixel(m_pDisplay, 0 )); ++ XSetLineAttributes(m_pDisplay, m_GC, 5, LineSolid, CapRound, JoinRound ); ++ XSetForeground( m_pDisplay, m_GC, WhitePixel(m_pDisplay, 0) ); ++ XFillRectangle( m_pDisplay, m_window, m_GC, ++ rDestRect.left, rDestRect.top, ++ rDestRect.right-rDestRect.left, ++ rDestRect.bottom-rDestRect.top ++ ); ++ XDrawRectangle( m_pDisplay, m_window, m_GC, ++ rDestRect.left, rDestRect.top, ++ rDestRect.right-rDestRect.left, ++ rDestRect.bottom-rDestRect.top ++ ); ++ XUnlockDisplay(m_pDisplay); ++ return HXR_OK; ++} ++ ++void CExRootSurf::_GetYUVScratchWidthHeight(UINT32* pWidth, UINT32* pHeight) ++{ ++ *pWidth = m_bmiYUVScratch.bmiHeader.biWidth; ++ *pHeight = m_bmiYUVScratch.bmiHeader.biHeight; ++} ++ ++XImage* CExRootSurf::_GetCompositionSurfaceDrawable() ++{ ++ return m_pXImage; ++} ++ ++ ++ ++//Not used except for XING..... ++void CExRootSurf::_CreateYUVScratchSurface(UINT32 width, UINT32 height) ++{ ++ //Remove old bits.... ++ HX_DELETE(m_pYUVScratchBits); ++ ++ //Clear BitmapInfo struct.... ++ memset(&m_bmiYUVScratch, 0, sizeof(HXBitmapInfo)); ++ int nResult = MakeBitmap( &m_bmiYUVScratch, ++ sizeof(m_bmiYUVScratch), ++ CID_YUY2, ++ width, ++ height, ++ NULL, ++ 0); ++ if( nResult ) ++ { ++ m_pYUVScratchBits = new UCHAR[m_bmiYUVScratch.bmiHeader.biSizeImage]; ++ m_nYUVScratchPitch = GetBitmapPitch(&m_bmiYUVScratch); ++ } ++} ++ ++ ++void CExRootSurf::_GetYUVScratchSurfacePointer(UCHAR** pYUVBits, INT32* YUVPitch) ++{ ++ *pYUVBits = m_pYUVScratchBits; ++ *YUVPitch = m_nYUVScratchPitch; ++} ++ ++HX_RESULT CExRootSurf::CreateScratchSurface( int nCompositionSurfaceCID, HXxSize* pSize) ++{ ++ //Remove old bits.... ++ HX_DELETE(m_pScratchBits); ++ ++ //Clear BitmapInfo struct.... ++ memset(&m_bmiScratch, 0, sizeof(HXBitmapInfo)); ++ int nResult = MakeBitmap( &m_bmiScratch, ++ sizeof(m_bmiScratch), ++ nCompositionSurfaceCID, ++ pSize->cx, ++ pSize->cy, ++ NULL, ++ 0); ++ if( nResult ) ++ { ++ m_pScratchBits = new UCHAR[m_bmiScratch.bmiHeader.biSizeImage]; ++ m_nScratchPitch = GetBitmapPitch(&m_bmiScratch); ++ } ++ ++ return nResult? HXR_OK : HXR_FAIL; ++} ++ ++HX_RESULT CExRootSurf::ScratchLock(UCHAR** pBits, INT32* pPitch) ++{ ++ *pBits = m_pScratchBits; ++ *pPitch = m_nScratchPitch; ++ return HXR_OK; ++} ++ ++HX_RESULT CExRootSurf::ScratchUnlock(UCHAR* pBits) ++{ ++ return HXR_OK; ++} ++ ++HX_RESULT CExRootSurf::_MinimalUnlock(HXxWindow* pWindow) ++{ ++// Window win = m_window; ++// HX_ASSERT(win); ++// HXxSize hxxSize; ++// m_pSite->GetSize(hxxSize); ++ ++// if (m_bUseShm) ++// { ++// XShmPutImage(m_pDisplay, ++// win, ++// m_GC, ++// m_pXImage, ++// 0, ++// 0, ++// 0, ++// 0, ++// hxxSize.cx, ++// hxxSize.cy, ++// False ++// ); ++// } ++// else ++// { ++// XPutImage(m_pDisplay, ++// win, ++// m_GC, ++// m_pXImage, ++// 0, ++// 0, ++// 0, ++// 0, ++// hxxSize.cx, ++// hxxSize.cy ++// ); ++// } ++ return HXR_OK; ++} ++ ++HX_RESULT CExRootSurf::_LockComposition(UCHAR** pBits, INT32* pPitch) ++{ ++ HX_RESULT retVal = HXR_OK; ++ if( !m_bCompositionSurfaceCreated || m_pCompositionSurface==NULL ) ++ { ++ retVal = _CreateCompositionSurface(); ++ } ++ HX_ASSERT( m_pCompositionSurface ); ++ *pBits = m_pCompositionSurface; ++ *pPitch = m_nCompositionPitch; ++ return HXR_OK; ++} ++ ++ ++void CExRootSurf::_BltFromScratchToComposition( HXxRect& rDestRect, HXxRect& rSrcRect) ++{ ++ HX_ASSERT( "Not implemented on unix yet...."==NULL ); ++} ++ ++HX_RESULT CExRootSurf::_CreateCompositionSurface() ++{ ++ HX_RESULT retVal = HXR_FAIL; ++ ++ if(m_bCompositionSurfaceCreated) ++ { ++ return HXR_OK; ++ } ++ ++ HX_ASSERT( !m_bCompositionSurfaceCreated ); ++ HX_ASSERT( m_pSite ); ++ ++ //Create a BMI to describe the composition surface ++ HXxSize hxxSize; ++ m_pSite->GetSize(hxxSize); ++ memcpy(&m_compositionSize, &hxxSize, sizeof(HXxSize)); /* Flawfinder: ignore */ ++ ++ // find out how big we want to allocate. ++ if (m_pSite->IsFullScreen()) ++ { ++ UINT16 unDummy=0; ++ UINT16 unHorzRes=0; ++ UINT16 unVertRes=0; ++ m_pSite->_GetDeviceCaps(NULL, unDummy, unHorzRes, unVertRes ); ++ m_allocatedCompositionSize.cx = unHorzRes; ++ m_allocatedCompositionSize.cy = unVertRes; ++ } ++ else ++ { ++ // we use root surface for BASIC_BLT and it assumes the offset(position) ++ // of the root site it cooresponding to is (0, 0). ++ // ++ // this is not true for "windowless" mode where the root site can be given ++ // an offset, as a result, we fail to blt the video. ++ // ++ // to fix this, we'll take the m_positionOrg into consideration when ++ // creating the composition surface, this may not be optimal but good enough ++ // for now. ++ // ++ // similar logic is also added for other platforms, we need to move this ++ // common code to the base class when we have chance to clean it up ++ if (m_compositionSize.cx && m_compositionSize.cy) ++ { ++ m_compositionSize.cx += m_pSite->m_positionOrig.x; ++ m_compositionSize.cy += m_pSite->m_positionOrig.y; ++ } ++ ++ m_allocatedCompositionSize.cx = m_compositionSize.cx; ++ m_allocatedCompositionSize.cy = m_compositionSize.cy; ++ } ++ ++ //XXXgfw uhhhh, OK. ++ if( m_compositionSize.cx > m_allocatedCompositionSize.cx || ++ m_compositionSize.cy > m_allocatedCompositionSize.cy ) ++ { ++ m_allocatedCompositionSize.cx = m_compositionSize.cx; ++ m_allocatedCompositionSize.cy = m_compositionSize.cy; ++ } ++ ++ //Make the bitmap header struct. ++ m_bmiComposition.bmiHeader.biBitCount = m_bmiSave.bmiHeader.biBitCount; ++ m_bmiComposition.bmiHeader.biCompression = m_bmiSave.bmiHeader.biCompression; ++ m_bmiComposition.un.dwBitMask[0] = m_bmiSave.un.dwBitMask[0]; ++ m_bmiComposition.un.dwBitMask[1] = m_bmiSave.un.dwBitMask[1]; ++ m_bmiComposition.un.dwBitMask[2] = m_bmiSave.un.dwBitMask[2]; ++ int nResult = MakeBitmap( &m_bmiComposition, ++ sizeof(m_bmiComposition), ++ m_nCompositionSurfaceCID, ++ m_allocatedCompositionSize.cx, ++ m_allocatedCompositionSize.cy, ++ NULL, ++ 0 ++ ); ++ m_bmiComposition.bmiHeader.biBitCount = m_bmiSave.bmiHeader.biBitCount; ++ m_bmiComposition.bmiHeader.biCompression = m_bmiSave.bmiHeader.biCompression; ++ m_bmiComposition.un.dwBitMask[0] = m_bmiSave.un.dwBitMask[0]; ++ m_bmiComposition.un.dwBitMask[1] = m_bmiSave.un.dwBitMask[1]; ++ m_bmiComposition.un.dwBitMask[2] = m_bmiSave.un.dwBitMask[2]; ++ ++ //Now create the bits.... ++ _ResizeVideoBuffer( m_bmiComposition.bmiHeader.biSizeImage ); ++ m_nCompositionPitch = GetBitmapPitch( &m_bmiComposition ); ++ ++ if( m_pXImage ) ++ { ++ XFree( m_pXImage ); ++ } ++ ++ if( m_bUseShm ) ++ { ++ XLockDisplay(m_pDisplay); ++ m_pXImage = XShmCreateImage( m_pDisplay, ++ m_pVisual, ++ m_unDepth, ++ ZPixmap, ++ (char*)m_pCompositionSurface, ++ &m_shmInfo, ++ m_allocatedCompositionSize.cx, ++ m_allocatedCompositionSize.cy ++ ); ++ XUnlockDisplay(m_pDisplay); ++ } ++ else ++ { ++ XLockDisplay(m_pDisplay); ++ m_pXImage = XCreateImage( m_pDisplay, ++ m_pVisual, ++ m_unDepth, ++ ZPixmap, ++ 0, ++ (char*)m_pCompositionSurface, ++ m_allocatedCompositionSize.cx, ++ m_allocatedCompositionSize.cy, ++ 32, ++ 0); ++ XUnlockDisplay(m_pDisplay); ++ } ++ ++ if( m_pXImage ) ++ { ++ m_bCompositionSurfaceCreated = TRUE; ++#ifdef _BIG_ENDIAN ++ m_pXImage->byte_order = MSBFirst; ++#else ++ m_pXImage->byte_order = LSBFirst; ++#endif ++ retVal = HXR_OK; ++ } ++ return retVal; ++} ++ ++void CExRootSurf::_MinimalBlt(HXxRect& destRect) ++{ ++ if (m_on_new_frame_cb) ++ { ++ PlayerImgInfo Info; ++ Info.Rect.left = destRect.left; ++ Info.Rect.right = destRect.right; ++ Info.Rect.top = destRect.top; ++ Info.Rect.bottom = destRect.bottom; ++ Info.cx = m_allocatedCompositionSize.cx; ++ Info.cy = m_allocatedCompositionSize.cy; ++ m_on_new_frame_cb(m_pCompositionSurface, ++ m_bmiComposition.bmiHeader.biSizeImage, ++ &Info, ++ m_context); ++ } ++} ++ ++HX_RESULT CExRootSurf::_DestroyCompositionSurface() ++{ ++ HX_RESULT retVal = HXR_OK; ++ if( m_bCompositionSurfaceCreated ) ++ { ++ if( m_pXImage ) ++ { ++ XFree(m_pXImage); ++ m_pXImage = NULL; ++ } ++ m_bCompositionSurfaceCreated = FALSE; ++ } ++ ++ return retVal; ++} ++ ++ ++ ++HX_RESULT CExRootSurf::BeginOptimizedBlt(HXBitmapInfoHeader* pBitmapInfo) ++{ ++#ifdef _DEBUG ++ fprintf(stderr, "CExRootSurf::BeginOptimizedBlt Needs to be written\n" ); ++#endif ++ return HXR_NOTIMPL; ++} ++ ++HX_RESULT CExRootSurf::OptimizedBlt( UCHAR* pImageBits, ++ HXxRect& rDestRect, ++ HXxRect& rSrcRect) ++{ ++#ifdef _DEBUG ++ fprintf(stderr, "CExRootSurf::OptimizedBlt Needs to be written\n" ); ++#endif ++ return HXR_NOTIMPL; ++} ++ ++HX_RESULT CExRootSurf::EndOptimizedBlt(void) ++{ ++#ifdef _DEBUG ++ fprintf(stderr, "CExRootSurf::EndOptimizedBlt Needs to be written\n" ); ++#endif ++ return HXR_NOTIMPL; ++} ++ ++HX_RESULT CExRootSurf::GetOptimizedFormat(HX_COMPRESSION_TYPE& ulType) ++{ ++#ifdef _DEBUG ++ fprintf(stderr, "CExRootSurf::GetOptimizedFormat Needs to be written\n" ); ++#endif ++ return HXR_NOTIMPL; ++} ++ ++HX_RESULT CExRootSurf::GetPreferredFormat(HX_COMPRESSION_TYPE& ulType) ++{ ++#ifdef _DEBUG ++ fprintf(stderr, "CExRootSurf::GetPreferredFormat Needs to be written\n" ); ++#endif ++ return HXR_NOTIMPL; ++} ++ ++GC CExRootSurf::GetGC() ++{ ++ return m_GC; ++} +Index: helix-libs/clientapps/clutter/exroot.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exroot.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,155 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Source last modified: $Id: unixroot.h,v 1.8 2007/07/06 20:54:05 jfinnecy Exp $ ++ * ++ * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, ++ * are subject to the current version of the RealNetworks Public ++ * Source License (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the current version of the RealNetworks Community ++ * Source License (the "RCSL") available at ++ * http://www.helixcommunity.org/content/rcsl, in which case the RCSL ++ * will apply. You may also obtain the license terms directly from ++ * RealNetworks. You may not use this file except in compliance with ++ * the RPSL or, if you have a valid RCSL with RealNetworks applicable ++ * to this file, the RCSL. Please see the applicable RPSL or RCSL for ++ * the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * Alternatively, the contents of this file may be used under the ++ * terms of the GNU General Public License Version 2 (the ++ * "GPL") in which case the provisions of the GPL are applicable ++ * instead of those above. If you wish to allow use of your version of ++ * this file only under the terms of the GPL, and not to allow others ++ * to use your version of this file under the terms of either the RPSL ++ * or RCSL, indicate your decision by deleting the provisions above ++ * and replace them with the notice and other provisions required by ++ * the GPL. If you do not delete the provisions above, a recipient may ++ * use your version of this file under the terms of any one of the ++ * RPSL, the RCSL or the GPL. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the ++ * portions it created. ++ * ++ * This file, and the files included with this file, is distributed ++ * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY ++ * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ++ * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ++ * ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef _UNIXROOT_H ++#define _UNIXROOT_H ++ ++#include "baseroot.h" ++#if defined(USE_XWINDOWS) ++#include ++#include ++#include ++#include ++#include ++#include ++#endif ++ ++#include "player.h" ++ ++class CExRootSurf : public CBaseRootSurface ++{ ++public: ++ CExRootSurf(IUnknown* pContext, CHXBaseSite* pSite, on_new_frame_cb_t on_new_frame_cb = NULL, void *context = NULL); ++ ++ //Helpers.... ++ HX_RESULT Init(); ++ GC GetGC(); ++ ++ //public inherited stuff ++ virtual HX_RESULT CreateScratchSurface(int nCompositionSurfaceCID, ++ HXxSize* pSize); ++ virtual HX_RESULT ScratchLock(UCHAR** pBits, INT32* pPitch); ++ virtual HX_RESULT ScratchUnlock(UCHAR* pBits); ++ ++ virtual HX_RESULT BeginOptimizedBlt(HXBitmapInfoHeader* pBitmapInfo); ++ virtual HX_RESULT OptimizedBlt( UCHAR* pImageBits, ++ HXxRect& rDestRect, ++ HXxRect& rSrcRect); ++ virtual HX_RESULT EndOptimizedBlt(void); ++ virtual HX_RESULT GetOptimizedFormat(HX_COMPRESSION_TYPE& ulType); ++ virtual HX_RESULT GetPreferredFormat(HX_COMPRESSION_TYPE& ulType); ++ ++ XImage* _GetCompositionSurfaceDrawable(); ++ ++ //Shared Memory helper func for the basesurf to use. ++// HX_RESULT _DetachSharedRegion(); ++// HX_RESULT _CreateSharedRegion(INT32 nSize); ++ ++protected: ++ ++ //Smartly handle resizing of shm buffer. ++ HX_RESULT _ResizeVideoBuffer(INT32 nSize); ++ ++ //Inherited from CBaseRootSurface.... ++ virtual void _BltFromScratchToComposition(HXxRect& rDestRect, ++ HXxRect& rSrcRect); ++ virtual HX_RESULT _DebugBlt( UCHAR* pImageData, ++ HXBitmapInfoHeader* pBitmapInfo, ++ HXxRect& rDestRect, ++ HXxRect& rSrcRect); ++ virtual void _GetYUVScratchWidthHeight(UINT32* pWidth, UINT32* pHeight); ++ virtual void _CreateYUVScratchSurface(UINT32 width, UINT32 height); ++ virtual void _GetYUVScratchSurfacePointer(UCHAR** pYUVBits, INT32* YUVPitch); ++ virtual HX_RESULT _MinimalUnlock(HXxWindow* pWindow); ++ virtual HX_RESULT _LockComposition(UCHAR** pBits, INT32* pPitch); ++ virtual HX_RESULT _CreateCompositionSurface(); ++ virtual HX_RESULT _DestroyCompositionSurface(); ++ virtual void _MinimalBlt(HXxRect& dest); ++ ++ ++private: ++ ++ virtual ~CExRootSurf(); ++ ++ //Protect unintentional copy and default ctors. ++ CExRootSurf(); ++ CExRootSurf( const CExRootSurf& ); ++ CExRootSurf& operator=( const CExRootSurf& it ); ++ ++ //Shared memory members. ++ HXBOOL m_bUseShm; ++ XShmSegmentInfo m_shmInfo; ++ int m_nShmId; ++ ++ //General display and GC stuff. ++ Display* m_pDisplay; ++ GC m_GC; ++ int m_nScreenNumber; ++ XImage* m_pXImage; ++ Window m_window; ++ Visual* m_pVisual; ++ unsigned int m_unDepth; ++ Screen* m_pScreen; ++ Colormap m_colormap; ++ int m_nBitsPerPixel; ++ ++ //Bitmap stuff. ++ UCHAR* m_pYUVScratchBits; ++ HXBitmapInfo m_bmiYUVScratch; ++ int m_nYUVScratchPitch; ++ UCHAR* m_pScratchBits; ++ HXBitmapInfo m_bmiScratch; ++ int m_nScratchPitch; ++ HXBitmapInfo m_bmiSave; ++ ULONG32 m_nCompositionSize; ++ on_new_frame_cb_t m_on_new_frame_cb; ++ void * m_context; ++}; ++ ++#endif +Index: helix-libs/clientapps/clutter/exsite.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exsite.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,2915 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Source last modified: $Id: unixsite.cpp,v 1.18.2.6 2008/06/05 14:24:30 lovish Exp $ ++ * ++ * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, ++ * are subject to the current version of the RealNetworks Public ++ * Source License (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the current version of the RealNetworks Community ++ * Source License (the "RCSL") available at ++ * http://www.helixcommunity.org/content/rcsl, in which case the RCSL ++ * will apply. You may also obtain the license terms directly from ++ * RealNetworks. You may not use this file except in compliance with ++ * the RPSL or, if you have a valid RCSL with RealNetworks applicable ++ * to this file, the RCSL. Please see the applicable RPSL or RCSL for ++ * the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * Alternatively, the contents of this file may be used under the ++ * terms of the GNU General Public License Version 2 (the ++ * "GPL") in which case the provisions of the GPL are applicable ++ * instead of those above. If you wish to allow use of your version of ++ * this file only under the terms of the GPL, and not to allow others ++ * to use your version of this file under the terms of either the RPSL ++ * or RCSL, indicate your decision by deleting the provisions above ++ * and replace them with the notice and other provisions required by ++ * the GPL. If you do not delete the provisions above, a recipient may ++ * use your version of this file under the terms of any one of the ++ * RPSL, the RCSL or the GPL. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the ++ * portions it created. ++ * ++ * This file, and the files included with this file, is distributed ++ * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY ++ * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ++ * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ++ * ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * Phil Dibowitz ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef _UNIX ++#error This is the UNIX platform specific implementation. ++#endif ++ ++// ++// System includes... ++// ++#include ++#include "hlxclib/string.h" ++#if defined(USE_XWINDOWS) ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#endif ++ ++ ++// ++// RMA includes... ++// ++#include "hxcom.h" ++#include "hxcore.h" ++#include "hxevent.h" ++#include "hxwintyp.h" ++#include "hxwin.h" ++#include "hxsite2.h" ++#include "hxtypes.h" ++#include "exsite.h" ++#include "unixcmap.h" ++#include "visuals.h" ++#include "region.h" ++#include "basesurf.h" ++#include "exroot.h" ++#include "hxthread.h" ++#include "hxtick.h" ++#include "sitetext.h" ++ ++#include "unixsurf.h" ++ ++#include "hxprefs.h" ++ ++// ++// Global & Static global/member data.... ++// ++Display *CHXExSite::zm_display = NULL; ++static CHXMapPtrToPtr z_mapSiteToWindow; ++ ++// ++// Scroll bar support ++// ++#define SCROLL_BAR_WIDTH 13 //Width of scroll bar. ++//#define _ARROWS_SIDE_BY_SIDE 1 //Regular or side by side arrows? ++ ++ ++ ++ ++// ++// CHXExSite only Methods... ++// ++CHXExSite::CHXExSite( IUnknown* pContext, IUnknown* pUnkOuter, INT32 lInitialZorder, on_new_frame_cb_t on_new_frame_cb, void *context) ++ : CHXBaseSite( pContext, pUnkOuter, lInitialZorder ) ++ , m_pUnixEventHandler(NULL) ++ , m_ScrollHorizButtonL(0) ++ , m_ScrollHorizButtonR(0) ++ , m_ScrollVertButtonT(0) ++ , m_ScrollVertButtonB(0) ++ , m_winFullScreenWindow(0) ++ , m_winOldParent(0) ++ , m_bScrollingInProgress(FALSE) ++ , m_nScrollDir(0) ++ , m_bLastPointInSite(FALSE) ++ , m_bDamaged(FALSE) ++ , m_bIgnoreFocusOutInFS(FALSE) ++ , m_bReparent(FALSE) ++ , m_on_new_frame_cb(on_new_frame_cb) ++ , m_context(context) ++#if defined(HELIX_CONFIG_MOBLIN) ++ , m_pAttachWindowCallback(NULL) ++ , m_pForceRedrawCallback(NULL) ++#endif ++{ ++ m_ptScrollVertPosT.x = m_ptScrollVertPosT.y = 0; ++ m_ptScrollVertPosB.x = m_ptScrollVertPosB.y = 0; ++ m_ptScrollHorizPosR.x = m_ptScrollHorizPosR.y = 0; ++ m_ptScrollHorizPosL.x = m_ptScrollHorizPosL.y = 0; ++ m_ptFullScreenOffset.x = m_ptFullScreenOffset.y = 0; ++ memset( &m_PreFullScreenSize, 0, sizeof( m_PreFullScreenSize ) ); ++ ++ HX_ASSERT( m_pContext ); ++ ++ /* Replace m_pVideoSurface with my own */ ++/* HX_RELEASE(m_pVideoSurface); ++ m_pVideoSurface = new CUnixSurf(m_pContext, this); ++ HX_ASSERT( m_pVideoSurface ); ++ m_pVideoSurface->InitSurface(m_pContext); ++ m_pVideoSurface->AddRef(); ++*/ ++ IHXPreferences* pPreferences = NULL; ++ if( m_pContext && HXR_OK == m_pContext->QueryInterface( IID_IHXPreferences, (void **) &pPreferences)) ++ { ++ IHXBuffer *pBuffer = NULL; ++ pPreferences->ReadPref("IgnoreFocusOutInFS", pBuffer); ++ if(pBuffer) ++ { ++ m_bIgnoreFocusOutInFS = (::atoi((const char*)pBuffer->GetBuffer()) == 1); ++ HX_RELEASE(pBuffer); ++ } ++ } ++} ++ ++CHXExSite::~CHXExSite() ++{ ++#if defined(HELIX_CONFIG_MOBLIN) ++ RemovePendingCallback(m_pAttachWindowCallback); ++ HX_RELEASE(m_pAttachWindowCallback); ++ ++ RemovePendingCallback(m_pForceRedrawCallback); ++ HX_RELEASE(m_pForceRedrawCallback); ++#endif ++ void* pDummy; ++ if (z_mapSiteToWindow.Lookup((void*)this, pDummy)) ++ { ++ z_mapSiteToWindow.RemoveKey((void*)this); ++ } ++ ++ if( m_pUnixEventHandler ) ++ { ++ m_pUnixEventHandler->CancelCallback(); ++ HX_RELEASE(m_pUnixEventHandler); ++ } ++} ++ ++HX_RESULT CHXExSite::_OpenXDisplay(char* pszDisplayString) ++{ ++ HX_RESULT retVal = HXR_OK; ++ ++ //Is the connection open already? ++ if( NULL==zm_display ) ++ { ++ zm_display = XOpenDisplay(pszDisplayString); ++ ++ //If you can't open the display your done. ++ if(NULL == zm_display ) ++ { ++ HX_ASSERT("Can't open X Display..."==NULL); ++ retVal = HXR_FAIL; ++ } ++ else ++ { ++ HX_ASSERT(m_pScheduler); ++ if( m_pScheduler ) ++ { ++ //UnixEventHandler scheduls itself for init callback ++ //in the ctor. ++ m_pUnixEventHandler = new UnixEventHandler(this); ++ m_pUnixEventHandler->AddRef(); ++ } ++ } ++ } ++ return retVal; ++} ++ ++Window CHXExSite::CreateXWindow( Window win ) ++{ ++ Window parentWindow; ++ HXxWindow* pWindow = NULL; ++ //If parentWin is NULL then we belong to the root window. ++ if( win ) ++ { ++ parentWindow = win; ++ } ++ else ++ { ++ HX_ASSERT(zm_display); ++ XLockDisplay(zm_display); ++ parentWindow = RootWindow(zm_display, DefaultScreen(zm_display)); ++ XUnlockDisplay(zm_display); ++ } ++ ++ //Find the best visual to use on this display. ++ Visual* visual = GetBestVisual(zm_display); ++ ++ //Get the visual info. ++ int nNotUsed=0; ++ XVisualInfo stVisInfo; ++ ++ memset(&stVisInfo, 0, sizeof(XVisualInfo)); ++ stVisInfo.visualid = XVisualIDFromVisual(visual); ++ XLockDisplay(zm_display); ++ XVisualInfo* pVisual = XGetVisualInfo( zm_display, ++ VisualIDMask, ++ &stVisInfo, ++ &nNotUsed ); ++ XUnlockDisplay(zm_display); ++ ++ // Set up attributes of the window. ++ int attrMask = CWBackPixel | CWBorderPixel; ++ XSetWindowAttributes attr; ++ ++ memset(&attr, 0, sizeof(XSetWindowAttributes)); ++ XLockDisplay(zm_display); ++ attr.background_pixel = BlackPixel(zm_display, DefaultScreen(zm_display)); ++ attr.border_pixel = BlackPixel(zm_display, DefaultScreen(zm_display)); ++ XUnlockDisplay(zm_display); ++ ++ //See if the default visaul of hte screen is the same one we Want ++ //to use. If not, create a new one and install it. ++ Colormap cmap; ++ XLockDisplay(zm_display); ++ Visual* defVisual = DefaultVisual(zm_display, DefaultScreen(zm_display)); ++ XUnlockDisplay(zm_display); ++ if( defVisual->visualid != stVisInfo.visualid ) ++ { ++ //XXXgfw Are we leaking this colormap???? ++ XLockDisplay(zm_display); ++ cmap = XCreateColormap(zm_display, parentWindow, visual, AllocNone); ++ XUnlockDisplay(zm_display); ++ attr.colormap = cmap; ++ attrMask |= CWColormap; ++ } ++ ++ // Set the size/position of the window before creating. ++ XSizeHints size_hints; ++ ++ size_hints.flags = PPosition | PSize; ++ size_hints.x = m_position.x; ++ size_hints.y = m_position.y; ++ size_hints.width = 1; ++ size_hints.height = 1; ++ ++ //Create it. ++ XLockDisplay(zm_display); ++ Window window = XCreateWindow(zm_display, ++ parentWindow, ++ size_hints.x, ++ size_hints.y, ++ size_hints.width, ++ size_hints.height, ++ 0, ++ pVisual->depth, ++ InputOutput, ++ visual, ++ attrMask, ++ &attr); ++ XUnlockDisplay(zm_display); ++ XFree(pVisual); ++ ++ //Tell the WM about this window. ++#if 0 ++ XSetStandardProperties( zm_display, ++ window, ++ "CHXExSite", ++ "CHXExSite", ++ None, ++ NULL, 0, ++ &size_hints ++ ); ++#endif ++ ++ //Select all input events on the window since the other platforms ++ //we work with have no concept of event masks ++ XLockDisplay(zm_display); ++#if 0 ++ int result = XSelectInput( zm_display, window, ++ ButtonPressMask | ButtonReleaseMask | KeyPressMask | ++ KeyReleaseMask | EnterWindowMask | LeaveWindowMask | ++ PointerMotionMask | ButtonMotionMask | KeymapStateMask | ++ ExposureMask | StructureNotifyMask | FocusChangeMask ++ ); ++#else ++ int result = XSelectInput( zm_display, window, 0 ); ++ ++ ++#endif ++ XUnlockDisplay(zm_display); ++ if( BadWindow == result ) ++ { ++#ifdef _DEBUG ++ fprintf( stderr, "Can select events.\n" ); ++#endif ++ } ++ ++ //Map the window. ++ XLockDisplay(zm_display); ++ /* XMapWindow(zm_display, window); */ ++ ++ //Flush event queue. ++ XFlush(zm_display); ++ XUnlockDisplay(zm_display); ++ ++ ++ return window; ++} ++ ++void CHXExSite::_MapHorzScroll() ++{ ++#if 0 ++ if( GetWindow() && GetWindow()->display && m_ScrollHorizButtonL) ++ { ++ Display* pDis = (Display*)GetWindow()->display; ++ XLockDisplay(pDis); ++ XMapWindow( pDis, m_ScrollHorizButtonL ); ++ XMapWindow( pDis, m_ScrollHorizButtonR ); ++ XUnlockDisplay(pDis); ++ } ++ _DrawArrows(); ++#endif ++} ++ ++void CHXExSite::_MapVertScroll() ++{ ++#if 0 ++ if( GetWindow() && GetWindow()->display && m_ScrollVertButtonT) ++ { ++ Display* pDis = (Display*)GetWindow()->display; ++ XLockDisplay(pDis); ++ XMapWindow( pDis, m_ScrollVertButtonT ); ++ XMapWindow( pDis, m_ScrollVertButtonB ); ++ XUnlockDisplay(pDis); ++ } ++ _DrawArrows(); ++#endif ++} ++ ++void CHXExSite::_MapScrollButtons() ++{ ++#if 0 ++ _MapHorzScroll(); ++ _MapVertScroll(); ++#endif ++} ++ ++void CHXExSite::_UnmapHorzScroll() ++{ ++#if 0 ++ HX_ASSERT( GetWindow() ); ++ if( m_ScrollHorizButtonL && GetWindow()->display ) ++ { ++ Display* pDis = (Display*)GetWindow()->display; ++ XLockDisplay(pDis); ++ XUnmapWindow( pDis, m_ScrollHorizButtonL ); ++ XUnmapWindow( pDis, m_ScrollHorizButtonR ); ++ XUnlockDisplay(pDis); ++ } ++#endif ++} ++void CHXExSite::_UnmapVertScroll() ++{ ++#if 0 ++ HX_ASSERT( GetWindow() ); ++ if( m_ScrollVertButtonT && GetWindow()->display ) ++ { ++ Display* pDis = (Display*)GetWindow()->display; ++ XLockDisplay(pDis); ++ XUnmapWindow( pDis, m_ScrollVertButtonT ); ++ XUnmapWindow( pDis, m_ScrollVertButtonB ); ++ XUnlockDisplay(pDis); ++ } ++#endif ++} ++ ++void CHXExSite::_UnmapScrollButtons() ++{ ++#if 0 ++ if( GetWindow() ) ++ { ++ _UnmapVertScroll(); ++ _UnmapHorzScroll(); ++ } ++#endif ++} ++ ++void CHXExSite::_DestroyScrollButtons() ++{ ++ HXxWindow* pWin = GetWindow(); ++ Display* pDis = (Display*)(pWin?pWin->display:NULL); ++ ++ if( m_ScrollHorizButtonL && pDis ) ++ { ++ XLockDisplay(pDis); ++ XDestroyWindow( pDis, m_ScrollHorizButtonL ); ++ m_ScrollHorizButtonL = 0; ++ XDestroyWindow( pDis, m_ScrollHorizButtonR ); ++ XUnlockDisplay(pDis); ++ m_ScrollHorizButtonR = 0; ++ } ++ ++ if( m_ScrollVertButtonT && pDis) ++ { ++ XLockDisplay(pDis); ++ XDestroyWindow( pDis, m_ScrollVertButtonT ); ++ m_ScrollVertButtonT = 0; ++ XDestroyWindow( pDis, m_ScrollVertButtonB ); ++ XUnlockDisplay(pDis); ++ m_ScrollVertButtonB = 0; ++ } ++ m_ptScrollVertPosT.x = m_ptScrollVertPosT.y = 0; ++ m_ptScrollVertPosB.x = m_ptScrollVertPosB.y = 0; ++ m_ptScrollHorizPosR.x = m_ptScrollHorizPosR.y = 0; ++ m_ptScrollHorizPosL.x = m_ptScrollHorizPosL.y = 0; ++} ++ ++void CHXExSite::_DrawArrows() ++{ ++#if 0 //Paul Debug ++ //only do the work if our site is visible. ++ if( !IsSiteVisible() ) ++ return; ++ ++ //Draw an arrow on this window. ++ XPoint points[4]; ++ int offset = SCROLL_BAR_WIDTH/10; ++ GC tmpGC; ++ XGCValues values; ++ Display* dis = (Display*)GetWindow()->display; ++ ++ if( m_ScrollVertButtonB ) ++ { ++ XLockDisplay(dis); ++ tmpGC = XCreateGC( dis, m_ScrollVertButtonB, 0, &values ); ++ XUnlockDisplay(dis); ++ } ++ else if( m_ScrollHorizButtonL ) ++ { ++ XLockDisplay(dis); ++ tmpGC = XCreateGC( dis, m_ScrollHorizButtonL, 0, &values ); ++ XUnlockDisplay(dis); ++ } ++ else ++ { ++ //We don't have any scroll bars to draw.... ++ return; ++ } ++ ++ ++ XLockDisplay(dis); ++ XSetForeground( dis, tmpGC, WhitePixel(dis, 0 )); ++ XSetBackground( dis, tmpGC, BlackPixel(dis, 0 )); ++ XUnlockDisplay(dis); ++ Colormap cmap = HXGetXColormap((Display*)GetWindow()->display, ++ (Window)GetWindow()->window); ++ XColor color; ++ ++ memset(&color, 0, sizeof(XColor)); ++ XLockDisplay(dis); ++ XParseColor(dis, cmap, "blue", &color); ++ XUnlockDisplay(dis); ++ HXFindBestXColor(dis, cmap, &color); ++ XLockDisplay(dis); ++ XSetForeground( dis, tmpGC, color.pixel); ++ XSetLineAttributes(dis, tmpGC, 1, LineSolid, CapRound, JoinRound ); ++ XUnlockDisplay(dis); ++ ++ ++ //Draw up Vertical arrow. ++ if( m_ScrollVertButtonT ) ++ { ++ points[0].x = offset; ++ points[0].y = SCROLL_BAR_WIDTH-offset; ++ points[1].x = SCROLL_BAR_WIDTH/2; ++ points[1].y = offset; ++ points[2].x = SCROLL_BAR_WIDTH-offset; ++ points[2].y = SCROLL_BAR_WIDTH-offset; ++ points[3].x = points[0].x; ++ points[3].y = points[0].y; ++ XLockDisplay(dis); ++ XFillPolygon( dis, m_ScrollVertButtonT, tmpGC, points, 4, Convex, CoordModeOrigin); ++ XUnlockDisplay(dis); ++ } ++ ++ //Draw down Vertical arrow. ++ if( m_ScrollVertButtonB ) ++ { ++ points[0].x = offset; ++ points[0].y = offset; ++ points[1].x = SCROLL_BAR_WIDTH-offset; ++ points[1].y = offset; ++ points[2].x = SCROLL_BAR_WIDTH/2; ++ points[2].y = SCROLL_BAR_WIDTH-offset; ++ points[3].x = points[0].x; ++ points[3].y = points[0].y; ++ XLockDisplay(dis); ++ XFillPolygon( dis, m_ScrollVertButtonB, tmpGC, points, 4, Convex, CoordModeOrigin); ++ XUnlockDisplay(dis); ++ } ++ ++ //Draw Left Horizontal arrow. ++ if( m_ScrollHorizButtonL ) ++ { ++ points[0].x = SCROLL_BAR_WIDTH-offset; ++ points[0].y = offset; ++ points[1].x = SCROLL_BAR_WIDTH-offset; ++ points[1].y = SCROLL_BAR_WIDTH-offset; ++ points[2].x = offset; ++ points[2].y = SCROLL_BAR_WIDTH/2; ++ points[3].x = points[0].x; ++ points[3].y = points[0].y; ++ XLockDisplay(dis); ++ XFillPolygon( dis, m_ScrollHorizButtonL, tmpGC, points, 4, Convex, CoordModeOrigin); ++ XUnlockDisplay(dis); ++ } ++ ++ //Draw Right Horizontal arrow. ++ if( m_ScrollHorizButtonR ) ++ { ++ points[0].x = offset; ++ points[0].y = SCROLL_BAR_WIDTH-offset; ++ points[1].x = offset; ++ points[1].y = offset; ++ points[2].x = SCROLL_BAR_WIDTH-offset; ++ points[2].y = SCROLL_BAR_WIDTH/2; ++ points[3].x = points[0].x; ++ points[3].y = points[0].y; ++ XLockDisplay(dis); ++ XFillPolygon( dis, m_ScrollHorizButtonR, tmpGC, points, 4, Convex, CoordModeOrigin); ++ XUnlockDisplay(dis); ++ } ++ ++ //Free the GC and go. ++ XLockDisplay(dis); ++ XFreeGC( dis, tmpGC ); ++ XUnlockDisplay(dis); ++#endif ++} ++ ++HXBOOL CHXExSite::_InButton( HXxPoint& pt, int x, int y ) ++{ ++ HXBOOL retVal =FALSE; ++ if( x>= pt.x && x< pt.x+SCROLL_BAR_WIDTH && y>=pt.y && yGetWindow(); ++ } ++ if(pParentWindow) ++ { ++ GetParentSite()->GetSize(mySize); ++ } ++ ++ HX_ASSERT( pParentWindow ); ++ HX_ASSERT( pParentWindow->window != 0 ); ++ ++ if( m_ScrollVertButtonB ) ++ { ++ // if the other bar already exists, don't overlap it! ++ mySize.cx -= SCROLL_BAR_WIDTH; ++ } ++ ++ m_ptScrollHorizPosL.x = m_topleft.x; ++ m_ptScrollHorizPosL.y = m_topleft.y+mySize.cy-SCROLL_BAR_WIDTH; ++ ++#ifndef _ARROWS_SIDE_BY_SIDE ++ m_ptScrollHorizPosR.x = m_topleft.x+mySize.cx-SCROLL_BAR_WIDTH; ++#else ++ m_ptScrollHorizPosR.x = m_topleft.x+SCROLL_BAR_WIDTH; ++#endif ++ m_ptScrollHorizPosR.y = m_topleft.y+mySize.cy-SCROLL_BAR_WIDTH; ++ ++ Display* dis = (Display*)GetWindow()->display; ++ XLockDisplay(dis); ++ Pixel blackPixel = BlackPixel( dis, DefaultScreen(dis) ); ++ XUnlockDisplay(dis); ++ Pixel greyPixel = blackPixel; ++ ++ Colormap cmap = HXGetXColormap(dis, (Window)GetWindow()->window); ++ XColor color; ++ ++ XLockDisplay(dis); ++ XParseColor(dis, cmap, "gray", &color); ++ XUnlockDisplay(dis); ++ HXFindBestXColor(dis, cmap, &color); ++ greyPixel = color.pixel; ++ ++ XLockDisplay(dis); ++ m_ScrollHorizButtonL = XCreateSimpleWindow( dis, ++ (Window)pParentWindow->window, ++ m_ptScrollHorizPosL.x, m_ptScrollHorizPosL.y, ++ SCROLL_BAR_WIDTH, SCROLL_BAR_WIDTH, ++ 1, ++ blackPixel, ++ greyPixel ++ ); ++ m_ScrollHorizButtonR = XCreateSimpleWindow( dis, ++ (Window)pParentWindow->window, ++ m_ptScrollHorizPosR.x, m_ptScrollHorizPosR.y, ++ SCROLL_BAR_WIDTH, SCROLL_BAR_WIDTH, ++ 1, ++ blackPixel, ++ greyPixel ++ ); ++ XUnlockDisplay(dis); ++ HX_ASSERT( m_ScrollHorizButtonR && m_ScrollHorizButtonL ); ++ ++} ++ ++void CHXExSite::_CreateVertScrollBar() ++{ ++ HX_ASSERT( m_ScrollVertButtonB == 0 ); ++ HX_ASSERT( m_ScrollVertButtonT == 0 ); ++ ++ HXxSize mySize; ++ ++ HXxWindow* pParentWindow = NULL; ++ if(GetParentSite()) ++ { ++ pParentWindow = GetParentSite()->GetWindow(); ++ } ++ if(pParentWindow) ++ { ++ GetParentSite()->GetSize(mySize); ++ } ++ ++ HX_ASSERT( pParentWindow ); ++ HX_ASSERT( pParentWindow->window != 0 ); ++ ++ if( m_ScrollHorizButtonR ) ++ { ++ // if the other bar already exists, don't overlap it! ++ mySize.cy -= SCROLL_BAR_WIDTH; ++ } ++ ++ ++ m_ptScrollVertPosT.x = m_topleft.x+mySize.cx-SCROLL_BAR_WIDTH; ++ m_ptScrollVertPosT.y = m_topleft.y; ++ ++ m_ptScrollVertPosB.x = m_topleft.x+mySize.cx-SCROLL_BAR_WIDTH; ++#ifndef _ARROWS_SIDE_BY_SIDE ++ m_ptScrollVertPosB.y = m_topleft.y+mySize.cy-SCROLL_BAR_WIDTH; ++#else ++ m_ptScrollVertPosB.y = m_topleft.y+SCROLL_BAR_WIDTH; ++#endif ++ ++ Display* dis = (Display*)GetWindow()->display; ++ XLockDisplay(dis); ++ Pixel blackPixel = BlackPixel( dis, DefaultScreen(dis) ); ++ XUnlockDisplay(dis); ++ Pixel greyPixel = blackPixel; ++ Colormap cmap = HXGetXColormap((Display*)GetWindow()->display, ++ (Window)GetWindow()->window); ++ XColor color; ++ XLockDisplay(dis); ++ XParseColor(dis, cmap, "gray", &color); ++ XUnlockDisplay(dis); ++ HXFindBestXColor(dis, cmap, &color); ++ greyPixel = color.pixel; ++ ++ HX_ASSERT( GetWindow() ); ++ XLockDisplay(dis); ++ m_ScrollVertButtonT = XCreateSimpleWindow( dis, ++ (Window)pParentWindow->window, ++ m_ptScrollVertPosT.x, m_ptScrollVertPosT.y, ++ SCROLL_BAR_WIDTH, SCROLL_BAR_WIDTH, ++ 1, ++ blackPixel, ++ greyPixel ++ ); ++ m_ScrollVertButtonB = XCreateSimpleWindow( dis, ++ (Window)pParentWindow->window, ++ m_ptScrollVertPosB.x, m_ptScrollVertPosB.y, ++ SCROLL_BAR_WIDTH, SCROLL_BAR_WIDTH, ++ 1, ++ blackPixel, ++ greyPixel ++ ); ++ XUnlockDisplay(dis); ++ ++ HX_ASSERT( m_ScrollVertButtonB && m_ScrollVertButtonT ); ++ ++} ++ ++// ++// Inherited CHXBaseSite methods. ++// ++void CHXExSite::_NeedWindowedSite() ++{ ++#ifdef _DEBUG ++ fprintf( stderr, "CHXExSite::_NeedWindowedSite do something here....\n" ); ++#endif ++ //Nothing to do on unix.... ++} ++ ++void CHXExSite::_AttachWindow() ++{ ++#if 1 ++ void* pDummy=NULL; ++ ++ if (m_pRootSurface) ++ { /* Replace CUnixRootSurf with my own CExRootSurf */ ++ HX_RELEASE(m_pRootSurface); ++ m_pRootSurface = new CExRootSurf(m_pContext, this, m_on_new_frame_cb, m_context); ++ m_pRootSurface->AddRef(); ++ } ++ ++ if(!z_mapSiteToWindow.Lookup((void*)this, pDummy)) ++ { ++ z_mapSiteToWindow.SetAt((void*)this, (void*)m_pWindow); ++ } ++ ++ //Set the display variable. ++ if( m_pWindow->display == NULL ) ++ { ++ HX_ASSERT(zm_display); ++ m_pWindow->display = zm_display; ++ } ++ ++ //Now that we have a window be sure to init the CExRootSurf. ++ //this lets it set up the display, colormap, etc. ++ ((CExRootSurf*)m_pRootSurface)->Init(); ++#endif ++} ++ ++void CHXExSite::_DetachWindow() ++{ ++#if 1 ++ void* pDummy; ++ ++ if (z_mapSiteToWindow.Lookup((void*)this, pDummy)) ++ { ++ z_mapSiteToWindow.RemoveKey((void*)this); ++ } ++#endif ++} ++ ++void* CHXExSite::_Create(void* pParentWindow, UINT32 style) ++{ ++ HRESULT result = HXR_OK; ++ if( m_pWindow && m_pWindow->window ) ++ { ++ HX_ASSERT( "We already have created a window"==NULL); ++ return NULL; ++ } ++ ++ if (pParentWindow==NULL || style) ++ { ++ m_bIsChildWindow = FALSE; ++ } ++ else ++ { ++ m_bIsChildWindow = TRUE; ++ } ++ ++ if( _OpenXDisplay(NULL) != HXR_OK ) ++ { ++ return NULL; ++ } ++ return (void*)CreateXWindow((Window)pParentWindow); ++} ++ ++ ++void CHXExSite::_Destroy(HXxWindow* pWindow) ++{ ++ _DestroySliders(); ++ HXxWindow* pWin = GetWindow(); ++ Display* pDis = (Display*)(pWin?pWin->display:NULL); ++ if( pDis ) ++ { ++ XLockDisplay(pDis); ++ XDestroyWindow( pDis, (Window)pWindow->window ); ++ XUnlockDisplay(pDis); ++ } ++} ++ ++void CHXExSite::_SetSize(HXxSize size) ++{ ++ HX_ASSERT( m_pWindow && m_pWindow->display && m_pWindow->window); ++ //The scroll bars get resized also... ++ _DestroySliders(); ++ Display* pDis = (Display*)GetWindow()->display; ++ XLockDisplay(pDis); ++ XResizeWindow(pDis, ++ (Window) m_pWindow->window, ++ size.cx, ++ size.cy); ++ XUnlockDisplay(pDis); ++} ++ ++void CHXExSite::_SetPosition(HXxPoint position) ++{ ++ HX_ASSERT( m_pWindow && m_pWindow->display && m_pWindow->window); ++ _DestroyScrollButtons(); ++ XLockDisplay((Display*) m_pWindow->display); ++ XMoveWindow((Display*)m_pWindow->display, ++ (Window)m_pWindow->window, ++ position.x, ++ position.y); ++ XUnlockDisplay((Display*) m_pWindow->display); ++} ++ ++void CHXExSite::_DamageRect(HXxRect rect) ++{ ++ if(GetWindow()) ++ { ++ m_bDamaged = TRUE; ++ } ++ return; ++} ++ ++void CHXExSite::_DamageRegion(HXxRegion rect) ++{ ++ if(GetWindow()) ++ { ++ m_bDamaged = TRUE; ++ } ++ return; ++} ++ ++void CHXExSite::_SendOSUpdateMessage() ++{ ++ //We need to redraw our window here, m_pWindow. ++} ++ ++void CHXExSite::_ShowSite(HXBOOL bShow) ++{ ++ if( bShow ) ++ { ++ _MapScrollButtons(); ++ } ++ else ++ { ++ _UnmapScrollButtons(); ++ } ++ //do nothing.... ++} ++ ++HXBOOL CHXExSite::_AtSystemTime() ++{ ++ return TRUE; ++} ++ ++void CHXExSite::_GetDeviceCaps( void* hdc, ++ UINT16& uBitsPerPixel, ++ UINT16& uHorzRes, ++ UINT16& uVertRes ) ++{ ++ Screen* pScreen = NULL; ++ HXxWindow* pWin = GetWindow(); ++ HX_ASSERT( pWin ); ++ if( pWin ) ++ { ++ Display* dis = (Display*)pWin->display; ++ HX_ASSERT( dis ); ++ if( dis ) ++ { ++ Display* pDisp = (Display*)GetWindow()->display; ++ XLockDisplay(pDisp); ++ pScreen = DefaultScreenOfDisplay(pDisp); ++ XUnlockDisplay(pDisp); ++ ++ uBitsPerPixel = pScreen->root_depth; ++ uHorzRes = pScreen->width; ++ uVertRes = pScreen->height; ++ } ++ } ++} ++ ++void CHXExSite::_GetWindowRect(HXxRect* destRect) ++{ ++ HX_ASSERT( "Doesn't seem to be used anywhere"==NULL ); ++} ++ ++void CHXExSite::_DestroySliders() ++{ ++ _DestroyScrollButtons(); ++} ++ ++void CHXExSite::_ForwardUpdateEvent(HXxEvent* pEvent) ++{ ++ GC gc = NULL; ++ AddRef(); ++ ++ HX_ASSERT(GetWindow()->window); ++ HX_ASSERT(m_pUser); ++ if(m_bIsChildWindow) ++ { ++ //Create a clip region that excludes our higher z-order ++ //siblings and is clipped to our parent. ++ if( !m_bRegionIsValid ) ++ { ++ RecomputeClip(); ++ } ++ ++ // The problem is that regions are locked to the origin so we ++ // will need to reverse shift the region before we set the ++ // origin of the graph port! get the GC from the video surface ++ gc = ((CExRootSurf*)m_pRootSurface)->GetGC(); ++ HX_ASSERT( gc ); ++ ++ //Actually setup our clip region ++ Display* pDis = (Display*)GetWindow()->display; ++ XLockDisplay(pDis); ++ XSetRegion( pDis, gc, (Region) m_Region ); ++ XUnlockDisplay(pDis); ++ } ++ ++ XEvent* pXEvent = (XEvent*) pEvent->param2; ++ XExposeEvent* exposeEvent = (XExposeEvent*) pXEvent; ++ ++ // get the rect for this site with respect to our parent ++ HXRECTANGLE exposedRect = { exposeEvent->x, ++ exposeEvent->y, ++ exposeEvent->width, ++ exposeEvent->height }; ++ HXREGION* exposedRegion = HXCreateRegion(); ++ HXUnionRectWithRegion(&exposedRect, exposedRegion, exposedRegion); ++ ++ // does the site intersect the current clipping region? ++ HXREGION* resultRegion = HXCreateRegion(); ++ HXIntersectRegion(exposedRegion, m_Region, resultRegion); ++ HXBOOL bSiteIntersectsExposed = (HXEmptyRegion(resultRegion)==FALSE); ++ ++ HXDestroyRegion(resultRegion); ++ HXDestroyRegion(exposedRegion); ++ ++ // if the exposed region intersects the sites clipping region ++ if(bSiteIntersectsExposed) ++ { ++ m_pUser->HandleEvent(pEvent); ++ } ++ ++ //If the user doesn't handle the standard update event then send ++ //them the cross platform HX_SURFACE_UPDATE event don't damage the ++ //original event structure ++ if(!pEvent->handled && m_pUser ) ++ { ++ HX_ASSERT(GetWindow()); ++ HXxEvent event; ++ event.event = HX_SURFACE_UPDATE; ++ event.window = GetWindow()->window; ++ event.param1 = m_pVideoSurface; ++ event.param2 = GetWindow(); ++ event.result = 0; ++ event.handled = FALSE; ++ m_pUser->HandleEvent(&event); ++ pEvent->handled = event.handled; ++ } ++ ++ ++ //reset the gc to use no region ++ if(m_bIsChildWindow && gc) ++ { ++ Display* pDisp = (Display*)GetWindow()->display; ++ XLockDisplay(pDisp); ++ XSetClipMask(pDisp, gc, None); ++ XUnlockDisplay(pDisp); ++ } ++ ++ //Handle the drawing of our arrows... ++ _DrawArrows(); ++ ++ //Now do all our children.... ++ CHXMapPtrToPtr::Iterator i = m_ChildrenMap.Begin(); ++ for(;i!=m_ChildrenMap.End();++i) ++ { ++ CHXExSite* pSite = (CHXExSite*) *i; ++ pSite->_ForwardUpdateEvent(pEvent); ++ } ++ ++ Release(); ++} ++ ++UINT32 CHXExSite::_MapKeySymToHXVK(KeySym sym, UINT32& uFlags ) ++{ ++ //XXXgfw if we add the extended flag in the HX_KEYBOARD event ++ //structure then we can modify the flags here to show that these ++ //keys are 'extended' in the windows sense. ++ UINT32 ulRet = 0; ++ switch( sym ) ++ { ++ case XK_Shift_R: ++ ulRet = XK_Shift_L; ++ break; ++ case XK_Alt_R: ++ ulRet = XK_Alt_L; ++ break; ++ case XK_KP_Home: ++ ulRet = XK_Home; ++ break; ++ case XK_KP_Next: ++ ulRet = XK_Next; ++ break; ++ case XK_KP_Prior: ++ ulRet = XK_Prior; ++ break; ++ case XK_KP_Enter: ++ ulRet = XK_Return; ++ break; ++ case XK_KP_End: ++ ulRet = XK_End; ++ break; ++ case XK_KP_Begin: ++ ulRet = XK_Begin; ++ break; ++ case XK_KP_Left: ++ ulRet = XK_Left; ++ break; ++ case XK_KP_Up: ++ ulRet = XK_Up; ++ break; ++ case XK_Control_R: ++ ulRet = XK_Control_L; ++ break; ++ case XK_KP_Right: ++ ulRet = XK_Right; ++ break; ++ case XK_KP_Down: ++ ulRet = XK_Down; ++ break; ++ case XK_KP_Insert: ++ ulRet = XK_Insert; ++ break; ++ case XK_KP_Delete: ++ ulRet = XK_Delete; ++ break; ++ default: ++ ulRet = sym; ++ break; ++ } ++ if( ulRet != sym ) ++ { ++ //We have mapped a key from Right hand side, keypad, arrows ++ //or other parts of an extended keyboard. Set the flag. ++ uFlags |= HX_EXTENDED_KEY_MASK; ++ } ++ return ulRet; ++} ++ ++ ++HXBOOL CHXExSite::_ConvertToHXEvent(HXxEvent* pEvent ) ++{ ++ // get original events info from pEvent ++ XEvent* pXEvent = (XEvent*) pEvent->param2; ++ XButtonEvent* buttonEvent = (XButtonEvent*) pXEvent; ++ ++ ++ //=============================================================== ++ // Convert all other event to RMA generic events and pass back. ++ //=============================================================== ++ if( ((pEvent->event == ButtonPress) || ++ (pEvent->event == ButtonRelease) || ++ (pEvent->event == MotionNotify ) || ++ (pEvent->event == EnterNotify) || ++ (pEvent->event == FocusIn) || ++ (pEvent->event == FocusOut) || ++ (pEvent->event == KeyPress) || ++ (pEvent->event == KeyRelease) || ++ (pEvent->event == LeaveNotify)) ++ ) ++ { ++ // set modifier flags for all events.... ++ UINT32 flags = 0; ++ ++ // create new HXxEvent ++ HXxEvent theEvent; ++ ++ //XXXgfw ouch.... ++ static HXxPoint realPt = {0,0}; ++ ++ //Init certain members. ++ memset(&theEvent, 0, sizeof(HXxEvent)); ++ theEvent.window = pEvent->window; ++ theEvent.handled = FALSE; ++ ++ // ++ // NOTE: ++ // ++ // theEvent must be filled in by *ALL* event types. ++ // theEvent will be memcopied into the pEvent passed ++ // back to the basesite at the end of the method. ++ // ++ ++ //================================================== ++ // LEAVE NOTIFY EVENT ++ //================================================== ++ if( pEvent->event==LeaveNotify) ++ { ++ if( m_pTopLevelSite->m_pMouseInSite ) ++ { ++ HXxPoint oobPoint; ++ oobPoint.x = -1; ++ oobPoint.y = -1; ++ HXxEvent Outevent = { HX_MOUSE_LEAVE, ++ m_pWindow->window, ++ (void*)&oobPoint, ++ 0, 0, ++ FALSE }; ++ m_pTopLevelSite->m_pMouseInSite->EventOccurred(&Outevent); ++ m_pTopLevelSite->m_pMouseInSite = NULL; ++ } ++ pEvent->handled=TRUE; ++ return TRUE; ++ } ++ ++ //================================================== ++ // ENTER NOTIFY EVENT ++ //================================================== ++ if( pEvent->event==EnterNotify) ++ { ++ pEvent->handled=TRUE; ++ return TRUE; ++ } ++ ++ //================================================== ++ // KEY PRESS/RELEASE EVENT ++ //================================================== ++ if ( pEvent->event == KeyPress || pEvent->event==KeyRelease ) ++ { ++ XKeyEvent* pKeyEvent = (XKeyEvent*)pEvent->param2; ++ ++ // ++ //Set the event type ++ // ++ theEvent.event = pEvent->event==KeyPress?HX_KEY_DOWN:HX_KEY_UP; ++ ++ // ++ // Fill in the scan/key code. ++ // ++ flags = pKeyEvent->keycode; ++ flags &= 0x000000ff; //the scan code only gets bits 0-7 ++ ++ // ++ // build key modifier list... ++ // ++ if( pKeyEvent->state & ShiftMask ) ++ flags |= HX_SHIFT_MASK; ++ ++ if( pKeyEvent->state & ControlMask ) ++ flags |= HX_CTRL_MASK; ++ ++ if( pKeyEvent->state & LockMask ) ++ flags |= HX_CAPS_LOCK_MASK; ++ ++ if( pKeyEvent->state & Mod1Mask) ++ flags |= HX_ALT_MASK; ++ ++ if( pKeyEvent->state & Mod2Mask) ++ flags |= HX_NUM_LOCK_MASK; ++ ++ if( pKeyEvent->state & Mod5Mask) ++ flags |= HX_SCROLL_LOCK_MASK; ++ ++ // ++ //Store the char pressed. ++ // ++ KeySym sym; ++ char szBuf[10]; /* Flawfinder: ignore */ ++ int nNum; ++ ++ //Save the state of the keys... ++ unsigned int unSave = pKeyEvent->state; ++ pKeyEvent->state=0; ++ ++ //Lookup the key without any state. ++ nNum = XLookupString( pKeyEvent, szBuf, 10, &sym, NULL ); ++ if( nNum > 0 ) ++ { ++ theEvent.param1 = (void*)*szBuf; ++ } ++ else ++ { ++ theEvent.param1 = (void*)_MapKeySymToHXVK(sym, flags); ++ flags |= HX_VIRTUAL_KEY_MASK; ++ } ++ //restore the state of the event ++ pKeyEvent->state = unSave; ++ ++ //Set the flags... ++ theEvent.param2 = (void*)flags; ++ ++ //Check for HX_CHAR needed or not. ++ if( theEvent.event == HX_KEY_DOWN ) ++ { ++ //We have to send an extra HX_CHAR event ++ HXxEvent extraEvent; ++ memcpy( &extraEvent, &theEvent, sizeof( extraEvent ) ); /* Flawfinder: ignore */ ++ ++ //Change the type. ++ extraEvent.event = HX_CHAR; ++ ++ // ++ //Change the keycode to an translated ascii char. ++ // ++ KeySym sym; ++ char szBuf[10]; /* Flawfinder: ignore */ ++ int nNum; ++ ++ nNum = XLookupString( pKeyEvent, szBuf, 10, &sym, NULL ); ++ ++ if( nNum > 0 ) ++ { ++ extraEvent.param1 = (void*)*szBuf; ++ } ++ else ++ { ++ extraEvent.param1 = (void*)_MapKeySymToHXVK(sym, flags); ++ flags |= HX_VIRTUAL_KEY_MASK; ++ } ++ extraEvent.param2 = (void*)flags; ++ ++ // ++ // Now send the extra event.... ++ // ++ CHXBaseSite::EventOccurred(&extraEvent); ++ } ++ } ++ ++ //================================================== ++ // FOCUS OUT EVENT ++ //================================================== ++ if ( pEvent->event == FocusOut ) ++ { ++ theEvent.event = HX_LOSE_FOCUS; ++ } ++ ++ if ( pEvent->event == FocusIn ) ++ { ++ theEvent.event = HX_SET_FOCUS; ++ } ++ ++ //================================================== ++ // MOUSE MOVE EVENT ++ //================================================== ++ if( pEvent->event == MotionNotify ) ++ { ++ XMotionEvent* pp = (XMotionEvent*)pEvent->param2; ++ theEvent.event = HX_MOUSE_MOVE; ++ ++ if( pp->state&Button1Mask ) ++ flags |= HX_PRIMARY_BUTTON; ++ ++ if( pp->state&Button2Mask ) ++ flags |= HX_CONTEXT_BUTTON; ++ ++ if( pp->state&Button3Mask ) ++ flags |= HX_THIRD_BUTTON; ++ ++ if(pp->state & ShiftMask) ++ flags |= HX_SHIFT_KEY; ++ ++ if(pp->state & ControlMask) ++ flags |= HX_CTRL_KEY; ++ ++ if(pp->state & Mod1Mask) ++ flags |= HX_ALT_COMMAND_KEY; ++ ++ theEvent.param2 = (void*) flags; ++ ++ //Grab the X and Y. ++ theEvent.param1 = (void*) &realPt; ++ realPt.x = pp->x; ++ realPt.y = pp->y; ++ } ++ ++ //================================================== ++ // BUTTON PRESS/RELEASE EVENT ++ //================================================== ++ if((pEvent->event == ButtonPress) || (pEvent->event == ButtonRelease)) ++ { ++ // remap event ++ if (pEvent->event == ButtonPress) ++ { ++ if (buttonEvent->button == Button3) ++ theEvent.event = HX_CONTEXT_BUTTON_DOWN; ++ else ++ theEvent.event = HX_PRIMARY_BUTTON_DOWN; ++ } ++ else if (pEvent->event == ButtonRelease) ++ { ++ if (buttonEvent->button == Button3) ++ theEvent.event = HX_CONTEXT_BUTTON_UP; ++ else ++ theEvent.event = HX_PRIMARY_BUTTON_UP; ++ } ++ ++ if(buttonEvent->state & ShiftMask) ++ flags |= HX_SHIFT_KEY; ++ ++ if(buttonEvent->state & ControlMask) ++ flags |= HX_CTRL_KEY; ++ ++ theEvent.param2 = (void*) flags; ++ ++ //Grab the X and Y. ++ theEvent.param1 = (void*) &realPt; ++ realPt.x = buttonEvent->x; ++ realPt.y = buttonEvent->y; ++ } ++ ++ //Copy the new event back into the passed in one for ++ //all events that fall through here... ++ memcpy( pEvent, &theEvent, sizeof(HXxEvent) ); /* Flawfinder: ignore */ ++ ++#if defined(_DEBUG) ++ //If the users presses control-primary button ++ //dump info on all sites. If shift-context, then ++ //just this site. ++ if( (buttonEvent->state&ControlMask)&& ++ (theEvent.event==HX_PRIMARY_BUTTON_DOWN)) ++ { ++ DisplayAllSiteData(); ++ } ++ if( (buttonEvent->state&ShiftMask)&& ++ (theEvent.event==HX_PRIMARY_BUTTON_DOWN)) ++ { ++ DisplaySiteData(""); ++ } ++#endif ++ } ++ return pEvent->handled; ++} ++ ++ ++void CHXExSite::CheckColorSettings() ++{ ++#if !defined(HELIX_FEATURE_HARDWARE_COLOR_CONTROLS) ++ CHXBaseSite::CheckColorSettings(); ++#else ++ CUnixSurf* pSurf = (CUnixSurf*)m_pVideoSurface; ++ if( !pSurf->HasHWColorConrols() ) ++ { ++ CHXBaseSite::CheckColorSettings(); ++ } ++ else ++ { ++ pSurf->SetHWColorControls(); ++ ++ //We do all color stuff except sharpmess in hardware. ++ float fCurrentSharpness; ++ INT16 bInterpolate; ++ zm_pColorAcc->GetSharpnessAdjustments(&fCurrentSharpness, &bInterpolate); ++ ++ if (fCurrentSharpness != m_fSharpness) ++ { ++ zm_pColorAcc->SetSharpnessAdjustments(m_fSharpness, FALSE); ++ } ++ } ++#endif ++} ++ ++// ++// OK, here it is. Take care of any OS specific duties, like scrollbar ++// stuff and expose events. Then, if the event isn't handled, convert ++// to an RMA event and return. ++HXBOOL CHXExSite::_HandleOSEvents(HXxEvent* pEvent) ++{ ++ HXxPoint position = {0, 0}; ++ HXxPoint point; ++ ++ if( NULL==pEvent ) ++ { ++ return FALSE; ++ } ++ ++ return TRUE; ++ ++#if defined(_DEBUG) && 0 ++// fprintf( stderr, "this: %p m_pUser: %p ", this, m_pUser ); ++ switch( pEvent->event ) ++ { ++ case HX_MOUSE_LEAVE: ++ fprintf( stderr, "HX_MOUSE_LEAVE\n" ); ++ break; ++// case HX_MOUSE_MOVE: ++// point.x = ((HXxPoint*)pEvent->param1)->x; ++// point.y = ((HXxPoint*)pEvent->param1)->y; ++// fprintf( stderr, "HX_MOUSE_MOVE: %d %d\n", point.x, point.y ); ++// break; ++ case HX_MOUSE_ENTER: ++ fprintf( stderr, "HX_MOUSE_ENTER\n" ); ++ break; ++// case MotionNotify: ++// point.x = ((XMotionEvent*)pEvent->param2)->x; ++// point.y = ((XMotionEvent*)pEvent->param2)->y; ++// fprintf( stderr, "MotionNotify: %d %d\n", point.x, point.y ); ++// break; ++ case Expose: ++ fprintf( stderr, "Expose\n" ); ++ break; ++ case EnterNotify : ++ fprintf( stderr, "EnterNotify\n" ); ++ break; ++ case LeaveNotify: ++ fprintf( stderr, "LeaveNotify\n" ); ++ break; ++ case KeyPress: ++ fprintf( stderr, "this: %p m_pUser: %p ", this, m_pUser ); ++ fprintf( stderr, "Keypress\n\n" ); ++ break; ++ case KeyRelease: ++ fprintf( stderr, "this: %p m_pUser: %p ", this, m_pUser ); ++ fprintf( stderr, "KeyRelease\n" ); ++ break; ++ default: ++ fprintf( stderr, "Other\n" ); ++ break; ++ } ++#endif ++ ++ //Find the ConfigureNotify events so we can drop to RGB from ++ //overlay while we move.... ++// if( pEvent->event == ConfigureNotify && this==m_pTopLevelSite ) ++// { ++// XConfigureEvent* pev = (XConfigureEvent*)pEvent->param2; ++// if( m_pWindow && pev->window == (Window)m_pWindow->window ) ++// { ++// HXxPoint p; ++// _GetPositionRelativeToActualWindow( p ); ++// // fprintf( stderr, "wint %p -- x,y width, height: %d %d %d %d \n", ++// // pev->window, ++// // pev->x, pev->y, pev->width, pev->height); ++// // fprintf( stderr, "size of site: %d %d\n", m_size.cx, m_size.cy); ++// // fprintf( stderr, "pos of site: %d %d\n", m_topleft.x, m_topleft.y); ++// m_pTopLevelSite->m_pMutex->Lock(); ++// m_pTopLevelSite->SiteMoving(0, 0); ++// m_pTopLevelSite->m_nLastMoveTime = HX_GET_TICKCOUNT(); ++// m_pTopLevelSite->ScheduleCallback(MOUSE, 100); ++// m_pTopLevelSite->m_pMutex->Unlock(); ++// } ++// } ++ ++ //See if we should drop out of full screen ++ if( pEvent->event == FocusOut && IsFullScreen() && !m_bIgnoreFocusOutInFS ) ++ { ++// fprintf( stderr, "_HandleOSEvents: focus out: " ); ++// XEvent* pXEvent = (XEvent*) pEvent->param2; ++// XFocusChangeEvent* event = (XFocusChangeEvent*) pXEvent; ++// switch( event->mode ) ++// { ++// case NotifyAncestor: ++// fprintf( stderr, "NotifyAncestor\n" ); ++// break; ++// case NotifyVirtual: ++// fprintf( stderr, "NotifyVirtual\n" ); ++// break; ++// case NotifyInferior: ++// fprintf( stderr, "NotifyInferior\n" ); ++// break; ++// case NotifyNonlinear: ++// fprintf( stderr, "NotifyNonlinear\n" ); ++// break; ++// case NotifyNonlinearVirtual: ++// fprintf( stderr, "NotifyNonlinearVirtual\n" ); ++// break; ++// case NotifyPointer: ++// fprintf( stderr, "NotifyPointer\n" ); ++// break; ++// case NotifyPointerRoot: ++// fprintf( stderr, "NotifyPointerRoot\n" ); ++// break; ++// case NotifyDetailNone: ++// fprintf( stderr, "NotifyDetailNone\n" ); ++// break; ++// default: ++// fprintf( stderr, "screwed.....\n" ); ++// } ++ ExitFullScreen(); ++ } ++ ++ ++#if defined(_DEBUG) && defined(TEST_FULL_SCREEN) ++ if( pEvent->event == KeyPress ) ++ { ++ KeySym sym; ++ char szBuf[10]; /* Flawfinder: ignore */ ++ int nNum; ++ ++ //Lookup the key without any state. ++ nNum = XLookupString( (XKeyEvent*)(pEvent->param2), szBuf, 10, &sym, NULL ); ++ if( nNum > 0 ) ++ { ++ if( 'f' == szBuf[0] && IsFullScreen() ) ++ { ++ //Exit full screen if 'f' is pressed..... ++ m_pTopLevelSite->ExitFullScreen(); ++ } ++ else if( 'f' == szBuf[0] && !IsFullScreen() ) ++ { ++ //Enter full screen if 'f' is pressed..... ++ m_pTopLevelSite->EnterFullScreen(); ++ } ++ ++ } ++ ++ } ++#endif ++ ++#if defined(_DEBUG) && defined(_TEST_COLOR_CONTROLS) ++ if( pEvent->event == KeyPress ) ++ { ++ KeySym sym; ++ char szBuf[10]; /* Flawfinder: ignore */ ++ int nNum; ++ ++ //Lookup the key without any state. ++ nNum = XLookupString( (XKeyEvent*)(pEvent->param2), szBuf, 10, &sym, NULL ); ++ if( nNum > 0 ) ++ { ++ if( 'b' == szBuf[0] ) ++ { ++ SetBrightness( GetBrightness()-.05); ++ } ++ if( 'B' == szBuf[0] ) ++ { ++ SetBrightness( GetBrightness()+.05); ++ } ++ ++ if( 'c' == szBuf[0] ) ++ { ++ SetContrast( GetContrast()-.05); ++ } ++ if( 'C' == szBuf[0] ) ++ { ++ SetContrast( GetContrast()+.05); ++ } ++ ++ if( 'h' == szBuf[0] ) ++ { ++ SetHue( GetHue()-.05); ++ } ++ if( 'H' == szBuf[0] ) ++ { ++ SetHue( GetHue()+.05 ); ++ } ++ ++ if( 's' == szBuf[0] ) ++ { ++ SetSaturation( GetSaturation()-.05); ++ } ++ if( 'S' == szBuf[0] ) ++ { ++ SetSaturation( GetSaturation()+.05); ++ } ++ fprintf( stderr, "colors %f %f %f %f\n", ++ GetBrightness(), ++ GetContrast(), ++ GetSaturation(), ++ GetHue()); ++ } ++ ++ } ++#endif ++ ++ //Exit full screen on ESC pressed...... ++ if( pEvent->event == KeyPress ) ++ { ++ KeySym sym; ++ char szBuf[10]; /* Flawfinder: ignore */ ++ int nNum; ++ ++ //Lookup the key without any state. ++ nNum = XLookupString( (XKeyEvent*)(pEvent->param2), szBuf, 10, &sym, NULL ); ++ if( nNum > 0 ) ++ { ++ if( 27 == (int)szBuf[0] && IsFullScreen() ) ++ { ++ //Exit full screen if esc is pressed..... ++ m_pTopLevelSite->ExitFullScreen(); ++ } ++ } ++ } ++ ++ //Find out if this is an event we are interested in. Make sure we ++ //are visible, it isn't a button, expose or FocusIn event and also ++ //make sure it is headed for our window. ++ if (!_ShouldProcess(pEvent)) ++ { ++ return FALSE; ++ } ++ ++ ++ if(m_pUser && GetWindow() && GetWindow()->window) ++ { ++ //Do not send an update event to a hidden site. ++ if( pEvent->event == Expose || ++ pEvent->event == FocusIn || ++ pEvent->event == HX_SURFACE_UPDATE ) ++ { ++ if( (m_ScrollVertButtonT || m_ScrollHorizButtonR) && IsSiteVisible() ) ++ { ++ _DrawArrows(); ++ } ++ _ForwardUpdateEvent(pEvent); ++ return TRUE; ++ } ++ else ++ { ++ // get original events info from pEvent ++ XEvent* pXEvent = (XEvent*) pEvent->param2; ++ XButtonEvent* buttonEvent = (XButtonEvent*) pXEvent; ++ ++ ++ //XXXgfw all this code sucks! It really need to be written ++ //for just native events or RMA events. With the change to a ++ //common site it is all screwed up. I am leaving it for now ++ //so we can get on with transparancy but get back to it! ++ ++ //If the user clicks MB1 on a scroll button, handle it here and ++ //don't pass it up or let the user handle the event. ++ //Hit detection here. ++ ++ //////////////////////////////////////////////////////// ++ // BEGIN SCROLLING GARBAGE ++ //////////////////////////////////////////////////////// ++ if( ++ ((pEvent->event==ButtonPress || pEvent->event==ButtonRelease) && ++ buttonEvent->button==Button1) && ++ (m_ScrollHorizButtonL || m_ScrollVertButtonB ) ++ ) ++ { ++ int buttonX=0; ++ int buttonY=0; ++ ++ if( pEvent->event==ButtonRelease ) ++ { ++ if( m_bScrollingInProgress ) ++ { ++ m_bScrollingInProgress = FALSE; ++ m_nScrollDir = 0; ++ return TRUE ; ++ } ++ } ++ else ++ { ++ buttonX = buttonEvent->x; ++ buttonY = buttonEvent->y; ++ ++ HXBOOL bPointInSite = FALSE; ++ if( m_Region ) ++ bPointInSite = HXPointInRegion(m_Region, buttonX, buttonY); ++ ++ if( bPointInSite ) ++ { ++ if( m_ScrollHorizButtonL ) ++ { ++ if( _InButton( m_ptScrollHorizPosL, buttonX, buttonY )) ++ { ++ m_bScrollingInProgress = TRUE; ++ m_nScrollDir = 1; ++ } ++ if( _InButton( m_ptScrollHorizPosR, buttonX, buttonY )) ++ { ++ m_bScrollingInProgress = TRUE; ++ m_nScrollDir = 2; ++ } ++ } ++ if( m_ScrollVertButtonT ) ++ { ++ if( _InButton( m_ptScrollVertPosT, buttonX, buttonY )) ++ { ++ m_bScrollingInProgress = TRUE; ++ m_nScrollDir = 3; ++ } ++ if( _InButton( m_ptScrollVertPosB, buttonX, buttonY )) ++ { ++ m_bScrollingInProgress = TRUE; ++ m_nScrollDir = 4; ++ } ++ } ++ } ++ } ++ ++ if( (m_ScrollHorizButtonL||m_ScrollVertButtonT) && m_bScrollingInProgress) ++ { ++ int xx=0; ++ int yy=0; ++ HXxWindow* pParentWindow = GetParentSite()->GetWindow(); ++ //Make it scroll 10% of the parent window each click. ++ HXxSize sizeTmp; ++ GetParentSite()->GetSize(sizeTmp); ++ ++ //Set it to a percentage of the slider range. ++ int incX = sizeTmp.cx/10; ++ int incY = sizeTmp.cy/10; ++ ++ HX_ASSERT( pParentWindow ); ++ ++ xx = m_XSliderPos; ++ yy = m_YSliderPos; ++ ++ if( m_nScrollDir == 1 ) ++ xx-=incX; ++ if( m_nScrollDir == 2 ) ++ xx+=incX; ++ if( m_nScrollDir == 3 ) ++ yy-=incY; ++ if( m_nScrollDir == 4 ) ++ yy+=incY; ++ ++ if( xx > m_size.cx-sizeTmp.cx ) ++ xx = m_size.cx-sizeTmp.cx; ++ if( yy > m_size.cy-sizeTmp.cy) ++ yy = m_size.cy-sizeTmp.cy; ++ ++ if( xx < 0 ) ++ xx = 0; ++ if( yy < 0 ) ++ yy = 0; ++ ++ m_XSliderPos = xx; ++ m_YSliderPos = yy; ++ ++ HXxRect rect; ++ DamageRect(rect); ++ ++ InternalForceRedraw(); ++ } ++ //Only throw away the event if it had something to do with ++ //scolling. ++ if( m_bScrollingInProgress ) ++ { ++ m_bScrollingInProgress = FALSE; ++ m_nScrollDir = 0; ++ return TRUE; ++ } ++ } ++ //////////////////////////////////////////////////////// ++ // END SCROLLING GARBAGE ++ //////////////////////////////////////////////////////// ++ point.x = -1; ++ point.y = -1; ++ ++ if( pEvent->event == MotionNotify) ++ { ++ point.x = ((XMotionEvent*)pXEvent)->x; ++ point.y = ((XMotionEvent*)pXEvent)->y; ++ } ++ else if( pEvent->event == ButtonPress ) ++ { ++ point.x = ((XMotionEvent*)pXEvent)->x; ++ point.y = ((XMotionEvent*)pXEvent)->y; ++ } ++ ++ // ++ //Give the user a chance at the native event. ++ // ++ if( m_RegionWithoutChildren && HXPointInRegion(m_RegionWithoutChildren, point.x, point.y )) ++ { ++ if( m_Region && HXPointInRegion(m_Region, point.x, point.y) ) ++ { ++ if (m_pUser) ++ m_pUser->HandleEvent(pEvent); ++ } ++ else ++ { ++ INT32 handledCount = 0; ++ INT32 mapCount = 0; ++ ++ //try send this to all of our children ++ _unixsitecpp1: ++ mapCount = m_ChildrenMap.GetCount(); ++ CHXMapPtrToPtr::Iterator i; ++ for(i=m_ChildrenMap.Begin() ; i!=m_ChildrenMap.End() ; ++i) ++ { ++ CHXBaseSite* pSite = (CHXBaseSite*) *i; ++ pSite->_HandleOSEvents(pEvent); ++ if (pEvent->handled) ++ { ++ break; ++ } ++ handledCount+=pEvent->handled; ++ pEvent->handled=0; ++ ++ if (m_ChildrenMap.GetCount() != mapCount) ++ { ++ goto _unixsitecpp1; ++ } ++ } ++ if (handledCount) ++ { ++ pEvent->handled = 1; ++ } ++ HX_ASSERT(handledCount<2); ++ } ++ } ++ pEvent->handled=FALSE; ++ } ++ } ++ ++ return FALSE; ++} ++ ++void CHXExSite::_GenerateOSEvent(HXxEvent* pEvent, HXxEvent* pEvent2) ++{ ++ //XXXgfw Not needed on UNIX I guess??? ++} ++ ++void CHXExSite::_GenerateSetCursorEvent() ++{ ++#ifdef _DEBUG ++ fprintf( stderr, "CHXExSite::_GenerateSetCursorEvent\n" ); ++#endif ++ //XXXgfw do we need this?? ++} ++ ++void CHXExSite::_TryCreateXSlider() ++{ ++#if 0 ++ if( !m_ScrollHorizButtonL && IsSiteVisible() ) ++ _CreateHorizScrollBar(); ++#endif ++} ++ ++void CHXExSite::_SetXSliderValues(INT32 range, INT32 pageSize) ++{ ++ //XXXgfw this is a do nothing as long as we only have ++ //scroll buttons on unix and not real scroll bars. ++} ++ ++void CHXExSite::_TryCreateYSlider() ++{ ++#if 0 ++ if( !m_ScrollVertButtonT && IsSiteVisible() ) ++ _CreateVertScrollBar(); ++#endif ++} ++ ++void CHXExSite::_SetYSliderValues(INT32 range, INT32 pageSize) ++{ ++ //XXXgfw this is a do nothing as long as we only have ++ //scroll buttons on unix and not real scroll bars. ++} ++ ++void CHXExSite::_GetSystemSizeOfSliders(INT32* pWidth, INT32* pHeight) ++{ ++#if 0 ++ *pWidth = *pHeight = SCROLL_BAR_WIDTH; ++#endif ++} ++ ++HXBOOL CHXExSite::_IsWindowVisible() ++{ ++#if 0 ++ HX_RESULT retVal = FALSE; ++ //XXXgfw do this for now... ++ retVal = IsSiteVisible(); ++ return retVal; ++#else ++ return FALSE; ++#endif ++ ++} ++ ++void CHXExSite::_ShowXSlider(HXBOOL bShow) ++{ ++#if 0 ++ if( GetWindow() ) ++ { ++ if( bShow ) ++ _MapHorzScroll(); ++ else ++ _UnmapHorzScroll(); ++ } ++#endif ++} ++ ++void CHXExSite::_MoveXSlider( INT32 left, ++ INT32 top, ++ INT32 right, ++ INT32 bottom, ++ HXBOOL bRedraw ) ++{ ++ //Do nothing right now.... ++} ++ ++void CHXExSite::_ShowYSlider(HXBOOL bShow) ++{ ++#if 0 ++ if( GetWindow() ) ++ { ++ if( bShow ) ++ _MapVertScroll(); ++ else ++ _UnmapVertScroll(); ++ } ++#endif ++} ++ ++void CHXExSite::_MoveYSlider( INT32 left, ++ INT32 top, ++ INT32 right, ++ INT32 bottom, ++ HXBOOL bRedraw) ++{ ++ //do nothing right now... ++} ++ ++HXBOOL CHXExSite::_DoesXSliderExist() ++{ ++ return FALSE; ++// return (m_ScrollHorizButtonL!=0); ++} ++ ++void* CHXExSite::_GetContainingWindow() ++{ ++ //XXXgfw Do we need this??? ++ return NULL; ++} ++ ++void CHXExSite::_GetCursorPos(HXxPoint* pPoint) ++{ ++ //Return the cursor pos in screen coords. ++ Window rootWin; ++ Window childWin; ++ int rootX=0; ++ int rootY=0; ++ int childX=0; ++ int childY=0; ++ unsigned int mask=0; ++ Bool ret=FALSE; ++ ++ HX_ASSERT(GetWindow()); ++ Display* pDis = (Display*)GetWindow()->display; ++ XLockDisplay(pDis); ++ ret = XQueryPointer(pDis, ++ (Window)GetWindow()->window, ++ &rootWin, ++ &childWin, ++ &rootX, &rootY, ++ &childX, &childY, ++ &mask); ++ XUnlockDisplay(pDis); ++ ++ if(ret) ++ { ++ pPoint->x = rootX; ++ pPoint->y = rootY; ++ } ++} ++void* CHXExSite::_GetWindowWithCursor() ++{ ++#if 0 ++ //Return the cursor pos in screen coords. ++ void* pRet = NULL; ++ int rootX = 0; ++ int rootY = 0; ++ int childX= 0; ++ int childY= 0; ++ unsigned int mask = 0; ++ Bool ret = FALSE; ++ Window rootWin; ++ Window childWin; ++ ++ HX_ASSERT(GetWindow()); ++ Display* pDis = (Display*)GetWindow()->display; ++ XLockDisplay(pDis); ++ ret = XQueryPointer(pDis, ++ (Window)GetWindow()->window, ++ &rootWin, ++ &childWin, ++ &rootX, &rootY, ++ &childX, &childY, ++ &mask); ++ XUnlockDisplay(pDis); ++ ++ if(ret) ++ { ++ pRet = (void*)childWin; ++ } ++ return pRet; ++#else ++ HX_ASSERT( "Not implemented..." == NULL ); ++ return NULL; ++#endif ++} ++ ++void CHXExSite::_MapPointToOSWindow(HXxPoint* pPt, void** pWindowHandle) ++{ ++ //XXXgfw we could query the window tree and traverse down but that ++ //is really slow and this isn't used right now. ++ HX_ASSERT( "Not implemented..." == NULL ); ++} ++ ++void CHXExSite::_ReInitPrimarySurface() ++{ ++ //Nothing to do in unix here right? ++} ++ ++HXBOOL CHXExSite::_MoveWindow( void* win, ++ INT32 X, ++ INT32 Y, ++ INT32 nWidth, ++ INT32 nHeight, ++ HXBOOL bRepaint) ++{ ++#if 0 ++ //XXXgfw we still have to do bRepaint.... ++ HX_ASSERT( m_pWindow && m_pWindow->window && m_pWindow->display); ++ _DestroyScrollButtons(); ++ XLockDisplay((Display*) m_pWindow->display); ++ XMoveResizeWindow( (Display*)m_pWindow->display, ++ (Window)m_pWindow->window, ++ X, ++ Y, ++ nWidth, ++ nHeight ++ ); ++ XUnlockDisplay((Display*) m_pWindow->display); ++#else ++ HX_ASSERT( "Not implemented..." == NULL ); ++#endif ++ return TRUE; ++} ++ ++HXBOOL CHXExSite::_UpdateWindow(void* hWnd) ++{ ++ //We need to generate a repaint here of the window.... ++ return TRUE; ++} ++ ++HXBOOL CHXExSite::_ShowWindow(void* hWnd, INT32 nCmdShow) ++{ ++#if 0 ++ HX_ASSERT( nCmdShow==HX_SHOW_WINDOW || nCmdShow==HX_HIDE_WINDOW); ++ if( !m_pWindow || !m_pWindow->window || !m_pWindow->display ) ++ return FALSE; ++ ++ if( nCmdShow == HX_SHOW_WINDOW ) ++ { ++ _MapScrollButtons(); ++ XLockDisplay((Display*) m_pWindow->display); ++ XMapWindow( (Display*)m_pWindow->display, (Window)m_pWindow->window ); ++ XUnlockDisplay((Display*) m_pWindow->display); ++ } ++ else ++ { ++ _UnmapScrollButtons(); ++ XLockDisplay((Display*) m_pWindow->display); ++ XUnmapWindow( (Display*)m_pWindow->display, (Window)m_pWindow->window ); ++ XUnlockDisplay((Display*) m_pWindow->display); ++ } ++#endif ++ return TRUE; ++} ++ ++HXBOOL CHXExSite::_SetWindowPos(void* hWnd, ++ void* hWndInsertAfter, ++ INT32 X, ++ INT32 Y, ++ INT32 cx, ++ INT32 cy, ++ INT32 uFlags) ++{ ++#ifdef _DEBUG ++ fprintf( stderr, "Now what on earth is this suppose to do??\n" ); ++#endif ++ return TRUE; ++} ++ ++HXBOOL CHXExSite::_SetWindowRgn(void* hWnd, HXREGION* hRgn, HXBOOL bRedraw) ++{ ++#if 0 ++ HX_ASSERT( GetWindow() ); ++ Display* pDis = (Display*)GetWindow()->display; ++ XLockDisplay(pDis); ++ XSetRegion( pDis, ++ (GC)m_pVideoSurface->_GetDC(NULL), ++ (Region)hRgn ++ ); ++ XUnlockDisplay(pDis); ++ if( bRedraw ) ++ { ++ HX_ASSERT("Redraw asked for here"==NULL ); ++ } ++#endif ++ return TRUE; ++} ++ ++void CHXExSite::_SetFocus(void* pWindow) ++{ ++#if 0 ++ XWindowAttributes attr; ++ HXxWindow* pWin = GetWindow(); ++ ++ HX_ASSERT(pWin); ++ HX_ASSERT(pWindow); ++ ++ XLockDisplay((Display*) pWin->display); ++ XGetWindowAttributes((Display*)pWin->display, (Window)pWindow, &attr); ++ XUnlockDisplay((Display*) pWin->display); ++ if( attr.map_state == IsViewable ) ++ { ++ XLockDisplay((Display*) pWin->display); ++ XSetInputFocus( (Display*)pWin->display, ++ (Window)pWindow, ++ RevertToParent, ++ CurrentTime ++ ); ++ XUnlockDisplay((Display*) pWin->display); ++ } ++ ++ return; ++#endif ++} ++ ++HX_RESULT CHXExSite::_EnterFullScreen(HXxWindow* pWindow) ++{ ++#if 0 ++ HXxWindow* pWin = GetWindow(); ++ HX_ASSERT( pWin && pWin->display && pWin->display); ++ HX_ASSERT( this == m_pTopLevelSite ); ++ ++ if( 0 != m_winFullScreenWindow || IsFullScreen() ) ++ { ++ //We are already in full screen ++ return HXR_FAIL; ++ } ++ ++ //Create a override redirect window to fill the root. ++ XSizeHints size_hints; ++ XLockDisplay((Display*) pWin->display); ++ Screen* pScreen = XDefaultScreenOfDisplay((Display*)pWin->display); ++ XUnlockDisplay((Display*) pWin->display); ++ UINT16 uHorzRes = WidthOfScreen(pScreen); ++ UINT16 uVertRes = HeightOfScreen(pScreen); ++ int attrMask = 0; ++ XSetWindowAttributes attr; ++ ++ memset(&attr, 0, sizeof(XSetWindowAttributes)); ++ attrMask = CWOverrideRedirect | CWBorderPixel | ++ CWBackPixel | CWCursor; ++ attr.cursor = None; ++ attr.override_redirect = True; ++ XLockDisplay((Display*)pWin->display); ++ attr.background_pixel = BlackPixel((Display*)pWin->display, ++ DefaultScreen((Display*)pWin->display)); ++ attr.border_pixel = BlackPixel((Display*)pWin->display, ++ DefaultScreen((Display*)pWin->display)); ++ XUnlockDisplay((Display*)pWin->display); ++ ++ size_hints.flags = PPosition | PSize; ++ size_hints.x = 0; ++ size_hints.y = 0; ++ size_hints.width = uHorzRes; ++ size_hints.height = uVertRes; ++ ++ //Create it. ++ XLockDisplay((Display*) pWin->display); ++ Window window = XCreateWindow((Display*)pWin->display, ++ DefaultRootWindow((Display*)pWin->display), ++ size_hints.x, ++ size_hints.y, ++ size_hints.width, ++ size_hints.height, ++ 0, ++ CopyFromParent, ++ InputOutput, ++ CopyFromParent, ++ attrMask, ++ &attr); ++ ++ //Tell the WM about this window. ++ XSetStandardProperties( (Display*)pWin->display, ++ window, ++ "unixfullscreen", ++ "unixfullscreen", ++ None, ++ NULL, 0, ++ &size_hints ++ ); ++ ++ int result = XSelectInput( zm_display, window, ++ ButtonPressMask | ButtonReleaseMask | KeyPressMask | ++ KeyReleaseMask | EnterWindowMask | LeaveWindowMask | ++ PointerMotionMask | ButtonMotionMask | KeymapStateMask | ++ ExposureMask | StructureNotifyMask | FocusChangeMask ++ ); ++ ++ //Map the window. ++ XMapWindow((Display*)pWin->display, window); ++ XUnlockDisplay((Display*) pWin->display); ++ ++ ++ //Get ready to resize the presentation.... ++ if(m_pTopLevelSite) ++ { ++ m_pTopLevelSite->m_bDisableForceRedraw = TRUE; ++ } ++ ++ //Maintain aspect ratio and Scale it. ++ float fXScale = (float)uHorzRes/(float)(m_size.cx); ++ float fYScale = (float)uVertRes/(float)(m_size.cy); ++ float fScale = (fXScaledisplay); ++ XQueryTree( (Display*)pWin->display, ++ (Window)pWin->window, ++ &winRootParent, ++ &winParent, ++ &pwinChildren, ++ &nNumChildren ++ ); ++ //Free unused children list. ++ XFree( pwinChildren ); ++ XUnlockDisplay((Display*) pWin->display); ++ ++ HX_ASSERT( winParent ); ++ m_winOldParent = winParent; ++ XLockDisplay((Display*) pWin->display); ++ XReparentWindow( (Display*)pWin->display, ++ (Window)pWin->window, ++ window, ++ m_ptFullScreenOffset.x, ++ m_ptFullScreenOffset.y ++ ); ++ ++ //Flush event queue. ++ XSync((Display*)pWin->display, False); ++ XUnlockDisplay((Display*) pWin->display); ++ ++ //Save it ++ m_winFullScreenWindow = window; ++ m_bInFullScreen = TRUE; ++ ++ //Now resize it... ++ SetSize(m_size); ++ //Redraw the presentation.... ++ m_pTopLevelSite->m_bDisableForceRedraw = FALSE; ++ _ForceRedrawAll(); ++ ++ //Give it focus.... ++ _SetFocus( (void*)pWin->window ); ++ ++ // now eat all the focusouts that came as a result of this reparent... ++ XEvent event; ++ XLockDisplay((Display*) pWin->display); ++ HXBOOL status = XCheckTypedWindowEvent((Display*)pWin->display, (Window)pWin->window, ++ FocusOut, &event); ++ XUnlockDisplay((Display*) pWin->display); ++ while (m_bWindowCreatedByCreate && status) ++ { ++ // just discarding these ++ XLockDisplay((Display*) pWin->display); ++ status = XCheckTypedWindowEvent((Display*)pWin->display, (Window)pWin->window, ++ FocusOut, &event); ++ XUnlockDisplay((Display*) pWin->display); ++ } ++ ++ //Update the status text... ++ if(m_pStatusText) ++ { ++ m_pStatusText->ParentChangedSize(); ++ m_pStatusText->Show(); ++ } ++ ++#else ++ HX_ASSERT( "Not implemented..." == NULL ); ++#endif ++ return HXR_OK; ++} ++ ++HX_RESULT CHXExSite::_ExitFullScreen() ++{ ++#if 0 ++ HX_ASSERT( this == m_pTopLevelSite ); ++ ++ HXxWindow* pWin = GetWindow(); ++ ++ HX_ASSERT( pWin && pWin->display && pWin->window ); ++ ++ //Give the window back to the TLC. ++ ++ XLockDisplay((Display*) pWin->display); ++ XReparentWindow( (Display*)pWin->display, ++ (Window)pWin->window, ++ m_winOldParent, ++ m_position.x, m_position.y ++ ); ++ XUnlockDisplay((Display*) pWin->display); ++ ++ //Just kill our window and take us out of full screen.... ++ if( 0 != m_winFullScreenWindow ) ++ { ++ XLockDisplay((Display*) pWin->display); ++ XDestroyWindow( (Display*)pWin->display, m_winFullScreenWindow ); ++ XUnlockDisplay((Display*) pWin->display); ++ m_winFullScreenWindow = 0; ++ } ++ ++ m_bDisableForceRedraw = TRUE; ++ ++ m_bInFullScreen = FALSE; ++ HXxSize size = {0,0}; ++ memcpy( &size, &m_PreFullScreenSize, sizeof(HXxSize) ); /* Flawfinder: ignore */ ++ m_PreFullScreenSize.cx = m_PreFullScreenSize.cy = 0; ++ ++ SetSize(size); ++ _SetFocus( (void*)pWin->window ); ++ m_ptFullScreenOffset.x = 0; ++ m_ptFullScreenOffset.y = 0; ++ ++ ++ m_bDisableForceRedraw = FALSE; ++ _ForceRedrawAll(); ++ ++ if(m_pStatusText) ++ { ++ m_pStatusText->ParentChangedSize(); ++ m_pStatusText->Hide(); ++ } ++ ++ //move the site back to where it was. ++ if( m_pTopLevelSite ) ++ { ++ m_pTopLevelSite->_SetPosition(m_CreateWindowPos); ++ } ++ ++ return HXR_OK; ++#else ++ HX_ASSERT( "Not implemented..." == NULL ); ++#endif ++} ++ ++HX_RESULT CHXExSite::_EnterFullScreenNoNewWindow() ++{ ++#if 0 ++ HXxWindow* pWin = GetWindow(); ++ ++ HX_ASSERT( pWin && pWin->display && pWin->display); ++ HX_ASSERT( this == m_pTopLevelSite ); ++ ++ if(IsFullScreen() || !pWin) ++ { ++ //We are already in full screen ++ return HXR_FAIL; ++ } ++ ++ //Get the screen size. ++ XLockDisplay((Display*) pWin->display); ++ Screen* pScreen = XDefaultScreenOfDisplay((Display*)pWin->display); ++ UINT16 uHorzRes = WidthOfScreen(pScreen); ++ UINT16 uVertRes = HeightOfScreen(pScreen); ++ XUnlockDisplay((Display*)pWin->display); ++ ++ //Get ready to resize the presentation.... ++ if( m_pTopLevelSite ) ++ { ++ m_pTopLevelSite->m_bDisableForceRedraw = TRUE; ++ } ++ ++ //Maintain aspect ratio and Scale it. ++ float fXScale = (float)uHorzRes/(float)(m_size.cx); ++ float fYScale = (float)uVertRes/(float)(m_size.cy); ++ float fScale = (fXScaledisplay); ++ XQueryTree( (Display*)pWin->display, ++ (Window)pWin->window, ++ &winRootParent, ++ &winParent, ++ &pwinChildren, ++ &nNumChildren ++ ); ++ ++ //Free unused children list. ++ XFree( pwinChildren ); ++ XUnlockDisplay((Display*) pWin->display); ++ ++ HX_ASSERT( winParent ); ++ m_winOldParent = winParent; ++ ++ m_bInFullScreen = TRUE; ++ ++ //Now resize it... ++ SetSize(m_size); ++ ++ //Redraw the presentation.... ++ if( m_pTopLevelSite ) ++ { ++ m_pTopLevelSite->m_bDisableForceRedraw = FALSE; ++ } ++ ++ _ForceRedrawAll(); ++ ++ //Give it focus.... ++ _SetFocus( (void*)pWin->window ); ++ ++ // now eat all the focusouts that came as a result of this reparent... ++ XEvent event; ++ XLockDisplay((Display*) pWin->display); ++ HXBOOL status = XCheckTypedWindowEvent((Display*)pWin->display, (Window)pWin->window, ++ FocusOut, &event); ++ XUnlockDisplay((Display*) pWin->display); ++ while (m_bWindowCreatedByCreate && status) ++ { ++ // just discarding these ++ XLockDisplay((Display*) pWin->display); ++ status = XCheckTypedWindowEvent((Display*)pWin->display, (Window)pWin->window, ++ FocusOut, &event); ++ XUnlockDisplay((Display*) pWin->display); ++ } ++ ++ //Update the status text... ++ if(m_pStatusText) ++ { ++ m_pStatusText->ParentChangedSize(); ++ m_pStatusText->Show(); ++ } ++#if defined(HELIX_CONFIG_MOBLIN) ++ if(!m_pAttachWindowCallback) ++ { ++ m_pAttachWindowCallback = new CHXGenericCallback((void*)this, (fGenericCBFunc)AttachWindowCallback); ++ m_pAttachWindowCallback->AddRef(); ++ } ++ if(!m_pForceRedrawCallback) ++ { ++ m_pForceRedrawCallback = new CHXGenericCallback((void*)this, (fGenericCBFunc)ForceRedrawCallback); ++ m_pForceRedrawCallback->AddRef(); ++ } ++ ++ // schedule callback for Attaching Window ++ if(m_pAttachWindowCallback) ++ { ++ m_pAttachWindowCallback->CallbackScheduled(m_pScheduler->RelativeEnter(m_pAttachWindowCallback, 100)); ++ } ++ if(m_pForceRedrawCallback) ++ { ++ m_pForceRedrawCallback->CallbackScheduled(m_pScheduler->RelativeEnter(m_pForceRedrawCallback, 500)); ++ } ++ ++#endif ++#else ++ HX_ASSERT( "Not implemented..." == NULL ); ++#endif ++ return HXR_OK; ++} ++ ++#if defined(HELIX_CONFIG_MOBLIN) ++void CHXExSite::AttachWindowCallback(void* pParam) ++{ ++ CHXExSite* pObj = (CHXExSite*)pParam; ++ if (pObj) ++ { ++ pObj->_AttachWindow(); ++ } ++} ++ ++ ++void CHXExSite::ForceRedrawCallback(void* pParam) ++{ ++ CHXExSite* pObj = (CHXExSite*)pParam; ++ ++ if (pObj) ++ { ++ UINT32 ulNumOfChildren = pObj->GetNumberOfChildSites(); ++ if(pObj->m_pTopLevelSite) ++ { ++ pObj->m_pTopLevelSite->m_bDisableForceRedraw = FALSE; ++ } ++ for ( UINT32 i = 0; i < ulNumOfChildren; ++i ) ++ { ++ SPIHXSite spChildSite; ++ if ( SUCCEEDED( pObj->GetNthChildSite( i, *spChildSite.AsInOutParam() ) ) ++ && spChildSite.IsValid() ) ++ { ++ spChildSite->DamageRegion( NULL ); ++ spChildSite->ForceRedraw(); ++ } ++ ++ } ++ } ++} ++ ++void CHXExSite::RemovePendingCallback(CHXGenericCallback* pCB) ++{ ++ if (pCB && ++ pCB->GetPendingCallback() && ++ m_pScheduler) ++ { ++ m_pScheduler->Remove(pCB->GetPendingCallback()); ++ pCB->CallbackCanceled(); ++ } ++} ++#endif ++ ++HX_RESULT CHXExSite::_EnterFullScreenExt(HXxWindow* pWindow, IHXValues* pValues) ++{ ++#if 0 ++ m_bReparent = FALSE; ++ HX_RESULT res = HXR_OK; ++ UINT32 ulReparent = 0; ++ ++ if (pValues) ++ { ++ pValues->GetPropertyULONG32("Reparent", ulReparent); ++ } ++ ++ m_bReparent = (HXBOOL)ulReparent; ++ ++ if (m_bReparent) ++ { ++ res = _EnterFullScreen(pWindow); ++ } ++ else ++ { ++ res = _EnterFullScreenNoNewWindow(); ++ } ++ ++ CHXBaseSite::FullScreenEntered(res); ++ return res; ++#else ++ HX_ASSERT( "Not implemented..." == NULL ); ++ return HXR_OK; /* this makes compiler happy */ ++#endif ++} ++ ++HX_RESULT CHXExSite::_ExitFullScreenExt() ++{ ++#if 0 ++ HX_RESULT res = _ExitFullScreen(); ++#if defined(HELIX_CONFIG_MOBLIN) ++ // schedule callback for attaching window ++ if(m_pAttachWindowCallback) ++ { ++ m_pAttachWindowCallback->CallbackScheduled(m_pScheduler->RelativeEnter(m_pAttachWindowCallback, 100)); ++ } ++ // schedule callback for Force Redraw the window ++ if(m_pForceRedrawCallback) ++ { ++ m_pForceRedrawCallback->CallbackScheduled(m_pScheduler->RelativeEnter(m_pForceRedrawCallback, 500)); ++ } ++#endif ++ CHXBaseSite::FullScreenExited(res); ++ ++ return res; ++#else ++ HX_ASSERT( "Not implemented..." == NULL ); ++ return HXR_OK; /* this makes compiler happy */ ++#endif ++ ++} ++ ++HX_RESULT CHXExSite::_EventOccurred(HXxEvent* pEvent) ++{ ++ return HXR_OK; ++} ++ ++HX_RESULT CHXExSite::_TestFullScreen( void* hTestBitmap, ++ const char* pszStatusText ) ++{ ++#ifdef _DEBUG ++ fprintf( stderr, "Going to test full screen....\n" ); ++#endif ++ return HXR_OK; ++} ++ ++void CHXExSite::ProcessEvent(HXxEvent* pEvent) ++{ ++ if(pEvent) ++ { ++ //Expose event compression. Combine all outstanding expose events ++ //into one big region. ++ if(Expose==pEvent->event) ++ { ++ _CollapseExposeEvents((XEvent*)pEvent->param2); ++ } ++ } ++ ++ //Send the event to each registered UnixSite. ++ void* pSite = NULL; ++ void* pWindow = NULL; ++ POSITION pos = z_mapSiteToWindow.GetStartPosition(); ++ while( pos ) ++ { ++ z_mapSiteToWindow.GetNextAssoc(pos, pSite, pWindow); ++ CHXExSite* pSiteWindowed = (CHXExSite*)pSite; ++ CHXExSite* pTopLevel = NULL; ++ HX_ASSERT(pSiteWindowed); ++ pSiteWindowed->AddRef(); ++ pTopLevel = (CHXExSite*)pSiteWindowed->GetTopLevelSite(); ++ ++ if(pEvent) ++ { ++ //Call back into the basesite's event loop. ++ pTopLevel->EventOccurred(pEvent); ++ } ++ ++ //XXXgfw As a workaround for the overlay not moving while the ++ //player is paused, we will check it here and update it if needed. ++ ++ //XXXRGG We might be able to use X's ConfigureNotify messages instead ++ //of doing a refresh every 50 ms. ++ pTopLevel->_UpdateOverlayIfNeeded(); ++ ++ pSiteWindowed->Release(); ++ } ++} ++ ++void CHXExSite::_CollapseExposeEvents(XEvent* xevent) ++{ ++ Display* display = xevent->xany.display; ++ Window window = xevent->xany.window; ++ XExposeEvent* expose_event = (XExposeEvent*)xevent; ++ XEvent new_event; ++ XExposeEvent* new_expose_event = (XExposeEvent*)&new_event; ++ ushort x1; ++ ushort y1; ++ ushort x2; ++ ushort y2; ++ ushort x3; ++ ushort y3; ++ ++ x1 = expose_event->x; ++ y1 = expose_event->y; ++ x2 = x1 + expose_event->width; ++ y2 = y1 + expose_event->height; ++ XLockDisplay(display); ++ HXBOOL status = XCheckWindowEvent(display, window, ExposureMask, &new_event); ++ XUnlockDisplay(display); ++ while( status) ++ { ++ if (new_expose_event->x < x1) ++ x1 = new_expose_event->x; ++ ++ if (new_expose_event->y < y1) ++ y1 = new_expose_event->y; ++ ++ x3 = new_expose_event->x + new_expose_event->width; ++ if (x3 > x2) ++ x2 = x3; ++ ++ y3 = new_expose_event->y + new_expose_event->height; ++ if (y3 > y2) ++ y2 = y3; ++ XLockDisplay(display); ++ status = XCheckWindowEvent(display, window, ExposureMask, &new_event); ++ XUnlockDisplay(display); ++ ++ } ++ ++ expose_event->x = x1; ++ expose_event->y = y1; ++ expose_event->width = x2 - x1; ++ expose_event->height = y2 - y1; ++ expose_event->count = new_expose_event->count; ++} ++ ++ ++HXBOOL CHXExSite::_ShouldProcess(HXxEvent* pEvent) ++{ ++ HXBOOL bShouldProcessThisEvent = TRUE; ++ ++ ++ if( !IsSiteVisible() ) ++ { ++ switch (pEvent->event) ++ { ++ case ButtonPress: ++ case ButtonRelease: ++ case Expose: ++ case FocusIn: ++ bShouldProcessThisEvent = FALSE; ++ break; ++ default: ++ break; ++ } ++ } ++ ++ if(m_pWindow && m_pWindow->window!=pEvent->window) ++ { ++ bShouldProcessThisEvent = FALSE; ++ } ++ return bShouldProcessThisEvent; ++} ++ ++ ++/////////////////////////////////////////////////////// ++// ++// UnixEventHandler methods... ++// ++CHXExSite::UnixEventHandler::UnixEventHandler(CHXExSite* pParent) ++ : m_pParent(pParent), ++ m_lRefCount(0), ++ m_cbHandle(0) ++{ ++ HX_ASSERT(m_pParent); ++ HX_ASSERT(m_pParent->m_pScheduler); ++ m_cbHandle = m_pParent->m_pScheduler->RelativeEnter((IHXCallback*)this, 30); ++} ++ ++CHXExSite::UnixEventHandler::~UnixEventHandler() ++{ ++ CancelCallback(); ++} ++ ++void ++CHXExSite::UnixEventHandler::CancelCallback() ++{ ++ if( m_cbHandle && m_pParent && m_pParent->m_pScheduler ) ++ { ++ UINT32 tempHandle = m_cbHandle; ++ m_cbHandle = 0; ++ m_pParent->m_pScheduler->Remove(tempHandle); ++ } ++} ++ ++HX_RESULT CHXExSite::UnixEventHandler::QueryInterface(REFIID riid, void** ppvObj) ++{ ++ if (IsEqualIID(riid, IID_IHXCallback)) ++ { ++ AddRef(); ++ *ppvObj = (IHXCallback*)this; ++ return HXR_OK; ++ } ++ else if (IsEqualIID(riid, IID_IUnknown)) ++ { ++ AddRef(); ++ *ppvObj = this; ++ return HXR_OK; ++ } ++ ++ *ppvObj = NULL; ++ return HXR_NOINTERFACE; ++} ++ ++ULONG32 CHXExSite::UnixEventHandler::AddRef() ++{ ++ return InterlockedIncrement(&m_lRefCount); ++} ++ ++ULONG32 CHXExSite::UnixEventHandler::Release() ++{ ++ HX_ASSERT(m_lRefCount>0); ++ if( InterlockedDecrement(&m_lRefCount)>0 ) ++ { ++ return m_lRefCount; ++ } ++ delete this; ++ return 0; ++} ++ ++//IHXCallback methods ++HX_RESULT CHXExSite::UnixEventHandler::Func() ++{ ++ XEvent xevent; ++ static HXxEvent pnevent; ++ ++ m_cbHandle = 0; ++ XLockDisplay(m_pParent->zm_display); ++ int status = XPending(m_pParent->zm_display); ++ XUnlockDisplay(m_pParent->zm_display); ++ while(status) ++ { ++ XLockDisplay(m_pParent->zm_display); ++ XNextEvent(m_pParent->zm_display, &xevent); ++ XUnlockDisplay(m_pParent->zm_display); ++ ++ // package native event in HXxEvent and send to dispatcher ++ pnevent.event = xevent.type; ++ pnevent.window = (void *)xevent.xany.window; ++ pnevent.param1 = xevent.xany.display; ++ pnevent.param2 = &xevent; ++ ++ m_pParent->ProcessEvent(&pnevent); ++ XLockDisplay(m_pParent->zm_display); ++ status = XPending(m_pParent->zm_display); ++ XUnlockDisplay(m_pParent->zm_display); ++ } ++ ++ if (m_pParent && m_pParent->m_pScheduler) ++ { ++ m_cbHandle = m_pParent->m_pScheduler->RelativeEnter((IHXCallback*)this, 30); ++ } ++ return HXR_OK; ++} ++ ++void CHXExSite::_UpdateOverlayIfNeeded() ++{ ++ if( m_pVideoSurface ) ++ { ++ if( m_pVideoSurface->m_nBltMode == HX_OVERLAY_BLT ) ++ { ++ ULONG32 ulNow = HX_GET_BETTERTICKCOUNT(); ++ CUnixSurf* pSurf = (CUnixSurf*)m_pVideoSurface; ++ if( ulNow- pSurf->m_ulLastOverlayUpdateTime > 50 ) ++ { ++ SiteMoving(0,0); ++ } ++ } ++ } ++ LISTPOSITION pos = m_ChildrenInZOrder.GetHeadPosition(); ++ while(pos) ++ { ++ CHXExSite* pSite = (CHXExSite*)m_ChildrenInZOrder.GetNext(pos); ++ pSite->_UpdateOverlayIfNeeded(); ++ } ++} ++ ++ ++HXBOOL CHXExSite::_ShouldEnterForceRedraw() ++{ ++ if( !m_bDamaged || !m_pUser || !IsSiteVisible() ) ++ { ++ return FALSE; ++ } ++ ++ if(InterlockedIncrement(&m_lBltEntryCount)>1) ++ { ++ InterlockedDecrement(&m_lBltEntryCount); ++ return FALSE; ++ } ++ ++ return TRUE; ++} ++ ++void CHXExSite::_ExitForceRedraw() ++{ ++ InterlockedDecrement(&m_lBltEntryCount); ++} ++ +Index: helix-libs/clientapps/clutter/exsite.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exsite.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,272 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Source last modified: $Id: unixsite.h,v 1.10.2.3 2008/06/05 14:24:30 lovish Exp $ ++ * ++ * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, ++ * are subject to the current version of the RealNetworks Public ++ * Source License (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the current version of the RealNetworks Community ++ * Source License (the "RCSL") available at ++ * http://www.helixcommunity.org/content/rcsl, in which case the RCSL ++ * will apply. You may also obtain the license terms directly from ++ * RealNetworks. You may not use this file except in compliance with ++ * the RPSL or, if you have a valid RCSL with RealNetworks applicable ++ * to this file, the RCSL. Please see the applicable RPSL or RCSL for ++ * the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * Alternatively, the contents of this file may be used under the ++ * terms of the GNU General Public License Version 2 (the ++ * "GPL") in which case the provisions of the GPL are applicable ++ * instead of those above. If you wish to allow use of your version of ++ * this file only under the terms of the GPL, and not to allow others ++ * to use your version of this file under the terms of either the RPSL ++ * or RCSL, indicate your decision by deleting the provisions above ++ * and replace them with the notice and other provisions required by ++ * the GPL. If you do not delete the provisions above, a recipient may ++ * use your version of this file under the terms of any one of the ++ * RPSL, the RCSL or the GPL. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the ++ * portions it created. ++ * ++ * This file, and the files included with this file, is distributed ++ * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY ++ * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ++ * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ++ * ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * Phil Dibowitz (jaymzh) ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef _UNIXSITE_H ++#define _UNIXSITE_H ++ ++#if defined(USE_XWINDOWS) ++#include ++#include ++#include ++#include ++#include ++#include ++#endif ++ ++#include "basesite.h" ++#include "hxcbobj.h" ++#include "player.h" ++ ++class CHXExSite : public CHXBaseSite ++{ ++public: ++ ++ friend class CExSurf; ++ friend class CExRootSurf; ++ ++ CHXExSite( IUnknown* pContext, ++ IUnknown* pUnkOuter, ++ INT32 lInitialZorder, ++ on_new_frame_cb_t on_new_frame_cb = NULL, ++ void *context = NULL); ++ ++ static void ProcessEvent(HXxEvent* pEvent); ++ Window CreateXWindow( Window win ); ++ ++ void _ForwardUpdateEvent(HXxEvent* pEvent); ++ ++ //static member vars. ++ static Display* zm_display; ++ void _UpdateOverlayIfNeeded(); ++ HXBOOL m_bIgnoreFocusOutInFS; ++ ++ //We override this. ++ void CheckColorSettings(); ++ ++protected: ++ ++ virtual ~CHXExSite(); ++ ++ // ++ // CHXExSite only methods.... ++ // ++ HX_RESULT _OpenXDisplay(char* DiplayString); ++ static void _CollapseExposeEvents(XEvent* xevent); ++ HXBOOL _ShouldProcess(HXxEvent* pEvent); ++ void _DrawArrows(); ++ void _CreateHorizScrollBar(void); ++ void _CreateVertScrollBar(void); ++ HXBOOL _InButton(HXxPoint& pt, int x, int y ); ++ void _DestroyScrollButtons(); ++ void _MapScrollButtons(); ++ void _MapHorzScroll(); ++ void _MapVertScroll(); ++ void _UnmapHorzScroll(); ++ void _UnmapVertScroll(); ++ void _UnmapScrollButtons(); ++ void _BuildClipRegion(); ++ void _ReleaseClippingRegion(); ++ ++ // ++ // Seperate object for our callbacks to keep the events flowing. ++ // ++ class UnixEventHandler : public IHXCallback ++ { ++ public: ++ UnixEventHandler(CHXExSite* pParent); ++ ++ //IUnknown methods ++ virtual HX_RESULT QueryInterface(REFIID riid, void** ppvObj); ++ virtual ULONG32 AddRef(); ++ virtual ULONG32 Release(); ++ ++ //IHXCallback methods ++ virtual HX_RESULT Func(); ++ void CancelCallback(); ++ ++ private: ++ virtual ~UnixEventHandler(); ++ ++ UnixEventHandler(); ++ UnixEventHandler(const UnixEventHandler&); ++ UnixEventHandler& operator=(const UnixEventHandler& it ); ++ ++ CHXExSite* m_pParent; ++ LONG32 m_lRefCount; ++ CallbackHandle m_cbHandle; ++ ++ IUnknown* m_pUnkPlayer; ++ }; ++ ++ ++ // ++ // CHXBaseSite inherited methods ++ // ++ virtual void _NeedWindowedSite(); ++ virtual void _AttachWindow(); ++ virtual void _DetachWindow(); ++ virtual void* _Create(void* ParentWindow, UINT32 style); ++ virtual void _Destroy(HXxWindow* pWindow); ++ virtual void _SetSize(HXxSize size); ++ virtual void _SetPosition(HXxPoint position); ++ virtual void _DamageRect(HXxRect rect); ++ virtual void _DamageRegion(HXxRegion rect); ++ virtual HXBOOL _ShouldEnterForceRedraw(); ++ virtual void _ExitForceRedraw(); ++ virtual void _SendOSUpdateMessage(); ++ virtual void _ShowSite(HXBOOL bShow); ++ virtual HXBOOL _AtSystemTime(); ++ virtual void _GetDeviceCaps( void* hdc, ++ UINT16& uBitesPerPixel, ++ UINT16& uHorzRes, ++ UINT16& uVertRes ); ++ virtual void _GetWindowRect(HXxRect* destRect); ++ virtual void _DestroySliders(); ++ virtual HXBOOL _HandleOSEvents(HXxEvent* pEvent); ++ virtual HXBOOL _ConvertToHXEvent(HXxEvent* pEvent); ++ virtual void _GenerateOSEvent(HXxEvent* pEvent, HXxEvent* pEvent2); ++ virtual void _GenerateSetCursorEvent(); ++ virtual void _TryCreateXSlider(); ++ virtual void _SetXSliderValues(INT32 range, INT32 pageSize); ++ virtual void _TryCreateYSlider(); ++ virtual void _SetYSliderValues(INT32 range, INT32 pageSize); ++ virtual void _GetSystemSizeOfSliders(INT32* pWidth, INT32* pHeight); ++ virtual HXBOOL _IsWindowVisible(); ++ virtual void _ShowXSlider(HXBOOL bShow); ++ virtual void _MoveXSlider( INT32 left, ++ INT32 top, ++ INT32 right, ++ INT32 bottom, ++ HXBOOL bRedraw ); ++ virtual void _ShowYSlider(HXBOOL bShow); ++ virtual void _MoveYSlider( INT32 left, ++ INT32 top, ++ INT32 right, ++ INT32 bottom, ++ HXBOOL bRedraw); ++ virtual HXBOOL _DoesXSliderExist(); ++ virtual void* _GetContainingWindow(); ++ virtual void _GetCursorPos(HXxPoint* pPoint); ++ virtual void _MapPointToOSWindow(HXxPoint* pPt, void** pWindowHandle); ++ virtual void* _GetWindowWithCursor(); ++ virtual void _ReInitPrimarySurface(); ++ virtual HXBOOL _MoveWindow( void* , ++ INT32 X, ++ INT32 Y, ++ INT32 nWidth, ++ INT32 nHeight, ++ HXBOOL bRepaint); ++ virtual HXBOOL _UpdateWindow(void* hWnd); ++ virtual HXBOOL _ShowWindow(void* hWnd, INT32 nCmdShow); ++ virtual HXBOOL _SetWindowPos(void* hWnd, ++ void* hWndInsertAfter, ++ INT32 X, ++ INT32 Y, ++ INT32 cx, ++ INT32 cy, ++ INT32 uFlags); ++ virtual HXBOOL _SetWindowRgn(void* hWnd, HXREGION* hRgn, HXBOOL bRedraw); ++ virtual void _SetFocus(void* pWindow); ++ ++ virtual HX_RESULT _EnterFullScreen(HXxWindow* pWindow = NULL); ++ virtual HX_RESULT _EventOccurred(HXxEvent* pEvent); ++ virtual HX_RESULT _ExitFullScreen(); ++ virtual HX_RESULT _TestFullScreen( void* hTestBitmap, ++ const char* pszStatusText ); ++ virtual HX_RESULT _EnterFullScreenExt(HXxWindow* pWindow, IHXValues* pValues); ++ virtual HX_RESULT _ExitFullScreenExt(); ++#if defined(HELIX_CONFIG_MOBLIN) ++ static void AttachWindowCallback(void *pParam); ++ static void ForceRedrawCallback(void *pParam); ++ void RemovePendingCallback(CHXGenericCallback* pCB); ++ ++ CHXGenericCallback* m_pAttachWindowCallback; ++ CHXGenericCallback* m_pForceRedrawCallback; ++#endif ++ HXBOOL m_bReparent; ++ ++private: ++ ++ //Protect unintentional copy and default ctors. ++ CHXExSite(); ++ CHXExSite( const CHXExSite& ); ++ CHXExSite& operator=( const CHXExSite& it ); ++ HX_RESULT _EnterFullScreenNoNewWindow(); ++ ++ //member vars. ++ UnixEventHandler* m_pUnixEventHandler; ++ static Cursor zm_GrabCursor; ++ Window m_ScrollHorizButtonL; ++ Window m_ScrollHorizButtonR; ++ Window m_ScrollVertButtonT; ++ Window m_ScrollVertButtonB; ++ Window m_winFullScreenWindow; ++ Window m_winOldParent; ++ HXxPoint m_ptScrollHorizPosL; ++ HXxPoint m_ptScrollHorizPosR; ++ HXxPoint m_ptScrollVertPosT; ++ HXxPoint m_ptScrollVertPosB; ++ HXxPoint m_ptFullScreenOffset; ++ HXxSize m_PreFullScreenSize; ++ HXBOOL m_bScrollingInProgress; ++ int m_nScrollDir; ++ HXBOOL m_bLastPointInSite; ++ HXBOOL m_bDamaged; ++ // ++ //Private helpers... ++ // ++ ++ //returns the HX_VK associated with this keysym.... ++ UINT32 _MapKeySymToHXVK(KeySym tmpSym, UINT32& uFlags); ++ on_new_frame_cb_t m_on_new_frame_cb; ++ void *m_context; ++}; ++ ++#endif //_UNIXSITE_H +Index: helix-libs/clientapps/clutter/exsitsup.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exsitsup.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,455 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifdef _WIN16 ++#include ++#endif ++ ++#include "hxcom.h" ++#include "hxtypes.h" ++#include "hxwintyp.h" ++#include "hxwin.h" ++#include "ihxpckts.h" ++#include "hxcomm.h" ++#include "fivemmap.h" ++#include "hxstring.h" // CHXString ++#include "exsite.h" ++#include "exsitsup.h" ++#include "pckunpck.h" // CreateBufferCCF ++#include "ciddefs.h" // CID_RGB32 ++#if defined(HELIX_FEATURE_PNG) ++#include "pxpngenc.h" // PXPNGEncode::EncodeToPNGBuffer ++#endif // HELIX_FEATURE_PNG ++#include "print.h" ++ ++ ++#include "globals.h" ++struct _stGlobals*& GetGlobal(); ++ ++/************************************************************************ ++ * Method: ++ * Constructor ++ */ ++ ExampleSiteSupplier::ExampleSiteSupplier(IUnknown* pUnkPlayer, on_new_frame_cb_t on_new_frame_cb = NULL, void *context = NULL) ++ : m_lRefCount(0) ++ , m_pSiteManager(NULL) ++ , m_pSite(NULL) ++ , m_pSiteCapture(NULL) ++ , m_pCaptureBuffer(NULL) ++ , m_pCCF(NULL) ++ , m_pUnkPlayer(pUnkPlayer) ++ , m_on_new_frame_cb(on_new_frame_cb) ++ , m_context(context) ++{ ++ if (m_pUnkPlayer) ++ { ++ m_pUnkPlayer->QueryInterface(IID_IHXSiteManager, ++ (void**)&m_pSiteManager); ++ ++ //printf("pauldebug:m_pUnkplayer->QueryInterface for m_pCCF calling\n"); ++ m_pUnkPlayer->QueryInterface(IID_IHXCommonClassFactory, ++ (void**)&m_pCCF); ++ //printf("pauldebug:m_pUnkplayer->QueryInterface for m_pCCF called\n"); ++ ++ m_pUnkPlayer->AddRef(); ++ } ++}; ++ ++/************************************************************************ ++ * Method: ++ * Destructor ++ */ ++ExampleSiteSupplier::~ExampleSiteSupplier() ++{ ++ HX_RELEASE(m_pSiteManager); ++ HX_RELEASE(m_pSite); ++ HX_RELEASE(m_pSiteCapture); ++ HX_RELEASE(m_pCaptureBuffer); ++ HX_RELEASE(m_pCCF); ++ HX_RELEASE(m_pUnkPlayer); ++} ++ ++/************************************************************************ ++ * Method: ++ * IUnknown::QueryInterface ++ */ ++ STDMETHODIMP ++ExampleSiteSupplier::QueryInterface(REFIID riid, void** ppvObj) ++{ ++ if (IsEqualIID(riid, IID_IUnknown)) ++ { ++ AddRef(); ++ *ppvObj = (IUnknown*)(IHXSiteSupplier*)this; ++ return HXR_OK; ++ } ++ else if (IsEqualIID(riid, IID_IHXSiteSupplier)) ++ { ++ AddRef(); ++ *ppvObj = (IHXSiteSupplier*)this; ++ return HXR_OK; ++ } ++ ++ *ppvObj = NULL; ++ return HXR_NOINTERFACE; ++} ++ ++/************************************************************************ ++ * Method: ++ * IUnknown::AddRef ++ */ ++ STDMETHODIMP_(ULONG32) ++ExampleSiteSupplier::AddRef() ++{ ++ return InterlockedIncrement(&m_lRefCount); ++} ++ ++/************************************************************************ ++ * Method: ++ * IUnknown::Release ++ */ ++ STDMETHODIMP_(ULONG32) ++ExampleSiteSupplier::Release() ++{ ++ if (InterlockedDecrement(&m_lRefCount) > 0) ++ { ++ return m_lRefCount; ++ } ++ ++ delete this; ++ return 0; ++} ++ ++/************************************************************************ ++ * Method: ++ * IHXSiteSupplier::SitesNeeded ++ * Purpose: ++ * Called to inform the site supplier that a site with a particular ++ * set of characteristics is needed. If the site supplier can ++ * fulfill the request it should call the site manager and add one ++ * or more new sites. ++ * Note that the request for sites is associated with a Request ID ++ * the client core will inform the site supplier when this requested ++ * site is no longer needed. ++ */ ++STDMETHODIMP ++ExampleSiteSupplier::SitesNeeded ++( ++ UINT32 uRequestID, ++ IHXValues* pProps ++ ) ++{ ++ /* ++ * Don't create a site if the -NULL_RENDER command line option ++ * was given. - jfarr ++ */ ++ if (GetGlobal()->g_bNullRender) ++ { ++ return (HXR_OK); ++ } ++ ++ /* ++ * If there are no properties, then we can't really create a ++ * site, because we have no idea what type of site is desired! ++ */ ++ if (!pProps) ++ { ++ return HXR_INVALID_PARAMETER; ++ } ++ ++ HRESULT hres = HXR_OK; ++ IHXValues* pSiteProps = NULL; ++ IHXSiteWindowed* pSiteWindowed = NULL; ++ IHXBuffer* pValue = NULL; ++ UINT32 style = 0; ++ IHXSite* pSite = NULL; ++ ++#if 0 ++ // Just let the RMA client core create a windowed site for us. ++ hres = m_pCCF->CreateInstance(CLSID_IHXSiteWindowed,(void**)&pSiteWindowed); ++ if (HXR_OK != hres) ++ { ++ goto exit; ++ } ++#else ++ { ++ *(void **)&pSiteWindowed = (IUnknown*)(IHXSiteWindowed*)(new CHXExSite(GetGlobal()->pMediaPlatform, NULL, 0, m_on_new_frame_cb, m_context)); ++ hres = ((IUnknown*)*(void **)&pSiteWindowed)->QueryInterface(IID_IHXSiteWindowed, (void**)&pSiteWindowed); ++ if (HXR_OK != hres) ++ { ++ goto exit; ++ } ++ } ++#endif ++ ++ hres = pSiteWindowed->QueryInterface(IID_IHXSite,(void**)&pSite); ++ if (HXR_OK != hres) ++ { ++ goto exit; ++ } ++ ++ if( !m_pSite ) ++ { ++ m_pSite = pSite; ++ m_pSite->AddRef(); ++ } ++ ++ ++ hres = pSiteWindowed->QueryInterface(IID_IHXValues,(void**)&pSiteProps); ++ if (HXR_OK != hres) ++ { ++ goto exit; ++ } ++ ++ /* ++ * We need to figure out what type of site we are supposed to ++ * to create. We need to "switch" between site user and site ++ * properties. So look for the well known site user properties ++ * that are mapped onto sites... ++ */ ++ hres = pProps->GetPropertyCString("playto",pValue); ++ if (HXR_OK == hres) ++ { ++ pSiteProps->SetPropertyCString("channel",pValue); ++ HX_RELEASE(pValue); ++ } ++ else ++ { ++ hres = pProps->GetPropertyCString("name",pValue); ++ if (HXR_OK == hres) ++ { ++ pSiteProps->SetPropertyCString("LayoutGroup",pValue); ++ HX_RELEASE(pValue); ++ } ++ } ++ ++#ifdef _WINDOWS ++ style = WS_OVERLAPPED | WS_VISIBLE | WS_CLIPCHILDREN; ++#endif ++ ++ hres = pSiteWindowed->Create(NULL, style); ++ if (HXR_OK != hres) ++ { ++ goto exit; ++ } ++ ++ /* ++ * We need to wait until we have set all the properties before ++ * we add the site. ++ */ ++ hres = m_pSiteManager->AddSite(pSite); ++ if (HXR_OK != hres) ++ { ++ goto exit; ++ } ++#ifdef _WINDOWS ++ { ++ HXxWindow* pWindow = pSiteWindowed->GetWindow(); ++ if (pWindow && pWindow->window) ::SetForegroundWindow( (HWND)(pWindow->window) ); ++ } ++#endif ++ m_CreatedSites.SetAt((void*)uRequestID,pSite); ++ pSite->AddRef(); ++ ++exit: ++ ++ HX_RELEASE(pSiteProps); ++ HX_RELEASE(pSiteWindowed); ++ HX_RELEASE(pSite); ++ ++ return hres; ++} ++ ++/************************************************************************ ++ * Method: ++ * IHXSiteSupplier::SitesNotNeeded ++ * Purpose: ++ * Called to inform the site supplier that all sites from a previos ++ * site request are no longer needed. If the site supplier had ++ * previously created non-persistant sites (like popup windows) ++ * to fulfill a request for sites it should call the site manager ++ * and remove those sites. ++ */ ++STDMETHODIMP ++ExampleSiteSupplier::SitesNotNeeded(UINT32 uRequestID) ++{ ++ IHXSite* pSite = NULL; ++ IHXSiteWindowed* pSiteWindowed = NULL; ++ void* pVoid = NULL; ++ ++ if (!m_CreatedSites.Lookup((void*)uRequestID,pVoid)) ++ { ++ return HXR_INVALID_PARAMETER; ++ } ++ pSite = (IHXSite*)pVoid; ++ ++ m_pSiteManager->RemoveSite(pSite); ++ ++ // Need to actually do the work on destroying the window ++ // and all that jazz. ++ pSite->QueryInterface(IID_IHXSiteWindowed,(void**)&pSiteWindowed); ++ ++ pSiteWindowed->Destroy(); ++ ++ // ref count = 2 ++ pSiteWindowed->Release(); ++ ++ // ref count = 1; deleted from this object's view! ++ pSite->Release(); ++ ++ m_CreatedSites.RemoveKey((void*)uRequestID); ++ ++ return HXR_OK; ++} ++ ++/************************************************************************ ++ * Method: ++ * IHXSiteSupplier::BeginChangeLayout ++ * Purpose: ++ * Called to inform the site supplier a layout change has beginning ++ * it can expect to recieve SitesNeeded() and SitesNotNeeded() calls ++ * while a layout change is in progress, ++ */ ++STDMETHODIMP ++ExampleSiteSupplier::BeginChangeLayout() ++{ ++ return HXR_OK; ++} ++ ++/************************************************************************ ++ * Method: ++ * IHXSiteSupplier::DoneChangeLayout ++ * Purpose: ++ * Called to inform the site supplier the layout change has been ++ * completed. ++ */ ++STDMETHODIMP ++ExampleSiteSupplier::DoneChangeLayout() ++{ ++ return HXR_OK; ++} ++ ++HX_RESULT ++ExampleSiteSupplier::CaptureImage(CHXString pszFileName, INT32 dWidth, INT32 dHeight) ++{ ++ HX_RESULT res=HXR_FAIL; ++ ++ // Get the IHXSiteCapture object from the site ++ if (m_pSiteCapture == NULL) ++ { ++ if (m_pSite && m_pSite->QueryInterface(IID_IHXSiteCapture, (void**)&m_pSiteCapture) == HXR_OK) ++ { ++ m_pSiteCapture->AddRef(); ++ } ++ } ++ ++ // Create the buffer that will receive the image data ++ if (m_pCaptureBuffer == NULL) ++ { ++ CreateBufferCCF(m_pCaptureBuffer, m_pCCF); ++ if (!m_pCaptureBuffer) ++ { ++ return HXR_OUTOFMEMORY; ++ } ++ } ++ ++ HXBOOL bCanCapture = FALSE; ++ ++ // Check if the site is available to capture an image ++ if (m_pSiteCapture && (res = m_pSiteCapture->CanCapture(bCanCapture)) == HXR_OK && bCanCapture) ++ { ++ HX_RESULT res; ++ HXxSize outputSize; ++ outputSize.cx = dWidth; ++ outputSize.cy = dHeight; ++ m_strFileName = pszFileName; ++ ++ // Asynchronous call. CaptureDone() will be called with result. ++ res = m_pSiteCapture->Capture((IHXSiteCaptureResponse*)this, m_pCaptureBuffer, &outputSize, CID_RGB32); ++ } ++ ++ return res; ++ ++} ++ ++// ++// IHXSiteCaptureResponse::CaptureDone ++// ++// Called when the site has captured the next frame. ++// bmiOutputFormat points to image format description which ++// is valid until the completion of CaptureDone. ++// bmiOutputFormat can be different for every capture. ++// pCaptureBuffer holds the image if supplied in ++// Capture() method. pCaptureBuffer is automatically ++// resized if it has insufficient size to hold the image ++// data. ++// ++// status may be: ++// HXR_FAIL -- No capture was done. General Error. All data is invalid. ++// HXR_OK -- Capture was done. Both variables are valid. ++STDMETHODIMP ++ExampleSiteSupplier::CaptureDone(REF(HX_RESULT) status, ++ REF(HXBitmapInfoHeader) bmiOutputFormat, ++ REF(IHXBuffer*) pCaptureBuffer) ++{ ++ if (status == HXR_OK) ++ { ++#if defined(HELIX_FEATURE_PNG) ++ // Convert capture buffer into PNG ++ IHXBuffer* pConvertedBuffer=NULL; ++ HX_RESULT res = HXR_OK; ++ res = PXPNGEncode::EncodeToPNGBuffer(pCaptureBuffer, &bmiOutputFormat, m_pCCF, pConvertedBuffer); ++ if (res == HXR_OK && !m_strFileName.IsEmpty()) ++ { ++ CHXString strTail = m_strFileName.Right(4); ++ if (strTail.CompareNoCase(".png") != 0) ++ { ++ m_strFileName += ".png"; ++ } ++ ++ FILE* fp = fopen(m_strFileName, "wb"); ++ if (fp) ++ { ++ fwrite(pConvertedBuffer->GetBuffer(), 1, pConvertedBuffer->GetSize(), fp); ++ fclose(fp); ++ STDOUT("Captured image to PNG file: %s\n", (const char*)m_strFileName); ++ STDOUT("File size: %ld\n", pConvertedBuffer->GetSize()); ++ } ++ HX_RELEASE(pConvertedBuffer); ++ } ++#endif // HELIX_FEATURE_PNG ++ } ++ ++ return status; ++} +Index: helix-libs/clientapps/clutter/exsitsup.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exsitsup.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,154 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef _EXSITSUP_H_ ++#define _EXSITSUP_H_ ++ ++#include "fivemmap.h" ++#include "player.h" ++ ++/**************************************************************************** ++ * ++ * Class: ++ * ++ * ExampleSiteSupplier ++ * ++ * Purpose: ++ * ++ * Implementation for ragui's IHXSiteSupplier ++ * ++ */ ++class ExampleSiteSupplier : ++ public IHXSiteSupplier ++ , public IHXSiteCaptureResponse ++{ ++private: ++ LONG32 m_lRefCount; ++ IHXSiteManager* m_pSiteManager; ++ IHXSite* m_pSite; ++ IHXSiteCapture* m_pSiteCapture; ++ IHXBuffer* m_pCaptureBuffer; ++ IHXCommonClassFactory* m_pCCF; ++ IUnknown* m_pUnkPlayer; ++ FiveMinuteMap m_CreatedSites; ++ CHXString m_strFileName; ++ on_new_frame_cb_t m_on_new_frame_cb; ++ void * m_context; ++ ++ ~ExampleSiteSupplier(); ++ ++public: ++ ExampleSiteSupplier(IUnknown* pUnkPlayer, on_new_frame_cb_t new_frame_cb = NULL, void *context = NULL); ++ ++ /* ++ * IUnknown methods ++ */ ++ STDMETHOD(QueryInterface) (THIS_ ++ REFIID riid, ++ void** ppvObj); ++ ++ STDMETHOD_(ULONG32,AddRef) (THIS); ++ ++ STDMETHOD_(ULONG32,Release) (THIS); ++ ++ /* ++ * IHXSiteSupplier methods ++ */ ++ ++ /************************************************************************ ++ * Method: ++ * IHXSiteSupplier::SitesNeeded ++ * Purpose: ++ * Called to inform the site supplier that a site with a particular ++ * set of characteristics is needed. If the site supplier can ++ * fulfill the request it should call the site manager and add one ++ * or more new sites. ++ * Note that the request for sites is associated with a Request ID ++ * the client core will inform the site supplier when this requested ++ * site is no longer needed. ++ */ ++ STDMETHOD(SitesNeeded) (THIS_ ++ UINT32 uRequestID, ++ IHXValues* pSiteProps); ++ ++ /************************************************************************ ++ * Method: ++ * IHXSiteSupplier::SitesNotNeeded ++ * Purpose: ++ * Called to inform the site supplier that all sites from a previos ++ * site request are no longer needed. If the site supplier had ++ * previously created non-persistant sites (like popup windows) ++ * to fulfill a request for sites it should call the site manager ++ * and remove those sites. ++ */ ++ STDMETHOD(SitesNotNeeded) ++ (THIS_ ++ UINT32 uRequestID); ++ ++ ++ /************************************************************************ ++ * Method: ++ * IHXSiteSupplier::BeginChangeLayout ++ * Purpose: ++ * Called to inform the site supplier a layout change has beginning ++ * it can expect to recieve SitesNeeded() and SitesNotNeeded() calls ++ * while a layout change is in progress, ++ */ ++ STDMETHOD(BeginChangeLayout) (THIS); ++ ++ /************************************************************************ ++ * Method: ++ * IHXSiteSupplier::DoneChangeLayout ++ * Purpose: ++ * Called to inform the site supplier the layout change has been ++ * completed. ++ */ ++ STDMETHOD(DoneChangeLayout) (THIS); ++ ++ /* ++ * IHXSiteCaptureResponse ++ */ ++ STDMETHOD(CaptureDone) (THIS_ ++ REF(HX_RESULT) status, ++ REF(HXBitmapInfoHeader) bmiOutputFormat, ++ REF(IHXBuffer*) pImageDataBuffer ++ ); ++ ++ HX_RESULT CaptureImage(CHXString pFileName, INT32 dWidth, INT32 dHeight); ++ ++}; ++ ++#endif // _EXSITSUP_H_ ++ +Index: helix-libs/clientapps/clutter/exstateadvsnk.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exstateadvsnk.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,229 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include ++ ++#include "hxtypes.h" ++ ++#include "hxcom.h" ++#include "hxcomm.h" ++#include "hxmon.h" ++#include "hxcore.h" ++#include "hxengin.h" ++#include "hxclsnk.h" ++#include "hxgroup.h" ++#include "hxstrutl.h" ++#include "exstateadvsnk.h" ++#include "hxstring.h" ++#include "hxprefs.h" ++#include "excontxt.h" ++ ++#include "print.h" ++ ++#include "globals.h" ++#include "player.h" ++ ++struct _stGlobals*& GetGlobal(); //in main.cpp ++ ++#ifdef __TCS__ ++extern unsigned long gStreamTime; ++ ++static int iOpened = 0; ++ ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif /* defined(__cplusplus) */ ++ ++typedef enum hookBuffering { ++ eContacting = 0, ++ eConnecting = 1, ++ eBuffering = 2, ++ ePlaying = 3 ++}hookBuffering; ++ ++void hookRealAudio_Buffering(hookBuffering connectState, int pct); ++ ++void hookRealAudio_PlayPosition(unsigned long current,unsigned long duration); ++ ++typedef enum hookState { ++ ePlay = 0, ++ ePause = 1, ++ eStop = 2, ++ eResume = 3, ++ eComplete // Clip is done playing ++}hookState; ++void hookRealAudio_State(hookState newState); ++ ++ ++#if defined(__cplusplus) ++} ++#endif /* defined(__cplusplus) */ ++ ++#endif // __TCS__ ++ ++void PrintBuffer(const char* pszName,const unsigned char* pbBuf, unsigned int dwBytes); ++ ++ExampleClientStateAdviceSink::ExampleClientStateAdviceSink(IUnknown* pUnknown, LONG32 lClientIndex, on_state_change_cb_t on_state_change_cb, void *context) ++ : m_lRefCount (0) ++ , m_lClientIndex (lClientIndex) ++ , m_pUnknown (NULL) ++ , m_State (HX_CLIENT_STATE_READY) ++ , m_state_change_cb(on_state_change_cb) ++ , m_context(context) ++{ ++ if (pUnknown) ++ { ++ m_pUnknown = pUnknown; ++ m_pUnknown->AddRef(); ++ ++ IHXPlayer* pPlayer; ++ IHXClientStateAdviseSinkControl *pStateControl; ++ if(HXR_OK == m_pUnknown->QueryInterface(IID_IHXPlayer, ++ (void**)&pPlayer)) ++ { ++ m_pPlayer = pPlayer; ++ ++ ++ } ++ ++ if (HXR_OK == m_pUnknown->QueryInterface(IID_IHXClientStateAdviseSinkControl, (void **)&pStateControl)) ++ { ++ pStateControl->AddClientStateAdviseSink(this); ++ } ++ } ++ ++#ifdef __TCS__ ++ bEnableAdviceSink = TRUE; ++ iOpened = 0; ++#endif ++} ++ ++ExampleClientStateAdviceSink::~ExampleClientStateAdviceSink(void) ++{ ++ ++ if (m_pPlayer) ++ { ++ m_pPlayer->Release(); ++ m_pPlayer = NULL; ++ } ++ if (m_pUnknown) ++ { ++ m_pUnknown->Release(); ++ m_pUnknown = NULL; ++ } ++} ++ ++ ++// *** IUnknown methods *** ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::QueryInterface ++// Purpose: ++// Implement this to export the interfaces supported by your ++// object. ++// ++STDMETHODIMP ExampleClientStateAdviceSink::QueryInterface(REFIID riid, void** ppvObj) ++{ ++ if (IsEqualIID(riid, IID_IUnknown)) ++ { ++ AddRef(); ++ *ppvObj = (IUnknown*)(IHXClientStateAdviseSink *)this; ++ return HXR_OK; ++ } ++ else if (IsEqualIID(riid, IID_IHXClientStateAdviseSink)) ++ { ++ AddRef(); ++ *ppvObj = (IHXClientStateAdviseSink*)this; ++ return HXR_OK; ++ } ++ ++ *ppvObj = NULL; ++ return HXR_NOINTERFACE; ++} ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::AddRef ++// Purpose: ++// Everyone usually implements this the same... feel free to use ++// this implementation. ++// ++STDMETHODIMP_(ULONG32) ExampleClientStateAdviceSink::AddRef() ++{ ++ return InterlockedIncrement(&m_lRefCount); ++} ++ ++///////////////////////////////////////////////////////////////////////// ++// Method: ++// IUnknown::Release ++// Purpose: ++// Everyone usually implements this the same... feel free to use ++// this implementation. ++// ++STDMETHODIMP_(ULONG32) ExampleClientStateAdviceSink::Release() ++{ ++ if (InterlockedDecrement(&m_lRefCount) > 0) ++ { ++ return m_lRefCount; ++ } ++ ++ delete this; ++ return 0; ++} ++ ++ ++/************************************************************************ ++ * Method: ++ * IHXClientStateAdviseSink::OnStateChange ++ * Purpose: ++ * Called to advise the client state has changed state ++ */ ++STDMETHODIMP ExampleClientStateAdviceSink::OnStateChange(UINT16 uOldState, UINT16 uNewState) ++{ ++ if (m_state_change_cb) ++ m_state_change_cb(uOldState, uNewState, m_context); ++ ++ m_State = uNewState; ++ return HXR_OK; ++} ++ ++EHXClientState ExampleClientStateAdviceSink::GetState() ++{ ++ return m_State; ++} ++ ++ +Index: helix-libs/clientapps/clutter/exstateadvsnk.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/exstateadvsnk.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,108 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef _EXAMPLE_CLIENT_STATE_ADVISE_SNK_H_ ++#define _EXAMPLE_CLIENT_STATE_ADVISE_SNK_H_ ++ ++#include "player.h" ++ ++struct IHXClientStateAdviseSink; ++struct IHXGroupSink; ++struct IUnknown; ++struct IHXRegistry; ++struct IHXScheduler; ++struct IHXCallback; ++struct IHXPlayer; ++struct IHXGroup; ++ ++class ExampleClientStateAdviceSink : public IHXClientStateAdviseSink ++{ ++ private: ++ LONG32 m_lRefCount; ++ LONG32 m_lClientIndex; ++ ++ IUnknown* m_pUnknown; ++ ++ UINT32 m_ulStartTime; ++ UINT32 m_ulStopTime; ++ ++ UINT32 m_lCurrentBandwidth; ++ UINT32 m_lAverageBandwidth; ++ HXBOOL m_bOnStop; ++ ++ HXBOOL m_bWaitForTrackStart; ++ ++ on_state_change_cb_t m_state_change_cb; ++ void *m_context; ++ EHXClientState m_State; ++ ++ // IHXCallback ++ IHXPlayer* m_pPlayer; ++ ULONG32 m_hCallback; ++ ~ExampleClientStateAdviceSink(); ++ ++ ++ public: ++ ++ ExampleClientStateAdviceSink(IUnknown* /*IN*/ pUnknown, LONG32 /*IN*/ lClientIndex, on_state_change_cb_t on_state_change_cb = NULL, void *context = NULL); ++ ++ /* ++ * IUnknown methods ++ */ ++ STDMETHOD(QueryInterface) (THIS_ ++ REFIID riid, ++ void** ppvObj); ++ ++ STDMETHOD_(ULONG32,AddRef) (THIS); ++ ++ STDMETHOD_(ULONG32,Release) (THIS); ++ ++ /*********************************************************************** ++ * Method: ++ * IHXClientStateAdviseSink::OnStateChange ++ * Purpose: ++ * Called by client engine to inform the client that the state has changed. ++ * States are defined in the enum EHXClientState, defined in this file. ++ * ++ */ ++ STDMETHOD(OnStateChange) (THIS_ ++ UINT16 uOldState, ++ UINT16 uNewState ++ ) ; ++ ++ EHXClientState GetState(); ++}; ++ ++#endif /* _EXAMPLECLSNK_ */ +Index: helix-libs/clientapps/clutter/fivemmap.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/fivemmap.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,175 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include ++#include "hxtypes.h" ++#include "fivemmap.h" ++ ++void* FiveMinuteMap::GetFirstValue() ++{ ++ m_nCursor = 0; ++ ++ if (m_nMapSize) ++ { ++ return m_pValueArray[m_nCursor]; ++ } ++ else ++ { ++ return NULL; ++ } ++} ++ ++void* FiveMinuteMap::GetNextValue() ++{ ++ m_nCursor++; ++ ++ if (m_nCursor < m_nMapSize) ++ { ++ return m_pValueArray[m_nCursor]; ++ } ++ else ++ { ++ return NULL; ++ } ++} ++ ++HXBOOL FiveMinuteMap::Lookup(void* Key, void*& Value) const ++{ ++ HXBOOL bFound = FALSE; ++ int nIndex = 0; ++ ++ // If Key is alrady in the list, replace value ++ for (; nIndex < m_nMapSize; nIndex++) ++ { ++ if (m_pKeyArray[nIndex] == Key) ++ { ++ Value = m_pValueArray[nIndex]; ++ bFound = TRUE; ++ goto exit; ++ } ++ } ++ ++exit: ++ return bFound; ++} ++ ++void FiveMinuteMap::RemoveKey(void* Key) ++{ ++ HXBOOL bFound = FALSE; ++ int nIndex = 0; ++ ++ // If Key is alrady in the list, replace value ++ for (; nIndex < m_nMapSize; nIndex++) ++ { ++ if (m_pKeyArray[nIndex] == Key) ++ { ++ if (nIndex < (m_nMapSize-1)) ++ { ++ memmove(&(m_pKeyArray[nIndex]),&(m_pKeyArray[nIndex+1]),sizeof(void*)*(m_nMapSize-(nIndex+1))); ++ memmove(&(m_pValueArray[nIndex]),&(m_pValueArray[nIndex+1]),sizeof(void*)*(m_nMapSize-(nIndex+1))); ++ } ++ m_nMapSize--; ++ goto exit; ++ } ++ } ++ ++exit: ++ (NULL); // We're done! ++} ++ ++void FiveMinuteMap::RemoveValue(void* Value) ++{ ++ HXBOOL bFound = FALSE; ++ int nIndex = 0; ++ ++ // If Value is alrady in the list, replace value ++ for (; nIndex < m_nMapSize; nIndex++) ++ { ++ if (m_pValueArray[nIndex] == Value) ++ { ++ if (nIndex < (m_nMapSize-1)) ++ { ++ memmove(&(m_pKeyArray[nIndex]),&(m_pKeyArray[nIndex+1]),sizeof(void*)*(m_nMapSize-(nIndex+1))); ++ memmove(&(m_pValueArray[nIndex]),&(m_pValueArray[nIndex+1]),sizeof(void*)*(m_nMapSize-(nIndex+1))); ++ } ++ m_nMapSize--; ++ goto exit; ++ } ++ } ++ ++exit: ++ (NULL); // We're done! ++} ++ ++ ++void FiveMinuteMap::SetAt(void* Key, void* Value) ++{ ++ int nIndex = 0; ++ ++ // If Key is alrady in the list, replace value ++ for (; nIndex < m_nMapSize; nIndex++) ++ { ++ if (m_pKeyArray[nIndex] == Key) ++ { ++ m_pValueArray[nIndex] = Value; ++ goto exit; ++ } ++ } ++ ++ // If we have room, add it to the end! ++ if (m_nAllocSize == m_nMapSize) ++ { ++ m_nAllocSize += AllocationSize; ++ void** pNewKeys = new void*[m_nAllocSize]; ++ void** pNewValues = new void*[m_nAllocSize]; ++ ++ memcpy(pNewKeys,m_pKeyArray,sizeof(void*)*m_nMapSize); /* Flawfinder: ignore */ ++ memcpy(pNewValues,m_pValueArray,sizeof(void*)*m_nMapSize); /* Flawfinder: ignore */ ++ ++ delete [] m_pKeyArray; ++ delete [] m_pValueArray; ++ ++ m_pKeyArray = pNewKeys; ++ m_pValueArray = pNewValues; ++ } ++ ++ m_pKeyArray[m_nMapSize] = Key; ++ m_pValueArray[m_nMapSize] = Value; ++ m_nMapSize++; ++ ++exit: ++ (NULL); // We're done! ++} ++ +Index: helix-libs/clientapps/clutter/fivemmap.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/fivemmap.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,79 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef _FIVEMMAP_H_ ++#define _FIVEMMAP_H_ ++ ++#ifndef _HXTYPES_H_ ++#error FiveMinuteMap assumes pntypes.h. ++#endif ++ ++class FiveMinuteMap ++{ ++ const int AllocationSize; ++ ++ void** m_pKeyArray; ++ void** m_pValueArray; ++ int m_nMapSize; ++ int m_nAllocSize; ++ int m_nCursor; ++public: ++ FiveMinuteMap() ++ : m_pKeyArray(NULL) ++ , m_pValueArray(NULL) ++ , m_nMapSize(0) ++ , m_nAllocSize(0) ++ , m_nCursor(0) ++ , AllocationSize(10) ++ {}; ++ ++ ~FiveMinuteMap() ++ { ++ delete [] m_pKeyArray; ++ delete [] m_pValueArray; ++ }; ++ ++ int GetCount() {return m_nMapSize;} ++ ++ void* GetFirstValue(); ++ void* GetNextValue(); ++ ++ HXBOOL Lookup(void* Key, void*& Value) const; ++ void RemoveKey(void* Key); ++ void RemoveValue(void* Value); ++ void SetAt(void* Key, void* Value); ++}; ++ ++#endif /* _FIVEMMAP_H_ */ +Index: helix-libs/clientapps/clutter/globals.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/globals.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,150 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++/**************************************************************************** ++ * ++ * Test Client: ++ * ++ * ++ * This is an test client running on Windows, Mac, and Unix without a GUI. ++ * ++ */ ++ ++#ifndef _SPLAY_GLOBALS_H ++#define _SPLAY_GLOBALS_H ++ ++#include "dllacces.h" ++#include "dllpath.h" ++#include "hxengin.h" ++#include "hxplayvelocity.h" ++#include "hxcore.h" ++#include "ihxmedpltfm.h" ++#include "excontxt.h" ++#include "preflist.h" ++ ++#define HX_COMMAND_BUFFER_SIZE 256 ++#define HX_MAX_NUM_MULTI_SEEKS 10 ++struct _stGlobals ++{ ++ _stGlobals() ++ : g_pDLLAccess(NULL), ++ g_nPlayers(0), ++ m_fpHXMediaPlatformOpen(NULL), ++ m_fpHXCreateMediaPlatform(NULL), ++ m_fpHXMediaPlatformClose(NULL), ++ m_fpCreateEngine(NULL), ++ m_fpCloseEngine(NULL), ++ m_fpSetDLLAccessPath(NULL), ++ bEnableAdviceSink(FALSE), ++ bEnableVerboseMode(FALSE), ++ g_bEnableSlowStart(TRUE), ++ g_bOnBeginOccurred(FALSE), ++ g_pszUsername( NULL), ++ g_pszPassword(NULL), ++ g_pszGUIDFile(NULL), ++ g_pszGUIDList(NULL), ++ g_Error(HXR_OK), ++ g_ulNumSecondsPlayed(0), ++ pMediaPlatform(NULL), ++ g_pIHXKicker(NULL), ++ bUseLegacyAPIs(FALSE), ++ pEngine(NULL), ++ g_pQuickSeek(NULL), ++ g_bNullRender(FALSE), ++ g_bUserStop(FALSE), ++ g_bInitVelocity(FALSE), ++ g_bABD(FALSE), ++ g_pVelocityCaps(NULL), ++ g_ulNumMultiSeeks(0), ++ g_ulMultiSeekIndex(0), ++ g_bMultiSeek(FALSE), ++ g_uThreadIDForKicker(-1) ++ { ++ memset(g_szCommandBuffer, 0, HX_COMMAND_BUFFER_SIZE); ++ memset(g_szPriorCommandBuffer, 0, HX_COMMAND_BUFFER_SIZE); ++ memset(g_Players, 0, sizeof(g_Players)); ++ memset(g_pszURLs, 0, sizeof(g_pszURLs)); ++ memset(g_pClientContexts, 0, sizeof(g_pClientContexts)); ++ } ++ ++ #define MAX_NUM_PLAYERS 256 ++ IHXPlayer* g_Players[MAX_NUM_PLAYERS]; ++ char *g_pszURLs[MAX_NUM_PLAYERS]; ++ ExampleClientContext *g_pClientContexts[MAX_NUM_PLAYERS]; ++ int g_nPlayers; ++ DLLAccessPath g_statclnt; ++ DLLAccess* g_pDLLAccess; ++ CHXPrefList g_prefList; ++ ++ FPHXMEDIAPLATFORMOPEN m_fpHXMediaPlatformOpen; ++ FPHXCREATEMEDIAPLATFORM m_fpHXCreateMediaPlatform; ++ FPHXMEDIAPLATFORMCLOSE m_fpHXMediaPlatformClose; ++ ++ FPRMCREATEENGINE m_fpCreateEngine; ++ FPRMCLOSEENGINE m_fpCloseEngine; ++ FPRMSETDLLACCESSPATH m_fpSetDLLAccessPath; ++ ++ HXBOOL bEnableAdviceSink; ++ HXBOOL bEnableVerboseMode; ++ HXBOOL g_bEnableSlowStart; ++ HXBOOL g_bOnBeginOccurred; ++ char* g_pszUsername; ++ char* g_pszPassword; ++ char* g_pszGUIDFile; ++ char* g_pszGUIDList; ++ HX_RESULT g_Error; ++ UINT32 g_ulNumSecondsPlayed; ++ IHXMediaPlatform* pMediaPlatform; ++ IHXMediaPlatformKicker* g_pIHXKicker; ++ UINT32 g_uThreadIDForKicker; ++ pthread_t g_pThreadKickmanId; ++ HXBOOL bUseLegacyAPIs; ++ IHXClientEngine* pEngine; ++ IHXQuickSeek* g_pQuickSeek; ++ HXBOOL g_bNullRender; ++ HXBOOL g_bUserStop; ++ HXBOOL g_bInitVelocity; ++ HXBOOL g_bABD; ++ IHXPlaybackVelocityCaps* g_pVelocityCaps; ++ HXBOOL g_bMultiSeek; ++ UINT32 g_ulMultiSeekTime[HX_MAX_NUM_MULTI_SEEKS]; ++ UINT32 g_ulNumMultiSeeks; ++ UINT32 g_ulMultiSeekIndex; ++ char g_szCommandBuffer[HX_COMMAND_BUFFER_SIZE]; ++ char g_szPriorCommandBuffer[HX_COMMAND_BUFFER_SIZE]; ++}; ++ ++ ++#endif // _SPLAY_GLOBALS_H +Index: helix-libs/clientapps/clutter/iids.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/iids.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,50 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++// define all guids here once... ++#define INITGUID ++#define NCIHACK ++#include "hxtypes.h" ++#include "hxcom.h" ++#include "hxiids.h" ++#include "hxpiids.h" ++#if defined _WINDOWS ++#if defined (HELIX_FEATURE_DIRECT_SOUND) ++#include "dsound.h" ++#endif /* HELIX_FEATURE_DIRECT_SOUND */ ++#if defined (HELIX_FEATURE_VIDEO) && !defined(_WINCE) ++#include "ddraw.h" ++#endif /* HELIX_FEATURE_VIDEO */ ++#endif +Index: helix-libs/clientapps/clutter/linux2.pcf +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/linux2.pcf 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,42 @@ ++# ++# ***** BEGIN LICENSE BLOCK ***** ++# Version: RCSL 1.0/RPSL 1.0 ++# ++# Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++# ++# The contents of this file, and the files included with this file, are ++# subject to the current version of the RealNetworks Public Source License ++# Version 1.0 (the "RPSL") available at ++# http://www.helixcommunity.org/content/rpsl unless you have licensed ++# the file under the RealNetworks Community Source License Version 1.0 ++# (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++# in which case the RCSL will apply. You may also obtain the license terms ++# directly from RealNetworks. You may not use this file except in ++# compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++# applicable to this file, the RCSL. Please see the applicable RPSL or ++# RCSL for the rights, obligations and limitations governing use of the ++# contents of the file. ++# ++# This file is part of the Helix DNA Technology. RealNetworks is the ++# developer of the Original Code and owns the copyrights in the portions ++# it created. ++# ++# This file, and the files included with this file, is distributed and made ++# available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++# EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++# FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++# ++# Technology Compatibility Kit Test Suite(s) Location: ++# http://www.helixcommunity.org/content/tck ++# ++# Contributor(s): ++# ++# ***** END LICENSE BLOCK ***** ++# ++ ++project.AddSystemLibraries("dl", "m", "pthread") ++ ++if (project.IsDefined("HELIX_FEATURE_VIDEO") and ++ project.IsDefined("USE_XWINDOWS")): ++ project.AddSystemLibraries("X11") +Index: helix-libs/clientapps/clutter/player.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/player.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,1057 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++/**************************************************************************** ++ * ++ * Test Client: ++ * ++ * ++ * This is an test client running on Windows, Mac, and Unix without a GUI. ++ * ++ */ ++#include "hxtypes.h" ++ ++#include ++ ++#include "hlxclib/time.h" ++#include "ihxmedpltfm.h" ++#include "hxwintyp.h" ++#include "hxcom.h" ++#include "ihxpckts.h" ++#include "hxcomm.h" ++#include "hxmon.h" ++#include "hxfiles.h" ++#include "hxengin.h" ++#include "hxcore.h" ++#include "hxclsnk.h" ++#include "hxgroup.h" ++#include "hxerror.h" ++#include "hxauth.h" ++#include "hxwin.h" ++#include "hxprefs.h" ++#include "hxtbuf.h" ++#include "fivemmap.h" ++#include "dllacces.h" ++#include "hxausvc.h" ++#include "hxstrutl.h" ++#include "hxgroup.h" ++#include "hxwin.h" ++#include "hxtick.h" ++#include "hxbuffer.h" ++#include "hxplayvelocity.h" ++#include "pckunpck.h" // For CreateAndSetBufferCCF() ++#include "hxvctrl.h" ++#include "hxbsrc.h" ++#include "excallback.h" ++#include "pthread.h" ++ ++#if defined(HELIX_FEATURE_PRESENTATION_FEATURE_SELECTION) ++#include "hxpfs.h" ++#endif // HELIX_FEATURE_PRESENTATION_FEATURE_SELECTION. ++ ++#if defined(HELIX_FEATURE_PREFERENCES) ++#include "preflist.h" ++#endif /* #if defined(HELIX_FEATURE_PREFERENCES) */ ++#include "exadvsnk.h" ++#include "exerror.h" ++#include "exsitsup.h" ++#include "exaumgr.h" ++#if defined(_WIN32) ++#include "exabd.h" ++#endif ++#include "excontxt.h" ++#include "print.h" ++#if defined(USE_XWINDOWS) ++#include ++#endif ++#if defined (_UNIX) ++#include ++#include ++#include ++#include ++#include ++#endif ++#if defined(_WINDOWS) ++#include ++#endif ++ ++#ifdef __TCS__ ++#include ++#if defined(__cplusplus) ++extern "C" { ++#endif /* defined(__cplusplus) */ ++ extern unsigned long tmosTimSleep(unsigned long ticks); ++ unsigned long gForcePlayerToStop = 0; ++#if defined(__cplusplus) ++} ++#endif /* defined(__cplusplus) */ ++#endif ++ ++#if defined (_MACINTOSH) || defined (_MAC_UNIX) ++bool gMacPlayerIsDone = false; ++#endif ++ ++ ++#if defined _VXWORKS ++#include "sys/times.h" ++#include "string.h" ++#include "hxtime.h" ++#endif ++ ++#if defined(_MACINTOSH) ++#ifndef _MAC_MACHO ++#include ++#include ++#endif ++#endif ++ ++#include "dllpath.h" ++ ++#ifdef _SYMBIAN ++#include ++#include "platform/symbian/symbian_event_hndlr.h" ++#endif ++ ++ENABLE_DLLACCESS_PATHS(g_SPlayAccessPath); ++ ++// typedef for SetDLLAccessPath ++ ++ ++#include "thrdutil.h" ++ ++#if defined(_AIX) ++#include ++#endif ++ ++#if defined _DEBUG || defined DEBUG ++#include "debug.h" ++#endif ++ ++#ifndef MAX_PATH ++#define MAX_PATH 256 ++#endif //!MAX_PATH ++ ++#if defined(HELIX_CONFIG_NOSTATICS) ++# include "globals/hxglobals.h" ++#endif ++ ++#define MAX_NUM_URLS 10 ++ ++#include "globals.h" //for global struct. ++ ++#include "player.h" ++ ++#if defined(_WINDOWS) && defined(_STATICALLY_LINKED) ++HINSTANCE g_hInstance = NULL; ++#endif ++ ++struct _stGlobals*& GetGlobal() ++{ ++#if defined(HELIX_CONFIG_NOSTATICS) ++ static const struct _stGlobals* const _g_pstGlobals = NULL; ++ struct _stGlobals*& g_pstGlobals = (struct _stGlobals*&)HXGlobalPtr::Get(&_g_pstGlobals); ++#else ++ static struct _stGlobals* g_pstGlobals = NULL; ++#endif ++ if( g_pstGlobals == NULL ) ++ { ++ g_pstGlobals = new struct _stGlobals(); ++ } ++ return g_pstGlobals; ++ ++} ++ ++ ++// Constants ++const int DEFAULT_TIME_DELTA = 2000; ++const int DEFAULT_STOP_TIME = -1; ++const int SLEEP_TIME = 5; ++const int GUID_LEN = 64; ++ ++// Function prototypes ++void PrintUsage(const char* pszAppName); ++HXBOOL AllPlayersDone(int nNumPlayers, IHXPlayer** ppPlayers); ++void StopAllPlayers(int nNumPlayers, IHXPlayer** ppPlayers); ++HXBOOL ReadGUIDFile(); ++char* GetAppName(char* pszArgv0); ++ ++#ifdef __TCS__ ++#if defined(__cplusplus) ++extern "C" { ++#endif /* defined(__cplusplus) */ ++ ++ extern void _alloc_stats(int verbose); ++#if defined(__cplusplus) ++} ++#endif /* defined(__cplusplus) */ ++ ++static IHXPlayer** g_Players; ++static int g_nPlayers = 0; ++static long evtCount = 0; ++static long evtFullCount = 0; ++#endif ++ ++ ++ ++#if defined(HELIX_FEATURE_PRESENTATION_FEATURE_SELECTION) ++HX_RESULT ++DumpPFdata(IHXPresentationFeatureManager* pPFMgr, ++ const char* pszPFName) ++{ ++ HX_RESULT hxr = HXR_OK; ++ ++ IHXBuffer* pFeatureCurrentSetting = NULL; ++ IHXValues* pFeatureOptions = NULL; ++ ++ if (!pPFMgr || !pszPFName) ++ { ++ hxr = HXR_INVALID_PARAMETER; ++ } ++ else ++ { ++ // List all the options for this PF: ++ HX_RESULT hxr = pPFMgr->GetPresentationFeature( ++ pszPFName, ++ pFeatureCurrentSetting, ++ pFeatureOptions); ++ ++ if (FAILED(hxr)) ++ { ++ // PF doesn't exist! ++ STDOUT("\t%s - No such presentation feature\n\n", pszPFName); ++ } ++ else ++ { ++ // Now, go through pFeatureOptions and display ++ // them and their "is-selectable"-flag values: ++ const char* pszPFOptionName = NULL; ++ const char* pszPFCurSetting = pFeatureCurrentSetting? ++ (const char*)pFeatureCurrentSetting->GetBuffer() : NULL; ++ UINT32 bPFOptionIsSelectableFlag = FALSE; ++ IHXBuffer* pPFOptionIsSelectableFlag = NULL; ++ ++ HX_ASSERT(pszPFCurSetting); ++ STDOUT("\t%s\t(Current setting == \"%s\")\n", pszPFName, pszPFCurSetting? ++ pszPFCurSetting : ""); ++ ++ if (!pFeatureOptions) // NULL is OK; that means freeform (open-ended): ++ { ++ STDOUT("\t\t(%s's options are freeform, i.e., open-ended)\n", ++ pszPFName); ++ } ++ else // List all the options and their flags: ++ { ++ if (HXR_OK == pFeatureOptions->GetFirstPropertyCString(pszPFOptionName, ++ pPFOptionIsSelectableFlag) && *pszPFOptionName) ++ { ++ do ++ { ++ const UCHAR* pIsSelFlag = pPFOptionIsSelectableFlag->GetBuffer(); ++ if (pIsSelFlag && *pIsSelFlag) ++ { ++ // Anything but '0' (zero) is treated as '1' (is selectable): ++ bPFOptionIsSelectableFlag = (HXBOOL)('0' != *pIsSelFlag && ++ '\0' == *(pIsSelFlag+1)); ++ } ++ else ++ { ++ // Set the error, but we'll go ahead and treat it as '0': ++ hxr = HXR_INVALID_PARAMETER; ++ bPFOptionIsSelectableFlag = FALSE; ++ } ++ ++ STDOUT("\t\t%s\t\tIs selectable: %s\n", ++ pszPFOptionName, bPFOptionIsSelectableFlag? "yes":"no"); ++ // Release it to get the next PF: ++ HX_RELEASE(pPFOptionIsSelectableFlag); ++ } while (HXR_OK == pFeatureOptions->GetNextPropertyCString( ++ pszPFOptionName, pPFOptionIsSelectableFlag)); ++ } ++ } ++ ++ HX_RELEASE(pPFOptionIsSelectableFlag); ++ } ++ } ++ ++ HX_RELEASE(pFeatureCurrentSetting); ++ HX_RELEASE(pFeatureOptions); ++ ++ return hxr; ++} ++#endif // HELIX_FEATURE_PRESENTATION_FEATURE_SELECTION. ++ ++ ++char* RemoveWrappingQuotes(char* str) ++{ ++ int len = strlen(str); ++ if (len > 0) ++ { ++ if (str[len-1] == '"') str[--len] = 0; ++ if (str[0] == '"') { int i = 0; do { str[i++] = str[i+1]; } while(--len); } ++ } ++ return str; ++} ++ ++void *kickman(void *dummy) ++{ ++ while(1) { ++ UINT32 sleepTime = 0; ++ IHXMediaPlatformKicker* pKicker = GetGlobal()->g_pIHXKicker; ++ if( pKicker ) ++ { ++ pKicker->Kick(GetGlobal()->g_uThreadIDForKicker, &sleepTime); ++ } ++ usleep(sleepTime); ++ } ++} ++ ++PLAYER_API int init_main( ) ++{ ++#if defined(_WIN32) && !defined(WIN32_PLATFORM_PSPC) ++ setvbuf(stdout, NULL, _IONBF, 0); ++#endif /* defined(_WIN32) && !defined(WIN32_PLATFORM_PSPC) */ ++ ++ FPHXMEDIAPLATFORMOPEN fpHXMediaPlatformOpen = NULL; ++ FPHXCREATEMEDIAPLATFORM fpHXCreateMediaPlatform = NULL; ++ FPHXMEDIAPLATFORMCLOSE fpHXMediaPlatformClose = NULL; ++ ++ FPRMCREATEENGINE fpCreateEngine = NULL; ++ FPRMCLOSEENGINE fpCloseEngine = NULL; ++ FPRMSETDLLACCESSPATH fpSetDll = NULL; ++ ++ HX_RESULT theErr = HXR_OK; ++ ExampleClientContext** ppExContexts = NULL; ++#if defined(HELIX_FEATURE_AUTO_BANDWIDTH_DETECTION) && defined(_WIN32) ++ ExampleABD* pABD = NULL; ++#endif ++ IHXPlayer** ppPlayers = NULL; ++ IHXQuickSeek* ppQuickSeek = NULL; ++ IHXErrorSink* pErrorSink = NULL; ++ IHXErrorSinkControl* pErrorSinkControl = NULL; ++ UINT32 ulABDResult = 0; ++ UINT32 ulProbPktSize = 0; ++ UINT32 ulProbPktNum = 0; ++#if defined(HELIX_FEATURE_PLAYBACK_VELOCITY) ++ INT32 lVelocity = 100; ++ INT32 lKeyFrameMode = 0; ++ INT32 lAutoSwitch = 0; ++#endif /* #if defined(HELIX_FEATURE_PLAYBACK_VELOCITY) */ ++ CHXString* pABDServer = NULL; ++ char* pszURL[MAX_NUM_URLS]; ++ char* pszURLOrig[MAX_NUM_URLS]; ++ UINT32 ulNumURLsFound = 0; ++ int nNumPlayers = 1; ++ int nNumPlayRepeats = 1; ++ int nTimeDelta = DEFAULT_TIME_DELTA; ++ int nStopTime = DEFAULT_STOP_TIME; ++ bool bStopTime = true; ++ int i = 0; ++ char* pszGUIDList = NULL; ++#ifdef _MACINTOSH ++ char dllhome[MAX_PATH] = {'\0'}; /* Flawfinder: ignore */ ++#elif defined(_SYMBIAN) ++ char dllhome[MAX_PATH] = "c:"; /* Flawfinder: ignore */ ++#else ++ char dllhome[MAX_PATH] = {'.','\0'}; /* Flawfinder: ignore */ ++#endif ++ DLLAccess* pDLLAccess = NULL; ++ char staticLibPath[MAX_PATH] = {0}; /* Flawfinder: ignore */ ++#ifdef _WINDOWS ++ HINSTANCE hDll = NULL; ++#endif ++ bool bStopping = false; ++ int nPlay = 0; ++ ++ // NULL out the URL arrays ++ memset(pszURL, 0, MAX_NUM_URLS * sizeof(char*)); ++ memset(pszURLOrig, 0, MAX_NUM_URLS * sizeof(char*)); ++ ++ ++ //See if the user has set their HELIX_LIBS env var. This is overridden by the ++ //-l option. ++ const char* pszHelixLibs = getenv("HELIX_LIBS"); ++ if( pszHelixLibs ) ++ SafeStrCpy( dllhome, pszHelixLibs, MAX_PATH); ++ ++ ++ ++ GetGlobal()->bEnableAdviceSink = TRUE; ++ GetGlobal()->g_prefList.Add("UseOverlay", "0"); ++ ++ SafeSprintf(staticLibPath, MAX_PATH, "%s/%s", dllhome, "hxmedpltfm.so"); ++ ++ if (dllhome) ++ { ++ GetDLLAccessPath()->SetPath(DLLTYPE_COMMON, dllhome); ++ GetDLLAccessPath()->SetPath(DLLTYPE_PLUGIN, dllhome); ++ GetDLLAccessPath()->SetPath(DLLTYPE_CODEC, dllhome); ++ } ++ ++ // initialize the globals ++ GetGlobal()->m_fpCreateEngine = NULL; ++ GetGlobal()->m_fpCloseEngine = NULL; ++ GetGlobal()->g_nPlayers = 0; ++ ++ // prepare/load the HXCore module ++ pDLLAccess = new DLLAccess(); ++ ++ STDOUT("Simpleplayer is looking for the client core at %s\n", staticLibPath ); ++ ++ if (DLLAccess::DLL_OK != pDLLAccess->open(staticLibPath)) ++ { ++ const char* pErrorString = NULL; ++ pErrorString = pDLLAccess->getErrorString(); ++ STDERR("splayer: %s\n\n", pErrorString); ++#ifndef _STATICALLY_LINKED ++#ifndef _MACINTOSH ++ //Make sure the user has told us where to find the DLLs at. Either ++ //with the -l option or with the HELIX_LIBS env var. ++ STDERR("You must tell the player where to find the client core and\n"); ++ STDERR("all of its supporting DLLs and codecs. Please use the -l\n"); ++ STDERR("option or set your HELIX_LIBS env variable to point the player.\n"); ++ STDERR("to where you have all of the DLLs installed.\n\n" ); ++ //PrintUsage(argv[0]); ++#endif ++#endif ++ goto cleanup; ++ } ++ ++ GetGlobal()->m_fpHXMediaPlatformOpen = (FPHXMEDIAPLATFORMOPEN) pDLLAccess->getSymbol("HXMediaPlatformOpen"); ++ GetGlobal()->m_fpHXCreateMediaPlatform = (FPHXCREATEMEDIAPLATFORM) pDLLAccess->getSymbol("HXCreateMediaPlatform"); ++ GetGlobal()->m_fpHXMediaPlatformClose = (FPHXMEDIAPLATFORMCLOSE) pDLLAccess->getSymbol("HXMediaPlatformClose"); ++ ++ GetGlobal()->m_fpCreateEngine = (FPRMCREATEENGINE) pDLLAccess->getSymbol("CreateEngine"); ++ GetGlobal()->m_fpCloseEngine = (FPRMCLOSEENGINE) pDLLAccess->getSymbol("CloseEngine"); ++ GetGlobal()->m_fpSetDLLAccessPath = (FPRMSETDLLACCESSPATH) pDLLAccess->getSymbol("SetDLLAccessPath"); ++ ++ if (GetGlobal()->m_fpHXMediaPlatformOpen == NULL || ++ GetGlobal()->m_fpHXCreateMediaPlatform == NULL || ++ GetGlobal()->m_fpHXMediaPlatformClose == NULL || ++ GetGlobal()->m_fpCreateEngine == NULL || ++ GetGlobal()->m_fpCloseEngine == NULL || ++ GetGlobal()->m_fpSetDLLAccessPath == NULL ) ++ { ++ theErr = HXR_FAILED; ++ goto cleanup; ++ } ++ ++#if defined(USE_XWINDOWS) && defined(HELIX_FEATURE_VIDEO) ++ XInitThreads(); ++#endif ++ ++ { ++ fpHXMediaPlatformOpen = GetGlobal()->m_fpHXMediaPlatformOpen; ++ fpHXCreateMediaPlatform = GetGlobal()->m_fpHXCreateMediaPlatform; ++ fpHXMediaPlatformClose = GetGlobal()->m_fpHXMediaPlatformClose; ++ ++ if (HXR_OK != fpHXMediaPlatformOpen()) ++ { ++ theErr = HXR_FAILED; ++ goto cleanup; ++ } ++ ++ if (HXR_OK != fpHXCreateMediaPlatform((IHXMediaPlatform**)&GetGlobal()->pMediaPlatform)) ++ { ++ theErr = HXR_FAILED; ++ goto cleanup; ++ } ++ ++ IHXMediaPlatform* pMediaPlatform = GetGlobal()->pMediaPlatform; ++ ++ ++ if (HXR_OK != pMediaPlatform->AddPluginPath("HelixSimplePlayer", dllhome)) ++ { ++ theErr = HXR_FAILED; ++ goto cleanup; ++ } ++ ++ if (HXR_OK != pMediaPlatform->Init(NULL)) ++ { ++ theErr = HXR_FAILED; ++ goto cleanup; ++ } ++ ++ IHXCommonClassFactory* pCCF = NULL; ++ if (HXR_OK != pMediaPlatform->QueryInterface(IID_IHXCommonClassFactory, ++ (void**)&pCCF)) ++ { ++ theErr = HXR_FAILED; ++ goto cleanup; ++ } ++ ++ if (HXR_OK != pCCF->CreateInstance(CLSID_IHXClientEngine, (void**)&GetGlobal()->pEngine)) ++ { ++ HX_RELEASE(pCCF); ++ theErr = HXR_FAILED; ++ goto cleanup; ++ } ++ ++ HX_RELEASE(pCCF); ++ ++ IHXMediaPlatformKicker* pKicker = NULL; ++ pMediaPlatform->QueryInterface(IID_IHXMediaPlatformKicker, (void**)&pKicker); ++ HX_ASSERT(pKicker); ++ GetGlobal()->g_pIHXKicker = pKicker; ++ GetGlobal()->g_uThreadIDForKicker = HXGetCurrentThreadID(); ++ ++ pthread_t thread_id; ++ pthread_create(&thread_id, NULL, kickman, NULL); ++ GetGlobal()->g_pThreadKickmanId = thread_id; ++ } ++ ++ ++ ++ { ++ ++ ++#if defined(_WIN32) && !defined(WIN32_PLATFORM_PSPC) ++ SetConsoleCtrlHandler((PHANDLER_ROUTINE)HandlerRoutine, ++ TRUE); ++#endif ++ ++ } ++ ++ return HXR_OK; ++ ++ cleanup: ++ deinit_main(); ++ return HXR_FAIL; ++} ++ ++/* Get the least index to available entry in Getglobal()->gPlayers */ ++static int get_index() ++{ ++ int i; ++ /* an simple implementation */ ++ for (i = 0; i < MAX_NUM_PLAYERS; i++) ++ { ++ if (GetGlobal()->g_Players[i] == NULL) ++ return i; ++ } ++ ++ return -1; ++} ++ ++PLAYER_API unsigned int get_curr_playtime(void *pPlayerHandle) ++{ ++ unsigned int time = 0; ++ IHXPlayer *pPlayer = (IHXPlayer *)pPlayerHandle; ++ if (pPlayer) ++ time = pPlayer->GetCurrentPlayTime(); ++ return time; ++} ++ ++PLAYER_API int get_player(void **ppPlayerHandle, on_buffering_cb_t on_buffering_cb, on_pos_length_cb_t on_pos_length_cb, on_state_change_cb_t on_state_change_cb, on_new_frame_cb_t on_new_frame_cb, void *context) ++{ ++ int index = get_index(); ++ IHXPlayer **ppPlayer = (IHXPlayer **)ppPlayerHandle; ++ ExampleClientContext* pExContext = NULL; ++ pExContext = new ExampleClientContext(index); ++ if (!pExContext) ++ { ++ return HXR_UNEXPECTED; ++ } ++ pExContext->AddRef(); ++ ++ ppPlayer[0] = NULL; ++ IHXClientEngine* pEngine = GetGlobal()->pEngine; ++ if (HXR_OK != pEngine->CreatePlayer(*ppPlayer)) ++ { ++ HX_RELEASE(pExContext); ++ return HXR_FAILED; ++ } ++#if 1 ++ char* pszGUIDList = NULL; ++ //initialize the example context ++ pszGUIDList = GetGlobal()->g_pszGUIDList; ++ { ++ char pszGUID[GUID_LEN + 1]; /* Flawfinder: ignore */ // add 1 for terminator ++ char* token = NULL; ++ IHXPreferences* pPreferences = NULL; ++ ++ pszGUID[0] = '\0'; ++ ++ if (pszGUIDList) ++ { ++ // Get next GUID from the GUID list ++ { ++ token = strtok(pszGUIDList, "\n\0"); ++ } ++ if (token) ++ { ++ strncpy(pszGUID, token, GUID_LEN); /* Flawfinder: ignore */ ++ pszGUID[GUID_LEN] = '\0'; ++ } ++ } ++ ++ ppPlayer[0]->QueryInterface(IID_IHXPreferences, ++ (void**) &pPreferences); ++ ++ pExContext->Init(ppPlayer[0], pPreferences, pszGUID, on_buffering_cb, on_pos_length_cb, on_state_change_cb, on_new_frame_cb, context); ++ ++ ppPlayer[0]->SetClientContext(pExContext); ++ ++ HX_RELEASE(pPreferences); ++ ++ IHXErrorSinkControl* pErrorSinkControl = NULL; ++ ppPlayer[0]->QueryInterface(IID_IHXErrorSinkControl, ++ (void**) &pErrorSinkControl); ++ ++ if (pErrorSinkControl) ++ { ++ IHXErrorSink* pErrorSink = NULL; ++ pExContext->QueryInterface(IID_IHXErrorSink, ++ (void**) &pErrorSink); ++ if (pErrorSink) ++ { ++ pErrorSinkControl->AddErrorSink(pErrorSink, HXLOG_EMERG, HXLOG_INFO); ++ } ++ HX_RELEASE(pErrorSink); ++ } ++ HX_RELEASE(pErrorSinkControl); ++ GetGlobal()->g_prefList.SetPreferences(ppPlayer[0]); ++ ++ } ++#endif ++ HX_ASSERT(GetGlobal()->g_nPlayers < MAX_NUM_PLAYERS); ++ GetGlobal()->g_Players[index] = ppPlayer[0]; ++ GetGlobal()->g_pClientContexts[index] = pExContext; ++ GetGlobal()->g_nPlayers++; ++ ++ return HXR_OK; ++} ++ ++static int get_index_by_player( IHXPlayer *pPlayer) ++{ ++ int i; ++ /* an simple implementation */ ++ for (i = 0; i < MAX_NUM_PLAYERS; i++) ++ { ++ if (GetGlobal()->g_Players[i] && GetGlobal()->g_Players[i] == pPlayer) ++ return i; ++ } ++ ++ return -1; ++} ++ ++PLAYER_API int player_openurl( void *pPlayerHandle, char *pszRawURL) ++{ ++ HX_RESULT ret; ++ IHXPlayer *pPlayer = (IHXPlayer *)pPlayerHandle; ++ int index = get_index_by_player(pPlayer); ++ if (index < 0) ++ return HXR_FAIL; ++ ++ char *pszURLOrig = RemoveWrappingQuotes(pszRawURL); ++ ++ //if no "://" was found lets add file:// by default so that you ++ //can refer to local content as just ./splay ~/Content/startrek.rm, ++ //for example, and not ./splay file:///home/gregory/Content/startrek.rm ++ char* pszAddOn = NULL; ++ if( strstr( pszURLOrig, "://") ) ++ pszAddOn = (char *)""; ++ else ++ pszAddOn = (char *)"file://"; ++ ++ char *pszURL = new char[strlen(pszURLOrig)+strlen(pszAddOn)+1]; ++ sprintf( pszURL, "%s%s", pszAddOn, pszURLOrig ); /* Flawfinder: ignore */ ++ // Increment the number of URLs we have found ++ STDERR("opening %s on player\n", pszURL); ++ ++ GetGlobal()->g_pszURLs[index] = pszURL; ++ ret = pPlayer->OpenURL(pszURL); ++ ++ UINT32 sleepTime = 0; ++ ++ IHXMediaPlatformKicker* pKicker = GetGlobal()->g_pIHXKicker; ++ if( pKicker ) ++ { ++ pKicker->Kick(HXGetCurrentThreadID(), &sleepTime); ++ } ++ ++ return ret; ++} ++ ++PLAYER_API int put_player( void *pPlayerHandle) ++{ ++ IHXPlayer *pPlayer = (IHXPlayer *)pPlayerHandle; ++ int index; ++ index = get_index_by_player(pPlayer); ++ if (index < 0) ++ return HXR_FAIL; ++ ++ ExampleClientContext *pClientContext = GetGlobal()->g_pClientContexts[index]; ++ if (pClientContext) { ++ pClientContext->Release(); ++ pClientContext = NULL; ++ } ++ ++ GetGlobal()->g_pClientContexts[index] = NULL; ++ if (pPlayer) { ++ if (GetGlobal()->pEngine) { ++ GetGlobal()->pEngine->ClosePlayer(pPlayer); ++ } ++ pPlayer->Release(); ++ pPlayer = NULL; ++ } ++ GetGlobal()->g_Players[index] = NULL; ++ GetGlobal()->g_nPlayers--; ++ delete [] GetGlobal()->g_pszURLs[index]; ++ GetGlobal()->g_pszURLs[index] = NULL; ++ ++ return HXR_OK; ++} ++ ++PLAYER_API int player_geturl( void *pPlayerHandle, char **pszURL) ++{ ++ IHXPlayer *pPlayer = (IHXPlayer *)pPlayerHandle; ++ int index = get_index_by_player(pPlayer); ++ if (index >= 0) { ++ *pszURL = GetGlobal()->g_pszURLs[index]; ++ return HXR_OK; ++ } ++ ++ return HXR_FAIL; ++} ++ ++PLAYER_API int player_begin( void *pPlayerHandle ) ++{ ++ IHXPlayer *pPlayer = (IHXPlayer *)pPlayerHandle; ++ UINT32 sleepTime = 0; ++ pPlayer->Begin(); ++ ++#if 0 ++ IHXMediaPlatformKicker* pKicker = GetGlobal()->g_pIHXKicker; ++ if( pKicker ) ++ { ++ pKicker->Kick(HXGetCurrentThreadID(), &sleepTime); ++ } ++#endif ++ return HXR_OK; ++} ++ ++PLAYER_API int player_pause( void *pPlayerHandle ) ++{ ++ IHXPlayer *pPlayer = (IHXPlayer *)pPlayerHandle; ++ UINT32 sleepTime = 0; ++ pPlayer->Pause(); ++ ++#if 0 ++ IHXMediaPlatformKicker* pKicker = GetGlobal()->g_pIHXKicker; ++ if( pKicker ) ++ { ++ pKicker->Kick(HXGetCurrentThreadID(), &sleepTime); ++ } ++#endif ++ return HXR_OK; ++} ++ ++PLAYER_API int player_stop( void *pPlayerHandle ) ++{ ++ IHXPlayer *pPlayer = (IHXPlayer *)pPlayerHandle; ++ pPlayer->Stop(); ++ return HXR_OK; ++} ++ ++#if 0 ++int main(int argc, char *argv[]) ++{ ++ IHXPlayer *pPlayer; ++ init_main(); ++ while(1) { ++ get_player(&pPlayer); ++ player_openurl(pPlayer, argv[1]); ++ player_begin(pPlayer); ++ // sleep(2); ++ player_stop(pPlayer); ++ put_player(pPlayer); ++ } ++ deinit_main(); ++ return 0; ++} ++#endif ++ ++PLAYER_API int player_seek(void *pPlayerHandle, int pos) ++{ ++ IHXPlayer *pPlayer = (IHXPlayer *)pPlayerHandle; ++ if (pPlayer == NULL) ++ return HXR_FAIL; ++ ++ return pPlayer->Seek(pos); ++} ++PLAYER_API int player_getvolume(void *pPlayerHandle) ++{ ++ IHXPlayer *pPlayer = (IHXPlayer *)pPlayerHandle; ++ if (pPlayer == NULL) ++ return HXR_FAIL; ++ ++ int volume = 0; ++ ++ IHXAudioPlayer* pAudioPlayer = NULL; ++ pPlayer->QueryInterface(IID_IHXAudioPlayer, (void**) &pAudioPlayer); ++ if (pAudioPlayer) ++ { ++ // Get the IHXVolume ++ IHXVolume* pVolume = pAudioPlayer->GetAudioVolume(); ++ if (pVolume) ++ { ++ volume = pVolume->GetVolume(); ++ } ++ HX_RELEASE(pVolume); ++ } ++ HX_RELEASE(pAudioPlayer); ++ ++ return volume; ++} ++ ++ ++PLAYER_API int player_setvolume(void *pPlayerHandle, unsigned short volume) ++{ ++ IHXPlayer *pPlayer = (IHXPlayer *)pPlayerHandle; ++ if (pPlayer == NULL) ++ return HXR_FAIL; ++ ++ IHXAudioPlayer* pAudioPlayer = NULL; ++ pPlayer->QueryInterface(IID_IHXAudioPlayer, (void**) &pAudioPlayer); ++ if (pAudioPlayer) ++ { ++ // Get the IHXVolume ++ IHXVolume* pVolume = pAudioPlayer->GetAudioVolume(); ++ if (pVolume) ++ { ++ pVolume->SetVolume(volume); ++ } ++ HX_RELEASE(pVolume); ++ } ++ HX_RELEASE(pAudioPlayer); ++} ++ ++PLAYER_API int deinit_main() ++{ ++ ++ pthread_cancel(GetGlobal()->g_pThreadKickmanId); ++ int ret ; ++ ret = pthread_join(GetGlobal()->g_pThreadKickmanId, NULL); ++ if (ret < 0) { ++ perror("pthread_join error\n"); ++ } ++#if defined(HELIX_FEATURE_PLAYBACK_VELOCITY) ++ if (GetGlobal()->g_pVelocityCaps) ++ { ++ IHXPlaybackVelocityCaps* pCaps = GetGlobal()->g_pVelocityCaps; ++ pCaps->Release(); ++ GetGlobal()->g_pVelocityCaps = NULL; ++ } ++#endif /* #if defined(HELIX_FEATURE_PLAYBACK_VELOCITY) */ ++ ++#ifdef __TCS__ ++ g_nPlayers = 0; ++#endif ++ ++ ++ { ++ IHXClientEngine* pEngine = GetGlobal()->pEngine; ++ ++ if (pEngine) ++ { ++ IHXClientEngine2* pEngine2 = NULL; ++ if (HXR_OK == pEngine->QueryInterface(IID_IHXClientEngine2, ++ (void**)&pEngine2)) ++ { ++ pEngine2->Close(); ++ } ++ HX_RELEASE(pEngine2); ++ } ++ HX_RELEASE(GetGlobal()->pEngine); ++ HX_RELEASE(GetGlobal()->g_pIHXKicker); ++ ++ if (GetGlobal()->pMediaPlatform) ++ { ++ // Reset() not only close the platform but also remove all ++ // persistent information(i.e. preferences) maintained by the ++ // platform ++ // GetGlobal()->pMediaPlatform->Reset(NULL); ++ GetGlobal()->pMediaPlatform->Close(); ++ HX_RELEASE(GetGlobal()->pMediaPlatform); ++ } ++ ++ if (GetGlobal()->m_fpHXMediaPlatformClose) ++ { ++ GetGlobal()->m_fpHXMediaPlatformClose(); ++ } ++ } ++ ++ ++ if (GetGlobal()->bEnableVerboseMode) ++ { ++ STDOUT("\nDone.\n"); ++ } ++ ++ if (GetGlobal()->g_pszUsername) ++ { ++ delete [] GetGlobal()->g_pszUsername; ++ GetGlobal()->g_pszUsername = NULL; ++ } ++ if (GetGlobal()->g_pszPassword) ++ { ++ delete [] GetGlobal()->g_pszPassword; ++ GetGlobal()->g_pszPassword = NULL; ++ } ++ if (GetGlobal()->g_pszGUIDFile) ++ { ++ delete [] GetGlobal()->g_pszGUIDFile; ++ GetGlobal()->g_pszGUIDFile = NULL; ++ } ++ if (GetGlobal()->g_pszGUIDList) ++ { ++ delete [] GetGlobal()->g_pszGUIDList; ++ GetGlobal()->g_pszGUIDList = NULL; ++ } ++ // If an error occurred during playback, return that ++ ++ if (GetGlobal()->g_Error != HXR_OK) ++ { ++ return GetGlobal()->g_Error; ++ } ++ // or HXR_OK (if there was more than one player) ++ else ++ { ++ return HXR_OK; ++ } ++} ++char* GetAppName(char* pszArgv0) ++{ ++ char* pszAppName; ++ ++ pszAppName = strrchr(pszArgv0, '\\'); ++ ++ if (NULL == pszAppName) ++ { ++ return pszArgv0; ++ } ++ else ++ { ++ return pszAppName + 1; ++ } ++} ++ ++void PrintUsage(const char* pszAppName) ++{ ++} ++ ++ ++ ++HXBOOL ReadGUIDFile() ++{ ++ HXBOOL bSuccess = FALSE; ++ FILE* pFile = NULL; ++ int nNumRead = 0; ++ int readSize = 10000; ++ char* pszBuffer = new char[readSize]; ++ ++ if (GetGlobal()->g_pszGUIDFile) ++ { ++ if((pFile = fopen(GetGlobal()->g_pszGUIDFile, "r")) != NULL) ++ { ++ // Read in the entire file ++ nNumRead = fread(pszBuffer, sizeof(char), readSize, pFile); ++ pszBuffer[nNumRead] = '\0'; ++ ++ // Store it for later parsing ++ GetGlobal()->g_pszGUIDList = new char[nNumRead + 1]; ++ strcpy(GetGlobal()->g_pszGUIDList, pszBuffer); /* Flawfinder: ignore */ ++ ++ fclose(pFile); ++ pFile = NULL; ++ ++ if (nNumRead > 0) ++ { ++ bSuccess = TRUE; ++ } ++ } ++ } ++ ++ delete [] pszBuffer; ++ ++ return bSuccess; ++} ++ ++static int are_all_src_seekable(IHXPlayer *pPlayer) ++{ ++ UINT16 nSrcCnt; ++ nSrcCnt = pPlayer->GetSourceCount(); ++ HXSource *pSource = NULL; /* This is brute-force */ ++ for (UINT16 i = 0; i < nSrcCnt; i++) ++ { ++ if (pPlayer->GetSource(i, (IUnknown *&)pSource) == HXR_OK) ++ { ++ if (!pSource->IsSeekable()) ++ return FALSE; ++ ++ ++ } ++ } ++ ++} ++ ++PLAYER_API int player_canseek(void *pPlayerHandle) ++{ ++ if (!pPlayerHandle) ++ return FALSE; ++ ++ IHXPlayer *pPlayer = (IHXPlayer *)pPlayerHandle; ++ ExampleClientContext* pExContext=NULL; ++ if (pPlayer->GetClientContext((IUnknown*&)pExContext) != HXR_OK) ++ return FALSE; ++ ++ if (!pExContext) ++ return FALSE; ++ ++ EHXClientState State = pExContext->GetState(); ++ ++ int all_src_seekable = are_all_src_seekable(pPlayer); ++ ++ HX_RELEASE(pExContext); ++ ++ if (State < HX_CLIENT_STATE_CONNECTED) ++ return TRUE; ++ ++ if (all_src_seekable && (!pPlayer->IsLive() || State == HX_CLIENT_STATE_PAUSED)) ++ return TRUE; ++ ++ return FALSE; ++} ++ ++ +Index: helix-libs/clientapps/clutter/player.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/player.h 2008-10-13 06:54:45.000000000 -0700 +@@ -0,0 +1,60 @@ ++#ifndef _PLAYER_H_ ++#define _PLAYER_H_ ++ ++#ifdef __cplusplus ++#define PLAYER_API extern "C" ++#else ++#define PLAYER_API ++#endif ++ ++/* Duplicate of EHXClientState */ ++typedef enum _EPlayerStateState ++{ ++ PLAYER_STATE_READY = 0, // uninitialized ++ PLAYER_STATE_CONNECTING, // attempting to connect to sources ++ PLAYER_STATE_CONNECTED, // connected to sources (realized) ++ PLAYER_STATE_OPENING, // opening sources ++ PLAYER_STATE_OPENED, // opened sources ++ PLAYER_STATE_PREFETCHING,// obtaining resources, buffering, etc. ++ PLAYER_STATE_PREFETCHED, // ready for playback at time zero ++ PLAYER_STATE_PLAYING, // currently playing ++ PLAYER_STATE_PAUSED, // paused ++ PLAYER_STATE_SEEKING // seeking ++} EHXPlayerState; ++ ++typedef struct { ++ int left; ++ int top; ++ int right; ++ int bottom; ++} PlayerRect; ++ ++typedef struct { ++ PlayerRect Rect; ++ unsigned int cx; ++ unsigned int cy; ++} PlayerImgInfo; ++ ++typedef void (*on_pos_length_cb_t)(unsigned int, unsigned int, void *); ++typedef void (*on_buffering_cb_t)(unsigned int, unsigned short, void *); ++typedef void (*on_state_change_cb_t)(unsigned short, unsigned short, void *); ++typedef void (*on_new_frame_cb_t)(unsigned char *p, unsigned int size, PlayerImgInfo *rect, void *context); ++ ++PLAYER_API int init_main(); ++PLAYER_API int deinit_main(); ++PLAYER_API int get_player(void **ppPlayerHandle, on_buffering_cb_t on_buffering_cb, on_pos_length_cb_t on_pos_length_cb, on_state_change_cb_t on_state_change_cb, on_new_frame_cb_t on_new_frame_cb, void *context); ++PLAYER_API int player_openurl( void *pPlayerHandle, char *pszRawURL); ++PLAYER_API int put_player( void *pPlayerHandle); ++PLAYER_API int player_geturl( void *pPlayerHandle, char **pszURL); ++PLAYER_API int player_begin( void *pPlayerHandle ); ++PLAYER_API int player_stop( void *pPlayerHandle ); ++PLAYER_API int player_pause( void *pPlayerHandle ); ++PLAYER_API unsigned int get_curr_playtime(void *pPlayerHandle); ++PLAYER_API int player_seek(void *pPlayerHandle, int pos); ++PLAYER_API int player_getvolume(void *pPlayerHandle); ++PLAYER_API int player_setvolume(void *pPlayerHandle, unsigned short volumn); ++PLAYER_API int player_canseek(void *pPlayerHandle); ++ ++ ++#endif ++ +Index: helix-libs/clientapps/clutter/preflist.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/preflist.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,142 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Source last modified: $Id: preflist.cpp,v 1.2 2007/07/06 20:32:36 jfinnecy Exp $ ++ * ++ * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, ++ * are subject to the current version of the RealNetworks Public ++ * Source License (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the current version of the RealNetworks Community ++ * Source License (the "RCSL") available at ++ * http://www.helixcommunity.org/content/rcsl, in which case the RCSL ++ * will apply. You may also obtain the license terms directly from ++ * RealNetworks. You may not use this file except in compliance with ++ * the RPSL or, if you have a valid RCSL with RealNetworks applicable ++ * to this file, the RCSL. Please see the applicable RPSL or RCSL for ++ * the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * Alternatively, the contents of this file may be used under the ++ * terms of the GNU General Public License Version 2 (the ++ * "GPL") in which case the provisions of the GPL are applicable ++ * instead of those above. If you wish to allow use of your version of ++ * this file only under the terms of the GPL, and not to allow others ++ * to use your version of this file under the terms of either the RPSL ++ * or RCSL, indicate your decision by deleting the provisions above ++ * and replace them with the notice and other provisions required by ++ * the GPL. If you do not delete the provisions above, a recipient may ++ * use your version of this file under the terms of any one of the ++ * RPSL, the RCSL or the GPL. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the ++ * portions it created. ++ * ++ * This file, and the files included with this file, is distributed ++ * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY ++ * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ++ * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ++ * ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++#include "preflist.h" ++ ++#include "hxstring.h" ++#include "hxccf.h" ++#include "hxprefs.h" ++#include "ihxpckts.h" ++ ++class CHXPrefInfo ++{ ++public: ++ CHXPrefInfo(const char* pKey, const char* pValue); ++ ~CHXPrefInfo(); ++ ++ const char* Key() const { return m_key;} ++ const char* Value() const { return m_value;} ++ ++private: ++ CHXString m_key; ++ CHXString m_value; ++}; ++ ++CHXPrefInfo::CHXPrefInfo(const char* pKey, const char* pValue) : ++ m_key(pKey), ++ m_value(pValue) ++{} ++ ++CHXPrefInfo::~CHXPrefInfo() ++{} ++ ++CHXPrefList::CHXPrefList() ++{} ++ ++CHXPrefList::~CHXPrefList() ++{ ++ Clear(); ++} ++ ++void CHXPrefList::Add(const char* pKey, const char* pValue) ++{ ++ CHXPrefInfo* pInfo = new CHXPrefInfo(pKey, pValue); ++ ++ if (pInfo) ++ { ++ if (!m_prefInfo.AddTail(pInfo)) ++ { ++ // We failed to insert the preference. ++ HX_DELETE(pInfo); ++ } ++ } ++} ++ ++void CHXPrefList::Clear() ++{ ++ while(!m_prefInfo.IsEmpty()) ++ { ++ CHXPrefInfo* pInfo = (CHXPrefInfo*)m_prefInfo.RemoveHead(); ++ HX_DELETE(pInfo); ++ } ++} ++ ++void CHXPrefList::SetPreferences(IUnknown* pContext) ++{ ++ IHXPreferences* pPrefs = NULL; ++ IHXCommonClassFactory* pCCF = NULL; ++ ++ if (pContext && ++ (HXR_OK == pContext->QueryInterface(IID_IHXPreferences, ++ (void**)&pPrefs)) && ++ (HXR_OK == pContext->QueryInterface(IID_IHXCommonClassFactory, ++ (void**)&pCCF))) ++ { ++ CHXSimpleList::Iterator itr = m_prefInfo.Begin(); ++ ++ for(; itr != m_prefInfo.End(); ++itr) ++ { ++ CHXPrefInfo* pInfo = (CHXPrefInfo*)(*itr); ++ ++ IHXBuffer* pBuf = NULL; ++ ++ if ((HXR_OK == pCCF->CreateInstance(CLSID_IHXBuffer, ++ (void**)&pBuf)) && ++ (HXR_OK == pBuf->Set((const unsigned char*)pInfo->Value(), ++ strlen(pInfo->Value())))) ++ { ++ pPrefs->WritePref(pInfo->Key(), pBuf); ++ } ++ ++ HX_RELEASE(pBuf); ++ } ++ } ++ ++ HX_RELEASE(pPrefs); ++ HX_RELEASE(pCCF); ++} +Index: helix-libs/clientapps/clutter/preflist.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/preflist.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,69 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Source last modified: $Id: preflist.h,v 1.2 2007/07/06 20:32:36 jfinnecy Exp $ ++ * ++ * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, ++ * are subject to the current version of the RealNetworks Public ++ * Source License (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the current version of the RealNetworks Community ++ * Source License (the "RCSL") available at ++ * http://www.helixcommunity.org/content/rcsl, in which case the RCSL ++ * will apply. You may also obtain the license terms directly from ++ * RealNetworks. You may not use this file except in compliance with ++ * the RPSL or, if you have a valid RCSL with RealNetworks applicable ++ * to this file, the RCSL. Please see the applicable RPSL or RCSL for ++ * the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * Alternatively, the contents of this file may be used under the ++ * terms of the GNU General Public License Version 2 (the ++ * "GPL") in which case the provisions of the GPL are applicable ++ * instead of those above. If you wish to allow use of your version of ++ * this file only under the terms of the GPL, and not to allow others ++ * to use your version of this file under the terms of either the RPSL ++ * or RCSL, indicate your decision by deleting the provisions above ++ * and replace them with the notice and other provisions required by ++ * the GPL. If you do not delete the provisions above, a recipient may ++ * use your version of this file under the terms of any one of the ++ * RPSL, the RCSL or the GPL. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the ++ * portions it created. ++ * ++ * This file, and the files included with this file, is distributed ++ * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY ++ * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ++ * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ++ * ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++#ifndef PREFLIST_H ++#define PREFLIST_H ++ ++#include "hxslist.h" ++ ++class CHXPrefList ++{ ++public: ++ CHXPrefList(); ++ ~CHXPrefList(); ++ ++ void Add(const char* pKey, const char* pValue); ++ void Clear(); ++ ++ void SetPreferences(IUnknown* pContext); ++ ++private: ++ CHXSimpleList m_prefInfo; ++}; ++ ++#endif /* PREFLIST_H */ +Index: helix-libs/clientapps/clutter/print.cpp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/print.cpp 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,80 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include ++#include ++#include "print.h" ++#ifdef WIN32_PLATFORM_PSPC ++#include "hlxosstr.h" ++#include ++#endif ++ ++int print2stdout(const char* pFmt, ...) ++{ ++ va_list args; ++ ++ va_start(args, pFmt); ++ ++#ifdef WIN32_PLATFORM_PSPC ++ char szMessage[512]; ++ int ret = vsprintf(szMessage, pFmt, args); ++ OutputDebugString(OS_STRING(szMessage)); ++#else ++ int ret = vfprintf(stdout, pFmt, args); ++#endif ++ ++ va_end(args); ++ ++ return ret; ++} ++ ++int print2stderr(const char* pFmt, ...) ++{ ++ va_list args; ++ ++ va_start(args, pFmt); ++ ++#ifdef WIN32_PLATFORM_PSPC ++ char szMessage[512]; ++ int ret = vsprintf(szMessage, pFmt, args); ++ OutputDebugString(OS_STRING(szMessage)); ++#else ++ int ret = vfprintf(stderr, pFmt, args); ++#endif ++ ++ va_end(args); ++ ++ return ret; ++} +Index: helix-libs/clientapps/clutter/print.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/print.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,60 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: RCSL 1.0/RPSL 1.0 ++ * ++ * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, are ++ * subject to the current version of the RealNetworks Public Source License ++ * Version 1.0 (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the RealNetworks Community Source License Version 1.0 ++ * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++ * in which case the RCSL will apply. You may also obtain the license terms ++ * directly from RealNetworks. You may not use this file except in ++ * compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++ * applicable to this file, the RCSL. Please see the applicable RPSL or ++ * RCSL for the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the portions ++ * it created. ++ * ++ * This file, and the files included with this file, is distributed and made ++ * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef PRINT_H ++#define PRINT_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#ifdef _SYMBIAN ++#include "platform/symbian/symbian_print.h" ++ ++#define STDOUT symbianPrint ++#define STDERR symbianPrint ++#else ++int print2stdout(const char* pFmt, ...); ++int print2stderr(const char* pFmt, ...); ++#define STDOUT print2stdout ++#define STDERR print2stderr ++#endif ++ ++#ifdef __cplusplus ++}; ++#endif ++ ++ ++#endif /* PRINT_H */ +Index: helix-libs/clientapps/clutter/shmhelp.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/shmhelp.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,88 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Source last modified: $Id: shmhelp.h,v 1.5 2007/07/06 20:54:01 jfinnecy Exp $ ++ * ++ * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, ++ * are subject to the current version of the RealNetworks Public ++ * Source License (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the current version of the RealNetworks Community ++ * Source License (the "RCSL") available at ++ * http://www.helixcommunity.org/content/rcsl, in which case the RCSL ++ * will apply. You may also obtain the license terms directly from ++ * RealNetworks. You may not use this file except in compliance with ++ * the RPSL or, if you have a valid RCSL with RealNetworks applicable ++ * to this file, the RCSL. Please see the applicable RPSL or RCSL for ++ * the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * Alternatively, the contents of this file may be used under the ++ * terms of the GNU General Public License Version 2 (the ++ * "GPL") in which case the provisions of the GPL are applicable ++ * instead of those above. If you wish to allow use of your version of ++ * this file only under the terms of the GPL, and not to allow others ++ * to use your version of this file under the terms of either the RPSL ++ * or RCSL, indicate your decision by deleting the provisions above ++ * and replace them with the notice and other provisions required by ++ * the GPL. If you do not delete the provisions above, a recipient may ++ * use your version of this file under the terms of any one of the ++ * RPSL, the RCSL or the GPL. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the ++ * portions it created. ++ * ++ * This file, and the files included with this file, is distributed ++ * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY ++ * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ++ * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ++ * ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#if defined(USE_XWINDOWS) ++#include ++#include ++#include ++#endif ++ ++#include "hxcom.h" ++#include "hxtypes.h" ++ ++ ++class ShmHelp ++{ ++ public: ++ ++ //Helpers ++ static void Init(Display* pDisplay ); ++ static HXBOOL ShmAvailable(); ++ static HX_RESULT DetachSharedRegion(UCHAR**ppMem, XShmSegmentInfo* pInfo ); ++ static HX_RESULT CreateSharedRegion( INT32 nSize, ++ UCHAR**ppMem, ++ int* pnShmID, ++ XShmSegmentInfo* pInfo ); ++ ++ ++ protected: ++ ++ private: ++ static HXBOOL zm_bUseShm; ++ ++ //The X11 Segment ID.... ++ static int zm_nSegment; ++ static Display* zm_pDisplay; ++ ++ ShmHelp(); ++ ShmHelp(Display*); ++ ~ShmHelp(); ++ ++}; ++ +Index: helix-libs/clientapps/clutter/unix.pcf +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/unix.pcf 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,65 @@ ++# ++# ***** BEGIN LICENSE BLOCK ***** ++# Version: RCSL 1.0/RPSL 1.0 ++# ++# Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. ++# ++# The contents of this file, and the files included with this file, are ++# subject to the current version of the RealNetworks Public Source License ++# Version 1.0 (the "RPSL") available at ++# http://www.helixcommunity.org/content/rpsl unless you have licensed ++# the file under the RealNetworks Community Source License Version 1.0 ++# (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, ++# in which case the RCSL will apply. You may also obtain the license terms ++# directly from RealNetworks. You may not use this file except in ++# compliance with the RPSL or, if you have a valid RCSL with RealNetworks ++# applicable to this file, the RCSL. Please see the applicable RPSL or ++# RCSL for the rights, obligations and limitations governing use of the ++# contents of the file. ++# ++# This file is part of the Helix DNA Technology. RealNetworks is the ++# developer of the Original Code and owns the copyrights in the portions ++# it created. ++# ++# This file, and the files included with this file, is distributed and made ++# available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++# EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS ++# FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++# ++# Technology Compatibility Kit Test Suite(s) Location: ++# http://www.helixcommunity.org/content/tck ++# ++# Contributor(s): ++# ++# ***** END LICENSE BLOCK ***** ++# ++ ++ ++if( ('HELIX_FEATURE_MINI_SITE' not in project.defines) and ++ (platform.name in ('linux2', 'linux-i386')) and ++ ('HELIX_FEATURE_VIDEO' in project.defines) and ++ (project.BuildOption("nodll")) ++ ): ++ project.sys_libraries.append('Xv', 'Xext') ++ ++ ++ ++ ++if project.BuildOption("nodll"): ++ if project.IsDefined("HELIX_FEATURE_VIDEO_CODEC_RV20"): ++ if platform.name in ('linux2', 'linux-i386', 'win32') and sysinfo.arch == 'i386': ++ project.AddLibraries(GetSDKPath("rvg2dec_libs") + '[adecg2]') ++ else: ++ project.AddLibraries(GetSDKPath("rvg2dec_libs") + '[cdecg2]') ++ ++ if project.IsDefined("HELIX_FEATURE_VIDEO_CODEC_RV30") or \ ++ project.IsDefined("HELIX_FEATURE_VIDEO_CODEC_RV40"): ++ if project.IsDefined("HELIX_FEATURE_ANSIC_RV89COMBO"): ++ project.AddLibraries(GetSDKPath("rv89combo_c_libs")+"[cdec]") ++ else: ++ if platform.name in ('linux2', 'linux-i386') and sysinfo.arch == 'i386': ++ project.AddLibraries(GetSDKPath("rv89combo_libs")+"[adec40]") ++ else: ++ project.AddLibraries(GetSDKPath("rv89combo_libs")+"[cdec40]") ++ +Index: helix-libs/clientapps/clutter/unixcmap.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/unixcmap.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,51 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Source last modified: $Id: unixcmap.h,v 1.3 2007/07/06 20:54:01 jfinnecy Exp $ ++ * ++ * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, ++ * are subject to the current version of the RealNetworks Public ++ * Source License (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the current version of the RealNetworks Community ++ * Source License (the "RCSL") available at ++ * http://www.helixcommunity.org/content/rcsl, in which case the RCSL ++ * will apply. You may also obtain the license terms directly from ++ * RealNetworks. You may not use this file except in compliance with ++ * the RPSL or, if you have a valid RCSL with RealNetworks applicable ++ * to this file, the RCSL. Please see the applicable RPSL or RCSL for ++ * the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * Alternatively, the contents of this file may be used under the ++ * terms of the GNU General Public License Version 2 (the ++ * "GPL") in which case the provisions of the GPL are applicable ++ * instead of those above. If you wish to allow use of your version of ++ * this file only under the terms of the GPL, and not to allow others ++ * to use your version of this file under the terms of either the RPSL ++ * or RCSL, indicate your decision by deleting the provisions above ++ * and replace them with the notice and other provisions required by ++ * the GPL. If you do not delete the provisions above, a recipient may ++ * use your version of this file under the terms of any one of the ++ * RPSL, the RCSL or the GPL. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the ++ * portions it created. ++ * ++ * This file, and the files included with this file, is distributed ++ * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY ++ * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ++ * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ++ * ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++EXTERN_C Colormap HXGetXColormap(Display* pDisplay, Window window); ++EXTERN_C void HXFindBestXColor(Display* pDisplay, Colormap cmap, XColor* desired); +Index: helix-libs/clientapps/clutter/visuals.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ helix-libs/clientapps/clutter/visuals.h 2008-10-13 06:05:49.000000000 -0700 +@@ -0,0 +1,74 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Source last modified: $Id: visuals.h,v 1.4 2007/07/06 20:54:01 jfinnecy Exp $ ++ * ++ * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. ++ * ++ * The contents of this file, and the files included with this file, ++ * are subject to the current version of the RealNetworks Public ++ * Source License (the "RPSL") available at ++ * http://www.helixcommunity.org/content/rpsl unless you have licensed ++ * the file under the current version of the RealNetworks Community ++ * Source License (the "RCSL") available at ++ * http://www.helixcommunity.org/content/rcsl, in which case the RCSL ++ * will apply. You may also obtain the license terms directly from ++ * RealNetworks. You may not use this file except in compliance with ++ * the RPSL or, if you have a valid RCSL with RealNetworks applicable ++ * to this file, the RCSL. Please see the applicable RPSL or RCSL for ++ * the rights, obligations and limitations governing use of the ++ * contents of the file. ++ * ++ * Alternatively, the contents of this file may be used under the ++ * terms of the GNU General Public License Version 2 (the ++ * "GPL") in which case the provisions of the GPL are applicable ++ * instead of those above. If you wish to allow use of your version of ++ * this file only under the terms of the GPL, and not to allow others ++ * to use your version of this file under the terms of either the RPSL ++ * or RCSL, indicate your decision by deleting the provisions above ++ * and replace them with the notice and other provisions required by ++ * the GPL. If you do not delete the provisions above, a recipient may ++ * use your version of this file under the terms of any one of the ++ * RPSL, the RCSL or the GPL. ++ * ++ * This file is part of the Helix DNA Technology. RealNetworks is the ++ * developer of the Original Code and owns the copyrights in the ++ * portions it created. ++ * ++ * This file, and the files included with this file, is distributed ++ * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY ++ * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ++ * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ++ * ENJOYMENT OR NON-INFRINGEMENT. ++ * ++ * Technology Compatibility Kit Test Suite(s) Location: ++ * http://www.helixcommunity.org/content/tck ++ * ++ * Contributor(s): ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef _UNIX ++#error This is the UNIX platform specific implementation. ++#endif ++ ++#ifndef _VISUALS_H_ ++#define _VISUALS_H_ ++ ++#if defined(USE_XWINDOWS) ++#include ++#include ++#include ++#endif ++ ++// ++// These functions are loaded with dlsym() so turn off name mangling ++// with extern "C". ++// ++extern "C" { ++ ++Visual* GetBestVisual(Display* display); ++Visual* GetVisual(Display* display, long mask, XVisualInfo* templ); ++ ++} ++ ++#endif // _VISUALS_H_ diff --git a/meta-extras/packages/helix/helix-libs/helix-player.pc b/meta-extras/packages/helix/helix-libs/helix-player.pc new file mode 100644 index 0000000000..5d2994809e --- /dev/null +++ b/meta-extras/packages/helix/helix-libs/helix-player.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: helix-player +Description: Helix Player Interface +Version: 4.1.0 +Libs: -L${libdir} -lhelix-player -lstdc++ +Cflags: -I/opt/helix/include -D_UNIX +Requires: diff --git a/meta-extras/packages/helix/helix-libs/hxclient.pc b/meta-extras/packages/helix/helix-libs/hxclient.pc new file mode 100644 index 0000000000..8f64d25670 --- /dev/null +++ b/meta-extras/packages/helix/helix-libs/hxclient.pc @@ -0,0 +1,11 @@ +prefix=/opt/helix +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: hxclient +Description: Helix Client Libraries off the Atlas Branch +Version: 4.1.0 +Libs: -L${libdir} -lhxclient -lstdc++ +Cflags: -I${includedir} -D_UNIX +Requires: diff --git a/meta-extras/packages/helix/ribosome.bb b/meta-extras/packages/helix/ribosome.bb new file mode 100644 index 0000000000..3cea6f6755 --- /dev/null +++ b/meta-extras/packages/helix/ribosome.bb @@ -0,0 +1,43 @@ +DESCRIPTION = "Ribosome: HelixCommunity Build System" +SECTION = "base" +HOMEPAGE = "http://helixcommunity.org" +LICENSE = "GPLv2" + +_SNAPSHOT = "22102008" +_TARBALL_SERVER = "http://git.moblin.org/repos/users/rusty" + +PV="r0" +PR = "r1" + +SRC_URI = "${_TARBALL_SERVER}/ribosome-${_SNAPSHOT}.tar.bz2 \ + ${_TARBALL_SERVER}/client-bif-${_SNAPSHOT}.tar.bz2 \ + ${_TARBALL_SERVER}/common-bif-${_SNAPSHOT}.tar.bz2 \ + file://ribosome/clutter.bif \ + file://ribosome/buildrc" + +S = "${WORKDIR}" + +COMPATIBLE_HOST = '(i.86.*-linux)' + +do_install() { + # Install build system of doom + install -d ${D}${libdir} + cp -a ribosome-${_SNAPSHOT} ${D}${libdir}/ribosome + install -m 0644 ribosome/buildrc ${D}${libdir}/ribosome/ + + # Install client BIF's + install -d ${D}${libdir}/ribosome/bif-cvs/helix/client/build/BIF + install -m 0644 client-bif-${_SNAPSHOT}/*.bif \ + ${D}${libdir}/ribosome/bif-cvs/helix/client/build/BIF + + # Install common BIF's + install -d ${D}${libdir}/ribosome/bif-cvs/helix/common/build/BIF + install -m 0644 common-bif-${_SNAPSHOT}/*.bif \ + ${D}${libdir}/ribosome/bif-cvs/helix/common/build/BIF + + # Install our own custom BIF + install -m 0644 ribosome/*.bif ${D}${libdir}/ribosome/bif-cvs/helix/client/build/BIF/ + + # The [ and ] characters break packaging, remove for now + rm -rf ${D}${libdir}/ribosome/test/data/utils/[client-restricted] +} diff --git a/meta-extras/packages/helix/ribosome/buildrc b/meta-extras/packages/helix/ribosome/buildrc new file mode 100644 index 0000000000..6dbc47a06d --- /dev/null +++ b/meta-extras/packages/helix/ribosome/buildrc @@ -0,0 +1,4 @@ +AddMultiCVS("helix",":ext:cvs.helixcommunity.org:/cvsroot/") +AddBIFPath("common", "[helix]/common/build/BIF") +AddBIFPath("client", "[helix]/client/build/BIF") +SetSDKPath("oggvorbissdk", "/usr/") diff --git a/meta-extras/packages/helix/ribosome/clutter.bif b/meta-extras/packages/helix/ribosome/clutter.bif new file mode 100755 index 0000000000..a87fcb3faa --- /dev/null +++ b/meta-extras/packages/helix/ribosome/clutter.bif @@ -0,0 +1,68 @@ + + + + + + + + + + + + unix + + + + HELIX_FEATURE_AUDIO_VORBIS + HELIX_FEATURE_VIDEO_THEORA + HELIX_FEATURE_NETSERVICES_SHIM + HELIX_FEATURE_AVIFF + HELIX_CONFIG_SLUGGISHAUTOUPGRADE + HELIX_FEATURE_ALSA + _FORTIFY_SOURCE=2 + + + + client_include + datatype_tools_dtdriver_dtdrplin + + + + helix_client_objs + player_hxclientkit + player_hxclientkit_src_hxrecordengine + client_core + client_resource + client_xres + protocol_sdp + video_site + datatype_smil + datatype_text_realtext_fileformat + datatype_text_realtext_renderer + datatype_tools_dtdriver_dtdrplin + datatype_ogg_fileformat + datatype_vorbis_renderer + datatype_theora_renderer + datatype_h261_renderer + datatype_h263 + datatype_group_audio + datatype_group_image + datatype_ram + datatype_sdp + datatype_avi_fileformat + filesystem_local + filesystem_http + filesystem_memory + common_auth_authmgr + common_auth_rn5auth + client_auth_basicauth + common_log_logsystem + common_log_logobserverfile + + + + + + + + diff --git a/meta-extras/packages/lirc/files/lirc_sir-sa1100.patch b/meta-extras/packages/lirc/files/lirc_sir-sa1100.patch new file mode 100644 index 0000000000..245b28ac51 --- /dev/null +++ b/meta-extras/packages/lirc/files/lirc_sir-sa1100.patch @@ -0,0 +1,10 @@ +--- lirc/drivers/lirc_sir/lirc_sir.c.orig 2004-11-18 17:30:17 +0100 ++++ lirc/drivers/lirc_sir/lirc_sir.c 2004-11-18 17:30:21 +0100 +@@ -628,6 +628,7 @@ + struct timeval curr_tv; + static unsigned long deltv; + #ifdef LIRC_ON_SA1100 ++ unsigned long deltintrtv; + int status; + static int n=0; + diff --git a/meta-extras/packages/lirc/files/lircd.conf_nslu2 b/meta-extras/packages/lirc/files/lircd.conf_nslu2 new file mode 100644 index 0000000000..5fbaba469c --- /dev/null +++ b/meta-extras/packages/lirc/files/lircd.conf_nslu2 @@ -0,0 +1,1886 @@ +# This file is modified for the NSLU2. +# It's based on http://lirc.sourceforge.net/remotes/philips/RC-5 +# and should support all RC5 compatible remotes. +# The timings are for a de-underclocked NSLU2. + +# To see which key generates which code, run "irw". +# To check whether lirc works at all, run "mode2 -d /dev/lirc" +# after stopping lircd with "/etc/init.d/lircd stop". +# To learn a new remote, run "irrecord -d /dev/lirc /etc/lircd.conf.new" and after +# success "mv /etc/lircd.conf.new /etc/lircd.conf". +# You could also take the timing values from /etc/lircd.conf.new +# and paste it in here. +# See also /etc/lircrc. + +begin remote + + name RC5 + bits 13 + flags RC5|CONST_LENGTH + eps 30 + aeps 100 +# if it doesn't work, you could change the following values: + one 863 921 + zero 863 921 + plead 947 + gap 113626 + min_repeat 1 + repeat_bit 2 + + begin codes + amp1-0 0x0000000000001400 + amp1-1 0x0000000000001401 + amp1-2 0x0000000000001402 + amp1-3 0x0000000000001403 + amp1-4 0x0000000000001404 + amp1-5 0x0000000000001405 + amp1-6 0x0000000000001406 + amp1-7 0x0000000000001407 + amp1-8 0x0000000000001408 + amp1-9 0x0000000000001409 + amp1-graphic_equalizer_left 0x000000000000140A + amp1-graphic_equalizer_right 0x000000000000140B + amp1-standby 0x000000000000140C + amp1-mute/demute 0x000000000000140D + amp1-P.P. 0x000000000000140E + amp1-display 0x000000000000140F + amp1-volume+ 0x0000000000001410 + amp1-volume- 0x0000000000001411 + amp1-brightness+ 0x0000000000001412 + amp1-brightness- 0x0000000000001413 + amp1-colour_saturation+ 0x0000000000001414 + amp1-colour_saturation- 0x0000000000001415 + amp1-bass+ 0x0000000000001416 + amp1-bass- 0x0000000000001417 + amp1-treble+ 0x0000000000001418 + amp1-treble- 0x0000000000001419 + amp1-balance_right 0x000000000000141A + amp1-balance_left 0x000000000000141B + amp1-graph_equal_left&right 0x000000000000141C + amp1-loudness 0x000000000000141D + amp1-high_tone_filter 0x000000000000141E + amp1-low_tone_filter 0x000000000000141F + amp1-step+ 0x0000000000001420 + amp1-step- 0x0000000000001421 + amp1-signal_path_scroll 0x0000000000001422 + amp1-INVALID 0x0000000000001423 + amp1-INVALID 0x0000000000001424 + amp1-surround_mode 0x0000000000001425 + amp1-sleeptimer 0x0000000000001426 + amp1-balance_rear 0x0000000000001427 + amp1-balance_front 0x0000000000001428 + amp1-TPS 0x0000000000001429 + amp1-timer_set 0x000000000000142A + amp1-timer_up 0x000000000000142B + amp1-timer_down 0x000000000000142C + amp1-timer_memo 0x000000000000142D + amp1-acoustic_memory 0x000000000000142E + amp1-acoustic_memory_select 0x000000000000142F + amp1-pause 0x0000000000001430 + amp1-erase 0x0000000000001431 + amp1-rewind 0x0000000000001432 + amp1-go_to 0x0000000000001433 + amp1-wind 0x0000000000001434 + amp1-play 0x0000000000001435 + amp1-stop 0x0000000000001436 + amp1-recording 0x0000000000001437 + amp1-external1 0x0000000000001438 + amp1-external2 0x0000000000001439 + amp1-clear_all_memory 0x000000000000143A + amp1-INVALID 0x000000000000143B + amp1-dyn_range_expand/compr 0x000000000000143C + amp1-system_standby 0x000000000000143D + amp1-INVALID 0x000000000000143E + amp1-system_select 0x000000000000143F + amp1-surround_sound 0x0000000000000400 + amp1-balance_front 0x0000000000000401 + amp1-balance_rear 0x0000000000000402 + amp1-sound_effects1 0x0000000000000403 + amp1-sound_effects2 0x0000000000000404 + amp1-sound_effects3 0x0000000000000405 + amp1-sound_effects4 0x0000000000000406 + amp1-sound_effects5 0x0000000000000407 + amp1-sound_or_menu_func.1 0x0000000000000408 + amp1-sound_or_menu_func.2 0x0000000000000409 + amp1-sound_or_menu_func.3 0x000000000000040A + amp1-linear_function_up 0x000000000000040D + amp1-linear_function_down 0x000000000000040E + amp1-catalogue 0x000000000000040F + amp1-cursor_step_up 0x0000000000000410 + amp1-cursor_step_down 0x0000000000000411 + amp1-menu_on 0x0000000000000412 + amp1-menu_off 0x0000000000000413 + amp1-display_A/V_status 0x0000000000000414 + amp1-cursor_step_left 0x0000000000000415 + amp1-cursor_step_right 0x0000000000000416 + amp1-menu_function 0x0000000000000417 + amp1-PIP_on/off 0x0000000000000418 + amp1-PIP_shift 0x0000000000000419 + amp1-PIP_main_swap 0x000000000000041A + amp1-strobe_on/off 0x000000000000041B + amp1-multi_strobe 0x000000000000041C + amp1-main_freezed 0x000000000000041D + amp1-3/9_multi_scan 0x000000000000041E + amp1-PIP_mode_select 0x000000000000041F + amp1-mosaic 0x0000000000000420 + amp1-solarization 0x0000000000000421 + amp1-main_stored 0x0000000000000422 + amp1-PIP_strobe 0x0000000000000423 + amp1-recall_main 0x0000000000000424 + amp1-PIP_freeze 0x0000000000000425 + amp1-PIP_step_up 0x0000000000000426 + amp1-PIP_step_down 0x0000000000000427 + amp1-INVALID 0x000000000000042C + amp1-INVALID 0x0000000000000430 + amp1-INVALID 0x0000000000000431 + amp1-INVALID 0x0000000000000436 + amp1-INVALID 0x0000000000000437 + amp1-connect 0x000000000000043B + amp1-disconnect 0x000000000000043C + amp2-0 0x00000000000014C0 + amp2-1 0x00000000000014C1 + amp2-2 0x00000000000014C2 + amp2-3 0x00000000000014C3 + amp2-4 0x00000000000014C4 + amp2-5 0x00000000000014C5 + amp2-6 0x00000000000014C6 + amp2-7 0x00000000000014C7 + amp2-8 0x00000000000014C8 + amp2-9 0x00000000000014C9 + amp2-graphic_equalizer_left 0x00000000000014CA + amp2-graphic_equalizer_right 0x00000000000014CB + amp2-standby 0x00000000000014CC + amp2-mute/demute 0x00000000000014CD + amp2-P.P. 0x00000000000014CE + amp2-display 0x00000000000014CF + amp2-volume+ 0x00000000000014D0 + amp2-volume- 0x00000000000014D1 + amp2-brightness+ 0x00000000000014D2 + amp2-brightness- 0x00000000000014D3 + amp2-colour_saturation+ 0x00000000000014D4 + amp2-colour_saturation- 0x00000000000014D5 + amp2-bass+ 0x00000000000014D6 + amp2-bass- 0x00000000000014D7 + amp2-treble+ 0x00000000000014D8 + amp2-treble- 0x00000000000014D9 + amp2-balance_right 0x00000000000014DA + amp2-balance_left 0x00000000000014DB + amp2-graph_equal_left&right 0x00000000000014DC + amp2-loudness 0x00000000000014DD + amp2-high_tone_filter 0x00000000000014DE + amp2-low_tone_filter 0x00000000000014DF + amp2-step+ 0x00000000000014E0 + amp2-step- 0x00000000000014E1 + amp2-signal_path_scroll 0x00000000000014E2 + amp2-INVALID 0x00000000000014E3 + amp2-INVALID 0x00000000000014E4 + amp2-surround_mode 0x00000000000014E5 + amp2-sleeptimer 0x00000000000014E6 + amp2-balance_rear 0x00000000000014E7 + amp2-balance_front 0x00000000000014E8 + amp2-TPS 0x00000000000014E9 + amp2-timer_set 0x00000000000014EA + amp2-timer_up 0x00000000000014EB + amp2-timer_down 0x00000000000014EC + amp2-timer_memo 0x00000000000014ED + amp2-acoustic_memory 0x00000000000014EE + amp2-acoustic_memory_select 0x00000000000014EF + amp2-pause 0x00000000000014F0 + amp2-erase 0x00000000000014F1 + amp2-rewind 0x00000000000014F2 + amp2-go_to 0x00000000000014F3 + amp2-wind 0x00000000000014F4 + amp2-play 0x00000000000014F5 + amp2-stop 0x00000000000014F6 + amp2-recording 0x00000000000014F7 + amp2-external1 0x00000000000014F8 + amp2-external2 0x00000000000014F9 + amp2-clear_all_memory 0x00000000000014FA + amp2-INVALID 0x00000000000014FB + amp2-dyn_range_expand/compr 0x00000000000014FC + amp2-system_standby 0x00000000000014FD + amp2-INVALID 0x00000000000014FE + amp2-system_select 0x00000000000014FF + amp2-surround_sound 0x00000000000004C0 + amp2-balance_front 0x00000000000004C1 + amp2-balance_rear 0x00000000000004C2 + amp2-sound_effects1 0x00000000000004C3 + amp2-sound_effects2 0x00000000000004C4 + amp2-sound_effects3 0x00000000000004C5 + amp2-sound_effects4 0x00000000000004C6 + amp2-sound_effects5 0x00000000000004C7 + amp2-sound_or_menu_func.1 0x00000000000004C8 + amp2-sound_or_menu_func.2 0x00000000000004C9 + amp2-sound_or_menu_func.3 0x00000000000004CA + amp2-linear_function_up 0x00000000000004CD + amp2-linear_function_down 0x00000000000004CE + amp2-catalogue 0x00000000000004CF + amp2-cursor_step_up 0x00000000000004D0 + amp2-cursor_step_down 0x00000000000004D1 + amp2-menu_on 0x00000000000004D2 + amp2-menu_off 0x00000000000004D3 + amp2-display_A/V_status 0x00000000000004D4 + amp2-cursor_step_left 0x00000000000004D5 + amp2-cursor_step_right 0x00000000000004D6 + amp2-menu_function 0x00000000000004D7 + amp2-PIP_on/off 0x00000000000004D8 + amp2-PIP_shift 0x00000000000004D9 + amp2-PIP_main_swap 0x00000000000004DA + amp2-strobe_on/off 0x00000000000004DB + amp2-multi_strobe 0x00000000000004DC + amp2-main_freezed 0x00000000000004DD + amp2-3/9_multi_scan 0x00000000000004DE + amp2-PIP_mode_select 0x00000000000004DF + amp2-mosaic 0x00000000000004E0 + amp2-solarization 0x00000000000004E1 + amp2-main_stored 0x00000000000004E2 + amp2-PIP_strobe 0x00000000000004E3 + amp2-recall_main 0x00000000000004E4 + amp2-PIP_freeze 0x00000000000004E5 + amp2-PIP_step_up 0x00000000000004E6 + amp2-PIP_step_down 0x00000000000004E7 + amp2-INVALID 0x00000000000004EC + amp2-INVALID 0x00000000000004F0 + amp2-INVALID 0x00000000000004F1 + amp2-INVALID 0x00000000000004F6 + amp2-INVALID 0x00000000000004F7 + amp2-connect 0x00000000000004FB + amp2-disconnect 0x00000000000004FC + cd-0 0x0000000000001500 + cd-1 0x0000000000001501 + cd-2 0x0000000000001502 + cd-3 0x0000000000001503 + cd-4 0x0000000000001504 + cd-5 0x0000000000001505 + cd-6 0x0000000000001506 + cd-7 0x0000000000001507 + cd-8 0x0000000000001508 + cd-9 0x0000000000001509 + cd-cursor_scroll 0x000000000000150A + cd-display_scroll 0x000000000000150B + cd-standby 0x000000000000150C + cd-mute/demute 0x000000000000150D + cd-P.P._(personal_pref.) 0x000000000000150E + cd-display 0x000000000000150F + cd-volume+ 0x0000000000001510 + cd-volume- 0x0000000000001511 + cd-brightness+ 0x0000000000001512 + cd-brightness- 0x0000000000001513 + cd-colour_saturation+ 0x0000000000001514 + cd-colour_saturation- 0x0000000000001515 + cd-bass+ 0x0000000000001516 + cd-bass- 0x0000000000001517 + cd-treble+ 0x0000000000001518 + cd-treble- 0x0000000000001519 + cd-balance_right 0x000000000000151A + cd-balance_left 0x000000000000151B + cd-rept_once/TSPo/shuffle 0x000000000000151C + cd-repeat_cont/TSPc 0x000000000000151D + cd-select+ 0x000000000000151E + cd-select- 0x000000000000151F + cd-next 0x0000000000001520 + cd-previous 0x0000000000001521 + cd-index_next 0x0000000000001522 + cd-index_previous 0x0000000000001523 + cd-play/program 0x0000000000001524 + cd-speed_nominal 0x0000000000001525 + cd-speed+ 0x0000000000001526 + cd-speed- 0x0000000000001527 + cd-INVALID 0x0000000000001528 + cd-store_execute 0x0000000000001529 + cd-INVALID 0x000000000000152A + cd-scan_forward 0x000000000000152B + cd-INVALID 0x000000000000152C + cd-open/close 0x000000000000152D + cd-INVALID 0x000000000000152E + cd-INVALID 0x000000000000152F + cd-pause 0x0000000000001530 + cd-erase 0x0000000000001531 + cd-rewind 0x0000000000001532 + cd-go_to 0x0000000000001533 + cd-wind 0x0000000000001534 + cd-play 0x0000000000001535 + cd-stop 0x0000000000001536 + cd-recording 0x0000000000001537 + cd-external1 0x0000000000001538 + cd-external2 0x0000000000001539 + cd-clear_all_memory 0x000000000000153A + cd-repeat_A/B_program 0x000000000000153B + cd-dynamic_range_expand 0x000000000000153C + cd-system_standby 0x000000000000153D + cd-dynamic_range_compress 0x000000000000153E + cd-system_select 0x000000000000153F + cd-surround_sound 0x0000000000000500 + cd-balance_front 0x0000000000000501 + cd-balance_rear 0x0000000000000502 + cd-sound_effects1 0x0000000000000503 + cd-sound_effects2 0x0000000000000504 + cd-sound_effects3 0x0000000000000505 + cd-sound_effects4 0x0000000000000506 + cd-sound_effects5 0x0000000000000507 + cd-sound_or_menu_func.1 0x0000000000000508 + cd-sound_or_menu_func.2 0x0000000000000509 + cd-sound_or_menu_func.3 0x000000000000050A + cd-linear_function_up 0x000000000000050D + cd-linear_function_down 0x000000000000050E + cd-sound_or_menu_func. 0x000000000000050F + cd-cursor_step_up 0x0000000000000510 + cd-cursor_step_down 0x0000000000000511 + cd-menu_on 0x0000000000000512 + cd-menu_off 0x0000000000000513 + cd-display_A/V_status 0x0000000000000514 + cd-cursor_step_left 0x0000000000000515 + cd-cursor_step_right 0x0000000000000516 + cd-menu_function 0x0000000000000517 + cd-PIP_on/off 0x0000000000000518 + cd-PIP_shift 0x0000000000000519 + cd-PIP_main_swap 0x000000000000051A + cd-strobe_on/off 0x000000000000051B + cd-multi_strobe 0x000000000000051C + cd-main_freezed 0x000000000000051D + cd-3/9_multi_scan 0x000000000000051E + cd-PIP_mode_select 0x000000000000051F + cd-mosaic 0x0000000000000520 + cd-solarization 0x0000000000000521 + cd-main_stored 0x0000000000000522 + cd-PIP_strobe 0x0000000000000523 + cd-recall_main 0x0000000000000524 + cd-PIP_freeze 0x0000000000000525 + cd-PIP_step_up 0x0000000000000526 + cd-PIP_step_down 0x0000000000000527 + cd-INVALID 0x0000000000000528 + cd-INVALID 0x0000000000000529 + cd-INVALID 0x000000000000052A + cd-INVALID 0x000000000000052B + cd-FTS 0x000000000000052C + cd-INVALID 0x000000000000052D + cd-INVALID 0x0000000000000532 + cd-INVALID 0x0000000000000533 + cd-INVALID 0x0000000000000534 + cd-INVALID 0x0000000000000535 + cd-sub_mode1 0x0000000000000536 + cd-sub_mode2 0x0000000000000537 + cd-connect 0x000000000000053B + cd-disconnect 0x000000000000053C + lv1-0 0x0000000000001100 + lv1-1 0x0000000000001101 + lv1-2 0x0000000000001102 + lv1-3 0x0000000000001103 + lv1-4 0x0000000000001104 + lv1-5 0x0000000000001105 + lv1-6 0x0000000000001106 + lv1-7 0x0000000000001107 + lv1-8 0x0000000000001108 + lv1-9 0x0000000000001109 + lv1-picture_number/time 0x000000000000110A + lv1-channel_number 0x000000000000110B + lv1-standby 0x000000000000110C + lv1-mute/demute 0x000000000000110D + lv1-P.P._(personal_pref.) 0x000000000000110E + lv1-display 0x000000000000110F + lv1-volume+ 0x0000000000001110 + lv1-volume- 0x0000000000001111 + lv1-brightness+ 0x0000000000001112 + lv1-brightness- 0x0000000000001113 + lv1-colour_saturation+ 0x0000000000001114 + lv1-colour_saturation- 0x0000000000001115 + lv1-bass+ 0x0000000000001116 + lv1-bass- 0x0000000000001117 + lv1-treble+ 0x0000000000001118 + lv1-treble- 0x0000000000001119 + lv1-balance_right 0x000000000000111A + lv1-balance_left 0x000000000000111B + lv1-repeat_once/TSPo 0x000000000000111C + lv1-repeat_cont/TSPc 0x000000000000111D + lv1-next 0x000000000000111E + lv1-fast_run_reverse 0x000000000000111F + lv1-entry 0x0000000000001120 + lv1-auto_stop/memory 0x0000000000001121 + lv1-slow_run_reverse 0x0000000000001122 + lv1-audio1 0x0000000000001123 + lv1-audio2 0x0000000000001124 + lv1-still_picture 0x0000000000001125 + lv1-speed+ 0x0000000000001126 + lv1-speed- 0x0000000000001127 + lv1-slow_run_forward 0x0000000000001128 + lv1-still_forward 0x0000000000001129 + lv1-fast_run_forward 0x000000000000112A + lv1-search_automatic 0x000000000000112B + lv1-scan_reverse 0x000000000000112C + lv1-open/close_(eject) 0x000000000000112D + lv1-scan_forward 0x000000000000112E + lv1-play_reverse 0x000000000000112F + lv1-pause 0x0000000000001130 + lv1-erase 0x0000000000001131 + lv1-rewind 0x0000000000001132 + lv1-go_to 0x0000000000001133 + lv1-wind 0x0000000000001134 + lv1-play 0x0000000000001135 + lv1-stop 0x0000000000001136 + lv1-recording 0x0000000000001137 + lv1-external1 0x0000000000001138 + lv1-external2 0x0000000000001139 + lv1-clear_all_memory 0x000000000000113A + lv1-freeze_segment 0x000000000000113B + lv1-TXT_(pal)/ant.sw_(ntsc) 0x000000000000113C + lv1-system_standby 0x000000000000113D + lv1-CX_on/off 0x000000000000113E + lv1-system_select 0x000000000000113F + lv1-surround_sound 0x0000000000000100 + lv1-balance_front 0x0000000000000101 + lv1-balance_rear 0x0000000000000102 + lv1-sound_effects1 0x0000000000000103 + lv1-sound_effects2 0x0000000000000104 + lv1-sound_effects3 0x0000000000000105 + lv1-sound_effects4 0x0000000000000106 + lv1-sound_effects5 0x0000000000000107 + lv1-sound_or_menu_func.1 0x0000000000000108 + lv1-sound_or_menu_func.2 0x0000000000000109 + lv1-sound_or_menu_func.3 0x000000000000010A + lv1-INVALID 0x000000000000010B + lv1-INVALID 0x000000000000010C + lv1-linear_function_up 0x000000000000010D + lv1-linear_function_down 0x000000000000010E + lv1-sound_or_menu_func. 0x000000000000010F + lv1-cursor_step_up 0x0000000000000110 + lv1-cursor_step_down 0x0000000000000111 + lv1-menu_on 0x0000000000000112 + lv1-menu_off 0x0000000000000113 + lv1-display_A/V_status 0x0000000000000114 + lv1-cursor_step_left 0x0000000000000115 + lv1-cursor_step_right 0x0000000000000116 + lv1-menu_function 0x0000000000000117 + lv1-PIP_on/off 0x0000000000000118 + lv1-PIP_shift 0x0000000000000119 + lv1-PIP_main_swap 0x000000000000011A + lv1-strobe_on/off 0x000000000000011B + lv1-multi_strobe 0x000000000000011C + lv1-main_freezed 0x000000000000011D + lv1-3/9_multi_scan 0x000000000000011E + lv1-PIP_mode_select 0x000000000000011F + lv1-mosaic 0x0000000000000120 + lv1-solarization 0x0000000000000121 + lv1-main_stored 0x0000000000000122 + lv1-PIP_strobe 0x0000000000000123 + lv1-recall_main 0x0000000000000124 + lv1-PIP_freeze 0x0000000000000125 + lv1-PIP_step_up 0x0000000000000126 + lv1-PIP_step_down 0x0000000000000127 + lv1-INVALID 0x0000000000000128 + lv1-INVALID 0x0000000000000129 + lv1-INVALID 0x000000000000012A + lv1-INVALID 0x000000000000012B + lv1-INVALID 0x000000000000012C + lv1-INVALID 0x000000000000012D + lv1-INVALID 0x0000000000000130 + lv1-INVALID 0x0000000000000131 + lv1-INVALID 0x0000000000000132 + lv1-INVALID 0x0000000000000133 + lv1-INVALID 0x0000000000000134 + lv1-INVALID 0x0000000000000135 + lv1-sub_mode1 0x0000000000000136 + lv1-sub_mode2 0x0000000000000137 + lv1-INVALID 0x0000000000000138 + lv1-INVALID 0x0000000000000139 + lv1-INVALID 0x000000000000013A + lv1-connect 0x000000000000013B + lv1-disconnect 0x000000000000013C + lv2-0 0x0000000000001300 + lv2-1 0x0000000000001301 + lv2-2 0x0000000000001302 + lv2-3 0x0000000000001303 + lv2-4 0x0000000000001304 + lv2-5 0x0000000000001305 + lv2-6 0x0000000000001306 + lv2-7 0x0000000000001307 + lv2-8 0x0000000000001308 + lv2-9 0x0000000000001309 + lv2-picture_number/time 0x000000000000130A + lv2-chapter_number 0x000000000000130B + lv2-standby 0x000000000000130C + lv2-mute/demute 0x000000000000130D + lv2-P.P._(personal_pref.) 0x000000000000130E + lv2-display 0x000000000000130F + lv2-volume+ 0x0000000000001310 + lv2-volume- 0x0000000000001311 + lv2-brightness+ 0x0000000000001312 + lv2-brightness- 0x0000000000001313 + lv2-colour_saturation+ 0x0000000000001314 + lv2-colour_saturation- 0x0000000000001315 + lv2-bass+ 0x0000000000001316 + lv2-bass- 0x0000000000001317 + lv2-treble+ 0x0000000000001318 + lv2-treble- 0x0000000000001319 + lv2-balance_right 0x000000000000131A + lv2-balance_left 0x000000000000131B + lv2-repeat_once/TSPo 0x000000000000131C + lv2-repeat_cont/TSPc 0x000000000000131D + lv2-next 0x000000000000131E + lv2-programming 0x000000000000131F + lv2-INVALID 0x0000000000001320 + lv2-auto_stop/memory 0x0000000000001321 + lv2-slow_run_reverse 0x0000000000001322 + lv2-stereo_left/right 0x0000000000001323 + lv2-previous 0x0000000000001324 + lv2-still_reverse 0x0000000000001325 + lv2-speed+ 0x0000000000001326 + lv2-speed- 0x0000000000001327 + lv2-slow_run_forward 0x0000000000001328 + lv2-still_forward 0x0000000000001329 + lv2-digital_multi_screen 0x000000000000132A + lv2-strobe 0x000000000000132B + lv2-scan_reverse 0x000000000000132C + lv2-open/close_(eject) 0x000000000000132D + lv2-scan_forward 0x000000000000132E + lv2-INVALID 0x000000000000132F + lv2-pause 0x0000000000001330 + lv2-erase 0x0000000000001331 + lv2-rewind 0x0000000000001332 + lv2-go_to 0x0000000000001333 + lv2-wind 0x0000000000001334 + lv2-play 0x0000000000001335 + lv2-stop 0x0000000000001336 + lv2-recording 0x0000000000001337 + lv2-external1 0x0000000000001338 + lv2-external2 0x0000000000001339 + lv2-clear_all_memory 0x000000000000133A + lv2-repeat_A/B_program 0x000000000000133B + lv2-TXT_(pal)/ant.sw_(ntsc) 0x000000000000133C + lv2-system_standby 0x000000000000133D + lv2-CX_on/off 0x000000000000133E + lv2-system_select 0x000000000000133F + lv2-surround_sound 0x0000000000000300 + lv2-balance_front 0x0000000000000301 + lv2-balance_rear 0x0000000000000302 + lv2-sound_effects1 0x0000000000000303 + lv2-sound_effects2 0x0000000000000304 + lv2-sound_effects3 0x0000000000000305 + lv2-sound_effects4 0x0000000000000306 + lv2-sound_effects5 0x0000000000000307 + lv2-sound_or_menu_func.1 0x0000000000000308 + lv2-sound_or_menu_func.2 0x0000000000000309 + lv2-sound_or_menu_func.3 0x000000000000030A + lv2-linear_function_up 0x000000000000030D + lv2-linear_function_down 0x000000000000030E + lv2-sound_or_menu_func. 0x000000000000030F + lv2-cursor_step_up 0x0000000000000310 + lv2-cursor_step_down 0x0000000000000311 + lv2-menu_on 0x0000000000000312 + lv2-menu_off 0x0000000000000313 + lv2-display_A/V_status 0x0000000000000314 + lv2-cursor_step_left 0x0000000000000315 + lv2-cursor_step_right 0x0000000000000316 + lv2-menu_function 0x0000000000000317 + lv2-PIP_on/off 0x0000000000000318 + lv2-PIP_shift 0x0000000000000319 + lv2-PIP_main_swap 0x000000000000031A + lv2-strobe_on/off 0x000000000000031B + lv2-multi_strobe 0x000000000000031C + lv2-main_freezed 0x000000000000031D + lv2-3/9_multi_scan 0x000000000000031E + lv2-PIP_mode_select 0x000000000000031F + lv2-mosaic 0x0000000000000320 + lv2-solarization 0x0000000000000321 + lv2-main_stored 0x0000000000000322 + lv2-PIP_strobe 0x0000000000000323 + lv2-recall_main 0x0000000000000324 + lv2-PIP_freeze 0x0000000000000325 + lv2-PIP_step_up 0x0000000000000326 + lv2-PIP_step_down 0x0000000000000327 + lv2-FTS 0x000000000000032C + lv2-index_next 0x0000000000000330 + lv2-index_previous 0x0000000000000331 + lv2-sub_mode1 0x0000000000000336 + lv2-sub_mode2 0x0000000000000337 + lv2-connect 0x000000000000033B + lv2-disconnect 0x000000000000033C + phono-0 0x0000000000001540 + phono-1 0x0000000000001541 + phono-2 0x0000000000001542 + phono-3 0x0000000000001543 + phono-4 0x0000000000001544 + phono-5 0x0000000000001545 + phono-6 0x0000000000001546 + phono-7 0x0000000000001547 + phono-8 0x0000000000001548 + phono-9 0x0000000000001549 + phono-INVALID 0x000000000000154A + phono-INVALID 0x000000000000154B + phono-standby 0x000000000000154C + phono-mute/demute 0x000000000000154D + phono-P.P. 0x000000000000154E + phono-display 0x000000000000154F + phono-volume+ 0x0000000000001550 + phono-volume- 0x0000000000001551 + phono-brightness+ 0x0000000000001552 + phono-brightness- 0x0000000000001553 + phono-colour_saturation+ 0x0000000000001554 + phono-colour_saturation- 0x0000000000001555 + phono-bass+ 0x0000000000001556 + phono-bass- 0x0000000000001557 + phono-treble+ 0x0000000000001558 + phono-treble- 0x0000000000001559 + phono-balance_right 0x000000000000155A + phono-balance_left 0x000000000000155B + phono-repeat_once 0x000000000000155C + phono-repeat_continuously 0x000000000000155D + phono-select+ 0x000000000000155E + phono-select- 0x000000000000155F + phono-next 0x0000000000001560 + phono-previous 0x0000000000001561 + phono-index_next 0x0000000000001562 + phono-index_previous 0x0000000000001563 + phono-stereo/mono 0x0000000000001564 + phono-INVALID 0x0000000000001565 + phono-INVALID 0x0000000000001566 + phono-INVALID 0x0000000000001567 + phono-INVALID 0x0000000000001568 + phono-store_execute 0x0000000000001569 + phono-INVALID 0x000000000000156A + phono-scan_forward 0x000000000000156B + phono-INVALID 0x000000000000156C + phono-open/close 0x000000000000156D + phono-wave_scroll 0x000000000000156E + phono-INVALID 0x000000000000156F + phono-pause 0x0000000000001570 + phono-erase 0x0000000000001571 + phono-rewind 0x0000000000001572 + phono-go_to 0x0000000000001573 + phono-wind 0x0000000000001574 + phono-play 0x0000000000001575 + phono-stop 0x0000000000001576 + phono-recording 0x0000000000001577 + phono-external1 0x0000000000001578 + phono-external2 0x0000000000001579 + phono-clear_all_memory 0x000000000000157A + phono-INVALID 0x000000000000157B + phono-INVALID 0x000000000000157C + phono-system_standby 0x000000000000157D + phono-counter_memory 0x000000000000157E + phono-system_select 0x000000000000157F + phono-surround_sound 0x0000000000000540 + phono-balance_front 0x0000000000000541 + phono-balance_rear 0x0000000000000542 + phono-sound_effects1 0x0000000000000543 + phono-sound_effects2 0x0000000000000544 + phono-sound_effects3 0x0000000000000545 + phono-sound_effects4 0x0000000000000546 + phono-sound_effects5 0x0000000000000547 + phono-sound_or_menu_func.1 0x0000000000000548 + phono-sound_or_menu_func.2 0x0000000000000549 + phono-sound_or_menu_func.3 0x000000000000054A + phono-linear_function_up 0x000000000000054D + phono-linear_function_down 0x000000000000054E + phono-sound_or_menu_func. 0x000000000000054F + phono-cursor_step_up 0x0000000000000550 + phono-cursor_step_down 0x0000000000000551 + phono-menu_on 0x0000000000000552 + phono-menu_off 0x0000000000000553 + phono-display_A/V_status 0x0000000000000554 + phono-cursor_step_left 0x0000000000000555 + phono-cursor_step_right 0x0000000000000556 + phono-menu_function 0x0000000000000557 + phono-PIP_on/off 0x0000000000000558 + phono-PIP_shift 0x0000000000000559 + phono-PIP_main_swap 0x000000000000055A + phono-strobe_on/off 0x000000000000055B + phono-multi_strobe 0x000000000000055C + phono-main_freezed 0x000000000000055D + phono-3/9_multi_scan 0x000000000000055E + phono-PIP_mode_select 0x000000000000055F + phono-mosaic 0x0000000000000560 + phono-solarization 0x0000000000000561 + phono-main_stored 0x0000000000000562 + phono-PIP_strobe 0x0000000000000563 + phono-recall_main 0x0000000000000564 + phono-PIP_freeze 0x0000000000000565 + phono-PIP_step_up 0x0000000000000566 + phono-PIP_step_down 0x0000000000000567 + phono-INVALID 0x0000000000000568 + phono-INVALID 0x0000000000000569 + phono-INVALID 0x000000000000056A + phono-INVALID 0x000000000000056B + phono-INVALID 0x000000000000056C + phono-INVALID 0x000000000000056D + phono-INVALID 0x0000000000000572 + phono-INVALID 0x0000000000000573 + phono-INVALID 0x0000000000000574 + phono-INVALID 0x0000000000000575 + phono-sub_mode 0x0000000000000576 + phono-sub_mode 0x0000000000000577 + phono-connect 0x000000000000057B + phono-disconnect 0x000000000000057C + rec1-0 0x0000000000001480 + rec1-1 0x0000000000001481 + rec1-2 0x0000000000001482 + rec1-3 0x0000000000001483 + rec1-4 0x0000000000001484 + rec1-5 0x0000000000001485 + rec1-6 0x0000000000001486 + rec1-7 0x0000000000001487 + rec1-8 0x0000000000001488 + rec1-9 0x0000000000001489 + rec1-INVALID 0x000000000000148A + rec1-INVALID 0x000000000000148B + rec1-standby 0x000000000000148C + rec1-mute/demute 0x000000000000148D + rec1-P.P. 0x000000000000148E + rec1-display 0x000000000000148F + rec1-volume+ 0x0000000000001490 + rec1-volume- 0x0000000000001491 + rec1-brightness+ 0x0000000000001492 + rec1-brightness- 0x0000000000001493 + rec1-colour_saturation+ 0x0000000000001494 + rec1-colour_saturation- 0x0000000000001495 + rec1-bass+ 0x0000000000001496 + rec1-bass- 0x0000000000001497 + rec1-treble+ 0x0000000000001498 + rec1-treble- 0x0000000000001499 + rec1-balance_right 0x000000000000149A + rec1-balance_left 0x000000000000149B + rec1-repeat_once 0x000000000000149C + rec1-repeat_continuously 0x000000000000149D + rec1-select+ 0x000000000000149E + rec1-select- 0x000000000000149F + rec1-next 0x00000000000014A0 + rec1-previous 0x00000000000014A1 + rec1-INVALID 0x00000000000014A2 + rec1-last_record_cancel 0x00000000000014A3 + rec1-sequential 0x00000000000014A4 + rec1-blank_search 0x00000000000014A5 + rec1-INVALID 0x00000000000014A6 + rec1-INVALID 0x00000000000014A7 + rec1-recording_pause 0x00000000000014A8 + rec1-store_execute 0x00000000000014A9 + rec1-recording_blank 0x00000000000014AA + rec1-scan_forward 0x00000000000014AB + rec1-mechanism_A 0x00000000000014AC + rec1-eject 0x00000000000014AD + rec1-mechanism_B 0x00000000000014AE + rec1-play_reverse 0x00000000000014AF + rec1-pause 0x00000000000014B0 + rec1-erase 0x00000000000014B1 + rec1-rewind 0x00000000000014B2 + rec1-go_to 0x00000000000014B3 + rec1-wind 0x00000000000014B4 + rec1-play 0x00000000000014B5 + rec1-stop 0x00000000000014B6 + rec1-recording 0x00000000000014B7 + rec1-external1 0x00000000000014B8 + rec1-external2 0x00000000000014B9 + rec1-clear_all_memory 0x00000000000014BA + rec1-INVALID 0x00000000000014BB + rec1-INVALID 0x00000000000014BC + rec1-system_standby 0x00000000000014BD + rec1-INVALID 0x00000000000014BE + rec1-system_select 0x00000000000014BF + rec1-surround_sound 0x0000000000000480 + rec1-balance_front 0x0000000000000481 + rec1-balance_rear 0x0000000000000482 + rec1-sound_effects1 0x0000000000000483 + rec1-sound_effects2 0x0000000000000484 + rec1-sound_effects3 0x0000000000000485 + rec1-sound_effects4 0x0000000000000486 + rec1-sound_effects5 0x0000000000000487 + rec1-sound_or_menu_func.1 0x0000000000000488 + rec1-sound_or_menu_func.2 0x0000000000000489 + rec1-sound_or_menu_func.3 0x000000000000048A + rec1-linear_function_up 0x000000000000048D + rec1-linear_function_down 0x000000000000048E + rec1-sound_or_menu_func. 0x000000000000048F + rec1-cursor_step_up 0x0000000000000490 + rec1-cursor_step_down 0x0000000000000491 + rec1-menu_on 0x0000000000000492 + rec1-menu_off 0x0000000000000493 + rec1-display_A/V_status 0x0000000000000494 + rec1-cursor_step_left 0x0000000000000495 + rec1-cursor_step_right 0x0000000000000496 + rec1-menu_function 0x0000000000000497 + rec1-PIP_on/off 0x0000000000000498 + rec1-PIP_shift 0x0000000000000499 + rec1-PIP_main_swap 0x000000000000049A + rec1-strobe_on/off 0x000000000000049B + rec1-multi_strobe 0x000000000000049C + rec1-main_freezed 0x000000000000049D + rec1-3/9_multi_scan 0x000000000000049E + rec1-PIP_mode_select 0x000000000000049F + rec1-mosaic 0x00000000000004A0 + rec1-solarization 0x00000000000004A1 + rec1-main_stored 0x00000000000004A2 + rec1-PIP_strobe 0x00000000000004A3 + rec1-recall_main 0x00000000000004A4 + rec1-PIP_freeze 0x00000000000004A5 + rec1-PIP_step_up 0x00000000000004A6 + rec1-PIP_step_down 0x00000000000004A7 + rec1-automatic_start_ID 0x00000000000004A8 + rec1-write_skip_ID 0x00000000000004A9 + rec1-skip_on/off 0x00000000000004AA + rec1-write_end_ID 0x00000000000004AB + rec1-write_FTS 0x00000000000004AC + rec1-write_TOC 0x00000000000004AD + rec1-write_start_ID 0x00000000000004B2 + rec1-Ca/Er/SK_ID 0x00000000000004B3 + rec1-reformat 0x00000000000004B4 + rec1-blank_search 0x00000000000004B5 + rec1-sub_mode 0x00000000000004B6 + rec1-sub_mode 0x00000000000004B7 + rec1-connect 0x00000000000004BB + rec1-disconnect 0x00000000000004BC + rec2-0 0x00000000000015C0 + rec2-1 0x00000000000015C1 + rec2-2 0x00000000000015C2 + rec2-3 0x00000000000015C3 + rec2-4 0x00000000000015C4 + rec2-5 0x00000000000015C5 + rec2-6 0x00000000000015C6 + rec2-7 0x00000000000015C7 + rec2-8 0x00000000000015C8 + rec2-9 0x00000000000015C9 + rec2-INVALID 0x00000000000015CA + rec2-INVALID 0x00000000000015CB + rec2-standby 0x00000000000015CC + rec2-mute/demute 0x00000000000015CD + rec2-P.P. 0x00000000000015CE + rec2-display 0x00000000000015CF + rec2-volume+ 0x00000000000015D0 + rec2-volume- 0x00000000000015D1 + rec2-brightness+ 0x00000000000015D2 + rec2-brightness- 0x00000000000015D3 + rec2-colour_saturation+ 0x00000000000015D4 + rec2-colour_saturation- 0x00000000000015D5 + rec2-bass+ 0x00000000000015D6 + rec2-bass- 0x00000000000015D7 + rec2-treble+ 0x00000000000015D8 + rec2-treble- 0x00000000000015D9 + rec2-balance_right 0x00000000000015DA + rec2-balance_left 0x00000000000015DB + rec2-repeat_once 0x00000000000015DC + rec2-repeat_continuously 0x00000000000015DD + rec2-select+ 0x00000000000015DE + rec2-select- 0x00000000000015DF + rec2-next 0x00000000000015E0 + rec2-previous 0x00000000000015E1 + rec2-INVALID 0x00000000000015E2 + rec2-last_record_cancel 0x00000000000015E3 + rec2-sequential 0x00000000000015E4 + rec2-blank_search 0x00000000000015E5 + rec2-INVALID 0x00000000000015E6 + rec2-INVALID 0x00000000000015E7 + rec2-recording_pause 0x00000000000015E8 + rec2-store_execute 0x00000000000015E9 + rec2-recording_blank 0x00000000000015EA + rec2-scan_forward 0x00000000000015EB + rec2-mechanism_A 0x00000000000015EC + rec2-eject 0x00000000000015ED + rec2-mechanism_B 0x00000000000015EE + rec2-play_reverse 0x00000000000015EF + rec2-pause 0x00000000000015F0 + rec2-erase 0x00000000000015F1 + rec2-rewind 0x00000000000015F2 + rec2-go_to 0x00000000000015F3 + rec2-wind 0x00000000000015F4 + rec2-play 0x00000000000015F5 + rec2-stop 0x00000000000015F6 + rec2-recording 0x00000000000015F7 + rec2-external1 0x00000000000015F8 + rec2-external2 0x00000000000015F9 + rec2-clear_all_memory 0x00000000000015FA + rec2-INVALID 0x00000000000015FB + rec2-INVALID 0x00000000000015FC + rec2-system_standby 0x00000000000015FD + rec2-INVALID 0x00000000000015FE + rec2-system_select 0x00000000000015FF + rec2-surround_sound 0x00000000000005C0 + rec2-balance_front 0x00000000000005C1 + rec2-balance_rear 0x00000000000005C2 + rec2-sound_effects1 0x00000000000005C3 + rec2-sound_effects2 0x00000000000005C4 + rec2-sound_effects3 0x00000000000005C5 + rec2-sound_effects4 0x00000000000005C6 + rec2-sound_effects5 0x00000000000005C7 + rec2-sound_or_menu_func.1 0x00000000000005C8 + rec2-sound_or_menu_func.2 0x00000000000005C9 + rec2-sound_or_menu_func.3 0x00000000000005CA + rec2-linear_function_up 0x00000000000005CD + rec2-linear_function_down 0x00000000000005CE + rec2-sound_or_menu_func. 0x00000000000005CF + rec2-cursor_step_up 0x00000000000005D0 + rec2-cursor_step_down 0x00000000000005D1 + rec2-menu_on 0x00000000000005D2 + rec2-menu_off 0x00000000000005D3 + rec2-display_A/V_status 0x00000000000005D4 + rec2-cursor_step_left 0x00000000000005D5 + rec2-cursor_step_right 0x00000000000005D6 + rec2-menu_function 0x00000000000005D7 + rec2-PIP_on/off 0x00000000000005D8 + rec2-PIP_shift 0x00000000000005D9 + rec2-PIP_main_swap 0x00000000000005DA + rec2-strobe_on/off 0x00000000000005DB + rec2-multi_strobe 0x00000000000005DC + rec2-main_freezed 0x00000000000005DD + rec2-3/9_multi_scan 0x00000000000005DE + rec2-PIP_mode_select 0x00000000000005DF + rec2-mosaic 0x00000000000005E0 + rec2-solarization 0x00000000000005E1 + rec2-main_stored 0x00000000000005E2 + rec2-PIP_strobe 0x00000000000005E3 + rec2-recall_main 0x00000000000005E4 + rec2-PIP_freeze 0x00000000000005E5 + rec2-PIP_step_up 0x00000000000005E6 + rec2-PIP_step_down 0x00000000000005E7 + rec2-automatic_start_ID 0x00000000000005E8 + rec2-write_skip_ID 0x00000000000005E9 + rec2-skip_on/off 0x00000000000005EA + rec2-write_end_ID 0x00000000000005EB + rec2-write_FTS 0x00000000000005EC + rec2-write_TOC 0x00000000000005ED + rec2-write_start_ID 0x00000000000005F2 + rec2-Ca/Er/SK_ID 0x00000000000005F3 + rec2-reformat 0x00000000000005F4 + rec2-blank_search 0x00000000000005F5 + rec2-sub_mode 0x00000000000005F6 + rec2-sub_mode 0x00000000000005F7 + rec2-connect 0x00000000000005FB + rec2-disconnect 0x00000000000005FC + sat-0 0x0000000000001200 + sat-1 0x0000000000001201 + sat-2 0x0000000000001202 + sat-3 0x0000000000001203 + sat-4 0x0000000000001204 + sat-5 0x0000000000001205 + sat-6 0x0000000000001206 + sat-7 0x0000000000001207 + sat-8 0x0000000000001208 + sat-9 0x0000000000001209 + sat-1/2_digits 0x000000000000120A + sat-channel/program_mode 0x000000000000120B + sat-standby 0x000000000000120C + sat-mute/demute 0x000000000000120D + sat-P.P. 0x000000000000120E + sat-display 0x000000000000120F + sat-volume+ 0x0000000000001210 + sat-volume- 0x0000000000001211 + sat-brightness+ 0x0000000000001212 + sat-brightness- 0x0000000000001213 + sat-colour_saturation+ 0x0000000000001214 + sat-colour_saturation- 0x0000000000001215 + sat-bass+ 0x0000000000001216 + sat-bass- 0x0000000000001217 + sat-treble+ 0x0000000000001218 + sat-treble- 0x0000000000001219 + sat-balance_right 0x000000000000121A + sat-balance_left 0x000000000000121B + sat-INVALID 0x000000000000121C + sat-INVALID 0x000000000000121D + sat-INVALID 0x000000000000121E + sat-INVALID 0x000000000000121F + sat-channel/program+ 0x0000000000001220 + sat-channel/program- 0x0000000000001221 + sat-INVALID 0x0000000000001222 + sat-language_select/mode1 0x0000000000001223 + sat-special_stereo_on/off 0x0000000000001224 + sat-audio_mixed_/_mode2 0x0000000000001225 + sat-INVALID 0x0000000000001226 + sat-INVALID 0x0000000000001227 + sat-INVALID 0x0000000000001228 + sat-INVALID 0x0000000000001229 + sat-INVALID 0x000000000000122A + sat-INVALID 0x000000000000122B + sat-INVALID 0x000000000000122C + sat-INVALID 0x000000000000122D + sat-subtitle 0x000000000000122E + sat-INVALID 0x000000000000122F + sat-pause 0x0000000000001230 + sat-erase 0x0000000000001231 + sat-rewind 0x0000000000001232 + sat-go_to 0x0000000000001233 + sat-wind 0x0000000000001234 + sat-play 0x0000000000001235 + sat-stop 0x0000000000001236 + sat-recording 0x0000000000001237 + sat-external1 0x0000000000001238 + sat-external2 0x0000000000001239 + sat-INVALID 0x000000000000123A + sat-INVALID 0x000000000000123B + sat-TXT_submode 0x000000000000123C + sat-system_standby 0x000000000000123D + sat-INVALID 0x000000000000123E + sat-system_select 0x000000000000123F + sat-surround_sound 0x0000000000000200 + sat-balance_front 0x0000000000000201 + sat-balance_rear 0x0000000000000202 + sat-sound_effects1 0x0000000000000203 + sat-sound_effects2 0x0000000000000204 + sat-sound_effects3 0x0000000000000205 + sat-sound_effects4 0x0000000000000206 + sat-sound_effects5 0x0000000000000207 + sat-sound_or_menu_func.1 0x0000000000000208 + sat-sound_or_menu_func.2 0x0000000000000209 + sat-sound_or_menu_func.3 0x000000000000020A + sat-INVALID 0x000000000000020B + sat-INVALID 0x000000000000020C + sat-linear_function_up 0x000000000000020D + sat-linear_function_down 0x000000000000020E + sat-sound_or_menu_func. 0x000000000000020F + sat-cursor_step_up 0x0000000000000210 + sat-cursor_step_down 0x0000000000000211 + sat-menu_on 0x0000000000000212 + sat-menu_off 0x0000000000000213 + sat-display_A/V_status 0x0000000000000214 + sat-cursor_step_left 0x0000000000000215 + sat-cursor_step_right 0x0000000000000216 + sat-menu_function 0x0000000000000217 + sat-PIP_on/off 0x0000000000000218 + sat-PIP_shift 0x0000000000000219 + sat-PIP_main_swap 0x000000000000021A + sat-strobe_on/off 0x000000000000021B + sat-multi_strobe 0x000000000000021C + sat-main_freezed 0x000000000000021D + sat-3/9_multi_scan 0x000000000000021E + sat-PIP_mode_select 0x000000000000021F + sat-mosaic 0x0000000000000220 + sat-solarization 0x0000000000000221 + sat-main_stored 0x0000000000000222 + sat-PIP_strobe 0x0000000000000223 + sat-recall_main 0x0000000000000224 + sat-PIP_freeze 0x0000000000000225 + sat-PIP_step_up 0x0000000000000226 + sat-PIP_step_down 0x0000000000000227 + sat-INVALID 0x0000000000000228 + sat-INVALID 0x0000000000000229 + sat-INVALID 0x000000000000022A + sat-INVALID 0x000000000000022B + sat-INVALID 0x000000000000022C + sat-INVALID 0x000000000000022D + sat-INVALID 0x0000000000000230 + sat-INVALID 0x0000000000000231 + sat-INVALID 0x0000000000000232 + sat-INVALID 0x0000000000000233 + sat-INVALID 0x0000000000000234 + sat-INVALID 0x0000000000000235 + sat-sub_mode 0x0000000000000236 + sat-sub_mode 0x0000000000000237 + sat-INVALID 0x0000000000000238 + sat-INVALID 0x0000000000000239 + sat-INVALID 0x000000000000023A + sat-connect 0x000000000000023B + sat-INVALID 0x000000000000023C + text-0 0x0000000000001080 + text-1 0x0000000000001081 + text-2 0x0000000000001082 + text-3 0x0000000000001083 + text-4 0x0000000000001084 + text-5 0x0000000000001085 + text-6 0x0000000000001086 + text-7 0x0000000000001087 + text-8 0x0000000000001088 + text-9 0x0000000000001089 + text-step_page+ 0x000000000000108A + text-step_page- 0x000000000000108B + text-standby 0x000000000000108C + text-mute/demute 0x000000000000108D + text-P.P. 0x000000000000108E + text-display 0x000000000000108F + text-volume+ 0x0000000000001090 + text-volume- 0x0000000000001091 + text-brightness+ 0x0000000000001092 + text-brightness- 0x0000000000001093 + text-colour_saturation+ 0x0000000000001094 + text-colour_saturation- 0x0000000000001095 + text-bass+ 0x0000000000001096 + text-bass- 0x0000000000001097 + text-treble+ 0x0000000000001098 + text-treble- 0x0000000000001099 + text-balance_right 0x000000000000109A + text-balance_left 0x000000000000109B + text-enter/validation_(Frnc) 0x000000000000109C + text-memory_out 0x000000000000109D + text-sequence_out 0x000000000000109E + text-INVALID 0x000000000000109F + text-exchange 0x00000000000010A0 + text-index/summary_(France) 0x00000000000010A1 + text-row_zero_(France) 0x00000000000010A2 + text-1st/2nd_language 0x00000000000010A3 + text-spacial_stereo_on/off 0x00000000000010A4 + text-INVALID 0x00000000000010A5 + text-hardcopy_printer 0x00000000000010A6 + text-antiope_TV_mixed_(Frnc) 0x00000000000010A7 + text-PIP_select 0x00000000000010A8 + text-page_hold_on/off 0x00000000000010A9 + text-clck_timed_page_(F:magazine) 0x00000000000010AA + text-large_top/lrge_bot/norm 0x00000000000010AB + text-reveal/conceal/canc_pic 0x00000000000010AC + text-cancel_teletext_picture 0x00000000000010AD + text-TV/Text_mixed/Subtitle 0x00000000000010AE + text-PIP_shift 0x00000000000010AF + text-pause 0x00000000000010B0 + text-erase 0x00000000000010B1 + text-rewind 0x00000000000010B2 + text-go_to 0x00000000000010B3 + text-wind 0x00000000000010B4 + text-play 0x00000000000010B5 + text-stop 0x00000000000010B6 + text-recording 0x00000000000010B7 + text-external1 0x00000000000010B8 + text-external2 0x00000000000010B9 + text-PIP_display_mode 0x00000000000010BA + text-INVALID 0x00000000000010BB + text-INVALID 0x00000000000010BC + text-system_standby 0x00000000000010BD + text-news_flash_(France) 0x00000000000010BE + text-system_select 0x00000000000010BF + text-surround_sound 0x0000000000000080 + text-balance_front 0x0000000000000081 + text-balance_rear 0x0000000000000082 + text-sound_effects1 0x0000000000000083 + text-sound_effects2 0x0000000000000084 + text-sound_effects3 0x0000000000000085 + text-sound_effects4 0x0000000000000086 + text-sound_effects5 0x0000000000000087 + text-sound_or_menu_func.1 0x0000000000000088 + text-sound_or_menu_func.2 0x0000000000000089 + text-sound_or_menu_func.3 0x000000000000008A + text-linear_function_up 0x000000000000008D + text-linear_function_down 0x000000000000008E + text-sound_or_menu_func. 0x000000000000008F + text-cursor_step_up 0x0000000000000090 + text-cursor_step_down 0x0000000000000091 + text-menu_on 0x0000000000000092 + text-menu_off 0x0000000000000093 + text-display_A/V_status 0x0000000000000094 + text-cursor_step_left 0x0000000000000095 + text-cursor_step_right 0x0000000000000096 + text-menu_function 0x0000000000000097 + text-PIP_on/off 0x0000000000000098 + text-PIP_shift 0x0000000000000099 + text-PIP_main_swap 0x000000000000009A + text-strobe_on/off 0x000000000000009B + text-multi_strobe 0x000000000000009C + text-main_freezed 0x000000000000009D + text-3/9_multi_scan 0x000000000000009E + text-PIP_mode_select 0x000000000000009F + text-mosaic 0x00000000000000A0 + text-solarization 0x00000000000000A1 + text-main_stored 0x00000000000000A2 + text-PIP_strobe 0x00000000000000A3 + text-recall_main 0x00000000000000A4 + text-PIP_freeze 0x00000000000000A5 + text-PIP_step_up 0x00000000000000A6 + text-PIP_step_down 0x00000000000000A7 + text-red 0x00000000000000AB + text-green 0x00000000000000AC + text-yellow 0x00000000000000AD + text-cyan 0x00000000000000AE + text-INVALID 0x00000000000000AF + text-sub_mode 0x00000000000000B6 + text-sub_mode 0x00000000000000B7 + text-cleaning_up 0x00000000000000BA + text-connect 0x00000000000000BB + text-disconnect 0x00000000000000BC + text-cleaning_up1 0x00000000000000BD + text-cleaning_up2 0x00000000000000BE + text-cleaning_up3 0x00000000000000BF + tuner-0 0x0000000000001440 + tuner-1 0x0000000000001441 + tuner-2 0x0000000000001442 + tuner-3 0x0000000000001443 + tuner-4 0x0000000000001444 + tuner-5 0x0000000000001445 + tuner-6 0x0000000000001446 + tuner-7 0x0000000000001447 + tuner-8 0x0000000000001448 + tuner-9 0x0000000000001449 + tuner-1/2_digits 0x000000000000144A + tuner-INVALID 0x000000000000144B + tuner-standby 0x000000000000144C + tuner-mute/demute 0x000000000000144D + tuner-P.P. 0x000000000000144E + tuner-display 0x000000000000144F + tuner-volume+ 0x0000000000001450 + tuner-volume- 0x0000000000001451 + tuner-brightness+ 0x0000000000001452 + tuner-brightness- 0x0000000000001453 + tuner-colour_saturation+ 0x0000000000001454 + tuner-colour_saturation- 0x0000000000001455 + tuner-bass+ 0x0000000000001456 + tuner-bass- 0x0000000000001457 + tuner-treble+ 0x0000000000001458 + tuner-treble- 0x0000000000001459 + tuner-balance_right 0x000000000000145A + tuner-balance_left 0x000000000000145B + tuner-INVALID 0x000000000000145C + tuner-INVALID 0x000000000000145D + tuner-search+ 0x000000000000145E + tuner-search- 0x000000000000145F + tuner-preset+ 0x0000000000001460 + tuner-preset- 0x0000000000001461 + tuner-INVALID 0x0000000000001462 + tuner-INVALID 0x0000000000001463 + tuner-INVALID 0x0000000000001464 + tuner-mono/stereo 0x0000000000001465 + tuner-INVALID 0x0000000000001466 + tuner-INVALID 0x0000000000001467 + tuner-RF_switch 0x0000000000001468 + tuner-store_execute 0x0000000000001469 + tuner-INVALID 0x000000000000146A + tuner-scan_forward 0x000000000000146B + tuner-INVALID 0x000000000000146C + tuner-FM 0x000000000000146D + tuner-MW_(USA:_MW/FM) 0x000000000000146E + tuner-LW 0x000000000000146F + tuner-pause 0x0000000000001470 + tuner-erase 0x0000000000001471 + tuner-rewind 0x0000000000001472 + tuner-go_to 0x0000000000001473 + tuner-wind 0x0000000000001474 + tuner-play 0x0000000000001475 + tuner-stop 0x0000000000001476 + tuner-recording 0x0000000000001477 + tuner-external1 0x0000000000001478 + tuner-external2 0x0000000000001479 + tuner-clear_all_memory 0x000000000000147A + tuner-INVALID 0x000000000000147B + tuner-INVALID 0x000000000000147C + tuner-system_standby 0x000000000000147D + tuner-INVALID 0x000000000000147E + tuner-system_select 0x000000000000147F + tuner-surround_sound 0x0000000000000440 + tuner-balance_front 0x0000000000000441 + tuner-balance_rear 0x0000000000000442 + tuner-sound_effects1 0x0000000000000443 + tuner-sound_effects2 0x0000000000000444 + tuner-sound_effects3 0x0000000000000445 + tuner-sound_effects4 0x0000000000000446 + tuner-sound_effects5 0x0000000000000447 + tuner-sound_or_menu_func.1 0x0000000000000448 + tuner-sound_or_menu_func.2 0x0000000000000449 + tuner-sound_or_menu_func.3 0x000000000000044A + tuner-linear_function_up 0x000000000000044D + tuner-linear_function_down 0x000000000000044E + tuner-sound_or_menu_func. 0x000000000000044F + tuner-cursor_step_up 0x0000000000000450 + tuner-cursor_step_down 0x0000000000000451 + tuner-menu_on 0x0000000000000452 + tuner-menu_off 0x0000000000000453 + tuner-display_A/V_status 0x0000000000000454 + tuner-cursor_step_left 0x0000000000000455 + tuner-cursor_step_right 0x0000000000000456 + tuner-menu_function 0x0000000000000457 + tuner-PIP_on/off 0x0000000000000458 + tuner-PIP_shift 0x0000000000000459 + tuner-PIP_main_swap 0x000000000000045A + tuner-strobe_on/off 0x000000000000045B + tuner-multi_strobe 0x000000000000045C + tuner-main_freezed 0x000000000000045D + tuner-3/9_multi_scan 0x000000000000045E + tuner-PIP_mode_select 0x000000000000045F + tuner-mosaic 0x0000000000000460 + tuner-solarization 0x0000000000000461 + tuner-main_stored 0x0000000000000462 + tuner-PIP_strobe 0x0000000000000463 + tuner-recall_main 0x0000000000000464 + tuner-PIP_freeze 0x0000000000000465 + tuner-PIP_step_up 0x0000000000000466 + tuner-PIP_step_down 0x0000000000000467 + tuner-INVALID 0x000000000000046C + tuner-INVALID 0x0000000000000470 + tuner-INVALID 0x0000000000000471 + tuner-INVALID 0x0000000000000476 + tuner-INVALID 0x0000000000000477 + tuner-connect 0x000000000000047B + tuner-disconnect 0x000000000000047C + tv1-0 0x0000000000001000 + tv1-1 0x0000000000001001 + tv1-2 0x0000000000001002 + tv1-3 0x0000000000001003 + tv1-4 0x0000000000001004 + tv1-5 0x0000000000001005 + tv1-6 0x0000000000001006 + tv1-7 0x0000000000001007 + tv1-8 0x0000000000001008 + tv1-9 0x0000000000001009 + tv1-1/2/3_digs_(japan:10) 0x000000000000100A + tv1-channel/program(jap:11) 0x000000000000100B + tv1-standby 0x000000000000100C + tv1-mute/demute 0x000000000000100D + tv1-P.P._(personal_pref.) 0x000000000000100E + tv1-display 0x000000000000100F + tv1-volume+ 0x0000000000001010 + tv1-volume- 0x0000000000001011 + tv1-brightness+ 0x0000000000001012 + tv1-brightness- 0x0000000000001013 + tv1-colour_saturation+ 0x0000000000001014 + tv1-colour_saturation- 0x0000000000001015 + tv1-bass+ 0x0000000000001016 + tv1-bass- 0x0000000000001017 + tv1-treble+ 0x0000000000001018 + tv1-treble- 0x0000000000001019 + tv1-balance_right 0x000000000000101A + tv1-balance_left 0x000000000000101B + tv1-contrast+ 0x000000000000101C + tv1-contrast- 0x000000000000101D + tv1-search+ 0x000000000000101E + tv1-tint/hue+ 0x000000000000101F + tv1-channel/program+ 0x0000000000001020 + tv1-channel/program- 0x0000000000001021 + tv1-alt/channel 0x0000000000001022 + tv1-1st/2nd_language 0x0000000000001023 + tv1-spacial_stereo_on/off 0x0000000000001024 + tv1-mono/stereo_(USA) 0x0000000000001025 + tv1-sleeptimer 0x0000000000001026 + tv1-tint/hue- 0x0000000000001027 + tv1-RF_switch/PIP_select 0x0000000000001028 + tv1-vote 0x0000000000001029 + tv1-timed_page/channel 0x000000000000102A + tv1-increment_(USA) 0x000000000000102B + tv1-decrement_(USA) 0x000000000000102C + tv1-INVALID 0x000000000000102D + tv1-2nd_controls_(USA:menu) 0x000000000000102E + tv1-PIP_shift 0x000000000000102F + tv1-pause 0x0000000000001030 + tv1-erase 0x0000000000001031 + tv1-rewind 0x0000000000001032 + tv1-go_to 0x0000000000001033 + tv1-wind 0x0000000000001034 + tv1-play 0x0000000000001035 + tv1-stop 0x0000000000001036 + tv1-recording 0x0000000000001037 + tv1-external1 0x0000000000001038 + tv1-external2 0x0000000000001039 + tv1-PIP_display_mode 0x000000000000103A + tv1-view_data_mode/advance 0x000000000000103B + tv1-teletext_submode_(J:12) 0x000000000000103C + tv1-system_standby 0x000000000000103D + tv1-crispener_on/off 0x000000000000103E + tv1-system_select 0x000000000000103F + tv1-surround_sound 0x0000000000000000 + tv1-balance_front 0x0000000000000001 + tv1-balance_rear 0x0000000000000002 + tv1-sound_effects1 0x0000000000000003 + tv1-sound_effects2 0x0000000000000004 + tv1-sound_effects3 0x0000000000000005 + tv1-sound_effects4 0x0000000000000006 + tv1-sound_effects5 0x0000000000000007 + tv1-sound_or_menu_func.1 0x0000000000000008 + tv1-sound_or_menu_func.2 0x0000000000000009 + tv1-sound_or_menu_func.3 0x000000000000000A + tv1-linear_function_up 0x000000000000000D + tv1-linear_function_down 0x000000000000000E + tv1-sound_or_menu_func. 0x000000000000000F + tv1-cursor_step_up 0x0000000000000010 + tv1-cursor_step_down 0x0000000000000011 + tv1-menu_on 0x0000000000000012 + tv1-menu_off 0x0000000000000013 + tv1-display_A/V_status 0x0000000000000014 + tv1-cursor_step_left 0x0000000000000015 + tv1-cursor_step_right 0x0000000000000016 + tv1-menu_function 0x0000000000000017 + tv1-PIP_on/off 0x0000000000000018 + tv1-PIP_shift 0x0000000000000019 + tv1-PIP_main_swap 0x000000000000001A + tv1-strobe_on/off 0x000000000000001B + tv1-multi_strobe 0x000000000000001C + tv1-main_freezed 0x000000000000001D + tv1-3/9_multi_scan 0x000000000000001E + tv1-PIP_mode_select 0x000000000000001F + tv1-mosaic 0x0000000000000020 + tv1-solarization 0x0000000000000021 + tv1-main_stored 0x0000000000000022 + tv1-PIP_strobe 0x0000000000000023 + tv1-recall_main 0x0000000000000024 + tv1-PIP_freeze 0x0000000000000025 + tv1-PIP_step_up 0x0000000000000026 + tv1-PIP_step_down 0x0000000000000027 + tv1-INVALID 0x000000000000002B + tv1-INVALID 0x000000000000002C + tv1-INVALID 0x000000000000002D + tv1-INVALID 0x000000000000002E + tv1-index 0x000000000000002F + tv1-sub_mode 0x0000000000000036 + tv1-sub_mode 0x0000000000000037 + tv1-cleaning_up 0x000000000000003A + tv1-connect 0x000000000000003B + tv1-disconnect 0x000000000000003C + tv1-cleaning_up1 0x000000000000003D + tv1-cleaning_up2 0x000000000000003E + tv1-cleaning_up3 0x000000000000003F + tv2-0 0x0000000000001040 + tv2-1 0x0000000000001041 + tv2-2 0x0000000000001042 + tv2-3 0x0000000000001043 + tv2-4 0x0000000000001044 + tv2-5 0x0000000000001045 + tv2-6 0x0000000000001046 + tv2-7 0x0000000000001047 + tv2-8 0x0000000000001048 + tv2-9 0x0000000000001049 + tv2-1/2/3_digs_(japan:10) 0x000000000000104A + tv2-channel/program(jap:11) 0x000000000000104B + tv2-standby 0x000000000000104C + tv2-mute/demute 0x000000000000104D + tv2-P.P._(personal_pref.) 0x000000000000104E + tv2-display 0x000000000000104F + tv2-volume+ 0x0000000000001050 + tv2-volume- 0x0000000000001051 + tv2-brightness+ 0x0000000000001052 + tv2-brightness- 0x0000000000001053 + tv2-colour_saturation+ 0x0000000000001054 + tv2-colour_saturation- 0x0000000000001055 + tv2-bass+ 0x0000000000001056 + tv2-bass- 0x0000000000001057 + tv2-treble+ 0x0000000000001058 + tv2-treble- 0x0000000000001059 + tv2-balance_right 0x000000000000105A + tv2-balance_left 0x000000000000105B + tv2-contrast+ 0x000000000000105C + tv2-contrast- 0x000000000000105D + tv2-search+ 0x000000000000105E + tv2-tint/hue+ 0x000000000000105F + tv2-channel/program+ 0x0000000000001060 + tv2-channel/program- 0x0000000000001061 + tv2-alt/channel 0x0000000000001062 + tv2-1st/2nd_language 0x0000000000001063 + tv2-spacial_stereo_on/off 0x0000000000001064 + tv2-mono/stereo_(USA) 0x0000000000001065 + tv2-sleeptimer 0x0000000000001066 + tv2-tint/hue- 0x0000000000001067 + tv2-RF_switch/PIP_select 0x0000000000001068 + tv2-vote 0x0000000000001069 + tv2-timed_page/channel 0x000000000000106A + tv2-increment_(USA) 0x000000000000106B + tv2-decrement_(USA) 0x000000000000106C + tv2-INVALID 0x000000000000106D + tv2-2nd_controls_(USA:menu) 0x000000000000106E + tv2-PIP_shift 0x000000000000106F + tv2-pause 0x0000000000001070 + tv2-erase 0x0000000000001071 + tv2-rewind 0x0000000000001072 + tv2-go_to 0x0000000000001073 + tv2-wind 0x0000000000001074 + tv2-play 0x0000000000001075 + tv2-stop 0x0000000000001076 + tv2-recording 0x0000000000001077 + tv2-external1 0x0000000000001078 + tv2-external2 0x0000000000001079 + tv2-PIP_display_mode 0x000000000000107A + tv2-view_data_mode/advance 0x000000000000107B + tv2-teletext_submode_(J:12) 0x000000000000107C + tv2-system_standby 0x000000000000107D + tv2-crispener_on/off 0x000000000000107E + tv2-system_select 0x000000000000107F + tv2-surround_sound 0x0000000000000040 + tv2-balance_front 0x0000000000000041 + tv2-balance_rear 0x0000000000000042 + tv2-sound_effects1 0x0000000000000043 + tv2-sound_effects2 0x0000000000000044 + tv2-sound_effects3 0x0000000000000045 + tv2-sound_effects4 0x0000000000000046 + tv2-sound_effects5 0x0000000000000047 + tv2-sound_or_menu_func.1 0x0000000000000048 + tv2-sound_or_menu_func.2 0x0000000000000049 + tv2-sound_or_menu_func.3 0x000000000000004A + tv2-linear_function_up 0x000000000000004D + tv2-linear_function_down 0x000000000000004E + tv2-sound_or_menu_func. 0x000000000000004F + tv2-cursor_step_up 0x0000000000000050 + tv2-cursor_step_down 0x0000000000000051 + tv2-menu_on 0x0000000000000052 + tv2-menu_off 0x0000000000000053 + tv2-display_A/V_status 0x0000000000000054 + tv2-cursor_step_left 0x0000000000000055 + tv2-cursor_step_right 0x0000000000000056 + tv2-menu_function 0x0000000000000057 + tv2-PIP_on/off 0x0000000000000058 + tv2-PIP_shift 0x0000000000000059 + tv2-PIP_main_swap 0x000000000000005A + tv2-strobe_on/off 0x000000000000005B + tv2-multi_strobe 0x000000000000005C + tv2-main_freezed 0x000000000000005D + tv2-3/9_multi_scan 0x000000000000005E + tv2-PIP_mode_select 0x000000000000005F + tv2-mosaic 0x0000000000000060 + tv2-solarization 0x0000000000000061 + tv2-main_stored 0x0000000000000062 + tv2-PIP_strobe 0x0000000000000063 + tv2-recall_main 0x0000000000000064 + tv2-PIP_freeze 0x0000000000000065 + tv2-PIP_step_up 0x0000000000000066 + tv2-PIP_step_down 0x0000000000000067 + tv2-INVALID 0x000000000000006B + tv2-INVALID 0x000000000000006C + tv2-INVALID 0x000000000000006D + tv2-INVALID 0x000000000000006E + tv2-index 0x000000000000006F + tv2-sub_mode 0x0000000000000076 + tv2-sub_mode 0x0000000000000077 + tv2-cleaning_up 0x000000000000007A + tv2-connect 0x000000000000007B + tv2-disconnect 0x000000000000007C + tv2-cleaning_up1 0x000000000000007D + tv2-cleaning_up2 0x000000000000007E + tv2-cleaning_up3 0x000000000000007F + vcr1-0 0x0000000000001140 + vcr1-1 0x0000000000001141 + vcr1-2 0x0000000000001142 + vcr1-3 0x0000000000001143 + vcr1-4 0x0000000000001144 + vcr1-5 0x0000000000001145 + vcr1-6 0x0000000000001146 + vcr1-7 0x0000000000001147 + vcr1-8 0x0000000000001148 + vcr1-9 0x0000000000001149 + vcr1-1/2_digits/AM/PM 0x000000000000114A + vcr1-channel/program_mode 0x000000000000114B + vcr1-standby 0x000000000000114C + vcr1-mute/demute 0x000000000000114D + vcr1-P.P. 0x000000000000114E + vcr1-display 0x000000000000114F + vcr1-volume+ 0x0000000000001150 + vcr1-volume- 0x0000000000001151 + vcr1-brightness+ 0x0000000000001152 + vcr1-brightness- 0x0000000000001153 + vcr1-colour_saturation+ 0x0000000000001154 + vcr1-colour_saturation- 0x0000000000001155 + vcr1-bass+ 0x0000000000001156 + vcr1-bass- 0x0000000000001157 + vcr1-treble+ 0x0000000000001158 + vcr1-treble- 0x0000000000001159 + vcr1-balance_right 0x000000000000115A + vcr1-balance_left 0x000000000000115B + vcr1-ITR_(OTR)_delay 0x000000000000115C + vcr1-timer_programming 0x000000000000115D + vcr1-record_select 0x000000000000115E + vcr1-fast_run_reverse 0x000000000000115F + vcr1-step+ 0x0000000000001160 + vcr1-step- 0x0000000000001161 + vcr1-slow_run_reverse 0x0000000000001162 + vcr1-audio_output_select 0x0000000000001163 + vcr1-clock/channel 0x0000000000001164 + vcr1-speed- 0x0000000000001165 + vcr1-speed+ 0x0000000000001166 + vcr1-Instant_Time_Recording 0x0000000000001167 + vcr1-slow_run_forward 0x0000000000001168 + vcr1-still_forward 0x0000000000001169 + vcr1-fast_run_forward 0x000000000000116A + vcr1-index_scan 0x000000000000116B + vcr1-scan_reverse 0x000000000000116C + vcr1-eject 0x000000000000116D + vcr1-scan_forward 0x000000000000116E + vcr1-play_reverse 0x000000000000116F + vcr1-pause 0x0000000000001170 + vcr1-erase 0x0000000000001171 + vcr1-rewind 0x0000000000001172 + vcr1-go_to 0x0000000000001173 + vcr1-wind 0x0000000000001174 + vcr1-play 0x0000000000001175 + vcr1-stop 0x0000000000001176 + vcr1-recording 0x0000000000001177 + vcr1-external1 0x0000000000001178 + vcr1-external2 0x0000000000001179 + vcr1-short/long_play 0x000000000000117A + vcr1-counter_memory 0x000000000000117B + vcr1-scroll_local_display 0x000000000000117C + vcr1-system_standby 0x000000000000117D + vcr1-RF_switch 0x000000000000117E + vcr1-system_select 0x000000000000117F + vcr1-surround_sound 0x0000000000000140 + vcr1-balance_front 0x0000000000000141 + vcr1-balance_rear 0x0000000000000142 + vcr1-sound_effects1 0x0000000000000143 + vcr1-sound_effects2 0x0000000000000144 + vcr1-sound_effects3 0x0000000000000145 + vcr1-sound_effects4 0x0000000000000146 + vcr1-sound_effects5 0x0000000000000147 + vcr1-sound_or_menu_func.1 0x0000000000000148 + vcr1-sound_or_menu_func.2 0x0000000000000149 + vcr1-sound_or_menu_func.3 0x000000000000014A + vcr1-data_stream_start 0x000000000000014B + vcr1-data_stream_end 0x000000000000014C + vcr1-linear_function_up 0x000000000000014D + vcr1-linear_function_down 0x000000000000014E + vcr1-catalogue 0x000000000000014F + vcr1-cursor_step_up 0x0000000000000150 + vcr1-cursor_step_down 0x0000000000000151 + vcr1-menu_on 0x0000000000000152 + vcr1-menu_off 0x0000000000000153 + vcr1-display_A/V_status 0x0000000000000154 + vcr1-cursor_step_left 0x0000000000000155 + vcr1-cursor_step_right 0x0000000000000156 + vcr1-acknowledge 0x0000000000000157 + vcr1-PIP_on/off 0x0000000000000158 + vcr1-PIP_shift 0x0000000000000159 + vcr1-PIP_main_swap 0x000000000000015A + vcr1-strobe_on/off 0x000000000000015B + vcr1-multi_strobe 0x000000000000015C + vcr1-main_freezed 0x000000000000015D + vcr1-3/9_multi_scan 0x000000000000015E + vcr1-PIP_mode_select 0x000000000000015F + vcr1-mosaic 0x0000000000000160 + vcr1-solarization 0x0000000000000161 + vcr1-main_stored 0x0000000000000162 + vcr1-PIP_strobe 0x0000000000000163 + vcr1-recall_main 0x0000000000000164 + vcr1-PIP_freeze 0x0000000000000165 + vcr1-PIP_step_up 0x0000000000000166 + vcr1-PIP_step_down 0x0000000000000167 + vcr1-automatic_start_ID 0x0000000000000168 + vcr1-write_skip_ID 0x0000000000000169 + vcr1-skip_on/off 0x000000000000016A + vcr1-write_end_ID 0x000000000000016B + vcr1-write_FTS 0x000000000000016C + vcr1-write_TOC 0x000000000000016D + vcr1-viss_index_next 0x0000000000000170 + vcr1-viss_index_previous 0x0000000000000171 + vcr1-mark 0x0000000000000172 + vcr1-erase 0x0000000000000173 + vcr1-renumber 0x0000000000000174 + vcr1-blank_search 0x0000000000000175 + vcr1-sub_mode 0x0000000000000176 + vcr1-sub_mode 0x0000000000000177 + vcr1-auto_repeat 0x0000000000000178 + vcr1-insert_temp 0x0000000000000179 + vcr1-scr_loc_disp 0x000000000000017A + vcr1-connect 0x000000000000017B + vcr1-INVALID 0x000000000000017C + vcr2-0 0x0000000000001180 + vcr2-1 0x0000000000001181 + vcr2-2 0x0000000000001182 + vcr2-3 0x0000000000001183 + vcr2-4 0x0000000000001184 + vcr2-5 0x0000000000001185 + vcr2-6 0x0000000000001186 + vcr2-7 0x0000000000001187 + vcr2-8 0x0000000000001188 + vcr2-9 0x0000000000001189 + vcr2-1/2_digits/AM/PM 0x000000000000118A + vcr2-channel/program_mode 0x000000000000118B + vcr2-standby 0x000000000000118C + vcr2-mute/demute 0x000000000000118D + vcr2-P.P. 0x000000000000118E + vcr2-display 0x000000000000118F + vcr2-volume+ 0x0000000000001190 + vcr2-volume- 0x0000000000001191 + vcr2-brightness+ 0x0000000000001192 + vcr2-brightness- 0x0000000000001193 + vcr2-colour_saturation+ 0x0000000000001194 + vcr2-colour_saturation- 0x0000000000001195 + vcr2-bass+ 0x0000000000001196 + vcr2-bass- 0x0000000000001197 + vcr2-treble+ 0x0000000000001198 + vcr2-treble- 0x0000000000001199 + vcr2-balance_right 0x000000000000119A + vcr2-balance_left 0x000000000000119B + vcr2-ITR_(OTR)_delay 0x000000000000119C + vcr2-timer_programming 0x000000000000119D + vcr2-record_select 0x000000000000119E + vcr2-fast_run_reverse 0x000000000000119F + vcr2-step+ 0x00000000000011A0 + vcr2-step- 0x00000000000011A1 + vcr2-slow_run_reverse 0x00000000000011A2 + vcr2-audio_output_select 0x00000000000011A3 + vcr2-clock/channel 0x00000000000011A4 + vcr2-speed- 0x00000000000011A5 + vcr2-speed+ 0x00000000000011A6 + vcr2-Instant_Time_Recording 0x00000000000011A7 + vcr2-slow_run_forward 0x00000000000011A8 + vcr2-still_forward 0x00000000000011A9 + vcr2-fast_run_forward 0x00000000000011AA + vcr2-index_scan 0x00000000000011AB + vcr2-scan_reverse 0x00000000000011AC + vcr2-eject 0x00000000000011AD + vcr2-scan_forward 0x00000000000011AE + vcr2-play_reverse 0x00000000000011AF + vcr2-pause 0x00000000000011B0 + vcr2-erase 0x00000000000011B1 + vcr2-rewind 0x00000000000011B2 + vcr2-go_to 0x00000000000011B3 + vcr2-wind 0x00000000000011B4 + vcr2-play 0x00000000000011B5 + vcr2-stop 0x00000000000011B6 + vcr2-recording 0x00000000000011B7 + vcr2-external1 0x00000000000011B8 + vcr2-external2 0x00000000000011B9 + vcr2-short/long_play 0x00000000000011BA + vcr2-counter_memory 0x00000000000011BB + vcr2-scroll_local_display 0x00000000000011BC + vcr2-system_standby 0x00000000000011BD + vcr2-RF_switch 0x00000000000011BE + vcr2-system_select 0x00000000000011BF + vcr2-surround_sound 0x0000000000000180 + vcr2-balance_front 0x0000000000000181 + vcr2-balance_rear 0x0000000000000182 + vcr2-sound_effects1 0x0000000000000183 + vcr2-sound_effects2 0x0000000000000184 + vcr2-sound_effects3 0x0000000000000185 + vcr2-sound_effects4 0x0000000000000186 + vcr2-sound_effects5 0x0000000000000187 + vcr2-sound_or_menu_func.1 0x0000000000000188 + vcr2-sound_or_menu_func.2 0x0000000000000189 + vcr2-sound_or_menu_func.3 0x000000000000018A + vcr2-data_stream_start 0x000000000000018B + vcr2-data_stream_end 0x000000000000018C + vcr2-linear_function_up 0x000000000000018D + vcr2-linear_function_down 0x000000000000018E + vcr2-catalogue 0x000000000000018F + vcr2-cursor_step_up 0x0000000000000190 + vcr2-cursor_step_down 0x0000000000000191 + vcr2-menu_on 0x0000000000000192 + vcr2-menu_off 0x0000000000000193 + vcr2-display_A/V_status 0x0000000000000194 + vcr2-cursor_step_left 0x0000000000000195 + vcr2-cursor_step_right 0x0000000000000196 + vcr2-acknowledge 0x0000000000000197 + vcr2-PIP_on/off 0x0000000000000198 + vcr2-PIP_shift 0x0000000000000199 + vcr2-PIP_main_swap 0x000000000000019A + vcr2-strobe_on/off 0x000000000000019B + vcr2-multi_strobe 0x000000000000019C + vcr2-main_freezed 0x000000000000019D + vcr2-3/9_multi_scan 0x000000000000019E + vcr2-PIP_mode_select 0x000000000000019F + vcr2-mosaic 0x00000000000001A0 + vcr2-solarization 0x00000000000001A1 + vcr2-main_stored 0x00000000000001A2 + vcr2-PIP_strobe 0x00000000000001A3 + vcr2-recall_main 0x00000000000001A4 + vcr2-PIP_freeze 0x00000000000001A5 + vcr2-PIP_step_up 0x00000000000001A6 + vcr2-PIP_step_down 0x00000000000001A7 + vcr2-automatic_start_ID 0x00000000000001A8 + vcr2-write_skip_ID 0x00000000000001A9 + vcr2-skip_on/off 0x00000000000001AA + vcr2-write_end_ID 0x00000000000001AB + vcr2-write_FTS 0x00000000000001AC + vcr2-write_TOC 0x00000000000001AD + vcr2-viss_index_next 0x00000000000001B0 + vcr2-viss_index_previous 0x00000000000001B1 + vcr2-mark 0x00000000000001B2 + vcr2-erase 0x00000000000001B3 + vcr2-renumber 0x00000000000001B4 + vcr2-blank_search 0x00000000000001B5 + vcr2-sub_mode 0x00000000000001B6 + vcr2-sub_mode 0x00000000000001B7 + vcr2-auto_repeat 0x00000000000001B8 + vcr2-insert_temp 0x00000000000001B9 + vcr2-scr_loc_disp 0x00000000000001BA + vcr2-connect 0x00000000000001BB + vcr2-INVALID 0x00000000000001BC + vd-0 0x00000000000010C0 + vd-1 0x00000000000010C1 + vd-2 0x00000000000010C2 + vd-3 0x00000000000010C3 + vd-4 0x00000000000010C4 + vd-5 0x00000000000010C5 + vd-6 0x00000000000010C6 + vd-7 0x00000000000010C7 + vd-8 0x00000000000010C8 + vd-9 0x00000000000010C9 + vd-=/=_=/= 0x00000000000010CA + vd-* 0x00000000000010CB + vd-standby 0x00000000000010CC + vd-mute/demute 0x00000000000010CD + vd-P.P. 0x00000000000010CE + vd-display 0x00000000000010CF + vd-volume+ 0x00000000000010D0 + vd-volume- 0x00000000000010D1 + vd-brightness+ 0x00000000000010D2 + vd-brightness- 0x00000000000010D3 + vd-colour_saturation+ 0x00000000000010D4 + vd-colour_saturation- 0x00000000000010D5 + vd-bass+ 0x00000000000010D6 + vd-bass- 0x00000000000010D7 + vd-treble+ 0x00000000000010D8 + vd-treble- 0x00000000000010D9 + vd-balance_right 0x00000000000010DA + vd-balance_left 0x00000000000010DB + vd-INVALID 0x00000000000010DC + vd-INVALID 0x00000000000010DD + vd-attribute_on/off 0x00000000000010DE + vd-INVALID 0x00000000000010DF + vd-INVALID 0x00000000000010E0 + vd-index 0x00000000000010E1 + vd-INVALID 0x00000000000010E2 + vd-1st/2nd_language 0x00000000000010E3 + vd-spacial_stereo_on/off 0x00000000000010E4 + vd-INVALID 0x00000000000010E5 + vd-hardcopy_printer 0x00000000000010E6 + vd-INVALID 0x00000000000010E7 + vd-terminal_initiation 0x00000000000010E8 + vd-INVALID 0x00000000000010E9 + vd-INVALID 0x00000000000010EA + vd-large_top/lrge_bot/norm 0x00000000000010EB + vd-INVALID 0x00000000000010EC + vd-INVALID 0x00000000000010ED + vd-TV/Text_mixed 0x00000000000010EE + vd-view_data_line_off 0x00000000000010EF + vd-pause 0x00000000000010F0 + vd-erase 0x00000000000010F1 + vd-rewind 0x00000000000010F2 + vd-go_to 0x00000000000010F3 + vd-wind 0x00000000000010F4 + vd-play 0x00000000000010F5 + vd-stop 0x00000000000010F6 + vd-recording 0x00000000000010F7 + vd-external1 0x00000000000010F8 + vd-external2 0x00000000000010F9 + vd-INVALID 0x00000000000010FA + vd-view_data_line_on 0x00000000000010FB + vd-INVALID 0x00000000000010FC + vd-system_standby 0x00000000000010FD + vd-INVALID 0x00000000000010FE + vd-system_select 0x00000000000010FF + vd-surround_sound 0x00000000000000C0 + vd-balance_front 0x00000000000000C1 + vd-balance_rear 0x00000000000000C2 + vd-sound_effects1 0x00000000000000C3 + vd-sound_effects2 0x00000000000000C4 + vd-sound_effects3 0x00000000000000C5 + vd-sound_effects4 0x00000000000000C6 + vd-sound_effects5 0x00000000000000C7 + vd-sound_or_menu_func.1 0x00000000000000C8 + vd-sound_or_menu_func.2 0x00000000000000C9 + vd-sound_or_menu_func.3 0x00000000000000CA + vd-linear_function_up 0x00000000000000CD + vd-linear_function_down 0x00000000000000CE + vd-sound_or_menu_func. 0x00000000000000CF + vd-cursor_step_up 0x00000000000000D0 + vd-cursor_step_down 0x00000000000000D1 + vd-menu_on 0x00000000000000D2 + vd-menu_off 0x00000000000000D3 + vd-display_A/V_status 0x00000000000000D4 + vd-cursor_step_left 0x00000000000000D5 + vd-cursor_step_right 0x00000000000000D6 + vd-menu_function 0x00000000000000D7 + vd-PIP_on/off 0x00000000000000D8 + vd-PIP_shift 0x00000000000000D9 + vd-PIP_main_swap 0x00000000000000DA + vd-strobe_on/off 0x00000000000000DB + vd-multi_strobe 0x00000000000000DC + vd-main_freezed 0x00000000000000DD + vd-3/9_multi_scan 0x00000000000000DE + vd-PIP_mode_select 0x00000000000000DF + vd-mosaic 0x00000000000000E0 + vd-solarization 0x00000000000000E1 + vd-main_stored 0x00000000000000E2 + vd-PIP_strobe 0x00000000000000E3 + vd-recall_main 0x00000000000000E4 + vd-PIP_freeze 0x00000000000000E5 + vd-PIP_step_up 0x00000000000000E6 + vd-PIP_step_down 0x00000000000000E7 + vd-INVALID 0x00000000000000EB + vd-INVALID 0x00000000000000EC + vd-INVALID 0x00000000000000ED + vd-INVALID 0x00000000000000EE + vd-INVALID 0x00000000000000EF + vd-sub_mode 0x00000000000000F6 + vd-sub_mode 0x00000000000000F7 + vd-cleaning_up 0x00000000000000FA + vd-connect 0x00000000000000FB + vd-disconnect 0x00000000000000FC + vd-cleaning_up1 0x00000000000000FD + vd-cleaning_up2 0x00000000000000FE + vd-cleaning_up3 0x00000000000000FF + end codes + +end remote + diff --git a/meta-extras/packages/lirc/files/lircd.init b/meta-extras/packages/lirc/files/lircd.init new file mode 100755 index 0000000000..11ce62447f --- /dev/null +++ b/meta-extras/packages/lirc/files/lircd.init @@ -0,0 +1,39 @@ +#! /bin/sh +# +# This is an init script for Familiar +# Copy it to /etc/init.d/lircd and type +# > update-rc.d lircd defaults 20 +# + + +test -f /usr/sbin/lircd || exit 0 +test -f /etc/lircd.conf || exit 0 + +case "$1" in + start) + echo -n "Starting lirc daemon: lircd" + start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- --device=/dev/lirc + echo "." + ;; + stop) + echo -n "Stopping lirc daemon: lircd" + start-stop-daemon --stop --quiet --exec /usr/sbin/lircd + echo "." + ;; + reload|force-reload) + start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircd + ;; + restart) + echo -n "Stopping lirc daemon: lircd" + start-stop-daemon --stop --quiet --exec /usr/sbin/lircd + sleep 1 + echo -n "Starting lirc daemon: lircd" + start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- --device=/dev/lirc + echo "." + ;; + *) + echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}" + exit 1 +esac + +exit 0 diff --git a/meta-extras/packages/lirc/files/lircexec.init b/meta-extras/packages/lirc/files/lircexec.init new file mode 100755 index 0000000000..3a8c1a306e --- /dev/null +++ b/meta-extras/packages/lirc/files/lircexec.init @@ -0,0 +1,37 @@ +#! /bin/sh +# +# This is an init script for Familiar +# Copy it to /etc/init.d/lircexecd and type +# > update-rc.d lircexecd defaults 20 +# It must be started after lircd (and it does alphabetically :-) +# irexec reads /etc/lircrc by default + + +test -f /usr/bin/irexec || exit 0 +test -f /etc/lircrc || exit 0 + +case "$1" in + start) + echo -n "Starting lircexec daemon: irexec" + start-stop-daemon --start --quiet --exec /usr/bin/irexec -- --daemon + echo "." + ;; + stop) + echo -n "Stopping lircexec daemon: irexec" + start-stop-daemon --stop --quiet --exec /usr/bin/irexec + echo "." + ;; + restart|force-restart) + echo -n "Stopping lircexec daemon: irexec" + start-stop-daemon --stop --quiet --exec /usr/bin/irexec + sleep 1 + echo -n "Starting lircexec daemon: irexec" + start-stop-daemon --start --quiet --exec /usr/bin/irexec -- --daemon + echo "." + ;; + *) + echo "Usage: /etc/init.d/lircexec {start|stop|reload|restart|force-restart}" + exit 1 +esac + +exit 0 diff --git a/meta-extras/packages/lirc/files/lircmd.init b/meta-extras/packages/lirc/files/lircmd.init new file mode 100755 index 0000000000..1a96207dbb --- /dev/null +++ b/meta-extras/packages/lirc/files/lircmd.init @@ -0,0 +1,38 @@ +#! /bin/sh +# +# This is an init script for Familiar +# Copy it to /etc/init.d/lirc and type +# > update-rc.d lirc defaults 20 +# + + +test -f /usr/sbin/lircmd || exit 0 + +case "$1" in + start) + echo -n "Starting lirc daemon: lircmd" + start-stop-daemon --start --quiet --exec /usr/sbin/lircmd + echo "." + ;; + stop) + echo -n "Stopping lirc daemon: lircmd" + start-stop-daemon --stop --quiet --exec /usr/sbin/lircmd + echo "." + ;; + reload|force-reload) + start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircmd + ;; + restart) + echo -n "Stopping lirc daemon: lircmd" + start-stop-daemon --stop --quiet --exec /usr/sbin/lircmd + sleep 1 + echo -n "Starting lirc daemon: lircmd" + start-stop-daemon --start --quiet --exec /usr/sbin/lircmd + echo "." + ;; + *) + echo "Usage: /etc/init.d/lircmd {start|stop|reload|restart|force-reload}" + exit 1 +esac + +exit 0 diff --git a/meta-extras/packages/lirc/files/lircrc_nslu2 b/meta-extras/packages/lirc/files/lircrc_nslu2 new file mode 100644 index 0000000000..0669d90b09 --- /dev/null +++ b/meta-extras/packages/lirc/files/lircrc_nslu2 @@ -0,0 +1,113 @@ +# This is the default files read by all lirc clients +# (see also /etc/lircd.conf) + +# I run /sbin/buzzer before every command to get an audible feedback + +## Here LIRC could shutdown your system +#begin +# prog = irexec +# remote = RC5 +# repeat = 0 +# button = vcr2-standby +# config = /sbin/buzzer; /sbin/halt +#end + + +## Here LIRC controls your mpd music deamon +begin + prog = irexec + remote = RC5 + repeat = 0 + button = vcr2-pause + config = /sbin/buzzer; mpc toggle +end +begin + prog = irexec + remote = RC5 + repeat = 0 + button = vcr2-step+ + config = /sbin/buzzer; mpc next +end +begin + prog = irexec + remote = RC5 + repeat = 0 + button = vcr2-step- + config = /sbin/buzzer; mpc prev +end +begin + prog = irexec + remote = RC5 + repeat = 0 + button = vcr2-scan_forward + config = /sbin/buzzer; mpc seek +00:00:30 +end +begin + prog = irexec + remote = RC5 + repeat = 0 + button = vcr2-scan_reverse + config = /sbin/buzzer; mpc seek -00:00:30 +end +begin + prog = irexec + remote = RC5 + repeat = 0 + button = vcr2-brightness+ + config = /sbin/buzzer; mpc volume +20 +end +begin + prog = irexec + remote = RC5 + repeat = 0 + button = vcr2-brightness- + config = /sbin/buzzer; mpc volume -20 +end + + +## Here LIRC acts as an repeater +begin + prog = irexec + remote = RC5 + repeat = 0 + button = vcr2-volume+ + config = /sbin/buzzer; irsend SEND_ONCE RC5 amp1-volume+ +end +begin + prog = irexec + remote = RC5 + repeat = 0 + button = vcr2-volume- + config = /sbin/buzzer; irsend SEND_ONCE RC5 amp1-volume- +end + + +## Here LIRC is the input device for your LC display software +begin + prog = lcdd + remote = RC5 + repeat = 0 + button = vcr2-1 + config = A +end +begin + prog = lcdd + remote = RC5 + repeat = 0 + button = vcr2-2 + config = B +end +begin + prog = lcdd + remote = RC5 + repeat = 0 + button = vcr2-3 + config = C +end +begin + prog = lcdd + remote = RC5 + repeat = 0 + button = vcr2-4 + config = D +end diff --git a/meta-extras/packages/lirc/files/split-hauppauge.patch b/meta-extras/packages/lirc/files/split-hauppauge.patch new file mode 100644 index 0000000000..170a233ffb --- /dev/null +++ b/meta-extras/packages/lirc/files/split-hauppauge.patch @@ -0,0 +1,141 @@ +--- lirc/remotes/hauppauge/lircd.conf.hauppauge~ 2003-05-03 15:42:30.000000000 +0100 ++++ lirc/remotes/hauppauge/lircd.conf.hauppauge 2004-10-10 20:14:14.000000000 +0100 +@@ -51,71 +51,3 @@ + end codes + + end remote +- +- +-# +-# this config file was automatically generated +-# using lirc-0.6.6(animax) on Tue Apr 15 19:50:27 2003 +-# +-# contributed by +-# +-# brand: Hauppauge +-# model no. of remote control: +-# devices being controlled by this remote: PVR 2/350 +-# +- +-begin remote +- +- name hauppauge_pvr +- bits 13 +- flags RC5|CONST_LENGTH +- eps 30 +- aeps 100 +- +- one 969 811 +- zero 969 811 +- plead 1097 +- gap 114605 +- toggle_bit 2 +- +- +- begin codes +- Power 0x00000000000017FD +- Go 0x00000000000017FB +- 1 0x00000000000017C1 +- 2 0x00000000000017C2 +- 3 0x00000000000017C3 +- 4 0x00000000000017C4 +- 5 0x00000000000017C5 +- 6 0x00000000000017C6 +- 7 0x00000000000017C7 +- 8 0x00000000000017C8 +- 9 0x00000000000017C9 +- Back/Exit 0x00000000000017DF +- 0 0x00000000000017C0 +- Menu 0x00000000000017CD +- Red 0x00000000000017CB +- Green 0x00000000000017EE +- Yellow 0x00000000000017F8 +- Blue 0x00000000000017E9 +- Ch+ 0x00000000000017E0 +- Ch- 0x00000000000017E1 +- Vol- 0x00000000000017D1 +- Vol+ 0x00000000000017D0 +- Ok 0x00000000000017E5 +- Mute 0x00000000000017CF +- Blank 0x00000000000017CC +- Full 0x00000000000017FC +- Rewind 0x00000000000017F2 +- Play 0x00000000000017F5 +- Forward 0x00000000000017F4 +- Record 0x00000000000017F7 +- Stop 0x00000000000017F6 +- Pause 0x00000000000017F0 +- Replay 0x00000000000017E4 +- Skip 0x00000000000017DE +- end codes +- +-end remote +- +- +--- /dev/null 2004-06-13 02:32:19.000000000 +0100 ++++ lirc/remotes/hauppauge/lircd.conf.hauppauge-pvr 2004-10-10 20:14:05.000000000 +0100 +@@ -0,0 +1,64 @@ ++# ++# this config file was automatically generated ++# using lirc-0.6.6(animax) on Tue Apr 15 19:50:27 2003 ++# ++# contributed by ++# ++# brand: Hauppauge ++# model no. of remote control: ++# devices being controlled by this remote: PVR 2/350 ++# ++ ++begin remote ++ ++ name hauppauge_pvr ++ bits 13 ++ flags RC5|CONST_LENGTH ++ eps 30 ++ aeps 100 ++ ++ one 969 811 ++ zero 969 811 ++ plead 1097 ++ gap 114605 ++ toggle_bit 2 ++ ++ ++ begin codes ++ Power 0x00000000000017FD ++ Go 0x00000000000017FB ++ 1 0x00000000000017C1 ++ 2 0x00000000000017C2 ++ 3 0x00000000000017C3 ++ 4 0x00000000000017C4 ++ 5 0x00000000000017C5 ++ 6 0x00000000000017C6 ++ 7 0x00000000000017C7 ++ 8 0x00000000000017C8 ++ 9 0x00000000000017C9 ++ Back/Exit 0x00000000000017DF ++ 0 0x00000000000017C0 ++ Menu 0x00000000000017CD ++ Red 0x00000000000017CB ++ Green 0x00000000000017EE ++ Yellow 0x00000000000017F8 ++ Blue 0x00000000000017E9 ++ Ch+ 0x00000000000017E0 ++ Ch- 0x00000000000017E1 ++ Vol- 0x00000000000017D1 ++ Vol+ 0x00000000000017D0 ++ Ok 0x00000000000017E5 ++ Mute 0x00000000000017CF ++ Blank 0x00000000000017CC ++ Full 0x00000000000017FC ++ Rewind 0x00000000000017F2 ++ Play 0x00000000000017F5 ++ Forward 0x00000000000017F4 ++ Record 0x00000000000017F7 ++ Stop 0x00000000000017F6 ++ Pause 0x00000000000017F0 ++ Replay 0x00000000000017E4 ++ Skip 0x00000000000017DE ++ end codes ++ ++end remote diff --git a/meta-extras/packages/lirc/lirc-config.inc b/meta-extras/packages/lirc/lirc-config.inc new file mode 100644 index 0000000000..03bfc61e39 --- /dev/null +++ b/meta-extras/packages/lirc/lirc-config.inc @@ -0,0 +1,13 @@ +EXTRA_OECONF = "--with-kerneldir=${STAGING_KERNEL_DIR} --with-driver=${DRIVER}" + +DRIVER ?= "serial" +# fails to build at the moment, re-enable later +#DRIVER_collie = "sa1100" +DRIVER_h3600 = "sa1100" +DRIVER_simpad = "sa1100" +DRIVER_nslu2 = "nslu2" +# XXX Why is X disabled on all these platforms anyway? +EXTRA_OECONF_append_collie = " --without-x" +EXTRA_OECONF_append_h3600 = " --without-x" +EXTRA_OECONF_append_simpad = " --without-x" +EXTRA_OECONF_append_nslu2 = " --without-x --with-transmitter --with-soft-carrier" diff --git a/meta-extras/packages/lirc/lirc-modules_0.8.3.bb b/meta-extras/packages/lirc/lirc-modules_0.8.3.bb new file mode 100644 index 0000000000..ee1de7194e --- /dev/null +++ b/meta-extras/packages/lirc/lirc-modules_0.8.3.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "LIRC is a package that allows you to decode and send infra-red signals of many commonly used remote controls." +SECTION = "base" +PRIORITY = "optional" +LICENSE = "GPL" +DEPENDS = "virtual/kernel virtual/fakeroot-native" +PR = "r2" + +SRC_URI = "${SOURCEFORGE_MIRROR}/lirc/lirc-${PV}.tar.gz \ + file://lirc_sir-sa1100.patch;patch=1" +S = "${WORKDIR}/lirc-${PV}" + +inherit autotools module-base + +include lirc-config.inc + +do_compile() { + # ${KERNEL_LD} doesn't understand the LDFLAGS, so suppress them + cd drivers && oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" LDFLAGS="" +} + +fakeroot do_install() { + oe_runmake -C drivers DESTDIR="${D}" moduledir="/lib/modules/${KERNEL_VERSION}/lirc" install + rm -rf ${D}/dev +} + +pkg_postinst() { +#!/bin/sh +set -e +if [ ! -c $D/dev/lirc ]; then mknod $D/dev/lirc c 61 0; fi +exit 0 +} + +FILES_${PN} = "/lib/modules" diff --git a/meta-extras/packages/lirc/lirc_0.8.3.bb b/meta-extras/packages/lirc/lirc_0.8.3.bb new file mode 100644 index 0000000000..9e4cacc3e4 --- /dev/null +++ b/meta-extras/packages/lirc/lirc_0.8.3.bb @@ -0,0 +1,31 @@ +DESCRIPTION = "LIRC is a package that allows you to decode and send infra-red signals of many commonly used remote controls." +SECTION = "console/network" +PRIORITY = "optional" +LICENSE = "GPL" +DEPENDS = "virtual/kernel virtual/libx11 libxau libsm libice" +PR = "r5" + +SRC_URI = "${SOURCEFORGE_MIRROR}/lirc/lirc-${PV}.tar.gz \ + file://lircd.init file://lircmd.init" +S = "${WORKDIR}/lirc-${PV}" + +inherit autotools module-base update-rc.d + +INITSCRIPT_NAME = "lircd" +INITSCRIPT_PARAMS = "defaults 20" + +include lirc-config.inc + +EXTRA_OEMAKE = 'SUBDIRS="daemons tools"' + +do_install_append() { + install -d ${D}${sysconfdir}/init.d + install ${WORKDIR}/lircd.init ${D}${sysconfdir}/init.d/lircd + + install -d ${D}${datadir}/lirc/ + cp -pPR ${S}/remotes ${D}${datadir}/lirc/ +} + +PACKAGES =+ "lirc-x" + +FILES_lirc-x = "${bindir}/irxevent ${bindir}/xmode2" diff --git a/meta-extras/packages/llvm/llvm-native/fix_ldflags_export.patch b/meta-extras/packages/llvm/llvm-native/fix_ldflags_export.patch new file mode 100644 index 0000000000..77511d68f6 --- /dev/null +++ b/meta-extras/packages/llvm/llvm-native/fix_ldflags_export.patch @@ -0,0 +1,26 @@ +Index: trunk/tools/llvm-config/Makefile +=================================================================== +--- trunk.orig/tools/llvm-config/Makefile 2008-02-11 15:14:22.000000000 +0000 ++++ trunk/tools/llvm-config/Makefile 2008-04-11 16:58:06.000000000 +0100 +@@ -27,7 +27,7 @@ + # This is blank for now. We need to be careful about adding stuff here: + # LDFLAGS tend not to be portable, and we don't currently require the + # user to use libtool when linking against LLVM. +-SUB_LDFLAGS = ++SUB_LDFLAGS = ${LD.Flags} + + FinalLibDeps = $(PROJ_OBJ_DIR)/FinalLibDeps.txt + LibDeps = $(PROJ_OBJ_DIR)/LibDeps.txt +@@ -57,10 +57,11 @@ + # Build our final script. + $(ToolDir)/llvm-config: llvm-config.in $(FinalLibDeps) + $(Echo) "Building llvm-config script." ++ $(Echo) 's,@LLVM_LDFLAGS@,$(SUB_LDFLAGS),' + $(Verb) $(ECHO) 's,@LLVM_CPPFLAGS@,$(SUB_CPPFLAGS),' > temp.sed + $(Verb) $(ECHO) 's,@LLVM_CFLAGS@,$(SUB_CFLAGS),' >> temp.sed + $(Verb) $(ECHO) 's,@LLVM_CXXFLAGS@,$(SUB_CXXFLAGS),' >> temp.sed +- $(Verb) $(ECHO) 's,@LLVM_LDFLAGS@,$(SUB_LDFLAGS),' >> temp.sed ++ $(Verb) $(ECHO) 's#@LLVM_LDFLAGS@#$(SUB_LDFLAGS)#' >> temp.sed + $(Verb) $(ECHO) 's,@LLVM_BUILDMODE@,$(BuildMode),' >> temp.sed + $(Verb) $(SED) -f temp.sed < $< > $@ + $(Verb) $(RM) temp.sed diff --git a/meta-extras/packages/llvm/llvm-native_svn.bb b/meta-extras/packages/llvm/llvm-native_svn.bb new file mode 100644 index 0000000000..56cc0d97b7 --- /dev/null +++ b/meta-extras/packages/llvm/llvm-native_svn.bb @@ -0,0 +1,13 @@ +DEPENDS = "flex-native" +SRC_URI = "svn://llvm.org/svn/llvm-project/llvm;proto=http;module=trunk \ + file://fix_ldflags_export.patch;patch=1" + +PV = "0.0+${SRCREV}" +PR = "r1" + +S = "${WORKDIR}/trunk" + +inherit autotools native + +EXTRA_OECONF = "--enable-optimized" +EXTRA_OEMAKE = "ENABLE_OPTIMIZED=1" \ No newline at end of file diff --git a/meta-extras/packages/maemo/nokia770-init/fixup-770.sh b/meta-extras/packages/maemo/nokia770-init/fixup-770.sh new file mode 100644 index 0000000000..0f1734d2ab --- /dev/null +++ b/meta-extras/packages/maemo/nokia770-init/fixup-770.sh @@ -0,0 +1,26 @@ +#! /bin/sh +case "$1" in + start) + echo -n "Unmounting virtual fs from initrd" + umount /mnt/initfs/sys + umount /mnt/initfs/proc + ln -s /dev/vc/0 /dev/tty0 + ln -s /dev/vc/1 /dev/tty1 + ln -s /dev/vc/2 /dev/tty2 + ln -s /dev/vc/3 /dev/tty3 + ln -s /dev/vc/4 /dev/tty4 + ln -s /dev/vc/5 /dev/tty5 + ln -s /dev/vc/6 /dev/tty6 + ln -s /dev/vc/7 /dev/tty7 + /sbin/ifconfig wlan0 up + ;; + stop) + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop}" >&2 + exit 1 + ;; +esac + +exit 0 + \ No newline at end of file diff --git a/meta-extras/packages/maemo/nokia770-init_1.0.bb b/meta-extras/packages/maemo/nokia770-init_1.0.bb new file mode 100644 index 0000000000..9075c016a6 --- /dev/null +++ b/meta-extras/packages/maemo/nokia770-init_1.0.bb @@ -0,0 +1,38 @@ +LICENSE = "GPL" +PR = "r7" + +DEPENDS = "base-passwd" + +SRC_URI = "file://fixup-770.sh" + +COMPATIBLE_MACHINE = "(nokia770|nokia800)" + +inherit update-rc.d + +INITSCRIPT_NAME = "fixup-770.sh" +INITSCRIPT_PARAMS = "defaults 01" + +FILES_${PN} = "${sysconfdir} ${libdir}" + +do_install () { + install -d ${D}${sysconfdir}/init.d + install -m 755 ${WORKDIR}/fixup-770.sh ${D}/${sysconfdir}/init.d/fixup-770.sh + + install -d ${D}/lib/firmware +} + +pkg_postinst () { +#!/bin/sh + +# set up some links to firmware and modules in initrd + mkdir -p $D/lib/firmware + ln -sf /mnt/initfs/usr/lib/hotplug/firmware/3825.arm $D/lib/firmware/3825.arm + ln -sf /mnt/initfs/usr/lib/hotplug/firmware/3826.arm $D/lib/firmware/3826.arm + ln -sf /mnt/initfs/usr/lib/hotplug/firmware/bc4fw.bin $D/lib/firmware/bc4fw.bin + ln -sf /mnt/initfs/usr/lib/hotplug/firmware/brf6150fw.bin $D/lib/firmware/brf6150fw.bin + ln -sf /mnt/initfs/usr/lib/hotplug/firmware/mtlm3825.arm $D/lib/firmware/mtlm3825.arm + ln -sf /mnt/initfs/usr/lib/hotplug/firmware/mtlm3826.arm $D/lib/firmware/mtlm3826.arm + +# rm -rf $D/lib/modules +# ln -s /mnt/initfs/lib/modules $D/lib/modules +} diff --git a/meta-extras/packages/maemo/xpext/auxdir.patch b/meta-extras/packages/maemo/xpext/auxdir.patch new file mode 100644 index 0000000000..da5841a132 --- /dev/null +++ b/meta-extras/packages/maemo/xpext/auxdir.patch @@ -0,0 +1,13 @@ +--- configure.ac.old 2005-06-03 12:53:28.000000000 +0200 ++++ configure.ac 2005-06-03 12:54:29.000000000 +0200 +@@ -25,9 +25,9 @@ + + AC_PREREQ([2.57]) + AC_INIT([spext], [1.0], [lauri.leukkunen@nokia.com], spext) ++AC_CONFIG_AUX_DIR(.) + AM_INIT_AUTOMAKE([dist-bzip2]) + AM_MAINTAINER_MODE +-AC_CONFIG_AUX_DIR(.) + + dnl PKG_CHECK_MODULES(FIXESEXT, fixesext) + diff --git a/meta-extras/packages/maemo/xpext_1.0-5.bb b/meta-extras/packages/maemo/xpext_1.0-5.bb new file mode 100644 index 0000000000..5be3d1c041 --- /dev/null +++ b/meta-extras/packages/maemo/xpext_1.0-5.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "X Server Nokia 770 extensions library" +LICENSE= "MIT" +SECTION = "x11/libs" +PRIORITY = "optional" +DEPENDS = "virtual/libx11 libxext" +PR = "r1" + +SRC_URI = "http://repository.maemo.org/pool/maemo/ossw/source/x/${PN}/${PN}_${PV}.tar.gz \ + file://auxdir.patch;patch=1;pnum=0" +S = "${WORKDIR}/xpext-1.0" + +# ${PN} is empty so we need to tweak -dev and -dbg package dependencies +RDEPENDS_${PN}-dev = "" +RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPV})" + +inherit autotools pkgconfig + +do_configure_prepend () { + cd ${S} + chmod +x ./autogen.sh + ./autogen.sh +} diff --git a/meta-extras/packages/maemo/xsp_1.0.0-8.bb b/meta-extras/packages/maemo/xsp_1.0.0-8.bb new file mode 100644 index 0000000000..c722213c86 --- /dev/null +++ b/meta-extras/packages/maemo/xsp_1.0.0-8.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "X Server Nokia 770 extensions library" +SECTION = "x11/libs" +PRIORITY = "optional" +LICENSE= "MIT" +DEPENDS = "virtual/libx11 libxext xpext" + +PR = "r1" + +SRC_URI = "http://repository.maemo.org/pool/maemo/ossw/source/x/xsp/${PN}_${PV}.tar.gz" +S = "${WORKDIR}/Xsp" + +inherit autotools pkgconfig diff --git a/meta-extras/packages/osc/osc-native_svn.bb b/meta-extras/packages/osc/osc-native_svn.bb new file mode 100755 index 0000000000..ab0ee0ba3a --- /dev/null +++ b/meta-extras/packages/osc/osc-native_svn.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "osc - OpenSUSE build service command-line tool." +HOMEPAGE = "http://en.opensuse.org/Build_Service/CLI" +SECTION = "console/utils" +LICENSE = "GPL" +PV = "0.0+svnr${SRCREV}" +PR = "r1" +DEPENDS = "python-native rpm-native" +RDEPENDS = "" + +SRC_URI = "svn://forgesvn1.novell.com/svn/opensuse/trunk/buildservice/src/clientlib/python;module=osc;proto=https" +S = "${WORKDIR}/osc" + +inherit native + +do_install() { + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + STAGING_LIBDIR=${STAGING_LIBDIR} STAGING_INCDIR=${STAGING_INCDIR} \ + ${STAGING_BINDIR_NATIVE}/python setup.py build || + oefatal "python setup.py build execution failed." + + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \ + ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${D}${prefix} --install-data=${D}${datadir} || \ + oefatal "python setup.py install execution failed." + + ln -sf osc-wrapper.py ${D}${bindir}/osc +} + diff --git a/meta-extras/packages/tasks/task-poky-x11-netbook.bb b/meta-extras/packages/tasks/task-poky-x11-netbook.bb new file mode 100644 index 0000000000..a5ebb54073 --- /dev/null +++ b/meta-extras/packages/tasks/task-poky-x11-netbook.bb @@ -0,0 +1,28 @@ +# +# Copyright (C) 2008 Intel. +# + +DESCRIPTION = "Netbook Tasks for Poky" +PR = "r1" + +PACKAGES = "\ + task-poky-x11-netbook \ + task-poky-x11-netbook-dbg \ + task-poky-x11-netbook-dev \ + " + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +ALLOW_EMPTY = "1" + +NETWORK_MANAGER ?= "networkmanager-applet" +RDEPENDS_task-poky-x11-netbook = "\ + mutter \ + matchbox-desktop \ + matchbox-session-netbook \ + matchbox-config-gtk \ + xcursor-transparent-theme \ + sato-icon-theme \ + settings-daemon \ + gtk-sato-engine \ + ${NETWORK_MANAGER}" diff --git a/meta-extras/packages/yum/createrepo-native/pathfix.patch b/meta-extras/packages/yum/createrepo-native/pathfix.patch new file mode 100644 index 0000000000..a09a51ccc9 --- /dev/null +++ b/meta-extras/packages/yum/createrepo-native/pathfix.patch @@ -0,0 +1,81 @@ +Index: createrepo-0.9/Makefile +=================================================================== +--- createrepo-0.9.orig/Makefile 2008-08-23 17:49:24.000000000 +0100 ++++ createrepo-0.9/Makefile 2008-08-23 17:52:01.000000000 +0100 +@@ -10,22 +10,6 @@ + SHELL = /bin/sh + top_srcdir = . + srcdir = . +-prefix = /usr +-exec_prefix = ${prefix} +- +-bindir = ${exec_prefix}/bin +-sbindir = ${exec_prefix}/sbin +-libexecdir = ${exec_prefix}/libexec +-datadir = ${prefix}/share +-sysconfdir = ${prefix}/etc +-sharedstatedir = ${prefix}/com +-localstatedir = ${prefix}/var +-libdir = ${exec_prefix}/lib +-infodir = ${prefix}/info +-docdir = +-includedir = ${prefix}/include +-oldincludedir = /usr/include +-mandir = ${prefix}/share/man + + pkgdatadir = $(datadir)/$(PKGNAME) + pkglibdir = $(libdir)/$(PKGNAME) +Index: createrepo-0.9/bin/Makefile +=================================================================== +--- createrepo-0.9.orig/bin/Makefile 2008-08-23 17:50:13.000000000 +0100 ++++ createrepo-0.9/bin/Makefile 2008-08-23 17:50:23.000000000 +0100 +@@ -1,22 +1,6 @@ + SHELL = /bin/sh + top_srcdir = .. + srcdir = ../bin +-prefix = /usr +-exec_prefix = ${prefix} +- +-bindir = ${exec_prefix}/bin +-sbindir = ${exec_prefix}/sbin +-libexecdir = ${exec_prefix}/libexec +-datadir = ${prefix}/share +-sysconfdir = ${prefix}/etc +-sharedstatedir = ${prefix}/com +-localstatedir = ${prefix}/var +-libdir = ${exec_prefix}/lib +-infodir = ${prefix}/info +-docdir = +-includedir = ${prefix}/include +-oldincludedir = /usr/include +-mandir = ${prefix}/man + + pkgdatadir = $(datadir)/$(PKGNAME) + pkglibdir = $(libdir)/$(PKGNAME) +Index: createrepo-0.9/docs/Makefile +=================================================================== +--- createrepo-0.9.orig/docs/Makefile 2008-08-23 17:52:42.000000000 +0100 ++++ createrepo-0.9/docs/Makefile 2008-08-23 17:52:50.000000000 +0100 +@@ -1,22 +1,6 @@ + SHELL = /bin/sh + top_srcdir = .. + srcdir = ../docs +-prefix = /usr +-exec_prefix = ${prefix} +- +-bindir = ${exec_prefix}/bin +-sbindir = ${exec_prefix}/sbin +-libexecdir = ${exec_prefix}/libexec +-datadir = ${prefix}/share +-sysconfdir = ${prefix}/etc +-sharedstatedir = ${prefix}/com +-localstatedir = ${prefix}/var +-libdir = ${exec_prefix}/lib +-infodir = ${prefix}/info +-docdir = +-includedir = ${prefix}/include +-oldincludedir = /usr/include +-mandir = ${datadir}/man + + pkgdatadir = $(datadir)/$(PKGNAME) + pkglibdir = $(libdir)/$(PKGNAME) diff --git a/meta-extras/packages/yum/createrepo-native_0.9.8.bb b/meta-extras/packages/yum/createrepo-native_0.9.8.bb new file mode 100644 index 0000000000..895f2e96fe --- /dev/null +++ b/meta-extras/packages/yum/createrepo-native_0.9.8.bb @@ -0,0 +1,17 @@ +DEPENDS = "python-native libxml2-native" +RDEPENDS = "yum-native" + +SRC_URI = "http://createrepo.baseurl.org/download/createrepo-${PV}.tar.gz \ + file://pathfix.patch;patch=1 " +PR = "r2" + +inherit autotools native + +S = "${WORKDIR}/createrepo-${PV}" + +do_compile_append () { + sed -e 's#exec /usr/share#exec ${datadir}#' -i ${S}/bin/createrepo + sed -e 's#exec /usr/share#exec ${datadir}#' -i ${S}/bin/modifyrepo + sed -e 's#!/usr/bin/python#!${bindir}/python#' -i ${S}/genpkgmetadata.py + sed -e 's#!/usr/bin/python#!${bindir}/python#' -i ${S}/modifyrepo.py +} diff --git a/meta-extras/packages/yum/files/98_yum b/meta-extras/packages/yum/files/98_yum new file mode 100644 index 0000000000..cb4047ad2b --- /dev/null +++ b/meta-extras/packages/yum/files/98_yum @@ -0,0 +1 @@ +d root root 0755 /var/cache/yum none diff --git a/meta-extras/packages/yum/files/extract-postinst.awk b/meta-extras/packages/yum/files/extract-postinst.awk new file mode 100644 index 0000000000..8f2836b32c --- /dev/null +++ b/meta-extras/packages/yum/files/extract-postinst.awk @@ -0,0 +1,11 @@ +/Name:.*/ { + package = substr($0, 7) + next +} +/postinstall.*scriptlet .*/ { + next +} +{ + print $0 >> ENVIRON["D"] "/etc/rpm-postinsts/" package ".sh" +} + diff --git a/meta-extras/packages/yum/files/fix b/meta-extras/packages/yum/files/fix new file mode 100644 index 0000000000..bcb3301e14 --- /dev/null +++ b/meta-extras/packages/yum/files/fix @@ -0,0 +1,18 @@ +--- + rpmUtils/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- yum-3.2.18.orig/rpmUtils/Makefile ++++ yum-3.2.18/rpmUtils/Makefile +@@ -1,10 +1,10 @@ + PYTHON=python + PACKAGE = $(shell basename `pwd`) + PYFILES = $(wildcard *.py) + PYVER := $(shell $(PYTHON) -c 'import sys; print "%.3s" %(sys.version)') +-PYSYSDIR := $(shell $(PYTHON) -c 'import sys; print sys.prefix') ++PYSYSDIR := /usr + PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER) + PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE) + + all: + echo "Nothing to do" diff --git a/meta-extras/packages/yum/files/hacks.patch b/meta-extras/packages/yum/files/hacks.patch new file mode 100644 index 0000000000..61f477172c --- /dev/null +++ b/meta-extras/packages/yum/files/hacks.patch @@ -0,0 +1,81 @@ +--- + rpmUtils/arch.py | 3 +++ + rpmUtils/transaction.py | 1 + + yum/constants.py | 2 +- + yum/depsolve.py | 2 ++ + 4 files changed, 7 insertions(+), 1 deletion(-) + +Index: yum-3.2.18/rpmUtils/arch.py +=================================================================== +--- yum-3.2.18.orig/rpmUtils/arch.py 2008-06-17 14:05:42.000000000 +0100 ++++ yum-3.2.18/rpmUtils/arch.py 2008-10-02 22:09:19.000000000 +0100 +@@ -275,6 +275,12 @@ + return arch + + def getCanonArch(skipRpmPlatform = 0): ++ import os ++ if 'YUM_ARCH_FORCE' in os.environ: ++ return os.environ['YUM_ARCH_FORCE'] ++ ++ sys.exit(1) ++ + if not skipRpmPlatform and os.access("/etc/rpm/platform", os.R_OK): + try: + f = open("/etc/rpm/platform", "r") +@@ -331,6 +338,12 @@ + base arch is the arch before noarch in the arches dict if myarch is not + a key in the multilibArches.""" + ++ import os ++ if 'YUM_ARCH_FORCE' in os.environ: ++ return os.environ['YUM_ARCH_FORCE'] ++ ++ sys.exit(1) ++ + if not myarch: + myarch = canonArch + +Index: yum-3.2.18/rpmUtils/transaction.py +=================================================================== +--- yum-3.2.18.orig/rpmUtils/transaction.py 2008-06-17 14:05:42.000000000 +0100 ++++ yum-3.2.18/rpmUtils/transaction.py 2008-10-02 17:09:57.000000000 +0100 +@@ -43,6 +43,7 @@ + 'clean'] + self.tsflags = [] + self.open = True ++ self.ts.setProbFilter(rpm.RPMPROB_FILTER_IGNOREOS | rpm.RPMPROB_FILTER_IGNOREARCH) + + def __del__(self): + # Automatically close the rpm transaction when the reference is lost +Index: yum-3.2.18/yum/constants.py +=================================================================== +--- yum-3.2.18.orig/yum/constants.py 2008-07-21 16:56:54.000000000 +0100 ++++ yum-3.2.18/yum/constants.py 2008-10-02 17:09:57.000000000 +0100 +@@ -17,7 +17,7 @@ + """ + + #Constants +-YUM_PID_FILE = '/var/run/yum.pid' ++YUM_PID_FILE = '/var/run2/yum.pid' + + #transaction set states + TS_UPDATE = 10 +Index: yum-3.2.18/yum/depsolve.py +=================================================================== +--- yum-3.2.18.orig/yum/depsolve.py 2008-08-06 17:05:16.000000000 +0100 ++++ yum-3.2.18/yum/depsolve.py 2008-10-02 17:09:57.000000000 +0100 +@@ -141,9 +141,14 @@ + else: + self.logger.critical(_('Invalid tsflag in config file: %s'), flag) + ++ self._ts.addTsFlag(rpm.RPMTRANS_FLAG_NOPOST) ++ self._ts.addTsFlag(rpm.RPMTRANS_FLAG_NOTRIGGERS) ++ + probfilter = 0 + for flag in self.tsInfo.probFilterFlags: + probfilter |= flag ++ probfilter |= rpm.RPMPROB_FILTER_IGNOREOS ++ probfilter |= rpm.RPMPROB_FILTER_IGNOREARCH + self._ts.setProbFilter(probfilter) + + def whatProvides(self, name, flags, version): diff --git a/meta-extras/packages/yum/files/paths.patch b/meta-extras/packages/yum/files/paths.patch new file mode 100644 index 0000000000..0175d05b34 --- /dev/null +++ b/meta-extras/packages/yum/files/paths.patch @@ -0,0 +1,106 @@ +--- + Makefile | 18 +++++++++--------- + docs/Makefile | 12 ++++++------ + etc/Makefile | 20 ++++++++++---------- + 3 files changed, 25 insertions(+), 25 deletions(-) + +Index: yum-3.2.27/Makefile +=================================================================== +--- yum-3.2.27.orig/Makefile 2010-03-04 01:10:20.000000000 +0000 ++++ yum-3.2.27/Makefile 2010-03-23 13:49:50.663912930 +0000 +@@ -22,19 +22,19 @@ + for d in $(SUBDIRS); do make PYTHON=$(PYTHON) -C $$d; [ $$? = 0 ] || exit 1 ; done + + install: +- mkdir -p $(DESTDIR)/usr/share/yum-cli ++ mkdir -p $(DESTDIR)$(datadir)/yum-cli + for p in $(PYFILES) ; do \ +- install -m 644 $$p $(DESTDIR)/usr/share/yum-cli/$$p; \ ++ install -m 644 $$p $(DESTDIR)$(datadir)/yum-cli/$$p; \ + done +- mv $(DESTDIR)/usr/share/yum-cli/yum-updatesd.py $(DESTDIR)/usr/share/yum-cli/yumupd.py +- $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/usr/share/yum-cli', 1, '$(PYDIR)', 1)" ++ mv $(DESTDIR)$(datadir)/yum-cli/yum-updatesd.py $(DESTDIR)$(datadir)/yum-cli/yumupd.py ++ $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)$(datadir)/yum-cli', 1, '$(PYDIR)', 1)" + +- mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/sbin +- install -m 755 bin/yum.py $(DESTDIR)/usr/bin/yum +- install -m 755 bin/yum-updatesd.py $(DESTDIR)/usr/sbin/yum-updatesd ++ mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) ++ install -m 755 bin/yum.py $(DESTDIR)$(bindir)/yum ++ install -m 755 bin/yum-updatesd.py $(DESTDIR)$(sbindir)/yum-updatesd + +- mkdir -p $(DESTDIR)/var/cache/yum +- mkdir -p $(DESTDIR)/var/lib/yum ++ mkdir -p $(DESTDIR)$(localstatedir)/cache/yum ++ mkdir -p $(DESTDIR)$(localstatedir)/lib/yum + + for d in $(SUBDIRS); do make PYTHON=$(PYTHON) DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done + +Index: yum-3.2.27/docs/Makefile +=================================================================== +--- yum-3.2.27.orig/docs/Makefile 2009-04-07 14:57:06.000000000 +0100 ++++ yum-3.2.27/docs/Makefile 2010-03-23 13:52:30.086667913 +0000 +@@ -6,10 +6,10 @@ + rm -fr epydoc + + install: +- mkdir -p $(DESTDIR)/usr/share/man/man5 +- mkdir -p $(DESTDIR)/usr/share/man/man8 +- install -m 644 yum.8 $(DESTDIR)/usr/share/man/man8/yum.8 +- install -m 644 yum-shell.8 $(DESTDIR)/usr/share/man/man8/yum-shell.8 +- install -m 644 yum.conf.5 $(DESTDIR)/usr/share/man/man5/yum.conf.5 +- install -m 644 yum-updatesd.8 $(DESTDIR)/usr/share/man/man8/yum-updatesd.8 +- install -m 644 yum-updatesd.conf.5 $(DESTDIR)/usr/share/man/man5/yum-updatesd.conf.5 ++ mkdir -p $(DESTDIR)$(mandir)/man5 ++ mkdir -p $(DESTDIR)$(mandir)/man8 ++ install -m 644 yum.8 $(DESTDIR)$(mandir)/man8/yum.8 ++ install -m 644 yum-shell.8 $(DESTDIR)$(mandir)/man8/yum-shell.8 ++ install -m 644 yum.conf.5 $(DESTDIR)$(mandir)/man5/yum.conf.5 ++ install -m 644 yum-updatesd.8 $(DESTDIR)$(mandir)/man8/yum-updatesd.8 ++ install -m 644 yum-updatesd.conf.5 $(DESTDIR)$(mandir)/man5/yum-updatesd.conf.5 +Index: yum-3.2.27/etc/Makefile +=================================================================== +--- yum-3.2.27.orig/etc/Makefile 2009-10-26 18:56:06.000000000 +0000 ++++ yum-3.2.27/etc/Makefile 2010-03-23 13:54:40.421912460 +0000 +@@ -1,4 +1,4 @@ +-YUMETC=$(DESTDIR)/etc/yum ++YUMETC=$(DESTDIR)$(sysconfdir)/yum + + all: + echo "Nothing to do" +@@ -7,23 +7,23 @@ + rm -f *.pyc *.pyo *~ + + install: +- mkdir -p $(DESTDIR)/etc/yum/ +- mkdir -p $(DESTDIR)/etc/yum/repos.d ++ mkdir -p $(DESTDIR)$(sysconfdir)/yum/ ++ mkdir -p $(DESTDIR)$(sysconfdir)/yum/repos.d + + install -m 644 yum.conf $(YUMETC)/yum.conf + + install -m 644 version-groups.conf $(YUMETC)/version-groups.conf + +- mkdir -p $(DESTDIR)/etc/logrotate.d +- install -m 644 yum.logrotate $(DESTDIR)/etc/logrotate.d/yum ++ mkdir -p $(DESTDIR)$(sysconfdir)/logrotate.d ++ install -m 644 yum.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/yum + +- mkdir -p $(DESTDIR)/etc/rc.d/init.d +- install -m 755 yum-updatesd.init $(DESTDIR)/etc/rc.d/init.d/yum-updatesd ++ mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d ++ install -m 755 yum-updatesd.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/yum-updatesd + +- mkdir -p $(DESTDIR)/etc/dbus-1/system.d/ +- install -m 755 yum-updatesd-dbus.conf $(DESTDIR)/etc/dbus-1/system.d/yum-updatesd.conf ++ mkdir -p $(DESTDIR)$(sysconfdir)/dbus-1/system.d/ ++ install -m 755 yum-updatesd-dbus.conf $(DESTDIR)$(sysconfdir)/dbus-1/system.d/yum-updatesd.conf + +- install -m 755 yum-updatesd.conf $(DESTDIR)/etc/yum/yum-updatesd.conf ++ install -m 755 yum-updatesd.conf $(DESTDIR)$(sysconfdir)/yum/yum-updatesd.conf + +- mkdir -p $(DESTDIR)/etc/bash_completion.d +- install -m 644 yum.bash $(DESTDIR)/etc/bash_completion.d ++ mkdir -p $(DESTDIR)$(sysconfdir)/bash_completion.d ++ install -m 644 yum.bash $(DESTDIR)$(sysconfdir)/bash_completion.d diff --git a/meta-extras/packages/yum/files/paths2.patch b/meta-extras/packages/yum/files/paths2.patch new file mode 100644 index 0000000000..8fe6d0c983 --- /dev/null +++ b/meta-extras/packages/yum/files/paths2.patch @@ -0,0 +1,35 @@ +--- + rpmUtils/Makefile | 2 +- + yum/Makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: yum-3.2.27/rpmUtils/Makefile +=================================================================== +--- yum-3.2.27.orig/rpmUtils/Makefile 2010-03-24 17:26:39.759798777 +0000 ++++ yum-3.2.27/rpmUtils/Makefile 2010-03-24 17:26:54.835863845 +0000 +@@ -2,8 +2,8 @@ + PACKAGE = $(shell basename `pwd`) + PYFILES = $(wildcard *.py) + PYVER := $(shell $(PYTHON) -c 'import sys; print "%.3s" %(sys.version)') +-PYSYSDIR := $(shell $(PYTHON) -c 'import sys; print sys.prefix') +-PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER) ++PYSYSDIR = $(libdir) ++PYLIBDIR = $(PYSYSDIR)/python$(PYVER) + PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE) + + all: +Index: yum-3.2.27/yum/Makefile +=================================================================== +--- yum-3.2.27.orig/yum/Makefile 2010-03-24 17:26:39.759798777 +0000 ++++ yum-3.2.27/yum/Makefile 2010-03-24 17:26:43.726773783 +0000 +@@ -2,8 +2,8 @@ + PACKAGE = $(shell basename `pwd`) + PYFILES = $(wildcard *.py) + PYVER := $(shell $(PYTHON) -c 'import sys; print "%.3s" %(sys.version)') +-PYSYSDIR := $(shell $(PYTHON) -c 'import sys; print sys.prefix') +-PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER) ++PYSYSDIR = $(libdir) ++PYLIBDIR = $(PYSYSDIR)/python$(PYVER) + PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE) + + all: diff --git a/meta-extras/packages/yum/files/yum-install-recommends.py b/meta-extras/packages/yum/files/yum-install-recommends.py new file mode 100755 index 0000000000..64716f2c3e --- /dev/null +++ b/meta-extras/packages/yum/files/yum-install-recommends.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python +import os, sys + +root = sys.argv[1] +installcmd = sys.argv[2] + +# +# Take an rpm image and look through for Recommends:. For each recommends +# found, try and install any matching packages including any Recommends for +# packages installed by us. +# + + +def get_recommends(): + deps = [] + output = os.popen("rpm --root %s -aq --recommends" % (root)) + lines = output.readlines() + for line in lines: + line = line.replace("(none)","") + if line: + deps.append(line.split()[0]) + return deps + +processed = [] + +while True: + toinstall = [] + recommends = set(get_recommends()) + for item in recommends: + if item not in processed: + toinstall.append(item) + if len(toinstall) != 0: + print "Installing %s" % " ".join(toinstall) + os.system("%s %s" % (installcmd, " ".join(toinstall))) + else: + break + processed.extend(toinstall) + + diff --git a/meta-extras/packages/yum/yum_3.2.27.bb b/meta-extras/packages/yum/yum_3.2.27.bb new file mode 100644 index 0000000000..acebc79dde --- /dev/null +++ b/meta-extras/packages/yum/yum_3.2.27.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "yum package manger is an automatic updater for rpm." +HOMEPAGE = "http://yum.baseurl.org/" +BUGTRACKER = "http://yum.baseurl.org/report" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760 \ + file://yum/sqlutils.py;beginline=2;endline=14;md5=d704ae6a9d69ce90768ab9188236b992" + +RDEPENDS = "python-rpm python-core python-iniparse python-urlgrabber \ + python-shell python-re python-logging python-pickle \ + python-netserver python-compression \ + python-unixadmin python-xml python-sqlite3 \ + python-textutils python-fcntl python-email \ + yum-metadata-parser" + +PR = "r9" + +SRC_URI = "http://yum.baseurl.org/download/3.2/yum-${PV}.tar.gz \ + file://paths.patch;apply=yes \ + file://paths2.patch;apply=yes \ + file://yum-install-recommends.py \ + file://extract-postinst.awk \ + file://98_yum" + +S = "${WORKDIR}/yum-${PV}" + +inherit autotools + +do_compile_append () { + sed -e 's#!/usr/bin/python#!${bindir}/python#' -e 's#/usr/share#${datadir}#' -i ${S}/bin/yum.py + sed -e 's#!/usr/bin/python#!${bindir}/python#' -e 's#/usr/share#${datadir}#' -i ${S}/bin/yum-updatesd.py +} + +do_install_append () { + install -d ${D}${bindir}/ + install ${WORKDIR}/extract-postinst.awk ${D}${bindir}/ + install ${WORKDIR}/yum-install-recommends.py ${D}${bindir}/ + rmdir ${D}${localstatedir}/cache/yum + rmdir ${D}${localstatedir}/cache + install -d ${D}/etc/default/volatiles + install -m 0644 ${WORKDIR}/98_yum ${D}/etc/default/volatiles +} + +FILES_${PN} += "${libdir}/python* ${datadir}/yum-cli" + +BBCLASSEXTEND = "native" -- cgit v1.2.3