102f4aeb0Sopenharmony_ciName 202f4aeb0Sopenharmony_ci 302f4aeb0Sopenharmony_ci KHR_stream 402f4aeb0Sopenharmony_ci KHR_stream_attrib 502f4aeb0Sopenharmony_ci 602f4aeb0Sopenharmony_ciName Strings 702f4aeb0Sopenharmony_ci 802f4aeb0Sopenharmony_ci EGL_KHR_stream 902f4aeb0Sopenharmony_ci EGL_KHR_stream_attrib 1002f4aeb0Sopenharmony_ci 1102f4aeb0Sopenharmony_ciContributors 1202f4aeb0Sopenharmony_ci 1302f4aeb0Sopenharmony_ci Marcus Lorentzon 1402f4aeb0Sopenharmony_ci Acorn Pooley 1502f4aeb0Sopenharmony_ci Robert Palmer 1602f4aeb0Sopenharmony_ci Greg Prisament 1702f4aeb0Sopenharmony_ci Daniel Kartch 1802f4aeb0Sopenharmony_ci Miguel A. Vico Moya 1902f4aeb0Sopenharmony_ci 2002f4aeb0Sopenharmony_ciContacts 2102f4aeb0Sopenharmony_ci 2202f4aeb0Sopenharmony_ci Acorn Pooley, NVIDIA (apooley 'at' nvidia.com) 2302f4aeb0Sopenharmony_ci Marcus Lorentzon, ST-Ericsson AB (marcus.xm.lorentzon 'at' stericsson.com) 2402f4aeb0Sopenharmony_ci Daniel Kartch, NVIDIA (dkartch 'at' nvidia.com) 2502f4aeb0Sopenharmony_ci 2602f4aeb0Sopenharmony_ciNotice 2702f4aeb0Sopenharmony_ci 2802f4aeb0Sopenharmony_ci Copyright (c) 2009-2016 The Khronos Group Inc. Copyright terms at 2902f4aeb0Sopenharmony_ci http://www.khronos.org/registry/speccopyright.html 3002f4aeb0Sopenharmony_ci 3102f4aeb0Sopenharmony_ciStatus 3202f4aeb0Sopenharmony_ci 3302f4aeb0Sopenharmony_ci Complete. 3402f4aeb0Sopenharmony_ci Approved by the Khronos Board of Promoters on December 2, 2011. 3502f4aeb0Sopenharmony_ci 3602f4aeb0Sopenharmony_ciVersion 3702f4aeb0Sopenharmony_ci 3802f4aeb0Sopenharmony_ci Version 27 - May 23, 2016 3902f4aeb0Sopenharmony_ci 4002f4aeb0Sopenharmony_ciNumber 4102f4aeb0Sopenharmony_ci 4202f4aeb0Sopenharmony_ci EGL Extension #32 4302f4aeb0Sopenharmony_ci 4402f4aeb0Sopenharmony_ciDependencies 4502f4aeb0Sopenharmony_ci 4602f4aeb0Sopenharmony_ci EGL_KHR_stream requires EGL 1.2. 4702f4aeb0Sopenharmony_ci 4802f4aeb0Sopenharmony_ci EGL_KHR_stream_attrib requires EGL_KHR_stream and EGL 1.5. 4902f4aeb0Sopenharmony_ci 5002f4aeb0Sopenharmony_ci EGL_KHR_stream_attrib interacts with 5102f4aeb0Sopenharmony_ci EGL_KHR_stream_consumer_gltexture. 5202f4aeb0Sopenharmony_ci 5302f4aeb0Sopenharmony_ci This extension is written based on the wording of the EGL 1.2 5402f4aeb0Sopenharmony_ci specification. 5502f4aeb0Sopenharmony_ci 5602f4aeb0Sopenharmony_ciOverview 5702f4aeb0Sopenharmony_ci 5802f4aeb0Sopenharmony_ci This extension defines a new object, the EGLStream, that can be 5902f4aeb0Sopenharmony_ci used to efficiently transfer a sequence of image frames from one 6002f4aeb0Sopenharmony_ci API to another. The EGLStream has mechanisms that can help keep 6102f4aeb0Sopenharmony_ci audio data synchronized to video data. 6202f4aeb0Sopenharmony_ci 6302f4aeb0Sopenharmony_ci Each EGLStream is associated with a "producer" that generates 6402f4aeb0Sopenharmony_ci image frames and inserts them into the EGLStream. The producer is 6502f4aeb0Sopenharmony_ci responsible for inserting each image frame into the EGLStream at 6602f4aeb0Sopenharmony_ci the correct time so that the consumer can display the image frame 6702f4aeb0Sopenharmony_ci for the appropriate period of time. 6802f4aeb0Sopenharmony_ci 6902f4aeb0Sopenharmony_ci Each EGLStream is also associated with a "consumer" that 7002f4aeb0Sopenharmony_ci retrieves image frames from the EGLStream. The consumer is 7102f4aeb0Sopenharmony_ci responsible for noticing that an image frame is available and 7202f4aeb0Sopenharmony_ci displaying it (or otherwise consuming it). The consumer is also 7302f4aeb0Sopenharmony_ci responsible for indicating the latency when that is possible (the 7402f4aeb0Sopenharmony_ci latency is the time that elapses between the time it is retrieved 7502f4aeb0Sopenharmony_ci from the EGLStream until the time it is displayed to the user). 7602f4aeb0Sopenharmony_ci 7702f4aeb0Sopenharmony_ci Some APIs are stream oriented (examples: OpenMAX IL, OpenMAX AL). 7802f4aeb0Sopenharmony_ci These APIs may be connected directly to an EGLStream as a producer 7902f4aeb0Sopenharmony_ci or consumer. Once a stream oriented producer is "connected" to an 8002f4aeb0Sopenharmony_ci EGLStream and "started" it may insert image frames into the 8102f4aeb0Sopenharmony_ci EGLStream automatically with no further interaction from the 8202f4aeb0Sopenharmony_ci application. Likewise, once a stream oriented consumer is 8302f4aeb0Sopenharmony_ci "connected" to an EGLStream and "started" it may retrieve image 8402f4aeb0Sopenharmony_ci frames from the EGLStream automatically with no further interaction 8502f4aeb0Sopenharmony_ci from the application. 8602f4aeb0Sopenharmony_ci 8702f4aeb0Sopenharmony_ci Some APIs are rendering oriented and require interaction with the 8802f4aeb0Sopenharmony_ci application during the rendering of each frame (examples: OpenGL, 8902f4aeb0Sopenharmony_ci OpenGL ES, OpenVG). These APIs will not automatically insert or 9002f4aeb0Sopenharmony_ci retrieve image frames into/from the EGLStream. Instead the 9102f4aeb0Sopenharmony_ci application must take explicit action to cause a rendering 9202f4aeb0Sopenharmony_ci oriented producer to insert an image frame or to cause a rendering 9302f4aeb0Sopenharmony_ci oriented consumer to retrieve an image frame. 9402f4aeb0Sopenharmony_ci 9502f4aeb0Sopenharmony_ci The EGLStream conceptually operates as a mailbox. When the 9602f4aeb0Sopenharmony_ci producer has a new image frame it empties the mailbox (discards 9702f4aeb0Sopenharmony_ci the old contents) and inserts the new image frame into the 9802f4aeb0Sopenharmony_ci mailbox. The consumer retrieves the image frame from the mailbox 9902f4aeb0Sopenharmony_ci and examines it. When the consumer is finished examining the 10002f4aeb0Sopenharmony_ci image frame it is either placed back in the mailbox (if the 10102f4aeb0Sopenharmony_ci mailbox is empty) or discarded (if the mailbox is not empty). 10202f4aeb0Sopenharmony_ci 10302f4aeb0Sopenharmony_ci Timing is mainly controlled by the producer. The consumer 10402f4aeb0Sopenharmony_ci operated with a fixed latency that it indicates to the producer 10502f4aeb0Sopenharmony_ci through the EGL_CONSUMER_LATENCY_USEC_KHR attribute. The consumer 10602f4aeb0Sopenharmony_ci is expected to notice when a new image frame is available in the 10702f4aeb0Sopenharmony_ci EGLStream, retrieve it, and display it to the user in the time 10802f4aeb0Sopenharmony_ci indicated by EGL_CONSUMER_LATENCY_USEC_KHR. The producer controls 10902f4aeb0Sopenharmony_ci when the image frame will be displayed by inserting it into the 11002f4aeb0Sopenharmony_ci stream at time 11102f4aeb0Sopenharmony_ci T - EGL_CONSUMER_LATENCY_USEC_KHR 11202f4aeb0Sopenharmony_ci where T is the time that the image frame is intended to appear to 11302f4aeb0Sopenharmony_ci the user. 11402f4aeb0Sopenharmony_ci 11502f4aeb0Sopenharmony_ci This extension does not cover the details of how a producer or a 11602f4aeb0Sopenharmony_ci consumer works or is "connected" to an EGLStream. Different kinds 11702f4aeb0Sopenharmony_ci of producers and consumers work differently and are described in 11802f4aeb0Sopenharmony_ci additional extension specifications. (Examples of producer 11902f4aeb0Sopenharmony_ci specifications: 12002f4aeb0Sopenharmony_ci EGL_KHR_stream_producer_eglsurface 12102f4aeb0Sopenharmony_ci EGL_KHR_stream_producer_aldatalocator 12202f4aeb0Sopenharmony_ci OpenMAX_AL_EGLStream_DataLocator 12302f4aeb0Sopenharmony_ci Example of consumer extension specification: 12402f4aeb0Sopenharmony_ci EGL_KHR_stream_consumer_gltexture 12502f4aeb0Sopenharmony_ci ) 12602f4aeb0Sopenharmony_ci 12702f4aeb0Sopenharmony_ci 12802f4aeb0Sopenharmony_ciGlossary 12902f4aeb0Sopenharmony_ci 13002f4aeb0Sopenharmony_ci EGLStream 13102f4aeb0Sopenharmony_ci An EGL object that transfers a sequence of image frames from one 13202f4aeb0Sopenharmony_ci API to another (e.g. video frames from OpenMAX AL to OpenGL ES). 13302f4aeb0Sopenharmony_ci 13402f4aeb0Sopenharmony_ci Image frame 13502f4aeb0Sopenharmony_ci A single image in a sequence of images. The sequence may be 13602f4aeb0Sopenharmony_ci frames of video data decoded from a video file, images output by a 13702f4aeb0Sopenharmony_ci camera sensor, surfaces rendered using OpenGL ES commands, or 13802f4aeb0Sopenharmony_ci generated in some other manner. An image frame has a period of 13902f4aeb0Sopenharmony_ci time during which it is intended to be displayed on the screen 14002f4aeb0Sopenharmony_ci (starting with the "Image Frame Display Time" and ending with the 14102f4aeb0Sopenharmony_ci "Image Frame Display Time" of the next image frame in the 14202f4aeb0Sopenharmony_ci sequence). 14302f4aeb0Sopenharmony_ci 14402f4aeb0Sopenharmony_ci Image Frame Insertion Time 14502f4aeb0Sopenharmony_ci The point in time when the producer inserts the image frame into 14602f4aeb0Sopenharmony_ci the EGLStream. This is the "Image Frame Intended Display Time" 14702f4aeb0Sopenharmony_ci minus the "Consumer Latency". 14802f4aeb0Sopenharmony_ci 14902f4aeb0Sopenharmony_ci Image Frame Intended Display Time 15002f4aeb0Sopenharmony_ci The point in time when the user should first see the image frame 15102f4aeb0Sopenharmony_ci on the display screen. 15202f4aeb0Sopenharmony_ci 15302f4aeb0Sopenharmony_ci Image Frame Actual Display Time 15402f4aeb0Sopenharmony_ci The point in time when the user actually first sees the image frame 15502f4aeb0Sopenharmony_ci on the display screen. 15602f4aeb0Sopenharmony_ci 15702f4aeb0Sopenharmony_ci Consumer Latency 15802f4aeb0Sopenharmony_ci The elapsed time between an image frame's "Image Frame Insertion 15902f4aeb0Sopenharmony_ci Time" and its "Image Frame Actual Display Time". The consumer is 16002f4aeb0Sopenharmony_ci responsible for predicting this and indicating its value to the 16102f4aeb0Sopenharmony_ci EGLStream. The producer is responsible for using this value to 16202f4aeb0Sopenharmony_ci calculate the "Image Frame Insertion Time" for each image frame. 16302f4aeb0Sopenharmony_ci The application has access to this value through the 16402f4aeb0Sopenharmony_ci EGL_CONSUMER_LATENCY_USEC attribute. 16502f4aeb0Sopenharmony_ci 16602f4aeb0Sopenharmony_ci Producer 16702f4aeb0Sopenharmony_ci The entity that inserts image frames into the EGLStream. The 16802f4aeb0Sopenharmony_ci producer is responsible for timing: it must insert image frames at 16902f4aeb0Sopenharmony_ci a point in time equal to the "Image Frame Intended Display Time" 17002f4aeb0Sopenharmony_ci minus the "Consumer Latency". 17102f4aeb0Sopenharmony_ci 17202f4aeb0Sopenharmony_ci Consumer 17302f4aeb0Sopenharmony_ci The entity that retrieves image frames from the EGLStream. When 17402f4aeb0Sopenharmony_ci the image frames are to be displayed to the user the consumer is 17502f4aeb0Sopenharmony_ci responsible for calculating the "Consumer Latency" and reporting 17602f4aeb0Sopenharmony_ci it to the EGLSteam. 17702f4aeb0Sopenharmony_ci 17802f4aeb0Sopenharmony_ci State (stream state) 17902f4aeb0Sopenharmony_ci At any given time an EGLStream is in one of several states. See 18002f4aeb0Sopenharmony_ci section "3.10.4.3 EGL_STREAM_STATE_KHR Attribute" in this 18102f4aeb0Sopenharmony_ci extension for a description of the states and what transitions 18202f4aeb0Sopenharmony_ci occur between them. 18302f4aeb0Sopenharmony_ci 18402f4aeb0Sopenharmony_ciNew Types 18502f4aeb0Sopenharmony_ci 18602f4aeb0Sopenharmony_ci This is the type of a handle that represents an EGLStream object. 18702f4aeb0Sopenharmony_ci 18802f4aeb0Sopenharmony_ci typedef void* EGLStreamKHR; 18902f4aeb0Sopenharmony_ci 19002f4aeb0Sopenharmony_ci This is a 64 bit unsigned integer. 19102f4aeb0Sopenharmony_ci 19202f4aeb0Sopenharmony_ci typedef khronos_uint64_t EGLuint64KHR; 19302f4aeb0Sopenharmony_ci 19402f4aeb0Sopenharmony_ciNew functions defined by EGL_KHR_stream 19502f4aeb0Sopenharmony_ci 19602f4aeb0Sopenharmony_ci EGLStreamKHR eglCreateStreamKHR( 19702f4aeb0Sopenharmony_ci EGLDisplay dpy, 19802f4aeb0Sopenharmony_ci const EGLint *attrib_list); 19902f4aeb0Sopenharmony_ci 20002f4aeb0Sopenharmony_ci EGLBoolean eglDestroyStreamKHR( 20102f4aeb0Sopenharmony_ci EGLDisplay dpy, 20202f4aeb0Sopenharmony_ci EGLStreamKHR stream); 20302f4aeb0Sopenharmony_ci 20402f4aeb0Sopenharmony_ci EGLBoolean eglStreamAttribKHR( 20502f4aeb0Sopenharmony_ci EGLDisplay dpy, 20602f4aeb0Sopenharmony_ci EGLStreamKHR stream, 20702f4aeb0Sopenharmony_ci EGLenum attribute, 20802f4aeb0Sopenharmony_ci EGLint value); 20902f4aeb0Sopenharmony_ci 21002f4aeb0Sopenharmony_ci EGLBoolean eglQueryStreamKHR( 21102f4aeb0Sopenharmony_ci EGLDisplay dpy, 21202f4aeb0Sopenharmony_ci EGLStreamKHR stream, 21302f4aeb0Sopenharmony_ci EGLenum attribute, 21402f4aeb0Sopenharmony_ci EGLint *value); 21502f4aeb0Sopenharmony_ci 21602f4aeb0Sopenharmony_ci EGLBoolean eglQueryStreamu64KHR( 21702f4aeb0Sopenharmony_ci EGLDisplay dpy, 21802f4aeb0Sopenharmony_ci EGLStreamKHR stream, 21902f4aeb0Sopenharmony_ci EGLenum attribute, 22002f4aeb0Sopenharmony_ci EGLuint64KHR *value); 22102f4aeb0Sopenharmony_ci 22202f4aeb0Sopenharmony_ciNew functions defined by EGL_KHR_stream_attrib 22302f4aeb0Sopenharmony_ci 22402f4aeb0Sopenharmony_ci EGLStreamKHR eglCreateStreamAttribKHR( 22502f4aeb0Sopenharmony_ci EGLDisplay dpy, 22602f4aeb0Sopenharmony_ci const EGLAttrib *attrib_list); 22702f4aeb0Sopenharmony_ci 22802f4aeb0Sopenharmony_ci EGLBoolean eglSetStreamAttribKHR( 22902f4aeb0Sopenharmony_ci EGLDisplay dpy, 23002f4aeb0Sopenharmony_ci EGLStreamKHR stream, 23102f4aeb0Sopenharmony_ci EGLenum attribute, 23202f4aeb0Sopenharmony_ci EGLAttrib value); 23302f4aeb0Sopenharmony_ci 23402f4aeb0Sopenharmony_ci EGLBoolean eglQueryStreamAttribKHR( 23502f4aeb0Sopenharmony_ci EGLDisplay dpy, 23602f4aeb0Sopenharmony_ci EGLStreamKHR stream, 23702f4aeb0Sopenharmony_ci EGLenum attribute, 23802f4aeb0Sopenharmony_ci EGLAttrib *value); 23902f4aeb0Sopenharmony_ci 24002f4aeb0Sopenharmony_ci EGLBoolean eglStreamConsumerAcquireAttribKHR( 24102f4aeb0Sopenharmony_ci EGLDisplay dpy, 24202f4aeb0Sopenharmony_ci EGLStreamKHR stream 24302f4aeb0Sopenharmony_ci const EGLAttrib *attrib_list); 24402f4aeb0Sopenharmony_ci 24502f4aeb0Sopenharmony_ci EGLBoolean eglStreamConsumerReleaseAttribKHR( 24602f4aeb0Sopenharmony_ci EGLDisplay dpy, 24702f4aeb0Sopenharmony_ci EGLStreamKHR stream, 24802f4aeb0Sopenharmony_ci const EGLAttrib *attrib_list); 24902f4aeb0Sopenharmony_ci 25002f4aeb0Sopenharmony_ciNew Tokens 25102f4aeb0Sopenharmony_ci 25202f4aeb0Sopenharmony_ci This value is returned from eglCreateStreamKHR in the case of an 25302f4aeb0Sopenharmony_ci error. It is an error to attempt to use this value as a parameter 25402f4aeb0Sopenharmony_ci to any EGL or client API function. 25502f4aeb0Sopenharmony_ci 25602f4aeb0Sopenharmony_ci EGL_NO_STREAM_KHR ((EGLStreamKHR)0) 25702f4aeb0Sopenharmony_ci 25802f4aeb0Sopenharmony_ci This enum is accepted as an attribute in the <attrib_list> parameter 25902f4aeb0Sopenharmony_ci of eglCreateStreamKHR and as the <attribute> parameter of 26002f4aeb0Sopenharmony_ci eglStreamAttribKHR, eglSetStreamAttribKHR, eglQueryStreamKHR and 26102f4aeb0Sopenharmony_ci eglQueryStreamAttribKHR. 26202f4aeb0Sopenharmony_ci 26302f4aeb0Sopenharmony_ci EGL_CONSUMER_LATENCY_USEC_KHR 0x3210 26402f4aeb0Sopenharmony_ci 26502f4aeb0Sopenharmony_ci These enums are accepted as the <attribute> parameter of 26602f4aeb0Sopenharmony_ci eglQueryStreamu64KHR. 26702f4aeb0Sopenharmony_ci 26802f4aeb0Sopenharmony_ci EGL_PRODUCER_FRAME_KHR 0x3212 26902f4aeb0Sopenharmony_ci EGL_CONSUMER_FRAME_KHR 0x3213 27002f4aeb0Sopenharmony_ci 27102f4aeb0Sopenharmony_ci This enum is accepted as the <attribute> parameter of 27202f4aeb0Sopenharmony_ci eglQueryStreamKHR and eglQueryStreamAttribKHR. 27302f4aeb0Sopenharmony_ci 27402f4aeb0Sopenharmony_ci EGL_STREAM_STATE_KHR 0x3214 27502f4aeb0Sopenharmony_ci 27602f4aeb0Sopenharmony_ci Returned in the <value> parameter of eglQueryStreamKHR or 27702f4aeb0Sopenharmony_ci eglQueryStreamAttribKHR when <attribute> is EGL_STREAM_STATE. 27802f4aeb0Sopenharmony_ci 27902f4aeb0Sopenharmony_ci EGL_STREAM_STATE_CREATED_KHR 0x3215 28002f4aeb0Sopenharmony_ci EGL_STREAM_STATE_CONNECTING_KHR 0x3216 28102f4aeb0Sopenharmony_ci EGL_STREAM_STATE_EMPTY_KHR 0x3217 28202f4aeb0Sopenharmony_ci EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218 28302f4aeb0Sopenharmony_ci EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219 28402f4aeb0Sopenharmony_ci EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A 28502f4aeb0Sopenharmony_ci 28602f4aeb0Sopenharmony_ci These errors may be generated by EGLStream calls. 28702f4aeb0Sopenharmony_ci 28802f4aeb0Sopenharmony_ci EGL_BAD_STREAM_KHR 0x321B 28902f4aeb0Sopenharmony_ci EGL_BAD_STATE_KHR 0x321C 29002f4aeb0Sopenharmony_ci 29102f4aeb0Sopenharmony_ciAdd a new section "2.5 Streams" after section "2.4 Shared State" 29202f4aeb0Sopenharmony_ci 29302f4aeb0Sopenharmony_ci EGL allows efficient interoperation between APIs through the 29402f4aeb0Sopenharmony_ci EGLStream object. An EGLStream represents a sequence of image 29502f4aeb0Sopenharmony_ci frames. 29602f4aeb0Sopenharmony_ci 29702f4aeb0Sopenharmony_ci Each EGLStream is associated with a producer that generates image 29802f4aeb0Sopenharmony_ci frames and inserts them into the EGLStream. Each EGLStream is 29902f4aeb0Sopenharmony_ci also associated with a consumer that retrieves image frames from 30002f4aeb0Sopenharmony_ci the EGLStream. 30102f4aeb0Sopenharmony_ci 30202f4aeb0Sopenharmony_ciAdd a new section "3.10 EGLStreams" after section "3.9 Posting the 30302f4aeb0Sopenharmony_ciColor Buffer" 30402f4aeb0Sopenharmony_ci 30502f4aeb0Sopenharmony_ci 3.10 EGLStreams 30602f4aeb0Sopenharmony_ci 30702f4aeb0Sopenharmony_ci EGL provides functions to create and destroy EGLStreams, for 30802f4aeb0Sopenharmony_ci querying and setting attributes of EGLStreams, and for connecting 30902f4aeb0Sopenharmony_ci EGLStreams to producers and consumers. 31002f4aeb0Sopenharmony_ci 31102f4aeb0Sopenharmony_ci Each EGLStream may be connected to only one producer and one 31202f4aeb0Sopenharmony_ci consumer. Once an EGLStream is connected to a consumer, it will 31302f4aeb0Sopenharmony_ci be connected to that consumer until the EGLStream is destroyed. 31402f4aeb0Sopenharmony_ci Likewise, once an EGLStream is connected to a producer it will be 31502f4aeb0Sopenharmony_ci connected to that producer until the EGLStream is destroyed. 31602f4aeb0Sopenharmony_ci Further semantics are described for each type of consumer and 31702f4aeb0Sopenharmony_ci producer that can be connected. 31802f4aeb0Sopenharmony_ci 31902f4aeb0Sopenharmony_ciAdd subsection 3.10.1 to section "3.10 EGLStreams" 32002f4aeb0Sopenharmony_ci 32102f4aeb0Sopenharmony_ci 3.10.1 Creating an EGLStream 32202f4aeb0Sopenharmony_ci 32302f4aeb0Sopenharmony_ci Call 32402f4aeb0Sopenharmony_ci 32502f4aeb0Sopenharmony_ci EGLStreamKHR eglCreateStreamKHR( 32602f4aeb0Sopenharmony_ci EGLDisplay dpy, 32702f4aeb0Sopenharmony_ci const EGLint *attrib_list); 32802f4aeb0Sopenharmony_ci 32902f4aeb0Sopenharmony_ci to create a new EGLStream. <dpy> specifies the EGLDisplay used for 33002f4aeb0Sopenharmony_ci this operation. The function returns a handle to the created 33102f4aeb0Sopenharmony_ci EGLStream. 33202f4aeb0Sopenharmony_ci 33302f4aeb0Sopenharmony_ci The EGLStream cannot be used until it has been connected to a 33402f4aeb0Sopenharmony_ci consumer and then to a producer (refer to section "3.10.2 33502f4aeb0Sopenharmony_ci Connecting an EGLStream to a consumer" and section "3.10.3 33602f4aeb0Sopenharmony_ci Connecting an EGLStream to a producer"). It must be connected to 33702f4aeb0Sopenharmony_ci a consumer before being connected to a producer. 33802f4aeb0Sopenharmony_ci 33902f4aeb0Sopenharmony_ci There is no way for the application to query the size, 34002f4aeb0Sopenharmony_ci colorformat, or number of buffers used in the EGLStream (although 34102f4aeb0Sopenharmony_ci these attributes may be available from the producer's API or the 34202f4aeb0Sopenharmony_ci consumer's API depending on what type of producer/consumer is 34302f4aeb0Sopenharmony_ci connected to the EGLStream). 34402f4aeb0Sopenharmony_ci 34502f4aeb0Sopenharmony_ci The parameter <attrib_list> contains a list of attributes and 34602f4aeb0Sopenharmony_ci values to set for the EGLStream. Attributes not in the list are 34702f4aeb0Sopenharmony_ci set to default values. EGLStream attributes are described in 34802f4aeb0Sopenharmony_ci section "3.10.4 EGLStream Attributes". 34902f4aeb0Sopenharmony_ci 35002f4aeb0Sopenharmony_ci If an error occurs eglCreateStreamKHR will return 35102f4aeb0Sopenharmony_ci EGL_NO_STREAM_KHR and generate an error. 35202f4aeb0Sopenharmony_ci 35302f4aeb0Sopenharmony_ci - EGL_BAD_ATTRIBUTE is generated if any of the parameters in 35402f4aeb0Sopenharmony_ci attrib_list is not a valid EGLStream attribute. 35502f4aeb0Sopenharmony_ci 35602f4aeb0Sopenharmony_ci - EGL_BAD_ACCESS is generated if any of the parameters in 35702f4aeb0Sopenharmony_ci attrib_list is read only. 35802f4aeb0Sopenharmony_ci 35902f4aeb0Sopenharmony_ci - EGL_BAD_PARAMETER is generated if any of the values in 36002f4aeb0Sopenharmony_ci attrib_list is outside the valid range for the attribute. 36102f4aeb0Sopenharmony_ci 36202f4aeb0Sopenharmony_ci - EGL_BAD_ALLOC is generated if not enough resources are 36302f4aeb0Sopenharmony_ci available to create the EGLStream. 36402f4aeb0Sopenharmony_ci 36502f4aeb0Sopenharmony_ci - EGL_BAD_DISPLAY is generated if <dpy> is not a valid, 36602f4aeb0Sopenharmony_ci initialized EGLDisplay. 36702f4aeb0Sopenharmony_ci 36802f4aeb0Sopenharmony_ciIf EGL_KHR_stream_attrib is present, add to the end of this section 36902f4aeb0Sopenharmony_ci 37002f4aeb0Sopenharmony_ci Streams may also be created by calling 37102f4aeb0Sopenharmony_ci 37202f4aeb0Sopenharmony_ci EGLStreamKHR eglCreateStreamAttribKHR( 37302f4aeb0Sopenharmony_ci EGLDisplay dpy, 37402f4aeb0Sopenharmony_ci const EGLAttrib *attrib_list); 37502f4aeb0Sopenharmony_ci 37602f4aeb0Sopenharmony_ci This is equivalent to eglCreateStreamKHR, but allows pointer 37702f4aeb0Sopenharmony_ci and handle attributes to be provided on 64-bit systems. 37802f4aeb0Sopenharmony_ci 37902f4aeb0Sopenharmony_ciAdd section 3.10.2 to section "3.10 EGLStreams" 38002f4aeb0Sopenharmony_ci 38102f4aeb0Sopenharmony_ci 3.10.2 Connecting an EGLStream to a consumer. 38202f4aeb0Sopenharmony_ci 38302f4aeb0Sopenharmony_ci Before using an EGLStream it must be connected to a consumer. 38402f4aeb0Sopenharmony_ci 38502f4aeb0Sopenharmony_ci Refer to sections 3.10.2.1 and following for different ways to 38602f4aeb0Sopenharmony_ci connect a consumer to an EGLStream. 38702f4aeb0Sopenharmony_ci 38802f4aeb0Sopenharmony_ci Once an EGLStream is connected to a consumer it will remain 38902f4aeb0Sopenharmony_ci connected to the same consumer until the EGLStream is destroyed. 39002f4aeb0Sopenharmony_ci 39102f4aeb0Sopenharmony_ci If the consumer is destroyed then the EGLStream's state will 39202f4aeb0Sopenharmony_ci become EGL_STREAM_STATE_DISCONNECTED_KHR. 39302f4aeb0Sopenharmony_ci 39402f4aeb0Sopenharmony_ci Any attempt to connect an EGLStream which is not in state 39502f4aeb0Sopenharmony_ci EGL_STREAM_STATE_CREATED_KHR will fail and generate an 39602f4aeb0Sopenharmony_ci EGL_BAD_STATE_KHR error. 39702f4aeb0Sopenharmony_ci 39802f4aeb0Sopenharmony_ci When an EGLStream is connected to a consumer its state becomes 39902f4aeb0Sopenharmony_ci EGL_STREAM_STATE_CONNECTING_KHR. 40002f4aeb0Sopenharmony_ci 40102f4aeb0Sopenharmony_ci 3.10.2.1 No way to connect consumer to EGLStream 40202f4aeb0Sopenharmony_ci 40302f4aeb0Sopenharmony_ci EGL does not currently define any mechanisms to connect a consumer 40402f4aeb0Sopenharmony_ci to an EGLStream. These will be added via additional extensions. 40502f4aeb0Sopenharmony_ci 40602f4aeb0Sopenharmony_ci (Example: See extension specification 40702f4aeb0Sopenharmony_ci EGL_KHR_stream_consumer_gltexture) 40802f4aeb0Sopenharmony_ci 40902f4aeb0Sopenharmony_ciIf EGL_KHR_stream_attrib is present, add to the end of this section 41002f4aeb0Sopenharmony_ci 41102f4aeb0Sopenharmony_ci 3.10.2.2 Acquiring and releasing consumer frames 41202f4aeb0Sopenharmony_ci 41302f4aeb0Sopenharmony_ci Methods for acquiring frames from a stream and releasing them back 41402f4aeb0Sopenharmony_ci to a stream are dependent on the type of consumer. Some consumers 41502f4aeb0Sopenharmony_ci support calling 41602f4aeb0Sopenharmony_ci 41702f4aeb0Sopenharmony_ci EGLBoolean eglStreamConsumerAcquireAttribKHR( 41802f4aeb0Sopenharmony_ci EGLDisplay dpy, 41902f4aeb0Sopenharmony_ci EGLStreamKHR stream 42002f4aeb0Sopenharmony_ci const EGLAttrib *attrib_list); 42102f4aeb0Sopenharmony_ci 42202f4aeb0Sopenharmony_ci to acquire the next available frame in <stream> and 42302f4aeb0Sopenharmony_ci 42402f4aeb0Sopenharmony_ci EGLBoolean eglStreamConsumerReleaseAttribKHR( 42502f4aeb0Sopenharmony_ci EGLDisplay dpy, 42602f4aeb0Sopenharmony_ci EGLStreamKHR stream, 42702f4aeb0Sopenharmony_ci const EGLAttrib *attrib_list); 42802f4aeb0Sopenharmony_ci 42902f4aeb0Sopenharmony_ci to release a frame back to the stream. 43002f4aeb0Sopenharmony_ci 43102f4aeb0Sopenharmony_ci Not all consumers are required to support either or both of these 43202f4aeb0Sopenharmony_ci functions. Where supported, the specific behavior is defined by the 43302f4aeb0Sopenharmony_ci consumer type, and may be affected by the contents of <attrib_list>. 43402f4aeb0Sopenharmony_ci <attrib_list> must either be NULL or a pointer to a list of 43502f4aeb0Sopenharmony_ci name/value pairs terminated by EGL_NONE. Valid attributes are 43602f4aeb0Sopenharmony_ci listed in tables 3.10.2.1 and 3.10.2.2. 43702f4aeb0Sopenharmony_ci 43802f4aeb0Sopenharmony_ci Attribute Type Section 43902f4aeb0Sopenharmony_ci ------------------------ ---------- ------- 44002f4aeb0Sopenharmony_ci Currently no acquire attributes are defined 44102f4aeb0Sopenharmony_ci 44202f4aeb0Sopenharmony_ci Table 3.10.2.1 EGLStream Consumer Acquire Attributes 44302f4aeb0Sopenharmony_ci 44402f4aeb0Sopenharmony_ci Attribute Type Section 44502f4aeb0Sopenharmony_ci ------------------------ ---------- ------- 44602f4aeb0Sopenharmony_ci Currently no release attributes are defined 44702f4aeb0Sopenharmony_ci 44802f4aeb0Sopenharmony_ci Table 3.10.2.2 EGLStream Consumer Release Attributes 44902f4aeb0Sopenharmony_ci 45002f4aeb0Sopenharmony_ci If no new image frame is available in the stream, 45102f4aeb0Sopenharmony_ci eglStreamConsumerAcquireAtrribKHR may block, retrieve an old frame, 45202f4aeb0Sopenharmony_ci or return an error, as defined by the type of consumer. If one or 45302f4aeb0Sopenharmony_ci more image frames are already acquired by the consumer when 45402f4aeb0Sopenharmony_ci eglStreamConsumerAcquireAttribKHR is called, the behavior is 45502f4aeb0Sopenharmony_ci determined by the type of consumer. 45602f4aeb0Sopenharmony_ci 45702f4aeb0Sopenharmony_ci If successful, eglStreamConsumerAcquireAttribKHR returns EGL_TRUE 45802f4aeb0Sopenharmony_ci and an image frame from <stream> will be bound into the address 45902f4aeb0Sopenharmony_ci space of the consumer as defined for its type. 46002f4aeb0Sopenharmony_ci 46102f4aeb0Sopenharmony_ci On failure, the function returns EGL_FALSE and generates an error. 46202f4aeb0Sopenharmony_ci Additionally, image objects in the consumer's address space may 46302f4aeb0Sopenharmony_ci become invalid, as determined by the consumer type. 46402f4aeb0Sopenharmony_ci 46502f4aeb0Sopenharmony_ci - EGL_BAD_ACCESS is generated if the consumer of <stream> does 46602f4aeb0Sopenharmony_ci not support acquiring frames through 46702f4aeb0Sopenharmony_ci eglStreamConsumerAcquireAttribKHR. 46802f4aeb0Sopenharmony_ci 46902f4aeb0Sopenharmony_ci - EGL_BAD_STATE_KHR is no frame is available for acquisition 47002f4aeb0Sopenharmony_ci after any timeout determined by the consumer. 47102f4aeb0Sopenharmony_ci 47202f4aeb0Sopenharmony_ci - EGL_BAD_ATTRIBUTE is generated if an attribute name in 47302f4aeb0Sopenharmony_ci <attrib_list> is not recognized or is not supported by the 47402f4aeb0Sopenharmony_ci consumer. 47502f4aeb0Sopenharmony_ci 47602f4aeb0Sopenharmony_ci - EGL_BAD_STREAM_KHR is generated if <stream> is not a valid 47702f4aeb0Sopenharmony_ci EGLStream created for <dpy>. 47802f4aeb0Sopenharmony_ci 47902f4aeb0Sopenharmony_ci - EGL_BAD_DISPLAY is generated if <dpy> is not a valid 48002f4aeb0Sopenharmony_ci EGLDisplay. 48102f4aeb0Sopenharmony_ci 48202f4aeb0Sopenharmony_ci - EGL_NOT_INITIALIZED is generated if <dpy> is not initialized. 48302f4aeb0Sopenharmony_ci 48402f4aeb0Sopenharmony_ci Calling eglStreamConsumerReleaseAttribKHR will release a frame held 48502f4aeb0Sopenharmony_ci by the consumer back to the stream. If more than one frame is held 48602f4aeb0Sopenharmony_ci by the consumer, the frame returned is determined by the consumer 48702f4aeb0Sopenharmony_ci type and the contents of <attrib_list>. If no frames are currently 48802f4aeb0Sopenharmony_ci held, the behavior is determined by the consumer type. Once 48902f4aeb0Sopenharmony_ci returned, the consumer may no longer access the contents of the 49002f4aeb0Sopenharmony_ci frame, and attempts to do so will result in errors as determined by 49102f4aeb0Sopenharmony_ci the consumer type. Upon success, eglStreamConsumerReleaseAttribKHR 49202f4aeb0Sopenharmony_ci returns EGL_TRUE. 49302f4aeb0Sopenharmony_ci 49402f4aeb0Sopenharmony_ci If eglStreamConsumerReleaseAttribKHR fails, EGL_FALSE is returned 49502f4aeb0Sopenharmony_ci and an error is generated. 49602f4aeb0Sopenharmony_ci 49702f4aeb0Sopenharmony_ci - EGL_BAD_ACCESS is generated if the consumer of <stream> does 49802f4aeb0Sopenharmony_ci not support releasing frames through 49902f4aeb0Sopenharmony_ci eglStreamConsumerReleaseAttribKHR. 50002f4aeb0Sopenharmony_ci 50102f4aeb0Sopenharmony_ci - EGL_BAD_STATE_KHR is generated if <stream> is not in state 50202f4aeb0Sopenharmony_ci EGL_STREAM_STATE_EMPTY_KHR, 50302f4aeb0Sopenharmony_ci EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR or 50402f4aeb0Sopenharmony_ci EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR. 50502f4aeb0Sopenharmony_ci 50602f4aeb0Sopenharmony_ci - EGL_BAD_ATTRIBUTE is generated if an attribute name in 50702f4aeb0Sopenharmony_ci <attrib_list> is not recognized or is not supported by the 50802f4aeb0Sopenharmony_ci consumer. 50902f4aeb0Sopenharmony_ci 51002f4aeb0Sopenharmony_ci - EGL_BAD_STREAM_KHR is generated if <stream> is not a valid 51102f4aeb0Sopenharmony_ci EGLStream created for <dpy>. 51202f4aeb0Sopenharmony_ci 51302f4aeb0Sopenharmony_ci - EGL_BAD_DISPLAY is generated if <dpy> is not a valid 51402f4aeb0Sopenharmony_ci EGLDisplay. 51502f4aeb0Sopenharmony_ci 51602f4aeb0Sopenharmony_ci - EGL_NOT_INITIALIZED is generated if <dpy> is not initialized. 51702f4aeb0Sopenharmony_ci 51802f4aeb0Sopenharmony_ciIf EGL_KHR_stream_consumer_gltexture is present in addition to 51902f4aeb0Sopenharmony_ciEGL_KHR_stream_attrib, the eglStreamConsumerAcquireKHR function is 52002f4aeb0Sopenharmony_ciequivalent to eglStreamConsumerAcquireAttribKHR with <attrib_list> set 52102f4aeb0Sopenharmony_cito NULL, the eglStreamConsumerReleaseKHR function is equivalent to 52202f4aeb0Sopenharmony_cieglStreamConsumerReleaseAttribKHR with <attrib_list> set to NULL, and 52302f4aeb0Sopenharmony_cithe definitions provided for those functions define their behavior for 52402f4aeb0Sopenharmony_cia GL texture consumer. 52502f4aeb0Sopenharmony_ci 52602f4aeb0Sopenharmony_ciAdd section 3.10.3 to section "3.10 EGLStreams" 52702f4aeb0Sopenharmony_ci 52802f4aeb0Sopenharmony_ci 3.10.3 Connecting an EGLStream to a producer. 52902f4aeb0Sopenharmony_ci 53002f4aeb0Sopenharmony_ci Before using an EGLStream it must be connected to a producer. The 53102f4aeb0Sopenharmony_ci EGLStream must be connected to a consumer before it may be 53202f4aeb0Sopenharmony_ci connected to a producer. 53302f4aeb0Sopenharmony_ci 53402f4aeb0Sopenharmony_ci The size and colorformat of the images in the EGLStream are 53502f4aeb0Sopenharmony_ci determined by the EGL implementation based on the requirements of 53602f4aeb0Sopenharmony_ci the producer and the consumer. The EGL implementation may 53702f4aeb0Sopenharmony_ci determine these at the time the producer is connected to the 53802f4aeb0Sopenharmony_ci EGLStream, at the time that the first image frame is inserted into 53902f4aeb0Sopenharmony_ci the EGLStream, or any time in between (this is left up to the 54002f4aeb0Sopenharmony_ci implementation). 54102f4aeb0Sopenharmony_ci 54202f4aeb0Sopenharmony_ci It is the responsibility of the producer to convert the images to 54302f4aeb0Sopenharmony_ci a form that the consumer can consume. The producer may negotiate 54402f4aeb0Sopenharmony_ci with the consumer as to what formats and sizes the consumer is 54502f4aeb0Sopenharmony_ci able to consume, but this negotiation (whether it occurs and how 54602f4aeb0Sopenharmony_ci it works) is an implementation detail. If the producer is unable 54702f4aeb0Sopenharmony_ci to convert the images to a form that the consumer can consume then 54802f4aeb0Sopenharmony_ci the attempt to connect the producer to the EGLStream will fail and 54902f4aeb0Sopenharmony_ci generate an EGL_BAD_MATCH error. 55002f4aeb0Sopenharmony_ci 55102f4aeb0Sopenharmony_ci Refer to sections 3.10.3.1 and following for different ways to 55202f4aeb0Sopenharmony_ci connect a producer to an EGLStream. 55302f4aeb0Sopenharmony_ci 55402f4aeb0Sopenharmony_ci Once an EGLStream is connected to a producer it will remain 55502f4aeb0Sopenharmony_ci connected to the same producer until the EGLStream is destroyed. 55602f4aeb0Sopenharmony_ci If the producer is destroyed then the EGLStream's state will 55702f4aeb0Sopenharmony_ci become EGL_STREAM_STATE_DISCONNECTED_KHR (refer to "3.10.4.3 55802f4aeb0Sopenharmony_ci EGL_STREAM_STATE_KHR Attribute"). 55902f4aeb0Sopenharmony_ci 56002f4aeb0Sopenharmony_ci Any attempt to connect an EGLStream which is not in state 56102f4aeb0Sopenharmony_ci EGL_STREAM_STATE_CONNECTING_KHR will fail and generate an 56202f4aeb0Sopenharmony_ci EGL_BAD_STATE_KHR error. 56302f4aeb0Sopenharmony_ci 56402f4aeb0Sopenharmony_ci When an EGLStream is connected to a producer its state becomes 56502f4aeb0Sopenharmony_ci EGL_STREAM_STATE_EMPTY_KHR. At this point the producer may begin 56602f4aeb0Sopenharmony_ci inserting image frames and the consumer may begin consuming image 56702f4aeb0Sopenharmony_ci frames, so the state may immediately change to 56802f4aeb0Sopenharmony_ci EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR and/or 56902f4aeb0Sopenharmony_ci EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR. 57002f4aeb0Sopenharmony_ci 57102f4aeb0Sopenharmony_ci 3.10.3.1 No way to connect producer to EGLStream 57202f4aeb0Sopenharmony_ci 57302f4aeb0Sopenharmony_ci EGL does not currently define any mechanisms to connect a producer 57402f4aeb0Sopenharmony_ci to an EGLStream. These will be added via additional extensions. 57502f4aeb0Sopenharmony_ci 57602f4aeb0Sopenharmony_ci (For example see extension specifications 57702f4aeb0Sopenharmony_ci EGL_KHR_stream_producer_eglsurface 57802f4aeb0Sopenharmony_ci EGL_KHR_stream_producer_aldatalocator 57902f4aeb0Sopenharmony_ci OpenMAX_AL_EGLStream_DataLocator 58002f4aeb0Sopenharmony_ci .) 58102f4aeb0Sopenharmony_ci 58202f4aeb0Sopenharmony_ciAdd section 3.10.4 to section "3.10 EGLStreams" 58302f4aeb0Sopenharmony_ci 58402f4aeb0Sopenharmony_ci 3.10.4 EGLStream Attributes 58502f4aeb0Sopenharmony_ci 58602f4aeb0Sopenharmony_ci Each EGLStream contains a set of attributes and values as 58702f4aeb0Sopenharmony_ci described in table 3.10.4.4. Each attribute has a type and a 58802f4aeb0Sopenharmony_ci value and is either read-only (ro), read/write (rw) or initialize 58902f4aeb0Sopenharmony_ci only (io - meaning it may be set in the attrib_list but not 59002f4aeb0Sopenharmony_ci changed once the EGLStream is created). 59102f4aeb0Sopenharmony_ci 59202f4aeb0Sopenharmony_ci Attribute Read/Write Type Section 59302f4aeb0Sopenharmony_ci -------------------------- ---------- ------ -------- 59402f4aeb0Sopenharmony_ci EGL_STREAM_STATE_KHR ro EGLint 3.10.4.3 59502f4aeb0Sopenharmony_ci EGL_PRODUCER_FRAME_KHR ro EGLuint64KHR 3.10.4.4 59602f4aeb0Sopenharmony_ci EGL_CONSUMER_FRAME_KHR ro EGLuint64KHR 3.10.4.5 59702f4aeb0Sopenharmony_ci EGL_CONSUMER_LATENCY_USEC_KHR rw EGLint 3.10.4.6 59802f4aeb0Sopenharmony_ci 59902f4aeb0Sopenharmony_ci Table 3.10.4.4 EGLStream Attributes 60002f4aeb0Sopenharmony_ci 60102f4aeb0Sopenharmony_ci 3.10.4.1 Setting EGLStream Attributes 60202f4aeb0Sopenharmony_ci 60302f4aeb0Sopenharmony_ci Call 60402f4aeb0Sopenharmony_ci 60502f4aeb0Sopenharmony_ci EGLBoolean eglStreamAttribKHR( 60602f4aeb0Sopenharmony_ci EGLDisplay dpy, 60702f4aeb0Sopenharmony_ci EGLStreamKHR stream, 60802f4aeb0Sopenharmony_ci EGLint attribute, 60902f4aeb0Sopenharmony_ci EGLint value); 61002f4aeb0Sopenharmony_ci 61102f4aeb0Sopenharmony_ci to set the value of an attribute for an EGLStream. The <value> is 61202f4aeb0Sopenharmony_ci the new value for <attribute>. Only read/write (rw) attributes 61302f4aeb0Sopenharmony_ci with type EGLint may be set with eglStreamAttribKHR (see "Table 61402f4aeb0Sopenharmony_ci 3.10.4.4 EGLStream Attributes"). 61502f4aeb0Sopenharmony_ci 61602f4aeb0Sopenharmony_ci If an error occurs, EGL_FALSE is returned and an error is 61702f4aeb0Sopenharmony_ci generated. 61802f4aeb0Sopenharmony_ci 61902f4aeb0Sopenharmony_ci - EGL_BAD_STATE_KHR is generated if <stream> is in 62002f4aeb0Sopenharmony_ci EGL_STREAM_STATE_DISCONNECTED_KHR state. 62102f4aeb0Sopenharmony_ci 62202f4aeb0Sopenharmony_ci - EGL_BAD_ATTRIBUTE is generated if <attribute> is not a valid 62302f4aeb0Sopenharmony_ci EGLStream attribute. 62402f4aeb0Sopenharmony_ci 62502f4aeb0Sopenharmony_ci - EGL_BAD_ACCESS is generated if <attribute> is read only. 62602f4aeb0Sopenharmony_ci 62702f4aeb0Sopenharmony_ci - EGL_BAD_PARAMETER is generated if value is outside the valid 62802f4aeb0Sopenharmony_ci range for <attribute>. 62902f4aeb0Sopenharmony_ci 63002f4aeb0Sopenharmony_ci - EGL_BAD_STREAM_KHR is generated if <stream> is not a valid 63102f4aeb0Sopenharmony_ci EGLStream created for <dpy>. 63202f4aeb0Sopenharmony_ci 63302f4aeb0Sopenharmony_ci - EGL_BAD_DISPLAY is generated if <dpy> is not a valid, 63402f4aeb0Sopenharmony_ci initialized EGLDisplay. 63502f4aeb0Sopenharmony_ci 63602f4aeb0Sopenharmony_ci 3.10.4.2 Querying EGLStream Attributes 63702f4aeb0Sopenharmony_ci 63802f4aeb0Sopenharmony_ci Call 63902f4aeb0Sopenharmony_ci 64002f4aeb0Sopenharmony_ci EGLBoolean eglQueryStreamKHR( 64102f4aeb0Sopenharmony_ci EGLDisplay dpy, 64202f4aeb0Sopenharmony_ci EGLStreamKHR stream, 64302f4aeb0Sopenharmony_ci EGLint attribute, 64402f4aeb0Sopenharmony_ci EGLint *value); 64502f4aeb0Sopenharmony_ci 64602f4aeb0Sopenharmony_ci to query the value of an EGLStream's attribute with type EGLint 64702f4aeb0Sopenharmony_ci and call 64802f4aeb0Sopenharmony_ci 64902f4aeb0Sopenharmony_ci EGLBoolean eglQueryStreamu64KHR( 65002f4aeb0Sopenharmony_ci EGLDisplay dpy, 65102f4aeb0Sopenharmony_ci EGLStreamKHR stream, 65202f4aeb0Sopenharmony_ci EGLenum attribute, 65302f4aeb0Sopenharmony_ci EGLuint64KHR *value); 65402f4aeb0Sopenharmony_ci 65502f4aeb0Sopenharmony_ci to query the value of an EGLStream's attribute with type 65602f4aeb0Sopenharmony_ci EGLuint64KHR. 65702f4aeb0Sopenharmony_ci 65802f4aeb0Sopenharmony_ci If an error occurs EGL_FALSE is returned and an error is 65902f4aeb0Sopenharmony_ci generated. 66002f4aeb0Sopenharmony_ci 66102f4aeb0Sopenharmony_ci - EGL_BAD_STREAM_KHR is generated if <stream> is not a valid 66202f4aeb0Sopenharmony_ci EGLStream created for <dpy>. 66302f4aeb0Sopenharmony_ci 66402f4aeb0Sopenharmony_ci - EGL_BAD_ATTRIBUTE is generated by eglQueryStreamKHR if 66502f4aeb0Sopenharmony_ci <attribute> is not a valid EGLStream attribute with type 66602f4aeb0Sopenharmony_ci EGLint. 66702f4aeb0Sopenharmony_ci 66802f4aeb0Sopenharmony_ci - EGL_BAD_ATTRIBUTE is generated by eglQueryStreamu64KHR if 66902f4aeb0Sopenharmony_ci <attribute> is not a valid EGLStream attribute with type 67002f4aeb0Sopenharmony_ci EGLuint64KHR. 67102f4aeb0Sopenharmony_ci 67202f4aeb0Sopenharmony_ci 3.10.4.3 EGL_STREAM_STATE_KHR Attribute 67302f4aeb0Sopenharmony_ci 67402f4aeb0Sopenharmony_ci The EGL_STREAM_STATE_KHR attribute is read only. It indicates the 67502f4aeb0Sopenharmony_ci state of the EGLStream. The EGLStream may be in one of the 67602f4aeb0Sopenharmony_ci following states: 67702f4aeb0Sopenharmony_ci 67802f4aeb0Sopenharmony_ci - EGL_STREAM_STATE_CREATED_KHR - The EGLStream has been created 67902f4aeb0Sopenharmony_ci but not yet connected to a producer or a consumer. 68002f4aeb0Sopenharmony_ci 68102f4aeb0Sopenharmony_ci - EGL_STREAM_STATE_CONNECTING_KHR - The EGLStream has been 68202f4aeb0Sopenharmony_ci connected to a consumer but not yet connected to a producer. 68302f4aeb0Sopenharmony_ci 68402f4aeb0Sopenharmony_ci - EGL_STREAM_STATE_EMPTY_KHR - the EGLStream has been connected 68502f4aeb0Sopenharmony_ci to a consumer and a producer, but the producer has not yet 68602f4aeb0Sopenharmony_ci inserted any image frames. 68702f4aeb0Sopenharmony_ci 68802f4aeb0Sopenharmony_ci - EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR - the producer has 68902f4aeb0Sopenharmony_ci inserted at least one image frame that the consumer has not 69002f4aeb0Sopenharmony_ci yet retrieved. 69102f4aeb0Sopenharmony_ci 69202f4aeb0Sopenharmony_ci - EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR - the producer has 69302f4aeb0Sopenharmony_ci inserted at least one image frame, and the consumer has 69402f4aeb0Sopenharmony_ci already retrieved the most recently inserted image frame. 69502f4aeb0Sopenharmony_ci 69602f4aeb0Sopenharmony_ci - EGL_STREAM_STATE_DISCONNECTED_KHR - either the producer or the 69702f4aeb0Sopenharmony_ci consumer (or both) are no longer connected to the EGLStream 69802f4aeb0Sopenharmony_ci (e.g. because they have been destroyed). Once the 69902f4aeb0Sopenharmony_ci EGLStream is in this state it will remain in this state 70002f4aeb0Sopenharmony_ci until the EGLStream is destroyed. In this state only 70102f4aeb0Sopenharmony_ci eglQueryStreamKHR and eglDestroyStreamKHR are valid 70202f4aeb0Sopenharmony_ci operations. 70302f4aeb0Sopenharmony_ci 70402f4aeb0Sopenharmony_ci Only the following state transitions may occur: 70502f4aeb0Sopenharmony_ci 70602f4aeb0Sopenharmony_ci -> EGL_STREAM_STATE_CREATED_KHR 70702f4aeb0Sopenharmony_ci A new EGLStream is created in this state. 70802f4aeb0Sopenharmony_ci 70902f4aeb0Sopenharmony_ci EGL_STREAM_STATE_CREATED_KHR -> 71002f4aeb0Sopenharmony_ci EGL_STREAM_STATE_CONNECTING_KHR 71102f4aeb0Sopenharmony_ci Occurs when a consumer is connected to the EGLStream. 71202f4aeb0Sopenharmony_ci 71302f4aeb0Sopenharmony_ci EGL_STREAM_STATE_CONNECTING_KHR -> 71402f4aeb0Sopenharmony_ci EGL_STREAM_STATE_EMPTY_KHR 71502f4aeb0Sopenharmony_ci Occurs when a producer is connected to the EGLStream. 71602f4aeb0Sopenharmony_ci 71702f4aeb0Sopenharmony_ci EGL_STREAM_STATE_EMPTY_KHR -> 71802f4aeb0Sopenharmony_ci EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 71902f4aeb0Sopenharmony_ci Occurs the first time the producer inserts an image frame. 72002f4aeb0Sopenharmony_ci 72102f4aeb0Sopenharmony_ci EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR -> 72202f4aeb0Sopenharmony_ci EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 72302f4aeb0Sopenharmony_ci Occurs when the consumer begins examining a newly inserted 72402f4aeb0Sopenharmony_ci image frame. 72502f4aeb0Sopenharmony_ci 72602f4aeb0Sopenharmony_ci EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR -> 72702f4aeb0Sopenharmony_ci EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 72802f4aeb0Sopenharmony_ci Occurs when the producer inserts a new image frame. 72902f4aeb0Sopenharmony_ci 73002f4aeb0Sopenharmony_ci * -> 73102f4aeb0Sopenharmony_ci EGL_STREAM_STATE_DISCONNECTED_KHR 73202f4aeb0Sopenharmony_ci Occurs when the producer or consumer is destroyed or is 73302f4aeb0Sopenharmony_ci otherwise unable to function normally. 73402f4aeb0Sopenharmony_ci 73502f4aeb0Sopenharmony_ci 73602f4aeb0Sopenharmony_ci 3.10.4.4 EGL_PRODUCER_FRAME_KHR Attribute 73702f4aeb0Sopenharmony_ci 73802f4aeb0Sopenharmony_ci The EGL_PRODUCER_FRAME_KHR attribute indicates how many image 73902f4aeb0Sopenharmony_ci frames have been inserted into the EGLStream by the producer. 74002f4aeb0Sopenharmony_ci This is also known as the "frame number" of the most recently 74102f4aeb0Sopenharmony_ci inserted frame (where the first frame inserted has a frame number 74202f4aeb0Sopenharmony_ci of 1). When EGL_STREAM_STATE_KHR is EGL_STREAM_STATE_CREATED_KHR, 74302f4aeb0Sopenharmony_ci EGL_STREAM_STATE_CONNECTING_KHR, or EGL_STREAM_STATE_EMPTY_KHR 74402f4aeb0Sopenharmony_ci then this value is 0. This value will wrap back to 0 after 74502f4aeb0Sopenharmony_ci about 10 million millennia. 74602f4aeb0Sopenharmony_ci 74702f4aeb0Sopenharmony_ci 3.10.4.4 EGL_CONSUMER_FRAME_KHR Attribute 74802f4aeb0Sopenharmony_ci 74902f4aeb0Sopenharmony_ci The EGL_CONSUMER_FRAME_KHR attribute indicates the frame number of 75002f4aeb0Sopenharmony_ci the image frame that the consumer most recently retrieved. This is 75102f4aeb0Sopenharmony_ci the value that EGL_PRODUCER_FRAME_KHR contained just after this 75202f4aeb0Sopenharmony_ci image frame was inserted into the EGLStream. 75302f4aeb0Sopenharmony_ci 75402f4aeb0Sopenharmony_ci 3.10.4.5 EGL_CONSUMER_LATENCY_USEC_KHR Attribute 75502f4aeb0Sopenharmony_ci 75602f4aeb0Sopenharmony_ci This attribute indicates the number of microseconds that elapse (on 75702f4aeb0Sopenharmony_ci average) from the time that an image frame is inserted into the 75802f4aeb0Sopenharmony_ci EGLStream by the producer until the image frame is visible to the 75902f4aeb0Sopenharmony_ci user. 76002f4aeb0Sopenharmony_ci 76102f4aeb0Sopenharmony_ci It is the responsibility of the consumer to set this value. Some 76202f4aeb0Sopenharmony_ci types of consumers may simply set this value to zero or an 76302f4aeb0Sopenharmony_ci implementation constant value. Other consumers may adjust this 76402f4aeb0Sopenharmony_ci value dynamically as conditions change. 76502f4aeb0Sopenharmony_ci 76602f4aeb0Sopenharmony_ci It is the responsibility of the producer to use this information to 76702f4aeb0Sopenharmony_ci insert image frames into the EGLStream at an appropriate time. 76802f4aeb0Sopenharmony_ci The producer should insert each image frame into the stream at the 76902f4aeb0Sopenharmony_ci time that frame should appear to the user MINUS the 77002f4aeb0Sopenharmony_ci EGL_CONSUMER_LATENCY_USEC_KHR value. Some types of producers may 77102f4aeb0Sopenharmony_ci ignore this value. 77202f4aeb0Sopenharmony_ci 77302f4aeb0Sopenharmony_ci The application may modify this value to adjust the timing of the 77402f4aeb0Sopenharmony_ci stream (e.g. to make video frames coincide with an audio track 77502f4aeb0Sopenharmony_ci under direction from a user). However the value set by the 77602f4aeb0Sopenharmony_ci application may be overridden by some consumers that dynamically 77702f4aeb0Sopenharmony_ci adjust the value. This will be noted in the description of 77802f4aeb0Sopenharmony_ci consumers which do this. 77902f4aeb0Sopenharmony_ci 78002f4aeb0Sopenharmony_ciIf EGL_KHR_stream_attrib is present, add to the end of section "3.10.4.1 78102f4aeb0Sopenharmony_ciSetting EGLStream Attributes" 78202f4aeb0Sopenharmony_ci 78302f4aeb0Sopenharmony_ci Attributes may also be set by calling 78402f4aeb0Sopenharmony_ci 78502f4aeb0Sopenharmony_ci EGLBoolean eglSetStreamAttribKHR( 78602f4aeb0Sopenharmony_ci EGLDisplay dpy, 78702f4aeb0Sopenharmony_ci EGLStreamKHR stream, 78802f4aeb0Sopenharmony_ci EGLenum attribute, 78902f4aeb0Sopenharmony_ci EGLAttrib value); 79002f4aeb0Sopenharmony_ci 79102f4aeb0Sopenharmony_ci This is equivalent to eglStreamAttribKHR, but allows attributes 79202f4aeb0Sopenharmony_ci with pointer and handle types, in addition to EGLint. 79302f4aeb0Sopenharmony_ci 79402f4aeb0Sopenharmony_ciIf EGL_KHR_stream_attrib is present, add to the end of section "3.10.4.2 79502f4aeb0Sopenharmony_ciQuerying EGLStream Attributes" 79602f4aeb0Sopenharmony_ci 79702f4aeb0Sopenharmony_ci Attributes may also be queried by calling 79802f4aeb0Sopenharmony_ci 79902f4aeb0Sopenharmony_ci EGLBoolean eglQueryStreamAttribKHR( 80002f4aeb0Sopenharmony_ci EGLDisplay dpy, 80102f4aeb0Sopenharmony_ci EGLStreamKHR stream, 80202f4aeb0Sopenharmony_ci EGLenum attribute, 80302f4aeb0Sopenharmony_ci EGLAttrib *value); 80402f4aeb0Sopenharmony_ci 80502f4aeb0Sopenharmony_ci This is equivalent to eglQueryStreamKHR, but allows attributes with 80602f4aeb0Sopenharmony_ci pointer and handle types, in addition to EGLint. 80702f4aeb0Sopenharmony_ci 80802f4aeb0Sopenharmony_ciAdd sections 3.10.5 and 3.10.6 to section "3.10 EGLStreams" 80902f4aeb0Sopenharmony_ci 81002f4aeb0Sopenharmony_ci 3.10.5 EGLStream operation 81102f4aeb0Sopenharmony_ci 81202f4aeb0Sopenharmony_ci 3.10.5.1 EGLStream operation in mailbox mode 81302f4aeb0Sopenharmony_ci 81402f4aeb0Sopenharmony_ci The EGLStream conceptually operates as a mailbox. 81502f4aeb0Sopenharmony_ci 81602f4aeb0Sopenharmony_ci When the producer has a new image frame it empties the mailbox and 81702f4aeb0Sopenharmony_ci inserts the new image frame into the mailbox. If the image frame 81802f4aeb0Sopenharmony_ci is intended to be displayed at time T then the producer must 81902f4aeb0Sopenharmony_ci insert it into the EGLStream at time 82002f4aeb0Sopenharmony_ci T - EGL_CONSUMER_LATENCY_USEC_KHR 82102f4aeb0Sopenharmony_ci 82202f4aeb0Sopenharmony_ci The consumer retrieves the image frame from the mailbox and 82302f4aeb0Sopenharmony_ci examines it. When the consumer is finished examining the image 82402f4aeb0Sopenharmony_ci frame it is either placed back in the mailbox (if the mailbox is 82502f4aeb0Sopenharmony_ci empty) or discarded (if the mailbox is not empty). 82602f4aeb0Sopenharmony_ci 82702f4aeb0Sopenharmony_ci This operation implies 2 things: 82802f4aeb0Sopenharmony_ci 82902f4aeb0Sopenharmony_ci - If the consumer consumes frames slower than the producer 83002f4aeb0Sopenharmony_ci inserts frames, then some frames may be lost (never seen by 83102f4aeb0Sopenharmony_ci the consumer). 83202f4aeb0Sopenharmony_ci 83302f4aeb0Sopenharmony_ci - If the consumer consumes frames faster than the producer 83402f4aeb0Sopenharmony_ci inserts frames, then the consumer may see some frames more 83502f4aeb0Sopenharmony_ci than once. 83602f4aeb0Sopenharmony_ci 83702f4aeb0Sopenharmony_ci Some details of EGLStream operation are dependent on the type of 83802f4aeb0Sopenharmony_ci producer and consumer that are connected to it. Refer to the 83902f4aeb0Sopenharmony_ci documentation for the producer and consumer for more details 84002f4aeb0Sopenharmony_ci (section 3.10.2.* and 3.10.3.*). 84102f4aeb0Sopenharmony_ci 84202f4aeb0Sopenharmony_ci 84302f4aeb0Sopenharmony_ci 3.10.6 Destroying an EGLStream 84402f4aeb0Sopenharmony_ci 84502f4aeb0Sopenharmony_ci Call 84602f4aeb0Sopenharmony_ci 84702f4aeb0Sopenharmony_ci EGLBoolean eglDestroyStreamKHR( 84802f4aeb0Sopenharmony_ci EGLDisplay dpy, 84902f4aeb0Sopenharmony_ci EGLStreamKHR stream); 85002f4aeb0Sopenharmony_ci 85102f4aeb0Sopenharmony_ci to mark an EGLStream for deletion. After this call returns the 85202f4aeb0Sopenharmony_ci <stream> will no longer be a valid stream handle. The resources 85302f4aeb0Sopenharmony_ci associated with the EGLStream may not be deleted until the 85402f4aeb0Sopenharmony_ci producer and consumer have released their references to the 85502f4aeb0Sopenharmony_ci resources (if any). Exactly how this is done is dependent on the 85602f4aeb0Sopenharmony_ci type of consumer and producer that is connected to the EGLStream. 85702f4aeb0Sopenharmony_ci 85802f4aeb0Sopenharmony_ci If an error occurs, EGL_FALSE is returned and an error is 85902f4aeb0Sopenharmony_ci generated. 86002f4aeb0Sopenharmony_ci 86102f4aeb0Sopenharmony_ci - EGL_BAD_STREAM_KHR is generated if <stream> is not a valid 86202f4aeb0Sopenharmony_ci EGLStream created for <dpy>. 86302f4aeb0Sopenharmony_ci 86402f4aeb0Sopenharmony_ci 86502f4aeb0Sopenharmony_ciIssues 86602f4aeb0Sopenharmony_ci 1. Are EGL_WIDTH and EGL_HEIGHT parameters needed? 86702f4aeb0Sopenharmony_ci 86802f4aeb0Sopenharmony_ci RESOLVED: No. The width and height of images managed by the 86902f4aeb0Sopenharmony_ci stream are determined by the producer. No application access 87002f4aeb0Sopenharmony_ci to the size is currently required. 87102f4aeb0Sopenharmony_ci 87202f4aeb0Sopenharmony_ci 2. Is EGL_BUFFER_SHOW_ALL_KHR required, or should the stream always 87302f4aeb0Sopenharmony_ci act as EGL_BUFFER_REPLACE_KHR? 87402f4aeb0Sopenharmony_ci 87502f4aeb0Sopenharmony_ci RESOLVED: this has been removed. The old 87602f4aeb0Sopenharmony_ci EGL_BUFFER_SHOW_ALL_KHR behavior is described in a separate 87702f4aeb0Sopenharmony_ci extension: EGL_KHR_stream_fifo 87802f4aeb0Sopenharmony_ci 87902f4aeb0Sopenharmony_ci 3. What are the exact semantics of the producer? 88002f4aeb0Sopenharmony_ci 88102f4aeb0Sopenharmony_ci RESOLVED: The exact semantics vary depending on the type of 88202f4aeb0Sopenharmony_ci producer. Refer to the extension that defines the type of 88302f4aeb0Sopenharmony_ci producer for more information. 88402f4aeb0Sopenharmony_ci 88502f4aeb0Sopenharmony_ci In general, the producer is responsible for inserting image 88602f4aeb0Sopenharmony_ci frames into the EGLStream at the correct time. The correct 88702f4aeb0Sopenharmony_ci time depends on how the image frames are being created and on 88802f4aeb0Sopenharmony_ci the value of EGL_CONSUMER_LATENCY_USEC_KHR. 88902f4aeb0Sopenharmony_ci 89002f4aeb0Sopenharmony_ci 4. What are the exact semantics of the consumer? 89102f4aeb0Sopenharmony_ci 89202f4aeb0Sopenharmony_ci RESOLVED: The exact semantics vary depending on the type of 89302f4aeb0Sopenharmony_ci consumer. Refer to the extension that defines the type of 89402f4aeb0Sopenharmony_ci consumer for more information. 89502f4aeb0Sopenharmony_ci 89602f4aeb0Sopenharmony_ci In general, the consumer is responsible for retrieving image 89702f4aeb0Sopenharmony_ci frames from the EGLStream when they become available. The 89802f4aeb0Sopenharmony_ci consumer is also responsible for setting the 89902f4aeb0Sopenharmony_ci EGL_CONSUMER_LATENCY_USEC_KHR when that is possible. 90002f4aeb0Sopenharmony_ci 90102f4aeb0Sopenharmony_ci 5. When will the EGLStream resources be deleted? 90202f4aeb0Sopenharmony_ci 90302f4aeb0Sopenharmony_ci RESOLVED: this depends on the type of consumer and producer. 90402f4aeb0Sopenharmony_ci Refer to the description of the consumer and producer (e.g. in 90502f4aeb0Sopenharmony_ci the extension that describes them). 90602f4aeb0Sopenharmony_ci 90702f4aeb0Sopenharmony_ci 6. How does A/V sync work? 90802f4aeb0Sopenharmony_ci 90902f4aeb0Sopenharmony_ci RESOLVED: The producer is responsible for A/V sync, but the 91002f4aeb0Sopenharmony_ci consumer needs to help. The consumer indicates the latency 91102f4aeb0Sopenharmony_ci (the average time that it takes the consumer to retrieve an 91202f4aeb0Sopenharmony_ci image from the EGLStream and place it on the display screen) 91302f4aeb0Sopenharmony_ci by setting the EGL_CONSUMER_LATENCY_USEC_KHR. The producer 91402f4aeb0Sopenharmony_ci uses knowledge about the audio stream to determine the correct 91502f4aeb0Sopenharmony_ci time to display an image frame, and inserts the image frame at 91602f4aeb0Sopenharmony_ci that time MINUS the EGL_CONSUMER_LATENCY_USEC_KHR. 91702f4aeb0Sopenharmony_ci 91802f4aeb0Sopenharmony_ci 7. What if the consumer cannot determine the latency? 91902f4aeb0Sopenharmony_ci 92002f4aeb0Sopenharmony_ci RESOLVED: If the consumer does not set the 92102f4aeb0Sopenharmony_ci EGL_CONSUMER_LATENCY_USEC_KHR attribute then its default value 92202f4aeb0Sopenharmony_ci will be used. This default value is implementation defined 92302f4aeb0Sopenharmony_ci and may be zero. See the description of the specific type of 92402f4aeb0Sopenharmony_ci consumer you are using (e.g. the extension that defines it) 92502f4aeb0Sopenharmony_ci for more details related to that consumer. 92602f4aeb0Sopenharmony_ci 92702f4aeb0Sopenharmony_ci 8. What colorformats are supported by EGLStream 92802f4aeb0Sopenharmony_ci 92902f4aeb0Sopenharmony_ci RESOLVED: No specific formats are required, but it is expected 93002f4aeb0Sopenharmony_ci that this work with the main YUV formats supported by the 93102f4aeb0Sopenharmony_ci platform's video HW and the main RGB(A) formats supported by 93202f4aeb0Sopenharmony_ci the platform's OpenGL (ES) hardware. It is the responsibility 93302f4aeb0Sopenharmony_ci of the producer to negotiate a format that will work with the 93402f4aeb0Sopenharmony_ci consumer. If the internal formats supported by the producer 93502f4aeb0Sopenharmony_ci do not coincide with the internal formats supported by the 93602f4aeb0Sopenharmony_ci consumer then the producer may choose to convert to a format 93702f4aeb0Sopenharmony_ci that the consumer understands, or it may choose to fail and 93802f4aeb0Sopenharmony_ci generate an error when an attempt is made to connect it to the 93902f4aeb0Sopenharmony_ci EGLStream. Exactly which it does for which formats is further 94002f4aeb0Sopenharmony_ci discussed in the producer endpoint documentation (refer to the 94102f4aeb0Sopenharmony_ci extension that describes the producer endpoint). 94202f4aeb0Sopenharmony_ci 94302f4aeb0Sopenharmony_ci 9. Is any EGLImage extension required by this extension? 94402f4aeb0Sopenharmony_ci 94502f4aeb0Sopenharmony_ci RESOLVED: No. This extension may be implemented using some of 94602f4aeb0Sopenharmony_ci the same code that is used to implement EGLImages, but there 94702f4aeb0Sopenharmony_ci is no dependency on EGLImages. 94802f4aeb0Sopenharmony_ci 94902f4aeb0Sopenharmony_ci 10. Why describe the "io" attribute type if no attributes use it. 95002f4aeb0Sopenharmony_ci 95102f4aeb0Sopenharmony_ci RESOLVED: Future extensions will add attributes of "io" type 95202f4aeb0Sopenharmony_ci (initialize only - meaning they can be set in the attribute 95302f4aeb0Sopenharmony_ci list when creating the EGLStream, but not modified once the 95402f4aeb0Sopenharmony_ci EGLStream is created). Rather than requiring each such 95502f4aeb0Sopenharmony_ci extension to describe the "io" type (and possibly getting 95602f4aeb0Sopenharmony_ci slightly different definitions or types in different 95702f4aeb0Sopenharmony_ci extensions) the "io" type is defined here so that other 95802f4aeb0Sopenharmony_ci extensions can easily use it. This helps layered 95902f4aeb0Sopenharmony_ci extensions to all use the same language. 96002f4aeb0Sopenharmony_ci 96102f4aeb0Sopenharmony_ci 96202f4aeb0Sopenharmony_ciRevision History 96302f4aeb0Sopenharmony_ci 96402f4aeb0Sopenharmony_ci #27 (May 23, 2016) Daniel Kartch 96502f4aeb0Sopenharmony_ci - For compatibility with EGL 1.5 and support of 64-bit 96602f4aeb0Sopenharmony_ci platforms, add EGL_KHR_stream_attrib extension with variants 96702f4aeb0Sopenharmony_ci of original functions that accept attributes of type 96802f4aeb0Sopenharmony_ci EGLAttrib. 96902f4aeb0Sopenharmony_ci - Corrected line length violations. 97002f4aeb0Sopenharmony_ci 97102f4aeb0Sopenharmony_ci #26 (July 12, 2012) Acorn Pooley 97202f4aeb0Sopenharmony_ci - Fix error in description of consumer latency. 97302f4aeb0Sopenharmony_ci 97402f4aeb0Sopenharmony_ci #25 (October 12, 2011) Acorn Pooley 97502f4aeb0Sopenharmony_ci - Add issue 10 97602f4aeb0Sopenharmony_ci 97702f4aeb0Sopenharmony_ci #24 (October 11, 2011) Acorn Pooley 97802f4aeb0Sopenharmony_ci - add error condition to eglDestroyStreamKHR 97902f4aeb0Sopenharmony_ci 98002f4aeb0Sopenharmony_ci #23 (October 5, 2011) Acorn Pooley 98102f4aeb0Sopenharmony_ci - refer to related EGL_KHR_... extension specs rather than 98202f4aeb0Sopenharmony_ci EGL_NV_... ones. 98302f4aeb0Sopenharmony_ci 98402f4aeb0Sopenharmony_ci #22 (September 27, 2011) Acorn Pooley 98502f4aeb0Sopenharmony_ci - Fix enum value for EGL_STREAM_STATE_KHR (bug 8064) 98602f4aeb0Sopenharmony_ci 98702f4aeb0Sopenharmony_ci #21 (September 27, 2011) Acorn Pooley 98802f4aeb0Sopenharmony_ci - Assign enum values (bug 8064) 98902f4aeb0Sopenharmony_ci 99002f4aeb0Sopenharmony_ci #20 (September 23, 2011) Acorn Pooley 99102f4aeb0Sopenharmony_ci - Rename EGL_NO_IMAGE_STREAM_KHR to EGL_NO_STREAM_KHR 99202f4aeb0Sopenharmony_ci 99302f4aeb0Sopenharmony_ci #19 (Aug 3, 2011) Acorn Pooley 99402f4aeb0Sopenharmony_ci - fix some error conditions 99502f4aeb0Sopenharmony_ci 99602f4aeb0Sopenharmony_ci #18 (Aug 2, 2011) Acorn Pooley 99702f4aeb0Sopenharmony_ci - Add eglQueryStreamu64KHR 99802f4aeb0Sopenharmony_ci - add EGLuint64KHR 99902f4aeb0Sopenharmony_ci - make EGL_PRODUCER_FRAME_KHR and EGL_CONSUMER_FRAME_KHR 64 100002f4aeb0Sopenharmony_ci bit. 100102f4aeb0Sopenharmony_ci 100202f4aeb0Sopenharmony_ci #17 (Aug 2, 2011) Acorn Pooley 100302f4aeb0Sopenharmony_ci - fix grammar 100402f4aeb0Sopenharmony_ci 100502f4aeb0Sopenharmony_ci #16 (July 6, 2011) Acorn Pooley 100602f4aeb0Sopenharmony_ci - rename from EGL_KHR_image_stream to EGL_KHR_stream 100702f4aeb0Sopenharmony_ci 100802f4aeb0Sopenharmony_ci #15 (June 29, 2011) Acorn Pooley 100902f4aeb0Sopenharmony_ci - major re-write 101002f4aeb0Sopenharmony_ci - remove EGL_SWAP_MODE_KHR and EGL_BUFFER_SHOW_ALL_KHR 101102f4aeb0Sopenharmony_ci - add new functions: 101202f4aeb0Sopenharmony_ci eglStreamAttribKHR 101302f4aeb0Sopenharmony_ci eglQueryStreamKHR 101402f4aeb0Sopenharmony_ci - add new attributes: 101502f4aeb0Sopenharmony_ci EGL_CONSUMER_LATENCY_USEC_KHR 101602f4aeb0Sopenharmony_ci EGL_PRODUCER_FRAME_KHR 101702f4aeb0Sopenharmony_ci EGL_CONSUMER_FRAME_KHR 101802f4aeb0Sopenharmony_ci EGL_STREAM_STATE_KHR 101902f4aeb0Sopenharmony_ci - add concept of EGL_STREAM_STATE_KHR 102002f4aeb0Sopenharmony_ci - add new error: 102102f4aeb0Sopenharmony_ci EGL_BAD_STATE_KHR 102202f4aeb0Sopenharmony_ci - add more thorough overview section 102302f4aeb0Sopenharmony_ci - add description of buffering 102402f4aeb0Sopenharmony_ci - place the functions in section 3 of the spec (were in 102502f4aeb0Sopenharmony_ci section 2) 102602f4aeb0Sopenharmony_ci - mention some of the consumer and producer specs that may be 102702f4aeb0Sopenharmony_ci needed to make use of this extension. 102802f4aeb0Sopenharmony_ci - remove very old issues that no longer make any sense 102902f4aeb0Sopenharmony_ci - add new issues and resolutions 103002f4aeb0Sopenharmony_ci 103102f4aeb0Sopenharmony_ci #14 (June 4, 2010) Greg Prisament 103202f4aeb0Sopenharmony_ci - fix minor typo 103302f4aeb0Sopenharmony_ci 103402f4aeb0Sopenharmony_ci #13 (June 2, 2010) Marcus Lorentzon 103502f4aeb0Sopenharmony_ci - add EGL enum values 103602f4aeb0Sopenharmony_ci 103702f4aeb0Sopenharmony_ci #12 (May 21, 2010) Marcus Lorentzon 103802f4aeb0Sopenharmony_ci - add clarifications on swap modes 103902f4aeb0Sopenharmony_ci 104002f4aeb0Sopenharmony_ci #11 (April 13, 2010) Marcus Lorentzon 104102f4aeb0Sopenharmony_ci - fix tyops 104202f4aeb0Sopenharmony_ci - make eglDestroyStream return EGLBoolean, not void 104302f4aeb0Sopenharmony_ci 104402f4aeb0Sopenharmony_ci #10 (March 17, 2010) Marcus Lorentzon 104502f4aeb0Sopenharmony_ci - fix typo 104602f4aeb0Sopenharmony_ci - remove obsolete text 104702f4aeb0Sopenharmony_ci - update issue 2 resolution 104802f4aeb0Sopenharmony_ci 104902f4aeb0Sopenharmony_ci #9 (December 15, 2009) Marcus Lorentzon 105002f4aeb0Sopenharmony_ci - move EGL_IMAGE_USE_* attributes to the endpoint extension 105102f4aeb0Sopenharmony_ci - resolved issue 5 105202f4aeb0Sopenharmony_ci 105302f4aeb0Sopenharmony_ci #8 (December 6, 2009) Marcus Lorentzon 105402f4aeb0Sopenharmony_ci - remove EGL_INIT_COLOR_KHR 105502f4aeb0Sopenharmony_ci - relax the definition of the Producer to allow not only video 105602f4aeb0Sopenharmony_ci frames to be generated 105702f4aeb0Sopenharmony_ci - clean up the language of recently produced, supplied, pending 105802f4aeb0Sopenharmony_ci images 105902f4aeb0Sopenharmony_ci 106002f4aeb0Sopenharmony_ci #7 (October 19, 2009) Acorn Pooley 106102f4aeb0Sopenharmony_ci - Update based on comments from Robert and Bruce 106202f4aeb0Sopenharmony_ci - remove mention of OpenWF 106302f4aeb0Sopenharmony_ci - make EGL_BUFFER_REPLACE_KHR be the default EGL_SWAP_MODE_KHR 106402f4aeb0Sopenharmony_ci - add issue 5 106502f4aeb0Sopenharmony_ci - remove EGLAPI and EGLAPIENTRY 106602f4aeb0Sopenharmony_ci 106702f4aeb0Sopenharmony_ci #6 (September 16, 2009) Acorn Pooley 106802f4aeb0Sopenharmony_ci - remove EGL_WIDTH and EGL_HEIGHT parameters 106902f4aeb0Sopenharmony_ci - add issue 4 107002f4aeb0Sopenharmony_ci - clarify swap modes 107102f4aeb0Sopenharmony_ci - other clarifications and simplifications 107202f4aeb0Sopenharmony_ci 107302f4aeb0Sopenharmony_ci #5 (July 2, 2009) Acorn Pooley 107402f4aeb0Sopenharmony_ci - remove reference to no-longer-existing <images> parameter. 107502f4aeb0Sopenharmony_ci - mention dependancy on EGL_KHR_image_uses extension. 107602f4aeb0Sopenharmony_ci - add description of EGL_IMAGE_USE_AS_* enums. 107702f4aeb0Sopenharmony_ci 107802f4aeb0Sopenharmony_ci #4 (June 3, 2009) Acorn Pooley 107902f4aeb0Sopenharmony_ci - Fix typos: change old EGLImageStream occurances to EGLStream 108002f4aeb0Sopenharmony_ci 108102f4aeb0Sopenharmony_ci #3 (April 22, 2009) Marcus Lorentzon 108202f4aeb0Sopenharmony_ci - Updated revide comments 108302f4aeb0Sopenharmony_ci - Removed external image support 108402f4aeb0Sopenharmony_ci 108502f4aeb0Sopenharmony_ci #2 (March 30, 2009) Marcus Lorentzon 108602f4aeb0Sopenharmony_ci - Replaced image surface with image stream 108702f4aeb0Sopenharmony_ci 108802f4aeb0Sopenharmony_ci #1 (February 21, 2009) Marcus Lorentzon 108902f4aeb0Sopenharmony_ci - Initial draft 109002f4aeb0Sopenharmony_ci 109102f4aeb0Sopenharmony_ci# vim:ai:ts=4:sts=4:expandtab:textwidth=70 1092