typedef khronos_int32_t | khronos_bool |
typedef khronos_int32_t | TErrCode |
Image stream implementation.
WF native stream is an abstraction of image stream or a content pipe that can be used to deliver image data from place to another. A stream has a producer (source) and a consumer (sink) as its users.
Streams operate on buffers, whose count is fixed at creation time (minimum is 1, but for non-blocking behavior values greater than 1 should be used.) Streams are meant to be used strictly on "point-to-point" basis, i.e. there should be only one producer and one consumer for each stream.
typedef const TSurfaceId * | SymbianStreamType |
typedef const void * | SymbianRequestStatusPtr |
Enumerator | Value | Description |
---|---|---|
ESOWF_NoEvent | 0x00000000 | |
ESOWF_EventComposed | 0x00000001 | |
ESOWF_EventUpdated | 0x00000010 | |
ESOWF_SIEventsMask | ESOWF_EventComposed | ESOWF_EventUpdated | |
ESOWF_EventAvailable | 0x00000100 | |
ESOWF_EventDisplayed | 0x00000200 | |
ESOWF_EventDisplayedX | 0x00000400 | |
ESOWF_SUSEventsMask | ESOWF_EventDisplayed | ESOWF_EventAvailable | ESOWF_EventDisplayedX | |
ESOWF_EventContentReady | 0x00000800 | |
ESOWF_ImplicitEventsMask | ESOWF_EventContentReady | ESOWF_EventDisplayed | ESOWF_EventAvailable | ESOWF_EventDisplayedX | |
ESOWF_AllEventsMask | (ESOWF_SIEventsMask | ESOWF_SUSEventsMask | ESOWF_EventContentReady) | |
ESOWF_ObserverReturnDefaultEvent | 0x00010000 | |
ESOWF_ObserverActivate | 0x00020000 | |
ESOWF_ObserverCheckVisible | 0x00040000 | |
ESOWF_ObserverRemove | 0x00080000 | |
ESOWF_ObserverDeactivate | 0x00100000 | |
ESOWF_RESERVED_MASK | 0xff000000 |
typedef enum type_SymbianStreamEventBits | SymbianStreamEventBits |
typedef khronos_int32_t | SymOwfNativeStreamBuffer |
typedef khronos_int32_t | MultipleSymbianStreamEventBits |
typedef khronos_int32_t | SymNativeStreamEvent |
typedef khronos_int32_t | SymbianStreamBuffer |
typedef khronos_int32_t | SymOwfPixelFormat |
typedef khronos_int32_t | SymOwfBool |
Enumerator | Value | Description |
---|---|---|
SOWF_STREAM_ERROR_NONE | 0 | |
SOWF_STREAM_ERROR_INVALID_STREAM | -1 | |
SOWF_STREAM_ERROR_INVALID_OBSERVER | -2 | |
SOWF_STREAM_ERROR_OUT_OF_MEMORY | -3 |
typedef void(* | SymOwfStreamCallback |
Native stream callback function type
typedef void(* | SymbianStreamCallback |
Native stream callback function type
Enumerator | Value | Description |
---|---|---|
SYM_CONTENT_UPDATE_BEGIN | 0x00000001 | |
SYM_CONTENT_UPDATE_END | 0x00000002 | |
SYM_CONTENT_UPDATE | 0x00000003 | |
SYM_CONTENT_UPDATE_MAX | 0xffffffff |
Enumerator | Value | Description |
---|---|---|
SYM_CONTENT_VISIBLE_NOT_SET | 0x00000000 | |
SYM_CONTENT_VISIBLE | 0x00000001 | |
SYM_CONTENT_NOT_VISIBLE | 0x00000002 | |
SYM_CONTENT_MAX | 0xffffffff |
Enumerator | Value | Description |
---|---|---|
SYM_CONTENT_PREVIOUS_COMMIT_FALSE | 0x00000000 | |
SYM_CONTENT_PREVIOUS_COMMIT_TRUE | 0x00000001 | |
SYM_CONTENT_COMMIT_MAX | 0xffffffff |
IMPORT_C TErrCode | SymbianStreamAcquire | ( | const TSurfaceId * | aId, |
SymbianStreamType * | aReturnHandle | |||
) |
Finds, and creates if necessary, a Native Stream object encapsulating the specified surface.
aId must not be a NULL pointer
aReturnHandle must not be a NULL pointer, and must point to writable storage for the handle.
In particular, aId->IsNull() should return EFalse.
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
The location pointed to by aReturnHandle is set to a valid Native Stream object and KErrNone is returned, or NULL is set and an error code is returned appropriately.
The method may fail due to memory allocation if the Native Stream does not already exist.
If a stream object is successfully created, then the reference on the stream is increased to ensure it remains live following the method call. See SymbianStreamRemoveReference to release the reference.
Parameters | |
---|---|
aId | The TSurfaceId for the surface to encapsulate. |
aReturnHandle | The Native Stream handle created. |
Panic Codes | |
---|---|
NativeStream | 1000001 Null Surface ID |
NativeStream | 1000002 Null return value pointer |
IMPORT_C TErrCode | SymbianStreamAcquireReadBuffer | ( | SymbianStreamType | aStream, |
SymbianStreamBuffer * | aReturnBuffer | |||
) |
Opens the current output buffer of the Native Stream object for non-exclusive reading.
aStream must be an active Native Stream object. It must not be NULL.
aReturnBuffer must not be a NULL pointer, and must point to writable storage for the handle.
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
To simplify composition, SymbianStreamAcquireReadBuffer will never fail. It will arbitrarily select a buffer if the stream has never been written to or updated.
This method always succeeds and returns quickly.
The current read buffer is locked for reading.
The location pointed to by aReturnBuffer is set to a handle representing the read buffer at the time of this call.
In single-buffered streams, the content of the buffer may be overwritten while the reader is reading it, leading to tearing, but this behavior is generally considered preferable to blocking the reader.
The Native Stream will not be destroyed while buffers are acquired.
Note that no operations likely to cause failure will occur during the acquire method, but successful acquire does not guarantee that the buffer pixel data can be successfully mapped using NativeStreamGetBufferPointer.
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aReturnBuffer | Filled with the handle to use to access the current read buffer |
Panic Codes | |
---|---|
NativeStream | 1000002 Null return value pointer |
NativeStream | 1000003 Null Native Stream |
IMPORT_C TErrCode | SymbianStreamAcquireWriteBuffer | ( | SymbianStreamType | aStream, |
SymbianStreamBuffer * | aReturnBuffer | |||
) |
Opens the write buffer of the Native Stream for exclusive writable access.
aStream must be an active Native Stream object. It must not be NULL.
aReturnBuffer must not be a NULL pointer, and must point to writable storage for the handle.
In single-buffered Native Streams, access is not controlled, any number of readers and/or writer(s) may access the buffer simultaneously, potentially leading to tearing, but this behavior is generally considered preferable to blocking the reader.
There is already an active writer
There are still readers attached to the next write buffer candidate (in buffer swapping architectures)
The copy from write buffer to read buffer is ongoing, or waiting for readers (in buffer copying architectures)
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
This method returns quickly.
If the write buffer cannot be acquired immediately then an error code is returned, indicating why exclusive access to a writable buffer could not be obtained.
If the write buffer is acquired the KErrNone is returned, and the contents referenced by aReturnBuffer are filled with a handle representing the current write buffer. The current write buffer is locked for writing.
The Native Stream will not be destroyed while buffers are acquired.
Note that no resource operations likely to cause failure will occur during the acquire method, but successful acquire does not guarantee that the buffer pixel data can be successfully mapped using NativeStreamGetBufferPointer.
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aReturnBuffer | Filled with the handle to use to access the current write buffer |
Panic Codes | |
---|---|
NativeStream | 1000002 Null return value pointer |
NativeStream | 1000003 Null Native Stream |
IMPORT_C TErrCode | SymbianStreamAddObserver | ( | SymbianStreamType | aStream, |
SymbianStreamCallback | aObserver, | |||
void * | aData | |||
) |
typedef void (*SymOwfStreamCallback)( SymbianStreamType, SymNativeStreamEvent, void*);
aStream must be an active Native Stream object. It must not be NULL.
aObserver must not be NULL
aData may be NULL
The combination of observer and data may be already registered, in which case it will be called twice if an event occurs.
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
The method may fail to add the observer to an internal list of observers, due to memory failure.
The observer function will be called when any event occurs which was specified in the OpenWF-C SI and has been implemented by OpenWF Support. Symbian OS-specific extension events will not be delivered to observers registering using this method.
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aObserver | Client function to be called when any event is called. |
aData | Data supplied by client which will be passed to the method call. |
Panic Codes | |
---|---|
NativeStream | 1000003 Null Native Stream |
NativeStream | 1000004 Null aObserver |
IMPORT_C TErrCode | SymbianStreamAddExtendedObserver | ( | SymbianStreamType | aStream, |
SymbianStreamCallback | aObserver, | |||
void * | aData, | |||
khronos_int32_t | aScreenNumber, | |||
SymbianStreamEventBits | aEvents | |||
) |
aStream must be an active Native Stream object. It must not be NULL.
aObserver must not be NULL
aEvents must specify 1 or more event flags
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
zero: Screen number 0 associated with the first on-screen composition context
positive: A real screen number associated other on-screen composition contexts
A good value for aScreenNumber may not be required for all event registrations, and should be set to EScreenNumberAllNoEvents when not required.
The method may fail to add the observer to an internal list of observers, due to memory failure.
The observer function will be called when an event specified in the parameter list occurs.
If the screen number is zero or positive, or EScreenNumberAllEvents and the event includes ESOWF_EVENTUPDATED then this client may be expected to handle bit flagged events - see SymbianStreamEventBits. Such an Observer must also send back Available and Displayed notifications to Symbian Stream as required.
See also: TSymContentReadyInfo
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aObserver | Client function to be called when any specified event is called. |
aData | Client data passed to the function. |
aScreenNumber | Screen Number of the consumer, where relevant. |
aEvents | Events for which this observer will be called. |
Panic Codes | |
---|---|
NativeStream | 1000003 Null Native Stream |
NativeStream | 1000004 Null aObserver |
IMPORT_C void | SymbianStreamAddReference | ( | SymbianStreamType | aStream | ) |
aStream must be an active Native Stream object. It must not be NULL.
The object will not be destroyed until an equivalent number of calls to SymbianStreamRemoveReference.
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
Panic Codes | |
---|---|
NativeStream | 1000003 Null Native Stream |
NativeStream | 1000004 Null aObserver |
IMPORT_C TErrCode | SymbianStreamGetBufferId | ( | SymbianStreamType | aStream, |
SymbianStreamBuffer | aBufferHandle, | |||
khronos_int32_t * | aReturnIndex, | |||
const TSurfaceId ** | aReturnSurface | |||
) |
aStream must be an active Native Stream object. It must not be NULL.
aBufferHandle must be a valid acquired buffer on that native stream that has not yet been released.
aReturnIndex must not be a NULL pointer, and must point to writable storage for the index value.
aReturnSurface must not be a NULL pointer, and must point to writable storage for the TSurfaceId pointer.
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
SymbianStreamGetBufferPointer or SymbianStreamGetBufferId can only be called after a call to SymbianStreamAcquireReadBuffer or SymbianStreamAcquireWriteBuffer, and before the call to SymbianStreamReleaseReadBuffer or SymbianStreamReleaseWriteBuffer.
They can be called multiple times in this period, but each call is not guaranteed to return the same information, and the information returned by an earlier call should not be used after repeating the call or after calling SymbianStreamReleaseReadBuffer or SymbianStreamReleaseWriteBuffer.
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aBufferHandle | Handle to acquired read or write buffer. |
aReturnIndex | Returns internal buffer number. |
aReturnSurface | Returns internal TSurfaceId. |
Panic Codes | |
---|---|
NativeStream | 1000002 Null return value pointer |
NativeStream | 1000003 Null Native Stream |
IMPORT_C TErrCode | SymbianStreamFind | ( | const TSurfaceId * | aId, |
SymbianStreamType * | aReturnStream | |||
) |
aId must not be NULL.
aReturnStream must not be a NULL pointer, and must point to writable storage for the handle.
[Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.]
If a Native Stream has been successfully acquired, using SymbianStreamAcquire, for the surface ID, then that Native Stream is returned.
The reference on the stream is increased to ensure it remains live following the method call. See SymbianStreamRemoveReference to release the reference.
If the identified stream is not currently acquired, then NULL is returned, and an error code is set.
The error codes set by this method may not distinguish between Surface IDs that have not been Acquired and bad values for the surface ID, such as IsNull() or destroyed surfaces.
Parameters | |
---|---|
aId | Surface ID handle that is to be accessed. |
aReturnStream | Filled with the handle of the equivalent Native Stream |
Panic Codes | |
---|---|
NativeStream | 1000001 Null Surface ID |
NativeStream | 1000002 Null return value pointer |
IMPORT_C TErrCode | SymbianStreamGetBufferPointer | ( | SymbianStreamType | aStream, |
SymbianStreamBuffer | aBuffer, | |||
void ** | aReturnPointer | |||
) |
aStream must be an active Native Stream object. It must not be NULL.
aBuffer should not be NULL
aReturnPointer must not be a NULL pointer, and must point to writable storage for the pointer.
aBuffer must be a currently acquired read or write buffer handle on the specified Native Stream.
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
SymbianStreamGetBufferPointer or SymbianStreamGetBufferId should not be called more than once for each buffer acquire. Correct cleanup behavior is not guaranteed if these methods are called multiple times.
The pixel data must be mappable to CPU-accessible RAM. For some multimedia content types this may not be possible, and the method will fail. The error reported will be forwarded from Surface Manager.
The method may fail if the pixel data cannot be made available in the caller's address space, for a variety of reasons including running out of virtual memory. If Successful:
Pixel data is made available and a pointer to the first pixel is returned.
The layout of the pixel data will be as specified by SymbianStreamGetHeader.
The memory may be tagged as read-only if the buffer was generated using AcquireReadBuffer.
This layout implies a maximum size to the buffer data. The client should not access data outside that range of addresses.
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aBuffer | Acquired buffer handle. |
aReturnPointer | Filled with the handle to use to access the current read buffer |
Panic Codes | |
---|---|
NativeStream | 1000001 Null Surface ID |
NativeStream | 1000002 Null return value pointer |
IMPORT_C void | SymbianStreamGetHeader | ( | SymbianStreamType | aStream, |
khronos_int32_t * | aWidth, | |||
khronos_int32_t * | aHeight, | |||
khronos_int32_t * | aStride, | |||
khronos_int32_t * | aFormat, | |||
khronos_int32_t * | aPixelSize | |||
) |
aStream must be an active Native Stream object. It must not be NULL.
The remaining parameters are each either NULL, or point to local data storage which will be modified.
Targets of non-NULL parameters will be filled in with values describing the surface encapsulated by the Native Stream.
[Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.]
In the current implementation, this information is stored locally and can be efficiently accessed.
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aWidth | Pointer to fill in width in pixels of the displayable buffer. |
aHeight | Pointer to fill in height in pixels of the displayable buffer. |
aStride | Pointer to fill in offset between rows of pixels. |
aFormat | Pointer to fill in format code matching well known Symbian OS surface format UIDs. |
aPixelSize | Pointer to fill in number of bytes per pixel for the given format. |
Panic Codes | |
---|---|
NativeStream | 1000002 Null return value pointer |
NativeStream | 1000003 Null Native Stream |
IMPORT_C void | SymbianStreamGetFullSize | ( | SymbianStreamType | aStream, |
khronos_int32_t * | aFullSizeWidth, | |||
khronos_int32_t * | aFullSizeHeight | |||
) |
aStream must be an active Native Stream object. It must not be NULL.
The remaining parameters are each either NULL, or point to local data storage which will be modified.
Targets of non-NULL parameters will be filled in with the oversized buffer values described in the surface encapsulated by the Native Stream.
If image stabilisation is not supported the displayable buffer size will be retrieved instead.
[Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.]
In the current implementation, this information is stored locally and can be efficiently accessed.
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aFullSizeWidth | Pointer to fill in width in pixels of the oversized buffer. |
aFullSizeHeight | Pointer to fill in height in pixels of the oversized buffer. |
Panic Codes | |
---|---|
NativeStream | 1000002 Null return value pointer |
NativeStream | 1000003 Null Native Stream |
IMPORT_C void | SymbianStreamGetDisplayableOffset | ( | SymbianStreamType | aStream, |
SymbianStreamBuffer | aBuffer, | |||
khronos_int32_t * | aOffsetX, | |||
khronos_int32_t * | aOffsetY | |||
) |
aStream must be an active Native Stream object. It must not be NULL.
aBuffer should not be NULL.
The remaining parameters are each either NULL, or point to local data storage which will be modified.
Targets of non-NULL parameters will be filled in with the displayable offset values associated with the acquired buffer.
The displayable offset is measured from the top left-hand corner of the oversized buffer to the top left-hand corner of the displayable sub rectangle.
If image stabilisation is not supported or the offset is not used the displayable offset will be set to zero.
[Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.]
In the current implementation, this information is stored locally and can be efficiently accessed.
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aBuffer | Acquired buffer handle. |
aOffsetX | Pointer to fill in the X-axis offset value in pixels of the displayable buffer. |
aOffsetY | Pointer to fill in the Y-axis offset value in pixels of the displayable buffer. |
Panic Codes | |
---|---|
NativeStream | 1000002 Null return value pointer |
NativeStream | 1000003 Null Native Stream |
IMPORT_C TErrCode | SymbianStreamGetHint | ( | SymbianStreamType | aStream, |
khronos_int32_t | aUid, | |||
khronos_int32_t * | aValueReturn, | |||
khronos_bool * | aMutableReturn | |||
) |
Returns extra details of the format of the image data stored in the Native Stream. This method is intended to allow compositors to access the SurfaceManager hints associated with the stream without using SurfaceManager-explicit code. It is possible in future that some of the hint IDs could be resolved locally rather than calling surface manager.
IMPORT_C TErrCode | SymbianStreamHasRegisteredScreenNotifications | ( | khronos_int32_t | aScreenNumber, |
void ** | aReturnState | |||
) |
Get handle to registration of a screen number for surface update notifications.
aReturnState may be NULL, or must point to a location to receive the internal object registered with SUS
[Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.]
aReturnState void* opaque handle is NULL if the given screen number is not registered. The type of the internal object returned by this method is subject to change.
A change in the value of aReturnState in subsequent calls indicates that the screen has been re-registered.
Parameters | |
---|---|
aScreenNumber | Any valid screen number. |
aReturnState | Points to a Pointer to hold the returned registered object. |
IMPORT_C TErrCode | SymbianStreamRegisterScreenNotifications | ( | khronos_int32_t | aScreenNumber, |
khronos_int32_t | aPriority, | |||
khronos_int32_t | aInternalVersion | |||
) |
Register a screen number for surface update notifications.
aScreenNumber and aPriority should be within acceptable value ranges for SUS.
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
The thread used to register screen notifications must have an active scheduler and generally run in scheduling mode.
Surface Update Server will be started if it has not already been started.
The given screen number is registered or re-registered with SUS at the given priority.
If SUS cannot be started, for example in debug environments, then an error is returned, but a screen update object is still created, as returned by SymbianStreamHasRegisteredScreenNotifications.
The default heap specified when calling this method will be activated when SUS notifies the Native Stream of an update.
Parameters | |
---|---|
aScreenNumber | Number of screen to be registered. This number should be acceptable to SUS. |
aPriority | Nominal priority of the screen for global updates. Higher values have higher priority. |
aInternalVersion | internal compositor version number to be reported to SUS. |
IMPORT_C TErrCode | SymbianStreamReleaseReadBuffer | ( | SymbianStreamType | aStream, |
SymbianStreamBuffer | aBuffer | |||
) |
aStream must be an active Native Stream object. It must not be NULL.
aBuffer must be a buffer handle acquired on this stream using SymbianStreamAcquireReadBuffer and not yet released.
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
The non-exclusive buffer lock is released, potentially allowing writers to modify the content of the buffer.
Any memory made available using SymbianStreamGetBufferPointer on this buffer handle may become unmapped from the caller's address space. The pointer must not continue to be used.
Clients using SymbianStreamBufferId to efficiently access multimedia resources should release those resources before calling this method; otherwise they risk the contents being overwritten.
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aBuffer | Buffer handle that is to be released. |
Panic Codes | |
---|---|
NativeStream | 1000003 Null Native Stream |
IMPORT_C TErrCode | SymbianStreamReleaseWriteBuffer | ( | SymbianStreamType | aStream, |
SymbianStreamBuffer | aBuffer | |||
) |
aStream must be an active Native Stream object. It must not be NULL.
aBuffer must be a buffer handle successfully acquired on this stream using SymbianStreamAcquireWriteBuffer and not yet released.
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
This buffer content becomes the read buffer for all subsequent calls to SymbianStreamAcquireReadBuffer
The exclusive buffer lock is released.
Any memory made available using SymbianStreamGetBufferPointer on this buffer handle may become unmapped from the caller's address space. The pointer should not continue to be used.
Clients using SymbianStreamBufferId to access multimedia resources should release those resources before calling this method; otherwise they risk the changes being ignored.
Any registered observers will be called with the ESOWF_EVENTUpdated notification.
If the surface is multi-buffered, subsequent attempts to SymbianStreamAcquireWriteBuffer will succeed and will select a different buffer to write to, presuming clients do not still have a non-exclusive read lock on the available write buffers.
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aBuffer | Buffer handle that is to be released. |
Panic Codes | |
---|---|
NativeStream | 1000003 Null Native Stream |
IMPORT_C TErrCode | SymbianStreamRemoveObserver | ( | SymbianStreamType | aStream, |
void * | aData, | |||
SymbianStreamEventBits | aEvents | |||
) |
aStream must be an active Native Stream object. It must not be NULL.
aData should have been provided as the client data when the observer was registered.
aEvents indicates which events should no longer be notified, and should match the original extended events list.
If aEvents is empty then the observer is removed from all events.
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
The observer function will no longer be called when the specified events occur, unless the observer was registered more than once, in which case the number of notifications will be reduced.
There is a small window of opportunity that events triggered on one thread may complete after the observer has been removed from another thread. Clients should be aware of this potential false call.
See also: TSymContentReadyInfo
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aData | Client data supplied when registering the observer. |
aEvents | Events to remove registration from. |
Panic Codes | |
---|---|
NativeStream | 1000006 Null for all search parameters |
IMPORT_C void | SymbianStreamRemoveReference | ( | SymbianStreamType | aStream | ) |
aStream must be an active Native Stream object. It must not be NULL.
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
The recorded references are reduced. If this is the final reference then the Native Stream is destroyed.
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
Panic Codes | |
---|---|
NativeStream | 1000003 Null Native Stream |
IMPORT_C void | SymbianStreamSetProtectionFlag | ( | SymbianStreamType | aStream, |
khronos_bool | aFlag | |||
) |
aStream must be an active Native Stream object. It must not be NULL.
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
If aFlag is set then the reference is effectively artificially raised to protect the Native Stream against deletion.
If aFlag is clear then the reference returns to normal mode, and the Native Stream may be destroyed.
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aFlag | Set true to activate protection - set false to deactivate protection. |
Panic Codes | |
---|---|
NativeStream | 1000003 Null Native Stream |
IMPORT_C khronos_bool | SymbianStreamSame | ( | SymbianStreamType | aStream, |
SymbianStreamType | aStream2 | |||
) |
Check if two stream objects are the same surface.
aStream must be an active Native Stream object, or it may be NULL.
aStream2 must be an active Native Stream object, or it may be NULL.
[Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack. ]
Direct comparison will be performed first. No allocations or system calls will be made to resolve this comparison, returning false where, for example the surface IDs refer to the same Surface Manager controlled object.
Parameters | |
---|---|
aStream | compare these two streams. |
aStream2 | compare these two streams. |
IMPORT_C TErrCode | SymbianStreamUnregisterScreenNotifications | ( | khronos_int32_t | aScreenNumber | ) |
Unregister a screen number for surface update notifications.
aScreenNumber should have previously been registered using SymbianStreamRegisterScreenNotifications.
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
Out of range screen numbers will not have been registered, and will naturally not be found to unregister. No specific error code will indicate these screen numbers.
Notifications of content updated will no longer be received by the Native Stream for that screen number or passed on to any observer.
Parameters | |
---|---|
aScreenNumber | Screen number to be unregistered. |
IMPORT_C void | SymbianStreamProcessNotifications | ( | SymbianStreamType | aStream, |
khronos_int32_t | aEvent, | |||
khronos_int32_t | aScreenNumber, | |||
khronos_int32_t | aSerialNumber, | |||
khronos_int32_t * | aReturnMask | |||
) |
aSerialNumber must be changed after each composition, and allows the Native stream to detect multiple calls from the same composition.
aStream must be an active Native Stream object. It must not be NULL.
This method, or CheckVisible must be called exactly once after receiving ESOWF_EVENTUpdated, for each type of notification requested in the ESOWF_EVENTUpdated call by any context that has registered both SymbianStreamRegisteredScreenNotifications and SymbianStreamAddObserver (or SymbianStreamAddObserver with ESOWF_EventUpdated).
Not calling this method when expected may cause deadlocks, and the result code delivered to SUS after calling the method too often with conflicting result codes is not defined.
ESOWF_EventAvailable Content is available
ESOWF_EventDisplayed Content is displayed
ESOWF_EventDisplayedX Content is displayed and repeated
Matching notifications to the Surface Update Server for this screen number may be completed (via callbacks).
If the notification is to be repeated then aReturnMask is modified to indicate which notifications should be repeated.
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aEvent | The type of consumption notification event. |
aScreenNumber | The screen number to which the event applies. |
aSerialNumber | The serial number to which the event applies. Changes after each composition, allowing repeat calls within one composition to be detected |
aReturnMask | Used by the recipient to enable repeating of the ESOWF_EventDisplayedX event. |
IMPORT_C void | SymbianStreamCheckVisible | ( | SymbianStreamType | aStream, |
khronos_int32_t | aEvent, | |||
khronos_int32_t | aScreenNumber, | |||
khronos_int32_t | aSerialNumber | |||
) |
aSerialNumber must be changed after each composition event, and allows the Native stream to detect multiple calls from the same composition.
aStream must be an active Native Stream object. It must not be NULL.
This method, or ProcessNotifications must be called exactly once after receiving ESOWF_EVENTUpdated, for each type of notification requested in the ESOWF_EVENTUpdated call by any context that has registered both SymbianStreamRegisteredScreenNotifications and SymbianStreamAddObserver (or SymbianStreamAddObserver with ESOWF_EventUpdated).
ESOWF_EventAvailable Content is available
ESOWF_EventDisplayed Content is displayed
ESOWF_EventDisplayedX Content is displayed and repeated
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aEvent | The type of consumption notification event. |
aScreenNumber | The screen number to which the event applies. |
aSerialNumber | The serial number to which the event applies. Changes after each composition, allowing repeat calls within one composition to be detected. |
IMPORT_C void | SymbianStreamSetFlipState | ( | SymbianStreamType | aStream, |
SymOwfBool | aFlip | |||
) |
The flip state is updated when SymbianStreamReleaseWriteBuffer() call is made
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aFlip | The flip state |
IMPORT_C TErrCode | SymbianStreamPublishPixelFormats | ( | khronos_int32_t | aScreenNumber, |
SymOwfBool | aOptimal, | |||
const SymOwfPixelFormat * | aFormats, | |||
khronos_int32_t | aFormatCount | |||
) |
Publish the native pixel formats supported by the OpenWF Composition implementation in its input streams
See also: CompositionPixelFormats::Publish()
Parameters | |
---|---|
aScreenNumber | Screen number for which the specified formats are supported. |
aOptimal | OWF_FALSE to publish all the supported formats for aScreenId. OWF_TRUE to publish the optimal formats for aScreenId. |
aFormats | Pointer to array of pixel format UIDs to be published. |
aFormatCount | Number of formats supplied in aFormats. |
IMPORT_C void | SymbianStreamUnpublishPixelFormats | ( | khronos_int32_t | aScreenNumber | ) |
Unpublish the native pixel formats supported by the OpenWF Composition implementation in its input streams
See also: CompositionPixelFormats::Unpublish()
Parameters | |
---|---|
aScreenNumber | Screen number for which formats have previously been published. |
IMPORT_C TErrCode | SymbianStreamActivateObserver | ( | SymbianStreamType | aStream, |
void * | aData, | |||
SymbianStreamEventBits | aEvents | |||
) |
aStream must be an active Native Stream object. It must not be NULL.
aEvents must specify 1 or more event flags
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
The observer function will be called when an event specified in the parameter list occurs.
See also: TSymContentReadyData
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aData | Client data passed to the observer callback function. |
aEvents | Events for which this observer will be called. |
IMPORT_C TErrCode | SymbianStreamDeactivateObserver | ( | SymbianStreamType | aStream, |
void * | aData, | |||
SymbianStreamEventBits | aEvents | |||
) |
aStream must be an active Native Stream object. It must not be NULL.
aEvents indicates the events corresponding to the observers to be deactivated
If aEvents is empty then deactivate all observers previously activated.
Calls can be safely made from any thread, but the same default heap must be in place for all calls. The thread should have an activated clean-up stack.
See also: TSymContentReadyInfo
Parameters | |
---|---|
aStream | Native Stream handle that is to be accessed. |
aData | Client data passed to the observer callback function. |
aEvents | Events to deactivate the observers from. |