Video
Description:
public namespace Video
Example: GTK-Integration:
public int main (string[] args) {
Gtk.init (ref args);
Gst.init (ref args);
if (args.length != 2) {
print ("% [VIDEO]\n", args[0]);
return 0;
}
var win = new Gtk.Window ();
uint val = 0;
uint *handle = &val;
win.realize.connect (() => {
handle = (uint*) ((Gdk.X11.Window) win.get_window ()).get_xid ();
});
var e = Gst.ElementFactory.make ("playbin","playbin");
e.bus.add_watch(0,(bus,message) => {
if(Gst.Video.is_video_overlay_prepare_window_handle_message (message)) {
Gst.Video.Overlay overlay = message.src as Gst.Video.Overlay;
assert (overlay != null);
overlay.set_window_handle (handle);
}
return true;
});
e["uri"] = args[1];
e.set_state (Gst.State.PLAYING);
win.destroy.connect (Gtk.main_quit);
win.show_all ();
Gtk.main ();
return 0;
}
valac --pkg gstreamer-video-1.0 --pkg gtk+-3.0 --pkg gdk-x11-3.0 gtk-integration.vala
Content:
Classes:
Structs:
Enums:
Constants:
Delegates:
- public delegate bool AffineTransformationGetMatrix (AffineTransformationMeta meta, float matrix)
- public delegate void ConvertSampleCallback (Sample sample, Error error)
- public delegate void FormatPack (FormatInfo info, PackFlags flags, void* src, int sstride, void* data, int stride, ChromaSite chroma_site, int y, int width)
- public delegate void FormatUnpack (FormatInfo info, PackFlags flags, void* dest, void* data, int stride, int x, int y, int width)
- public delegate bool GLTextureUpload (GLTextureUploadMeta meta, uint texture_id)
- public delegate bool MetaMapVFunc (Meta meta, uint plane, MapInfo info, void* data, int stride, MapFlags flags)
- public delegate bool MetaUnmapVFunc (Meta meta, uint plane, MapInfo info)
Methods:
- public Type afd_meta_api_get_type ()
- public unowned MetaInfo? afd_meta_get_info ()
- public Type affine_transformation_meta_api_get_type ()
- public unowned MetaInfo? affine_transformation_meta_get_info ()
- public Type bar_meta_api_get_type ()
- public unowned MetaInfo? bar_meta_get_info ()
- public bool blend (Frame dest, Frame src, int x, int y, float global_alpha)
- public void blend_scale_linear_RGBA (Info src, Buffer src_buffer, int dest_height, int dest_width, out unowned Info dest, out Buffer dest_buffer)
- public unowned AFDMeta? buffer_add_video_afd_meta (Buffer buffer, uint8 field, AFDSpec spec, AFDValue afd)
- public unowned AffineTransformationMeta? buffer_add_video_affine_transformation_meta (Buffer buffer)
- public unowned BarMeta? buffer_add_video_bar_meta (Buffer buffer, uint8 field, bool is_letterbox, uint bar_data1, uint bar_data2)
- public unowned CaptionMeta? buffer_add_video_caption_meta (Buffer buffer, CaptionType caption_type, uint8[] data)
- public unowned CodecAlphaMeta? buffer_add_video_codec_alpha_meta (Buffer buffer, owned Buffer alpha_buffer)
- public unowned GLTextureUploadMeta? buffer_add_video_gl_texture_upload_meta (Buffer buffer, GLTextureOrientation texture_orientation, uint n_textures, GLTextureType texture_type, GLTextureUpload upload, BoxedCopyFunc user_data_copy, BoxedFreeFunc user_data_free)
- public unowned Meta? buffer_add_video_meta (Buffer buffer, FrameFlags flags, Format format, uint width, uint height)
- public unowned Meta? buffer_add_video_meta_full (Buffer buffer, FrameFlags flags, Format format, uint width, uint height, uint n_planes, size_t[] offset, int[] stride)
- public unowned OverlayCompositionMeta? buffer_add_video_overlay_composition_meta (Buffer buf, OverlayComposition? comp)
- public unowned RegionOfInterestMeta? buffer_add_video_region_of_interest_meta (Buffer buffer, string roi_type, uint x, uint y, uint w, uint h)
- public unowned RegionOfInterestMeta? buffer_add_video_region_of_interest_meta_id (Buffer buffer, Quark roi_type, uint x, uint y, uint w, uint h)
- public unowned SEIUserDataUnregisteredMeta? buffer_add_video_sei_user_data_unregistered_meta (Buffer buffer, uint8 uuid, uint8 data, size_t size)
- public unowned TimeCodeMeta? buffer_add_video_time_code_meta (Buffer buffer, TimeCode tc)
- public unowned TimeCodeMeta? buffer_add_video_time_code_meta_full (Buffer buffer, uint fps_n, uint fps_d, DateTime latest_daily_jam, TimeCodeFlags flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count)
- public unowned Meta? buffer_get_video_meta (Buffer buffer)
- public unowned Meta? buffer_get_video_meta_id (Buffer buffer, int id)
- public unowned RegionOfInterestMeta? buffer_get_video_region_of_interest_meta_id (Buffer buffer, int id)
- public bool buffer_pool_config_get_video_alignment (Structure config, Alignment align)
- public void buffer_pool_config_set_video_alignment (Structure config, Alignment align)
- public bool calculate_display_ratio (out uint dar_n, out uint dar_d, uint video_width, uint video_height, uint video_par_n, uint video_par_d, uint display_par_n, uint display_par_d)
- public Type caption_meta_api_get_type ()
- public unowned MetaInfo? caption_meta_get_info ()
- public CaptionType caption_type_from_caps (Caps caps)
- public Caps caption_type_to_caps (CaptionType type)
- public void center_rect (Rectangle src, Rectangle dst, out Rectangle result, bool scaling)
- public ChromaSite chroma_from_string (string s)
- public ChromaSite chroma_site_from_string (string s)
- public string? chroma_site_to_string (ChromaSite site)
- public unowned string chroma_to_string (ChromaSite site)
- public Type codec_alpha_meta_api_get_type ()
- public unowned MetaInfo? codec_alpha_meta_get_info ()
- public ColorMatrix color_matrix_from_iso (uint value)
- public bool color_matrix_get_Kr_Kb (ColorMatrix matrix, out double Kr, out double Kb)
- public uint color_matrix_to_iso (ColorMatrix matrix)
- public ColorPrimaries color_primaries_from_iso (uint value)
- public unowned ColorPrimariesInfo? color_primaries_get_info (ColorPrimaries primaries)
- public bool color_primaries_is_equivalent (ColorPrimaries primaries, ColorPrimaries other)
- public uint color_primaries_to_iso (ColorPrimaries primaries)
- public void color_range_offsets (ColorRange range, FormatInfo info, out unowned int[] offset, out unowned int[] scale)
- public double color_transfer_decode (TransferFunction func, double val)
- public double color_transfer_encode (TransferFunction func, double val)
- public Sample convert_sample (Sample sample, Caps to_caps, ClockTime timeout) throws Error
- public void convert_sample_async (Sample sample, Caps to_caps, ClockTime timeout, owned ConvertSampleCallback callback)
- public Type crop_meta_api_get_type ()
- public unowned MetaInfo? crop_meta_get_info ()
- public bool event_is_force_key_unit (Event event)
- public Event event_new_downstream_force_key_unit (ClockTime timestamp, ClockTime stream_time, ClockTime running_time, bool all_headers, uint count)
- public Event event_new_still_frame (bool in_still)
- public Event event_new_upstream_force_key_unit (ClockTime running_time, bool all_headers, uint count)
- public bool event_parse_downstream_force_key_unit (Event event, out ClockTime timestamp, out ClockTime stream_time, out ClockTime running_time, out bool all_headers, out uint count)
- public bool event_parse_still_frame (Event event, out bool in_still)
- public bool event_parse_upstream_force_key_unit (Event event, out ClockTime running_time, out bool all_headers, out uint count)
- public FieldOrder field_order_from_string (string order)
- public unowned string field_order_to_string (FieldOrder order)
- public Format format_from_fourcc (uint32 fourcc)
- public Format format_from_masks (int depth, int bpp, int endianness, uint red_mask, uint green_mask, uint blue_mask, uint alpha_mask)
- public Format format_from_string (string format)
- public unowned FormatInfo? format_get_info (Format format)
- public void* format_get_palette (Format format, out size_t size)
- public uint32 format_to_fourcc (Format format)
- public unowned string format_to_string (Format format)
- public unowned Format[] formats_raw ()
- public bool frame_map (out Frame frame, Info info, Buffer buffer, MapFlags flags)
- public bool frame_map_id (out Frame frame, Info info, Buffer buffer, int id, MapFlags flags)
- public Type gl_texture_upload_meta_api_get_type ()
- public unowned MetaInfo? gl_texture_upload_meta_get_info ()
- public bool guess_framerate (ClockTime duration, out int dest_n, out int dest_d)
- public bool info_from_caps (out unowned Info info, Caps caps)
- public void info_init (out unowned Info info)
- public InterlaceMode interlace_mode_from_string (string mode)
- public unowned string interlace_mode_to_string (InterlaceMode mode)
- public bool is_common_aspect_ratio (int width, int height, int par_n, int par_d)
- public bool is_video_overlay_prepare_window_handle_message (Message msg)
- public Caps make_raw_caps (Format[]? formats)
- public Caps make_raw_caps_with_features (Format[]? formats, owned CapsFeatures? features)
- public bool mastering_display_info_from_string (out MasteringDisplayInfo minfo, string mastering)
- public Type meta_api_get_type ()
- public unowned MetaInfo? meta_get_info ()
- public Quark meta_transform_scale_get_quark ()
- public unowned Value? multiview_get_doubled_height_modes ()
- public unowned Value? multiview_get_doubled_size_modes ()
- public unowned Value? multiview_get_doubled_width_modes ()
- public unowned Value? multiview_get_mono_modes ()
- public unowned Value? multiview_get_unpacked_modes ()
- public bool multiview_guess_half_aspect (MultiviewMode mv_mode, uint width, uint height, uint par_n, uint par_d)
- public MultiviewMode multiview_mode_from_caps_string (string caps_mview_mode)
- public unowned string multiview_mode_to_caps_string (MultiviewMode mview_mode)
- public void multiview_video_info_change_mode (Info info, MultiviewMode out_mview_mode, MultiviewFlags out_mview_flags)
- public bool navigation_event_get_coordinates (Event event, out double x, out double y)
- public NavigationEventType navigation_event_get_type (Event event)
- public Event navigation_event_new_command (NavigationCommand command)
- public Event navigation_event_new_key_press (string key, NavigationModifierType state)
- public Event navigation_event_new_key_release (string key, NavigationModifierType state)
- public Event navigation_event_new_mouse_button_press (int button, double x, double y, NavigationModifierType state)
- public Event navigation_event_new_mouse_button_release (int button, double x, double y, NavigationModifierType state)
- public Event navigation_event_new_mouse_move (double x, double y, NavigationModifierType state)
- public Event navigation_event_new_mouse_scroll (double x, double y, double delta_x, double delta_y, NavigationModifierType state)
- public Event navigation_event_new_touch_cancel (NavigationModifierType state)
- public Event navigation_event_new_touch_down (uint identifier, double x, double y, double pressure, NavigationModifierType state)
- public Event navigation_event_new_touch_frame (NavigationModifierType state)
- public Event navigation_event_new_touch_motion (uint identifier, double x, double y, double pressure, NavigationModifierType state)
- public Event navigation_event_new_touch_up (uint identifier, double x, double y, NavigationModifierType state)
- public bool navigation_event_parse_command (Event event, out NavigationCommand command)
- public bool navigation_event_parse_key_event (Event event, out unowned string key)
- public bool navigation_event_parse_modifier_state (Event event, NavigationModifierType state)
- public bool navigation_event_parse_mouse_button_event (Event event, out int button, out double x, out double y)
- public bool navigation_event_parse_mouse_move_event (Event event, out double x, out double y)
- public bool navigation_event_parse_mouse_scroll_event (Event event, out double x, out double y, out double delta_x, out double delta_y)
- public bool navigation_event_parse_touch_event (Event event, out uint identifier, out double x, out double y, out double pressure)
- public bool navigation_event_parse_touch_up_event (Event event, out uint identifier, out double x, out double y)
- public bool navigation_event_set_coordinates (Event event, double x, double y)
- public NavigationMessageType navigation_message_get_type (Message message)
- public Message navigation_message_new_angles_changed (Object src, uint cur_angle, uint n_angles)
- public Message navigation_message_new_commands_changed (Object src)
- public Message navigation_message_new_event (Object src, Event event)
- public Message navigation_message_new_mouse_over (Object src, bool active)
- public bool navigation_message_parse_angles_changed (Message message, out uint cur_angle, out uint n_angles)
- public bool navigation_message_parse_event (Message message, out Event event)
- public bool navigation_message_parse_mouse_over (Message message, out bool active)
- public NavigationQueryType navigation_query_get_type (Query query)
- public Query navigation_query_new_angles ()
- public Query navigation_query_new_commands ()
- public bool navigation_query_parse_angles (Query query, out uint cur_angle, out uint n_angles)
- public bool navigation_query_parse_commands_length (Query query, out uint n_cmds)
- public bool navigation_query_parse_commands_nth (Query query, uint nth, out NavigationCommand cmd)
- public void navigation_query_set_angles (Query query, uint cur_angle, uint n_angles)
- public void navigation_query_set_commandsv (Query query, NavigationCommand[] cmds)
- public bool orientation_from_tag (TagList taglist, out OrientationMethod method)
- public Type overlay_composition_meta_api_get_type ()
- public unowned MetaInfo? overlay_composition_meta_get_info ()
- public void overlay_install_properties (ObjectClass oclass, int last_prop_id)
- public bool overlay_set_property (Object object, int last_prop_id, uint property_id, Value value)
- public Type region_of_interest_meta_api_get_type ()
- public unowned MetaInfo? region_of_interest_meta_get_info ()
- public Type sei_user_data_unregistered_meta_api_get_type ()
- public unowned MetaInfo? sei_user_data_unregistered_meta_get_info ()
- public bool sei_user_data_unregistered_parse_precision_time_stamp (SEIUserDataUnregisteredMeta user_data, out uint8 status, out uint64 precision_time_stamp)
- public uint tile_get_index (TileMode mode, int x, int y, int x_tiles, int y_tiles)
- public Type time_code_meta_api_get_type ()
- public unowned MetaInfo? time_code_meta_get_info ()
- public double transfer_function_decode (TransferFunction func, double val)
- public double transfer_function_encode (TransferFunction func, double val)
- public TransferFunction transfer_function_from_iso (uint value)
- public bool transfer_function_is_equivalent (TransferFunction from_func, uint from_bpp, TransferFunction to_func, uint to_bpp)
- public uint transfer_function_to_iso (TransferFunction func)