Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id A39F8E0106A; Thu, 22 Dec 2016 02:27:01 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [104.47.40.50 listed in list.dnswl.org] * -0.0 SPF_HELO_PASS SPF: HELO matches SPF record * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Greylist: delayed 84685 seconds by postgrey-1.32 at yocto-www; Thu, 22 Dec 2016 02:26:57 PST Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0050.outbound.protection.outlook.com [104.47.40.50]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 00240E0071C for ; Thu, 22 Dec 2016 02:26:57 -0800 (PST) Received: from BN6PR03CA0015.namprd03.prod.outlook.com (10.168.230.153) by BN6PR03MB2468.namprd03.prod.outlook.com (10.168.223.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.11; Thu, 22 Dec 2016 10:26:55 +0000 Received: from BN1AFFO11FD014.protection.gbl (2a01:111:f400:7c10::183) by BN6PR03CA0015.outlook.office365.com (2603:10b6:404:23::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.789.14 via Frontend Transport; Thu, 22 Dec 2016 10:26:55 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; nxp.com; dmarc=fail action=none header.from=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD014.mail.protection.outlook.com (10.58.52.74) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.789.10 via Frontend Transport; Thu, 22 Dec 2016 10:26:55 +0000 Received: from shlinux22.ap.freescale.net (shlinux22.ap.freescale.net [10.192.242.129]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id uBMAQofX032227; Thu, 22 Dec 2016 03:26:53 -0700 From: Yuqing Zhu To: Date: Thu, 22 Dec 2016 18:26:37 +0800 Message-ID: <1482402402-23406-2-git-send-email-carol.zhu@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1482402402-23406-1-git-send-email-carol.zhu@nxp.com> References: <1482402402-23406-1-git-send-email-carol.zhu@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131268760153575969; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(336005)(39850400002)(39410400002)(39860400002)(39380400002)(39840400002)(39400400002)(39450400003)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(626004)(50226002)(8936002)(104016004)(33646002)(85426001)(38730400001)(8676002)(5660300001)(189998001)(305945005)(81166006)(81156014)(230783001)(77096006)(356003)(8656002)(68736007)(50466002)(105606002)(48376002)(2351001)(110136003)(106466001)(97736004)(2906002)(86362001)(47776003)(2950100002)(575784001)(6666003)(5003940100001)(4326007)(36756003)(92566002)(76176999)(50986999)(6916009)(7059030)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2468; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD014; 1:ucjFEPcrJqSd0RiHsr4K01cwuAIXRcIcbQhSN+mosE5Py7VyuS3zs7BuG/PbOZO3EoithBvkAXIX0tf3d5nLXwQiV/3zwmJyjxOn79DpIuHATQT6sTEKvAE3wGavyO4wi4Q/tO79zywAEggmtnnMwd/Aqg5jFbDBtm7IfNYSOt3tdGoHpmgA91XDngn88b8BnZy9sBDncZ//3kaQd2o/TocbyNcCfmnqSjrwxiKxVT70Mt/CwBOC86n93+MDnOd9WC1VCa3nJaUNHt9PuLFB8lO7cvHpXKuarpBO91NLilGC2d0njJpQGt/vfynKkYuFIsePjt76MJGaUrjJHXeLGE/ZQE05QVkL3+DcDLkgyGjhqmgAPdIlkbl9GFjqErwt3HvAc8AnslxGKo5QF2CxI3A55Q7xv3O2P2jsSwkM9GAyzVVKPVPZKkCwR2e0iF0hEHEiC7PMddgnOvnqjITnB2OtVt7IWKPxVrUFSkrOGRCjyXGax1GKTvzstK6vV2662UR9Sw7y0Q0q8rQrVWbjfHcQBP8bWINhku3ZXzAZP+9pkXcvS9QDYm6JSuDAUpweinlCAtIYT3DgZW9sAIPB7WPWsjEzh8xa9czrTAAPVwLqhijVmGceA+KlxzTjKeA+hw4rbjjdJ9dCaM4eqWr9OXKD0iMUdmnEWV+AKNexb8EmIWQMPQktA8QmgssT9x5gYcbz3KdiCDyb8mqamevrtPrT0zPluRFOQinff53hV3I= MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: c9dec44e-103e-4365-f0c1-08d42a550d83 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR03MB2468; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2468; 3:hIkron/Re8fMc3Vw1UJ80cJ7A+dSMfr0stDk8eoMe15vxNzXFtk725UXH8MbhD8eNSRGWPtAg6gBxWlYzOxEGpc3xXDy77uKZHddQa0j04MUmTSu+Yg6LSjXZrXCH2IqjHqo+8BT1M29OvOAVYFpBziCzlvaZ+fl56Vg/Od2boSzFFQqiqFgcBY4yd2yj2cfDuQfEz9xuakca9dKz+74hITLxfEGFRxxoIT0NKCpOO0/pNSq1KxrrIBzA/x2BM/31pMqQAiKigAYEYEcNA4D6kFejrmO5m6Bb8mSJ/lZndovwpCfRWPtkqXz7XXJJCvAJO8Jn5PZenZse/JOiSpBpHp9FSwkrD+dvaVBOnUReu64IvWBip6jzqc5WTbRCZ// X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2468; 25:mBgTdlLESD2VH7ApzxiWpYqdIbf12MuQeLbi+dsX6Qzv8/ZjFzyOtQAygjvvMJW3Yke+NkI3swf/uFbz1OjU8jJ9F4y/e9zBFfoDYZfFKLrfOTuoiiyUvEXsKALfB7lkOxp/oNsjdCHlgaVfQIKAGVe0nPaKKuYHBkNT2N9UpKkX4h/avTUDgOQ+N8+Ded7Df6rjgYg3RapMiUcw3v9PfDVJSguSlFmB92eJ1ZDnqx+V8u3oWjeB1pIlZAArVIRCD33jxslDrA3BseYPsYBy/oH8P8wRN7Ol0IfoMWnVFHURW85SR1UoV+LBZ2DyrvPQTyuc1ED4jorkHItHtdAaJEICkEYDGGsw9BXPOjJNeqZroHfMn4qDZuPwWL9euBfyyAbDR/Awm9ZrFzWvLucXiJNxjsJ4znaIAncox25VoflzFeMibKbpzObFI87JJaqWNwsc6GzbFu8Pt3t1g9XN4oHwxhQrqBmoa0xlhpLV9uYRwTkDAWGr91JC3O45Tb5wktrHRuev1ahyZ+xtJr0gC5oH64Snz6x3giiSM/y5ipE4dzbOV9k5YLqjryfwF8b/11PLJ76GxAF3rnq/GYOfn008Wfek0BgGVYTjPVRUDYTzUhh64H5vbqq7k6LP2IyB3IJ11UNT7rHMY8l9DrAFny+VPXPId8HIzEXbi49QXxaL45mUyjr+HpaEDAIZumwybTICfOWN1/x+KTI+V3o68HzfXRm+Bu0qktKr1PN92jnZNezOxywhIHA5H/Ja1h7StrakLbCIKjECZtnIWIMlhpcq45FSBJWdBMKAio0HXEsnXCVyjN/bvbZ/fzpcAeLN X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2468; 31:JsIxZL/n7QrxKEfjRzPJ2Bw3jjiQRD6Daw2nw27zzFPYHNWpZXJl0YPoH9E8ZKhBciopReJDMXoHH+nbqNkAnqbcNVM4VHhEi8eReorsMdvzbgldGog+oyHXsiRYT8Jul/a7L3Xjnzvkd2Fo8SjV9VB6SHFgSo5xJ+KAX1NwdBnMvsyN4b1znjOCZqk1suaUSgWPB878uYNuUggbgkojHSs+AHS30L1YUCkFKjvoynyGT4eNefvbbD2vMkN0mWPuK3VKhnxO3ju8DLoPvakZhwa1loRky1J/Ts8MHqjg9nQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(101931422205132); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13023025)(13024025)(5005006)(8121501046)(13017025)(13018025)(13015025)(10201501046)(3002001)(6055026)(6096035)(20161123561025)(20161123563025)(20161123559025)(20161123556025)(20161123565025); SRVR:BN6PR03MB2468; BCL:0; PCL:0; RULEID:(400006); SRVR:BN6PR03MB2468; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2468; 4:wKWJx0gm+H4OvCODnPxUg57u+duZFhtIFshIq8S32LXhvutqF4rjD510czCT8R95z16PoIUqswFSAPdfucvkaSQdYdblyIKrVoYT0dw49CGfbEQnMGiFcDU0IBkg+BuC7GjGl6DWGU5d70FGGDaa1VIqHilsDR96/Ufddq5BbvBMLKhLaeaVwSXmSy7tpnJQ5y1Qq14/JaLjLxMISRZ5w+nZzQ0hLGGnKP7QrW9twDsELHEaE5UBL1h/mIihQ+b1IqLc0zhtxBNMw7tsVMAX8X1ScxdnOBFiHvqMxD6RNkuDqmWxp9U7wo0lKwXPPTCk9xWubPnMEszo4CxzJo3fgmoIF8sTbGBsBE8dgnMHXQc8wNkQhDimjs6Yj+R0gN96hKqzGy5cDjTTw7oxpTbZoaKGsMBFIDkLIV8mgEyibu/sehaYJ1bYyR0JM9J5BeDwwdWC9nYxgzHBwMH8P2Na6S3UkPIh1qONqwqDLguK4CtaqsuAURwIVfQiyGsz12EQosLQZa2x7IyAF5qGPhH/mLYn9o/KRiq2zFWf0eCnF10TTfXWU/+/3b57RHpbgvDGoKoCJuo0O1q1eAvRD/XtD+k3PDDgtRkiLJKsCj378si+vEB1mUYi/6Y/NfJR610SvyKKoCpuSJq5akbi3QhuK4MxF72XRuVMS1sXSCDyGjn18mWl72sznzAmGhPFUMJ6k7iOIQ+glkpXeXph4N8+pBzbWvrnWudsyb/3NZFKCJllTp0ffp6W701it3KM2x4rWGDGLjm4tW7hC9c91LtUow== X-Forefront-PRVS: 01644DCF4A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2468; 23:dVkB93W+y57YuOkMcHftdn8ElpfYVePHCFaIbA7cU?= =?us-ascii?Q?+KRyPH341ux8+RcLA8cBSKoyue5t1d66sM6rF0X0u9CNNNU1yBqDY2DrLJSF?= =?us-ascii?Q?X6EWn6FFqq354RN5gPuN58iKfE2c6M0NEiD7XTycVxaLujUsswi9fpIJc45t?= =?us-ascii?Q?fhSsc09O/s9FWONj5icURJmGz50gUWvDpRFfsf1MSk1TU/ourDY1hhVqN1VG?= =?us-ascii?Q?v/J9r3yA8sFTOidlOpmBoj9FWI26+vPTVlr3W/Xy5N79+M8sYBe7uz+K1tsC?= =?us-ascii?Q?w+pHtw+hLF6l7Xr5zXEg0hgGDP9HuPdLUAb2aj41TLZ1P+93LtSYWMUw+KOt?= =?us-ascii?Q?ORqCC6pQxytf6q1GwI8HhhSf3Y/Ve1QkOK/0aMtcsaz96PUcgOfWZAHK/pln?= =?us-ascii?Q?ZbqJEN79obHfbDPkqWMKYc8njumO1SfZARVouQmwMfmEJbU/ICvxhmG3PkKZ?= =?us-ascii?Q?b+NHe7qc7BKx+vZDj+y4mir/wFSsbyW25sRZYeNlANhP3H7kJ8z1GI2D6cgI?= =?us-ascii?Q?95UvNZdkMBn01dyuzFYCXyWpGOl5Zr2/UrnaNfShalnMTVMF4Jijw2ndxq54?= =?us-ascii?Q?J2CR223Yo1kZYXD/pHoWIQnipBrBFLafVQZiiWykpbzz40jZbqHwzM5svUkM?= =?us-ascii?Q?npT48qtYZM9pYaZ3+EwxbtR93xIjjSQKptej7J6E0ib7l8TVAA9dq4QZJ5gl?= =?us-ascii?Q?lLnKPha2HGKcehO1UOkxJ5o0WokzZVn7S4DYom6wabeTV1SYNfb2jTZ/nj2h?= =?us-ascii?Q?6NzOf1G3IjShRzoms54d6yzjsoxMfulCRQkPyRY+XihB/4v1FbyLO50ByOUo?= =?us-ascii?Q?XhEhyn9R/8lth+iEIN9pHTnKbn8FT5GqJxf/FJ9PsJGBfk6+1Jyrw4DopmGP?= =?us-ascii?Q?GLoq7mxqAftPYFSVFocMXKDQW9IYmJcCBmRWjgfqx51wjImfxFO25inZjj+A?= =?us-ascii?Q?ZZ9AqUY630OwWFaunqf2eaOeDbm2JhBvDo1qMx3Y0e8jJnMDSGu6B4QkzYsv?= =?us-ascii?Q?QgvSanSHnfU9bmT8l//sQtXn4Qnr+lfRmM0dFwB3jjQxdtvhI4HhCMIXOuIr?= =?us-ascii?Q?ejLVNX8UJKahSwrFPh4f7RpgdYbtf13GApMa2x60exyJ9jQjBe5HzCguC0Th?= =?us-ascii?Q?ch5nNNpNB9CzdsHw/w9+2iS/AuO35IyJsND2zEaNPI623C/DEAlE5NXlshZH?= =?us-ascii?Q?FEi3YGWQRTs5PRryCkp57J5ZdtilUtW/l1pddzXtNFfxbYDia2HE7lUU/Hrq?= =?us-ascii?Q?aBlSKUNgjPM/jM3b5gMtqqbzNhFruhXYWdrsHCCK+Jx8dzIX+y/e6O79r7gb?= =?us-ascii?Q?gvOiO63Gt9i6VoQ8qZ5ey4ODxqx3VWGknFAfsdefk5sY0ZSACXlNm9r8e+3j?= =?us-ascii?Q?18PJg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2468; 6:zI8gbT1zWA6dbQzIsftwFmDO2qwXyLNphcCf2ob15Zn8oPwGt0rLCyY6vifvrL307r+S0GOlZybB20LXNVVA7Tq13otMRE/98LLIkP4Mt+1TLnMzYhpjQzwPV8HLr6Tf1FoiMNliXf774mP1zGt3lqBDVSgzVx9nVukM+na1IiPCau0Jj8f7H6B2XeydKVSgSaALpxWpXSm7h450lGkBrgU4JJU2w+oXgUWVfNgOXxYbC2aCSL2eqibzRuFUCEycficgilSFpjUdbOzKYR9cTN2jgxJ4lzkxuFKh49rjMwiqkQ6k+sOwN9JG/SF5lXRml9J08elcNcPkQ0AylxvY0Z75pCKrr3adlZNX2GkBxjwwXpNeTmL49mnFYDVRYDS4i4C4ZfsfjUYGEm+AOEc5yWWNgwFvXaihidYtFeMVo56fPxU4o9EcwOjFHG5WOpkb; 5:tHitiK0GLTRmN3IGp/AV9ylhSjymxNScpqd2rApNm8pGl/hB03w0pSMnBPSEz9c3ch40dGuXX4J8QlI74y8flgp3E1I/Jba3WNLn0x+aKN0tBv+7wFeCM3UhLWKLujEJDFvlMZ6bDqo0+RJ+ukzNgp6iUxn0qEDGkgORIYqgUPCFTm+OPU3y0AXGwmwW+ZDJ; 24:b89WkLscf2gxpM6356e8sGfDSjom3DHBIzu1LSBvkVvpWtWlMdYiman/Ow9B9/FGcgiN8Q5TiFflrOxwnwmix77mVyjHwwGnxhW473+jUxE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2468; 7:zxUToTk+GEwilrZzSZpiBCIrmHiArhkFDOJ5/asfvokWPrhzi0hnnYSlFaOw3hKWrP4OPpWj+oBxHU0VubPKwMHcQBzP7SSJ4Vyb6tdxpoQGbkutKcuB/4M48aktDee6SgCbKZCuAtPd3d2i2NVA/JVqp/KFXsP1tKyQlyes3DEKsYs6KH5/vBfc59E6bdkNimhgqs8tyVDn+UlRBkPTabKTOnorqLDDtDvm7meXBWBq1q1A3gRQbG0phkvFvnHcE1X50HkoDrTIPIHNF+shBEvcM6uQMdTPoORfFwIyFzz6E4OMzTrspDk7Kr8do+YQVV+MEEctiVxrJRsD+NydD04rU0V11eUZE8FlWzBg//oCtIQw5KDoiaHt/eD+4MyZ+sdXZbWLFY2C5A4HNMbNc0U2+SdFfCswor8ahOM9bHJRX/8IYqVpurh7VKi8VSiYrOj6stjRWF7kU8x1MqFw3A== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2016 10:26:55.1703 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2468 Cc: Yuqing Zhu Subject: [PATCH 1/6] gstreamer1.0-plugins-bad: Support fb backend for gl plugins X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2016 10:27:01 -0000 Content-Type: text/plain 1. Add fb support in glimagesink 2. Override set_render_rectangle() to support resize Signed-off-by: Yuqing Zhu --- .../0002-Support-fb-backend-for-gl-plugins.patch | 781 +++++++++++++++++++++ .../gstreamer1.0-plugins-bad_1.10.%.bbappend | 1 + 2 files changed, 782 insertions(+) create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-Support-fb-backend-for-gl-plugins.patch diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-Support-fb-backend-for-gl-plugins.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-Support-fb-backend-for-gl-plugins.patch new file mode 100755 index 0000000..2dcce8d --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-Support-fb-backend-for-gl-plugins.patch @@ -0,0 +1,781 @@ +From d0179e89c294f775a7ebb6ccb0ad539433f3c22e Mon Sep 17 00:00:00 2001 +From: Haihua Hu +Date: Mon, 16 Nov 2015 17:41:57 +0800 +Subject: [PATCH 08/26] Support fb backend for gl plugins +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +1.Add fb support in glimagesink +2.override set_render_rectangle() to support resize + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu + +Conflicts: + configure.ac +--- + configure.ac | 25 ++- + gst-libs/gst/gl/Makefile.am | 5 + + gst-libs/gst/gl/fb/Makefile.am | 25 +++ + gst-libs/gst/gl/fb/gstgldisplay_fb.c | 109 +++++++++++++ + gst-libs/gst/gl/fb/gstgldisplay_fb.h | 67 ++++++++ + gst-libs/gst/gl/fb/gstglwindow_fb_egl.c | 265 ++++++++++++++++++++++++++++++++ + gst-libs/gst/gl/fb/gstglwindow_fb_egl.h | 65 ++++++++ + gst-libs/gst/gl/gstgldisplay.c | 11 ++ + gst-libs/gst/gl/gstgldisplay.h | 1 + + gst-libs/gst/gl/gstglwindow.c | 8 + + 11 files changed, 580 insertions(+), 1 deletions(-) + create mode 100644 gst-libs/gst/gl/fb/Makefile.am + create mode 100644 gst-libs/gst/gl/fb/gstgldisplay_fb.c + create mode 100644 gst-libs/gst/gl/fb/gstgldisplay_fb.h + create mode 100644 gst-libs/gst/gl/fb/gstglwindow_fb_egl.c + create mode 100644 gst-libs/gst/gl/fb/gstglwindow_fb_egl.h + +diff --git a/configure.ac b/configure.ac +index f135648..991e7d0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -700,6 +700,7 @@ HAVE_GL=no + HAVE_GLES2=no + HAVE_GLES3_H=no + HAVE_WAYLAND_EGL=no ++HAVE_FB_EGL=no + + HAVE_EGL_RPI=no + +@@ -737,6 +738,9 @@ case $host in + old_LIBS=$LIBS + old_CFLAGS=$CFLAGS + ++ dnl check fb backend for imx soc ++ AC_CHECK_LIB(EGL, fbGetDisplay, HAVE_FB_EGL=yes, HAVE_FB_EGL=no) ++ + dnl FIXME: Mali EGL depends on GLESv1 or GLESv2 + AC_CHECK_HEADER([EGL/fbdev_window.h], + [ +@@ -1043,6 +1047,16 @@ case $host in + fi + fi + ++ if test "x$HAVE_FB_EGL" = "xyes"; then ++ if test "x$NEED_EGL" = "xno" -o "x$HAVE_EGL" = "xno"; then ++ AC_MSG_WARN([EGL is required by the fb backend for OpenGL support]) ++ else ++ HAVE_WINDOW_FB=yes ++ GL_LIBS="$GL_LIBS" ++ GL_CFLAGS="$GL_CFLAGS" ++ fi ++ fi ++ + if test "x$HAVE_EGL_RPI" = "xyes"; then + if test "x$NEED_DISPMANX" != "xno"; then + HAVE_WINDOW_DISPMANX=yes +@@ -1057,7 +1071,7 @@ case $host in + fi + else + if test "x$NEED_EGL" != "xno"; then +- if test "x$HAVE_WINDOW_WAYLAND" = "xyes" -o "x$HAVE_WINDOW_X11" = "xyes" -o "x$HAVE_WINDOW_DISPMANX" = "xyes"; then ++ if test "x$HAVE_WINDOW_WAYLAND" = "xyes" -o "x$HAVE_WINDOW_X11" = "xyes" -o "x$HAVE_WINDOW_DISPMANX" = "xyes" -o "x$HAVE_WINDOW_FB" = "xyes"; then + GL_LIBS="$GL_LIBS -lEGL $EGL_LIBS" + GL_CFLAGS="$GL_CFLAGS $EGL_CFLAGS" + USE_EGL=yes +@@ -1209,6 +1223,7 @@ GST_GL_HAVE_WINDOW_WAYLAND=0 + GST_GL_HAVE_WINDOW_ANDROID=0 + GST_GL_HAVE_WINDOW_DISPMANX=0 + GST_GL_HAVE_WINDOW_EAGL=0 ++GST_GL_HAVE_WINDOW_FB=0 + + if test "x$HAVE_WINDOW_X11" = "xyes"; then + GL_WINDOWS="x11 $GL_WINDOWS" +@@ -1238,6 +1253,10 @@ if test "x$HAVE_WINDOW_EAGL" = "xyes"; then + GL_WINDOWS="eagl $GL_WINDOWS" + GST_GL_HAVE_WINDOW_EAGL=1 + fi ++if test "x$HAVE_WINDOW_FB" = "xyes"; then ++ GL_WINDOWS="fb $GL_WINDOWS" ++ GST_GL_HAVE_WINDOW_FB=1 ++fi + + GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES + #define GST_GL_HAVE_WINDOW_X11 $GST_GL_HAVE_WINDOW_X11 +@@ -1247,6 +1266,7 @@ GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES + #define GST_GL_HAVE_WINDOW_ANDROID $GST_GL_HAVE_WINDOW_ANDROID + #define GST_GL_HAVE_WINDOW_DISPMANX $GST_GL_HAVE_WINDOW_DISPMANX + #define GST_GL_HAVE_WINDOW_EAGL $GST_GL_HAVE_WINDOW_EAGL ++#define GST_GL_HAVE_WINDOW_FB $GST_GL_HAVE_WINDOW_FB + " + + dnl PLATFORM's +@@ -1322,6 +1342,7 @@ if test "x$GL_APIS" = "x" -o "x$GL_PLATFORMS" = "x" -o "x$GL_WINDOWS" = "x"; the + HAVE_WINDOW_ANDROID=no + HAVE_WINDOW_COCOA=no + HAVE_WINDOW_EAGL=no ++ HAVE_WINDOW_FB=no + fi + + AC_SUBST(GL_LIBS) +@@ -1337,6 +1358,7 @@ AM_CONDITIONAL(HAVE_WINDOW_DISPMANX, test "x$HAVE_WINDOW_DISPMANX" = "xyes") + AM_CONDITIONAL(HAVE_WINDOW_WAYLAND, test "x$HAVE_WINDOW_WAYLAND" = "xyes") + AM_CONDITIONAL(HAVE_WINDOW_ANDROID, test "x$HAVE_WINDOW_ANDROID" = "xyes") + AM_CONDITIONAL(HAVE_WINDOW_EAGL, test "x$HAVE_WINDOW_EAGL" = "xyes") ++AM_CONDITIONAL(HAVE_WINDOW_FB, test "x$HAVE_WINDOW_FB" = "xyes") + + AM_CONDITIONAL(USE_OPENGL, test "x$USE_OPENGL" = "xyes") + AM_CONDITIONAL(USE_GLES2, test "x$USE_GLES2" = "xyes") +@@ -3700,6 +3722,7 @@ gst-libs/gst/gl/egl/Makefile + gst-libs/gst/gl/wayland/Makefile + gst-libs/gst/gl/win32/Makefile + gst-libs/gst/gl/x11/Makefile ++gst-libs/gst/gl/fb/Makefile + gst-libs/gst/insertbin/Makefile + gst-libs/gst/interfaces/Makefile + gst-libs/gst/codecparsers/Makefile +diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am +index 5ceb622..01498e0 100644 +--- a/gst-libs/gst/gl/Makefile.am ++++ b/gst-libs/gst/gl/Makefile.am +@@ -119,6 +119,11 @@ SUBDIRS += eagl + libgstgl_@GST_API_VERSION@_la_LIBADD += eagl/libgstgl-eagl.la + endif + ++if HAVE_WINDOW_FB ++SUBDIRS += fb ++libgstgl_@GST_API_VERSION@_la_LIBADD += fb/libgstgl-fb.la ++endif ++ + if USE_EGL + SUBDIRS += egl + libgstgl_@GST_API_VERSION@_la_LIBADD += egl/libgstgl-egl.la +diff --git a/gst-libs/gst/gl/fb/Makefile.am b/gst-libs/gst/gl/fb/Makefile.am +new file mode 100644 +index 0000000..8e4656c +--- /dev/null ++++ b/gst-libs/gst/gl/fb/Makefile.am +@@ -0,0 +1,25 @@ ++## Process this file with automake to produce Makefile.in ++ ++noinst_LTLIBRARIES = libgstgl-fb.la ++ ++libgstgl_fb_la_SOURCES = \ ++ gstgldisplay_fb.c \ ++ gstglwindow_fb_egl.c ++ ++noinst_HEADERS = \ ++ gstgldisplay_fb.h \ ++ gstglwindow_fb_egl.h ++ ++libgstgl_fbincludedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl/fb ++ ++libgstgl_fb_la_CFLAGS = \ ++ -I$(top_srcdir)/gst-libs \ ++ -I$(top_builddir)/gst-libs \ ++ $(GL_CFLAGS) \ ++ $(GST_PLUGINS_BASE_CFLAGS) \ ++ $(GST_BASE_CFLAGS) \ ++ $(GST_CFLAGS) ++ ++libgstgl_fb_la_LDFLAGS = \ ++ $(GST_LIB_LDFLAGS) \ ++ $(GST_ALL_LDFLAGS) +diff --git a/gst-libs/gst/gl/fb/gstgldisplay_fb.c b/gst-libs/gst/gl/fb/gstgldisplay_fb.c +new file mode 100644 +index 0000000..3be9756 +--- /dev/null ++++ b/gst-libs/gst/gl/fb/gstgldisplay_fb.c +@@ -0,0 +1,109 @@ ++/* ++ * GStreamer ++ * Copyright (C) 2014 Matthew Waters ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ ++#include ++ ++GST_DEBUG_CATEGORY_STATIC (gst_gl_display_debug); ++#define GST_CAT_DEFAULT gst_gl_display_debug ++ ++G_DEFINE_TYPE (GstGLDisplayFB, gst_gl_display_fb, GST_TYPE_GL_DISPLAY); ++ ++static void gst_gl_display_fb_finalize (GObject * object); ++static guintptr gst_gl_display_fb_get_handle (GstGLDisplay * display); ++ ++static void ++gst_gl_display_fb_class_init (GstGLDisplayFBClass * klass) ++{ ++ GST_GL_DISPLAY_CLASS (klass)->get_handle = ++ GST_DEBUG_FUNCPTR (gst_gl_display_fb_get_handle); ++ ++ G_OBJECT_CLASS (klass)->finalize = gst_gl_display_fb_finalize; ++} ++ ++static void ++gst_gl_display_fb_init (GstGLDisplayFB * display_fb) ++{ ++ GstGLDisplay *display = (GstGLDisplay *) display_fb; ++ ++ display->type = GST_GL_DISPLAY_TYPE_FB; ++ display_fb->name = NULL; ++ display_fb->disp_idx = 0; ++ display_fb->display = NULL; ++} ++ ++static void ++gst_gl_display_fb_finalize (GObject * object) ++{ ++ GstGLDisplayFB *display_fb = GST_GL_DISPLAY_FB (object); ++ ++ if (display_fb->name) ++ g_free (display_fb->name); ++ ++ if (display_fb->display) ++ fbDestroyDisplay (display_fb->display); ++ ++ G_OBJECT_CLASS (gst_gl_display_fb_parent_class)->finalize (object); ++} ++ ++/** ++ * gst_gl_display_fb_new: ++ * @name: (allow-none): a display name ++ * ++ * Create a new #GstGLDisplayFB from the x11 display name. See XOpenDisplay() ++ * for details on what is a valid name. ++ * ++ * Returns: (transfer full): a new #GstGLDisplayFB or %NULL ++ */ ++GstGLDisplayFB * ++gst_gl_display_fb_new (gchar *name) ++{ ++ GstGLDisplayFB *display; ++ const gchar *fb_name = NULL; ++ ++ GST_DEBUG_CATEGORY_GET (gst_gl_display_debug, "gldisplay"); ++ GST_DEBUG ("creating Fb EGL display"); ++ ++ fb_name = name; ++ if (!fb_name) fb_name = "fb0"; ++ ++ display = g_object_new (GST_TYPE_GL_DISPLAY_FB, NULL); ++ display->name = g_strdup (fb_name); ++ sscanf (display->name, "fb%d", &display->disp_idx); ++ display->display = fbGetDisplayByIndex (display->disp_idx); ++ if (!display->display) { ++ GST_ERROR ("Failed to open FB display, \'%s\'", fb_name); ++ return NULL; ++ } ++ ++ GST_DEBUG ("Created fb EGL display %d", display->display); ++ ++ return display; ++} ++ ++static guintptr ++gst_gl_display_fb_get_handle (GstGLDisplay * display) ++{ ++ GST_DEBUG ("Get fb EGL display %d", GST_GL_DISPLAY_FB (display)->display); ++ return (guintptr) GST_GL_DISPLAY_FB (display)->display; ++} +diff --git a/gst-libs/gst/gl/fb/gstgldisplay_fb.h b/gst-libs/gst/gl/fb/gstgldisplay_fb.h +new file mode 100644 +index 0000000..62987c1 +--- /dev/null ++++ b/gst-libs/gst/gl/fb/gstgldisplay_fb.h +@@ -0,0 +1,67 @@ ++/* ++ * GStreamer ++ * Copyright (C) 2014 Matthew Waters ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ */ ++ ++#ifndef __GST_GL_DISPLAY_FB_H__ ++#define __GST_GL_DISPLAY_FB_H__ ++ ++#include ++#include ++#include ++ ++G_BEGIN_DECLS ++ ++GType gst_gl_display_fb_get_type (void); ++ ++#define GST_TYPE_GL_DISPLAY_FB (gst_gl_display_fb_get_type()) ++#define GST_GL_DISPLAY_FB(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_DISPLAY_FB,GstGLDisplayFB)) ++#define GST_GL_DISPLAY_FB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_GL_DISPLAY_FB,GstGLDisplayFBClass)) ++#define GST_IS_GL_DISPLAY_FB(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_DISPLAY_FB)) ++#define GST_IS_GL_DISPLAY_FB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_GL_DISPLAY_FB)) ++#define GST_GL_DISPLAY_FB_CAST(obj) ((GstGLDisplayFB*)(obj)) ++ ++typedef struct _GstGLDisplayFB GstGLDisplayFB; ++typedef struct _GstGLDisplayFBClass GstGLDisplayFBClass; ++ ++/** ++ * GstGLDisplayFB: ++ * ++ * the contents of a #GstGLDisplayFB are private and should only be accessed ++ * through the provided API ++ */ ++struct _GstGLDisplayFB ++{ ++ GstGLDisplay parent; ++ ++ /* */ ++ gchar *name; ++ gint disp_idx; ++ EGLNativeDisplayType display; ++}; ++ ++struct _GstGLDisplayFBClass ++{ ++ GstGLDisplayClass object_class; ++}; ++ ++GstGLDisplayFB *gst_gl_display_fb_new (gchar *name); ++ ++G_END_DECLS ++ ++#endif /* __GST_GL_DISPLAY_FB_H__ */ +diff --git a/gst-libs/gst/gl/fb/gstglwindow_fb_egl.c b/gst-libs/gst/gl/fb/gstglwindow_fb_egl.c +new file mode 100644 +index 0000000..a068e30 +--- /dev/null ++++ b/gst-libs/gst/gl/fb/gstglwindow_fb_egl.c +@@ -0,0 +1,265 @@ ++/* ++ * GStreamer ++ * Copyright (C) 2008 Julien Isorce ++ * Copyright (C) 2012 Matthew Waters ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ */ ++ ++#include "../gstgl_fwd.h" ++#include ++ ++#include "gstglwindow_fb_egl.h" ++ ++#define GST_CAT_DEFAULT gst_gl_window_debug ++ ++#define gst_gl_window_fb_egl_parent_class parent_class ++G_DEFINE_TYPE (GstGLWindowFbEGL, gst_gl_window_fb_egl, ++ GST_GL_TYPE_WINDOW); ++ ++static guintptr gst_gl_window_fb_egl_get_window_handle (GstGLWindow * ++ window); ++static void gst_gl_window_fb_egl_set_window_handle (GstGLWindow * window, ++ guintptr handle); ++static void gst_gl_window_fb_egl_draw (GstGLWindow * window); ++static void gst_gl_window_fb_egl_close (GstGLWindow * window); ++static gboolean gst_gl_window_fb_egl_open (GstGLWindow * window, ++ GError ** error); ++static gboolean ++gst_gl_window_fb_egl_set_render_rectangle(GstGLWindow * window, ++ guint x, guint y, guint width, guint height); ++ ++static void ++gst_gl_window_fb_egl_class_init (GstGLWindowFbEGLClass * klass) ++{ ++ GstGLWindowClass *window_class = (GstGLWindowClass *) klass; ++ ++ window_class->get_window_handle = ++ GST_DEBUG_FUNCPTR (gst_gl_window_fb_egl_get_window_handle); ++ window_class->set_window_handle = ++ GST_DEBUG_FUNCPTR (gst_gl_window_fb_egl_set_window_handle); ++ window_class->draw = GST_DEBUG_FUNCPTR (gst_gl_window_fb_egl_draw); ++ window_class->close = GST_DEBUG_FUNCPTR (gst_gl_window_fb_egl_close); ++ window_class->open = GST_DEBUG_FUNCPTR (gst_gl_window_fb_egl_open); ++ window_class->set_render_rectangle = ++ GST_DEBUG_FUNCPTR (gst_gl_window_fb_egl_set_render_rectangle); ++} ++ ++static void ++gst_gl_window_fb_egl_init (GstGLWindowFbEGL * window) ++{ ++ GstGLWindowFbEGL *window_egl; ++ ++ window_egl = GST_GL_WINDOW_FB_EGL (window); ++ ++ window_egl->width = 0; ++ window_egl->height = 0; ++ window_egl->default_fullscreen = TRUE; ++ window_egl->display = 0; ++} ++ ++/* Must be called in the gl thread */ ++GstGLWindowFbEGL * ++gst_gl_window_fb_egl_new (GstGLDisplay * display) ++{ ++ GstGLWindowFbEGL *window; ++ const gchar *fb_name = NULL; ++ ++ if (!display) ++ return NULL; ++ ++ window = g_object_new (GST_GL_TYPE_WINDOW_FB_EGL, NULL); ++ window->display = gst_gl_display_get_handle (display); ++ if (!window->display) { ++ GST_ERROR ("failed to get display for egl window"); ++ return NULL; ++ } ++ ++ return window; ++} ++ ++static void ++gst_gl_window_fb_egl_close (GstGLWindow * window) ++{ ++ GstGLWindowFbEGL *window_egl; ++ ++ window_egl = GST_GL_WINDOW_FB_EGL (window); ++ ++ if (window_egl->win_id) { ++ fbDestroyWindow (window_egl->win_id); ++ } ++ ++ GST_GL_WINDOW_CLASS (parent_class)->close (window); ++} ++ ++static gboolean ++gst_gl_window_fb_egl_open (GstGLWindow * window, GError ** error) ++{ ++ GstGLWindowFbEGL *window_egl; ++ ++ window_egl = GST_GL_WINDOW_FB_EGL (window); ++ ++ if (!window_egl->display) { ++ GST_ERROR ("No display for window_egl."); ++ return FALSE; ++ } ++ ++ window_egl->win_id = fbCreateWindow (window_egl->display, -1, -1, 0, 0); ++ if (!window_egl->win_id) { ++ GST_ERROR ("Failed to create window_egl"); ++ return FALSE; ++ } ++ ++ fbGetDisplayGeometry (window_egl->display, &window_egl->width, &window_egl->height); ++ window_egl->req_width = window_egl->width; ++ window_egl->req_height = window_egl->height; ++ GST_DEBUG ("Open FB display succesfully, resolution is (%dx%d),display %d, window %d.", ++ window_egl->width, window_egl->height, window_egl->display, window_egl->win_id); ++ ++ if (!GST_GL_WINDOW_CLASS (parent_class)->open (window, error)) ++ return FALSE; ++ ++ return TRUE; ++} ++static guintptr ++gst_gl_window_fb_egl_get_window_handle (GstGLWindow * window) ++{ ++ GST_DEBUG ("fb egl get window: %d", GST_GL_WINDOW_FB_EGL (window)->win_id); ++ return (guintptr) GST_GL_WINDOW_FB_EGL (window)->win_id; ++} ++ ++static void ++gst_gl_window_fb_egl_set_window_handle (GstGLWindow * window, ++ guintptr handle) ++{ ++} ++ ++static void ++draw_cb (gpointer data) ++{ ++ GstGLWindowFbEGL *window_egl = (GstGLWindowFbEGL *)data; ++ GstGLWindow *window = GST_GL_WINDOW (window_egl); ++ GstGLContext *context = gst_gl_window_get_context (window); ++ GstGLContextClass *context_class = GST_GL_CONTEXT_GET_CLASS (context); ++ ++ /* default full screen */ ++ if (window_egl->default_fullscreen && window->resize) { ++ window->resize (window->resize_data, window_egl->width, window_egl->height); ++ window_egl->default_fullscreen = FALSE; ++ } ++ ++ if (window->draw) ++ window->draw (window->draw_data); ++ ++ GST_DEBUG ("####### draw data"); ++ context_class->swap_buffers (context); ++ ++ gst_object_unref (context); ++} ++ ++static void ++gst_gl_window_fb_egl_draw (GstGLWindow * window) ++{ ++ gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, window); ++} ++ ++static gboolean ++_calculate_viewport_coordinates(GstVideoRectangle *req, GstVideoRectangle *result, ++ guint display_width, guint display_height) ++{ ++ if(!req || !result || req->w < 1 || req->h < 1) ++ return FALSE; ++ ++ result->x = req->x; ++ result->y = display_height - (req->y + req->h); ++ result->w = req->w; ++ result->h = req->h; ++ ++ return TRUE; ++} ++ ++struct SetRenderRectangle ++{ ++ GstGLWindowFbEGL *window_egl; ++ GstVideoRectangle rect; ++}; ++ ++static void ++_free_set_render_rectangle (struct SetRenderRectangle *render) ++{ ++ if (render) { ++ if (render->window_egl) ++ gst_object_unref (render->window_egl); ++ g_free (render); ++ } ++} ++ ++static void ++_set_render_rectangle (gpointer data) ++{ ++ const GstGLFuncs *gl; ++ GstGLContext *context; ++ GstVideoRectangle result, video_rect, tmp_res; ++ struct SetRenderRectangle *render = data; ++ GstGLWindow *window = GST_GL_WINDOW (render->window_egl); ++ ++ context = gst_gl_window_get_context(window); ++ gl = context->gl_vtable; ++ ++ GST_LOG_OBJECT (render->window_egl, "setting render rectangle %i,%i+%ix%i", ++ render->rect.x, render->rect.y, render->rect.w, render->rect.h); ++ ++ video_rect.x = render->rect.x; ++ video_rect.y = render->rect.y; ++ video_rect.w = GST_VIDEO_SINK_WIDTH(window->resize_data); ++ video_rect.h = GST_VIDEO_SINK_HEIGHT(window->resize_data); ++ ++ gst_video_sink_center_rect(video_rect, render->rect, &tmp_res, TRUE); ++ ++ GST_LOG_OBJECT (render->window_egl, "set center render rectangle %i,%i+%ix%i", ++ tmp_res.x, tmp_res.y, tmp_res.w, tmp_res.h); ++ ++ /* need to transform screen coordinate to viewport coordinate */ ++ if( _calculate_viewport_coordinates(&tmp_res, &result, ++ render->window_egl->width, render->window_egl->height)){ ++ GST_LOG_OBJECT (render->window_egl, "viewport render rectangle %i,%i+%ix%i", ++ result.x, result.y, result.w, result.h); ++ gl->Viewport(result.x, result.y, result.w, result.h); ++ } ++ ++ if(context) ++ gst_object_unref(context); ++} ++ ++static gboolean ++gst_gl_window_fb_egl_set_render_rectangle(GstGLWindow * window, ++ guint x, guint y, guint width, guint height) ++{ ++ GstGLWindowFbEGL *window_egl = GST_GL_WINDOW_FB_EGL (window); ++ struct SetRenderRectangle *render; ++ ++ render = g_new0 (struct SetRenderRectangle, 1); ++ render->window_egl = gst_object_ref (window_egl); ++ render->rect.x = x; ++ render->rect.y = y; ++ render->rect.w = width; ++ render->rect.h = height; ++ ++ gst_gl_window_send_message_async (window, ++ (GstGLWindowCB) _set_render_rectangle, render, ++ (GDestroyNotify) _free_set_render_rectangle); ++ return TRUE; ++} +diff --git a/gst-libs/gst/gl/fb/gstglwindow_fb_egl.h b/gst-libs/gst/gl/fb/gstglwindow_fb_egl.h +new file mode 100644 +index 0000000..216e421 +--- /dev/null ++++ b/gst-libs/gst/gl/fb/gstglwindow_fb_egl.h +@@ -0,0 +1,65 @@ ++/* ++ * GStreamer ++ * Copyright (C) 2012 Matthew Waters ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ */ ++ ++#ifndef __GST_GL_WINDOW_FB_EGL_H__ ++#define __GST_GL_WINDOW_FB_EGL_H__ ++ ++#include ++#include "EGL/eglplatform.h" ++ ++G_BEGIN_DECLS ++ ++#define GST_GL_TYPE_WINDOW_FB_EGL (gst_gl_window_fb_egl_get_type()) ++#define GST_GL_WINDOW_FB_EGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_WINDOW_FB_EGL, GstGLWindowFbEGL)) ++#define GST_GL_WINDOW_FB_EGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_WINDOW_FB_EGL, GstGLWindowFbEGLClass)) ++#define GST_GL_IS_WINDOW_FB_EGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_WINDOW_FB_EGL)) ++#define GST_GL_IS_WINDOW_FB_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_WINDOW_FB_EGL)) ++#define GST_GL_WINDOW_FB_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WINDOW_FB_EGL, GstGLWindowFbEGL_Class)) ++ ++typedef struct _GstGLWindowFbEGL GstGLWindowFbEGL; ++typedef struct _GstGLWindowFbEGLClass GstGLWindowFbEGLClass; ++ ++struct _GstGLWindowFbEGL { ++ /*< private >*/ ++ GstGLWindow parent; ++ ++ /* */ ++ gint width, req_width; ++ gint height, req_height; ++ gboolean default_fullscreen; ++ EGLNativeDisplayType display; ++ EGLNativeWindowType win_id; ++}; ++ ++struct _GstGLWindowFbEGLClass { ++ /*< private >*/ ++ GstGLWindowClass parent_class; ++ ++ /*< private >*/ ++ gpointer _reserved[GST_PADDING]; ++}; ++ ++GType gst_gl_window_fb_egl_get_type (void); ++ ++GstGLWindowFbEGL * gst_gl_window_fb_egl_new (GstGLDisplay * display); ++ ++G_END_DECLS ++ ++#endif /* __GST_GL_WINDOW_FB_EGL_H__ */ +diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c +index 3ffc906..7b0b5bf 100644 +--- a/gst-libs/gst/gl/gstgldisplay.c ++++ b/gst-libs/gst/gl/gstgldisplay.c +@@ -70,6 +70,9 @@ + #include + #include + #endif ++#if GST_GL_HAVE_WINDOW_FB ++#include ++#endif + + GST_DEBUG_CATEGORY_STATIC (gst_context); + GST_DEBUG_CATEGORY_STATIC (gst_gl_display_debug); +@@ -207,6 +210,14 @@ gst_gl_display_new (void) + if (!display && (!user_choice || g_strstr_len (user_choice, 7, "wayland"))) + display = GST_GL_DISPLAY (gst_gl_display_wayland_new (NULL)); + #endif ++#if GST_GL_HAVE_WINDOW_FB ++ if (!display && (!user_choice || g_strstr_len (user_choice, 2, "fb"))) { ++ const gchar *fb_name = NULL; ++ fb_name = g_getenv ("GST_GL_FB"); ++ if (!fb_name) fb_name = "fb0"; ++ display = GST_GL_DISPLAY (gst_gl_display_fb_new (fb_name)); ++ } ++#endif + #if GST_GL_HAVE_PLATFORM_EGL + if (!display && (!platform_choice + || g_strstr_len (platform_choice, 3, "egl"))) +diff --git a/gst-libs/gst/gl/gstgldisplay.h b/gst-libs/gst/gl/gstgldisplay.h +index a02e904..2f896bb 100644 +--- a/gst-libs/gst/gl/gstgldisplay.h ++++ b/gst-libs/gst/gl/gstgldisplay.h +@@ -61,6 +61,7 @@ typedef enum + GST_GL_DISPLAY_TYPE_WIN32 = (1 << 3), + GST_GL_DISPLAY_TYPE_DISPMANX = (1 << 4), + GST_GL_DISPLAY_TYPE_EGL = (1 << 5), ++ GST_GL_DISPLAY_TYPE_FB = (1 << 6), + + GST_GL_DISPLAY_TYPE_ANY = G_MAXUINT32 + } GstGLDisplayType; +diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c +index 0588f1d..834d927 100644 +--- a/gst-libs/gst/gl/gstglwindow.c ++++ b/gst-libs/gst/gl/gstglwindow.c +@@ -58,6 +58,9 @@ + #if GST_GL_HAVE_WINDOW_EAGL + #include "eagl/gstglwindow_eagl.h" + #endif ++#if GST_GL_HAVE_WINDOW_FB ++#include "fb/gstglwindow_fb_egl.h" ++#endif + #if GST_GL_HAVE_WINDOW_DISPMANX + #include "dispmanx/gstglwindow_dispmanx_egl.h" + #endif +@@ -308,6 +311,11 @@ gst_gl_window_new (GstGLDisplay * display) + if (!window && (!user_choice || g_strstr_len (user_choice, 4, "eagl"))) + window = GST_GL_WINDOW (gst_gl_window_eagl_new (display)); + #endif ++#if GST_GL_HAVE_WINDOW_FB ++ if (!window && (!user_choice || g_strstr_len (user_choice, 2, "fb"))) ++ window = GST_GL_WINDOW (gst_gl_window_fb_egl_new (display)); ++#endif ++ + if (!window) { + /* subclass returned a NULL window */ + GST_WARNING ("Could not create window. user specified %s, creating dummy" +-- +1.9.1 + diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.%.bbappend index e9f0cc3..fddeb3f 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.%.bbappend +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.%.bbappend @@ -9,6 +9,7 @@ PACKAGECONFIG_GL_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' SRC_URI_append_imxgpu2d = " \ file://0001-glplugin-Change-wayland-default-res-to-1024x768.patch \ + file://0002-Support-fb-backend-for-gl-plugins.patch \ " -- 1.9.1