Stream interface
FluStreamType |
|
FluStream * |
|
void |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
FluSource * |
|
void |
|
void |
|
void |
|
void |
|
void |
|
guintptr |
|
void |
|
void |
|
void |
|
void |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
gboolean |
|
void |
|
void |
|
gpointer |
|
gboolean |
FluStreamType flu_stream_type_get (FluStream *thiz);
Gets the type of a FluStream
Since: 1.0
The stream to get the type from
The type of the stream
Increase the reference count of an FluStream
Since: 1.0
The stream to increase the reference count
The same stream for programming convenience.
[transfer full]
void flu_stream_unref (FluStream *thiz);
Since: 1.0
gboolean flu_stream_is_active (FluStream *thiz);
Checks if an FluStream is active
Since: 1.0
The stream to check if it is active
TRUE if the stream is active, FALSE otherwise
gboolean flu_stream_is_ignored (FluStream *thiz);
Checks if an FluStream is ignored
Since: 1.0
The stream to check if it is ignored
TRUE if the stream is ignored, FALSE otherwise
gboolean flu_stream_is_pending (FluStream *thiz);
Checks if an FluStream is pending for activation
Since: 1.0
The stream to check if it is pending for activation
TRUE if the stream is pending for activation, FALSE otherwise
gboolean flu_stream_info_get (FluStream *thiz, const FluStreamInfo **info);
Gets the information of an FluStream
Since: 1.0
The stream to get the information from
The pointer to store the stream information. Returned structure lifetime is the same as the associated FluStream instance. If you need to keep FluStreamInfo data beyond the lifetime of the FluStream instance, you can use flu_stream_info_copy() to copy them to a local instance. Don't forget to call flu_stream_info_clear() later on your local instance to free up memory.
TRUE if the operation succeeded, FALSE otherwise
get the source the stream belongs to
Since: 1.1
source of the stream or NULL.
[transfer full]
void flu_stream_expose (FluStream *thiz);
Tell an FluStream to expose the last frame This will redraw the last frame on the destination texture
Since: 1.0
void flu_stream_mouse_event_send (FluStream *thiz, const gchar *event, gint button, gdouble x, gdouble y);
Send a mouse event to a FluStream. These events are typically retrieved from the user Interface layer (e.g. GTK) and sent to the stream for processing (e.g., by the DVD virtual machine inside Fluendo SDK).
Since: 1.0
The FluStream to send the mouse event to
The type of mouse event, as a text string. Recognised values are "mouse-button-press", "mouse-button-release" and "mouse-move".
The pressed button
The X coordinate of the mouse event
The Y coordinate of the mouse event
void flu_stream_key_event_send (FluStream *thiz, const gchar *event, const gchar *key);
Send a key event to a FluStream. These events are typically retrieved from the user Interface layer (e.g. GTK) and sent to the stream for processing (e.g., by the DVD virtual machine inside Fluendo SDK).
Since: 1.0
The FluStream to send the key event to
The type of the key event, as a text string. Recognised values are "key-press" and "key-release".
The key to send
void flu_stream_navigation_cmd_send (FluStream *thiz, FluStreamNavigationCommand command);
Send a navigation command to a FluStream. These events are typically generated through a User Interface menu, remote or special key and sent to the stream for processing (e.g., by the DVD virtual machine inside Fluendo SDK).
Since: 1.0
void flu_stream_texture_set (FluStream *thiz, guintptr handle, gboolean handle_aspect_ratio);
Sets the video texture on a FluStream. The texture pointer is system dependent. For X11 you need to pass a XDrawable, for android a ANativeWindow, for Windows a HWND and for Quartz an NSView.
Since: 1.0
The FluStream of type FLU_STREAM_TYPE_VIDEO to set the texture on
The texture to set
indicates that the video rendering element should handle the black borders to maintain video's original aspect ratio.
guintptr flu_stream_texture_get (FluStream *thiz);
Gets the video texture from a FluStream
Since: 1.0
The system dependent pointer see flu_stream_texture_set()
void flu_stream_volume_set (FluStream *thiz, gfloat volume);
Sets the volume of a FluStream
Since: 1.0
The FluStream of type FLU_STREAM_TYPE_AUDIO to set the volume on
The volume to set, in the range of 0 to 1
void flu_stream_volume_get (FluStream *thiz, gfloat *volume);
Gets the volume of a FluStream
Since: 1.0
The FluStream of type FLU_STREAM_TYPE_AUDIO to get the volume from
The volume to get, in the range of 0 to 1.
void flu_stream_time_offset_set (FluStream *thiz, gint64 offset);
Sets the time offset of a FluStream. Setting a time offset on a stream will make the playback of the stream be shifted by the time specified. This is useful, for example, to synchronize the playback in case the streams are badly muxed, or to synchronize the subtitles.
Since: 1.0
void flu_stream_time_offset_get (FluStream *thiz, gint64 *offset);
Gets the time offset of a FluStream. Initially the offset will be set to zero. In case flu_stream_time_offset_set() is used to set another value, this function will return such value.
Since: 1.0
gboolean flu_stream_position_get (FluStream *thiz, gint64 *position);
Gets the current position of this stream. Player position describes an overall clock position, and not the current sample that is being rendered for a particular stream. In some cases it might be required by the application developer to know what is the current position of a specific stream to easily return to that position. (For exemple a subtitle buffer or sparse video stream)
Since: 1.0
TRUE if the position is valid, FALSE otherwise
gboolean flu_stream_roi_set (FluStream *thiz, gint x, gint y, gint w, gint h);
Set the ROI (Region of Interest) on a stream note: The stream must be of type FLU_STREAM_TYPE_VIDEO
Since: 1.0
The FluStream to set the ROI
The x coordinate of the ROI rectangle
The y coordinate of the ROI rectangle
The width of the ROI rectangle
The height of the ROI rectangle
TRUE of the ROI can be set, FALSE otherwise
gboolean flu_stream_roi_get (FluStream *thiz, gint *x, gint *y, gint *w, gint *h);
Get the ROI (Region of Interest) of a stream note: The stream must be of type FLU_STREAM_TYPE_VIDEO
Since: 1.0
The FluStream to set the ROI
The x coordinate of the ROI rectangle.
The y coordinate of the ROI rectangle.
The width of the ROI rectangle.
The height of the ROI rectangle.
TRUE if successful, FALSE otherwise
gboolean flu_stream_render_rectangle_set (FluStream *thiz, gint x, gint y, gint width, gint height);
Set the render rectangle on a stream. A render rectangle specifies the area of the texture the stream must draw into note: The stream must be of type FLU_STREAM_TYPE_VIDEO
Since: 1.0
The FluStream to set the render rectangle
The x coordinate of the render rectangle
The y coordinate of the render rectangle
The width of the render rectangle
The height of the render rectangle
TRUE of the render rectangle can be set, FALSE otherwise
gboolean flu_stream_render_rectangle_get (FluStream *thiz, gint *x, gint *y, gint *width, gint *height);
Get the render rectangle on a stream. A render rectangle specifies the area of the texture the stream must draw into note: The stream must be of type FLU_STREAM_TYPE_VIDEO
Since: 1.0
The FluStream to get the render rectangle from
The x coordinate of the render rectangle.
The y coordinate of the render rectangle.
The width of the render rectangle.
The height of the render rectangle.
TRUE of the render rectangle can be get, FALSE otherwise
gboolean flu_stream_text_pango_get (FluStream *thiz, gchar **content, gsize *len);
Get the current pango content from a FluStream note: The stream must be active and of type FLU_STREAM_TYPE_TEXT
Since: 1.0
The FluStream to get the pango content from
The pointer to store the pango content on.
The length of the content pointer.
TRUE if successful, FALSE otherwise
gboolean flu_stream_text_plain_get (FluStream *thiz, gchar **content, gsize *len);
Get the current plain text from a FluStream note: The stream must be active and of type FLU_STREAM_TYPE_TEXT
Since: 1.0
The FluStream to get the plain text content from
The pointer to store the text plain content on.
The length of the content pointer.
TRUE if successful, FALSE otherwise
gboolean flu_stream_data_xml_get (FluStream *thiz, gchar **content, gsize *len);
Get the current xml text from a FluStream note: The stream must be active and of type FLU_STREAM_TYPE_DATA
Since: 1.1
The FluStream to get the xml text content from
The pointer to store the text xml content on
The length of the content
TRUE if successful, FALSE otherwise
gboolean flu_stream_frame_ycbcr_get (FluStream *thiz, FluStreamVideoYcbcrFormat format, gint width, gint height, guint8 **planes, guint32 *pitches);
Get the current YCbCr frame pixels from a FluStream note: The stream must be active and of type FLU_STREAM_TYPE_VIDEO
Since: 1.0
The FluStream to get the YCbCr pixels from
The FluStreamVideoYcbcrFormat format to use
The desired width of the frame (-1 to use the native width)
The desired height of the frame (-1 to use the native height)
The planes pointer to store the pixels. The number of planes depend on the format used
The pitch for each plane. The number of pitches depend on the format used.
TRUE if successful, FALSE otherwise
gboolean flu_stream_frame_ycbcr_push (FluStream *thiz, FluStreamVideoYcbcrFormat format, gint width, gint height, guint8 **planes, guint32 *pitches);
gboolean flu_stream_frame_rgb_get (FluStream *thiz, FluStreamVideoRgbFormat format, gint width, gint height, gpointer data, guint32 pitch);
Get the current RGB frame pixels from a FluStream note: The stream must be active and of type FLU_STREAM_TYPE_VIDEO
Since: 1.0
The FluStream to get the RGB pixels from
The FluStreamVideoRgbFormat format to use
The desired width of the frame (-1 to use the native width)
The desired height of the frame (-1 to use the native height)
The pointer where data is to be stored
The pitch of the frame (distance in bytes from the beginning of a row to the beginning of the next)
TRUE if successful, FALSE otherwise
gboolean flu_stream_frame_rgb_push (FluStream *thiz, FluStreamVideoRgbFormat format, gint width, gint height, guint8 *data, guint32 pitch);
gboolean flu_stream_frame_encoded_get (FluStream *thiz, FluStreamVideoFrameFormat format, gint width, gint height, guint8 **data, guint *size);
Get the current frame out of a FluStream, encoded in the format specified by FluStreamVideoFrameFormat format. Note: Stream must be active and have FLU_STREAM_TYPE_VIDEO or FLU_STREAM_TYPE_TEXT type.
Since: 1.1
The FluStream to get the frame pixels from
The FluStreamVideoFrameFormat format to use
The desired width of the frame (-1 to use the native width)
The desired height of the frame (-1 to use the native height)
Address of a pointer where data are going to be copied. On succes, data pointer will be filled out with the address of a binary data block representing the encoded content of the frame. In this case, data content must be freed using g_free(). In case of failure, data pointer will be filled out with NULL.
size in bytes of the buffer returned by data parameter.
TRUE if successful, FALSE otherwise
gboolean flu_stream_frame_save (FluStream *thiz, FluStreamVideoFrameFormat format, gint width, gint height, const gchar *location);
Save the current frame into an image file Note: Stream must be active and have FLU_STREAM_TYPE_VIDEO or FLU_STREAM_TYPE_TEXT type.
Since: 1.0
The FluStream to save to a file
The FluStreamVideoFrameFormat format to use
The desired width of the frame (-1 to use the native width)
The desired height of the frame (-1 to use the native height)
The file path to save the file (not a URI)
TRUE if successful, FALSE otherwise
void flu_stream_user_data_add (FluStream *thiz, const gchar *key, gpointer user_data, GDestroyNotify destroy);
Add user provided data into a stream
Since: 1.0
The FluStream to store the user data into
The name to identify the data stored
The callback function to relase user_data when the FluStream is destroyed
void flu_stream_user_data_remove (FluStream *thiz, const gchar *key);
Remove user provided data from a stream
Since: 1.0
gpointer flu_stream_user_data_get (FluStream *thiz, const gchar *key);
Get the user provided data from a stream
Since: 1.0
A pointer to the user data.
[transfer none]
Gets the last sample from a stream and forwards it the output stream.
note: The output stream must be a FluStream requested, for example from a FluRecorder. Both streams must be of the same type, as you can't copy an audio sample to a stream of type FLU_STREAM_TYPE_VIDEO
Since: 1.1
The FluStream to copy the last sample from
The FluStream to copy the last sample too
TRUE if successful, FALSE otherwise
Enum values used to describe different types of YCbCr formats
FLU_STREAM_VIDEO_YCBCR_FORMAT_YUYV |
Identical to YUY2, YUNV, V422. |
FLU_STREAM_VIDEO_YCBCR_FORMAT_YV12 |
YV12 |
FLU_STREAM_VIDEO_YCBCR_FORMAT_I420 |
Enum values used to describe different types of RGB formats
FLU_STREAM_VIDEO_RGB_FORMAT_R8G8B8 |
|
FLU_STREAM_VIDEO_RGB_FORMAT_B8G8R8X8 |
|
FLU_STREAM_VIDEO_RGB_FORMAT_B8G8R8A8 |
Bit-field structure to inform what changed in a stream
Audio specific mask to inform what fields are set or not
FLU_STREAM_AUDIO_FEATURE_EXTENSION |
Has the extension field set |
FLU_STREAM_AUDIO_FEATURE_DESCRIPTION |
Has the audio description field set |
Text specific mask to inform what fields are set or not
FLU_STREAM_TEXT_FEATURE_HEARING_IMPAIRED |
Has the hearing_impaired field set |
Specific mask to inform what fields are set or not
FLU_STREAM_FEATURE_GROUP_INDEX |
Has the group_index field set |
FLU_STREAM_FEATURE_COMPONENT_TAG |
Has the component_tag field set |
FLU_STREAM_FEATURE_AV_PID |
Has the av_pid field set |
FLU_STREAM_FEATURE_IS_ENCRYPTED |
Has the is_encrypted field set |
Enum values used to describe different user commands that can be sent to an FluStream through the navigation interface. These are typically used for DVD menu navigation, for example.
FLU_STREAM_NAVIGATION_COMMAND_MENU1 |
Go to menu 1. |
FLU_STREAM_NAVIGATION_COMMAND_MENU2 |
Go to menu 2. |
FLU_STREAM_NAVIGATION_COMMAND_MENU3 |
Go to menu 3. |
FLU_STREAM_NAVIGATION_COMMAND_MENU4 |
Go to menu 4. |
FLU_STREAM_NAVIGATION_COMMAND_MENU5 |
Go to menu 5. |
FLU_STREAM_NAVIGATION_COMMAND_MENU6 |
Go to menu 6. |
FLU_STREAM_NAVIGATION_COMMAND_MENU7 |
Go to menu 7. |
FLU_STREAM_NAVIGATION_COMMAND_LEFT |
Go left. |
FLU_STREAM_NAVIGATION_COMMAND_RIGHT |
Go right. |
FLU_STREAM_NAVIGATION_COMMAND_UP |
Go up. |
FLU_STREAM_NAVIGATION_COMMAND_DOWN |
Go down. |
FLU_STREAM_NAVIGATION_COMMAND_ACTIVATE |
Activate current selection |
FLU_STREAM_NAVIGATION_COMMAND_PREV_ANGLE |
Select previous angle |
FLU_STREAM_NAVIGATION_COMMAND_NEXT_ANGLE |
Select next angle |
typedef struct { } FluStream;
An opaque structure representing a media stream instance.