gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <2007> Wim Taymans <wim.taymans@gmail.com>
|
2011-03-15 11:51:04 +00:00
|
|
|
* Copyright (C) <2011> Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-03 23:05:09 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
#include <gst/gst-i18n-plugin.h>
|
|
|
|
#include <gst/pbutils/pbutils.h>
|
2010-09-09 12:11:52 +00:00
|
|
|
#include <gst/video/video.h>
|
2012-03-02 09:00:55 +00:00
|
|
|
#include <gst/audio/streamvolume.h>
|
|
|
|
#include <gst/video/colorbalance.h>
|
|
|
|
#include <gst/video/videooverlay.h>
|
2012-04-13 09:01:03 +00:00
|
|
|
#include <gst/video/navigation.h>
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
|
|
|
#include "gstplaysink.h"
|
2010-07-11 12:44:10 +00:00
|
|
|
#include "gststreamsynchronizer.h"
|
2011-03-25 07:26:00 +00:00
|
|
|
#include "gstplaysinkvideoconvert.h"
|
|
|
|
#include "gstplaysinkaudioconvert.h"
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
|
|
|
GST_DEBUG_CATEGORY_STATIC (gst_play_sink_debug);
|
|
|
|
#define GST_CAT_DEFAULT gst_play_sink_debug
|
|
|
|
|
|
|
|
#define VOLUME_MAX_DOUBLE 10.0
|
|
|
|
|
2009-09-09 10:42:04 +00:00
|
|
|
#define DEFAULT_FLAGS GST_PLAY_FLAG_AUDIO | GST_PLAY_FLAG_VIDEO | GST_PLAY_FLAG_TEXT | \
|
2012-02-22 10:56:59 +00:00
|
|
|
GST_PLAY_FLAG_SOFT_VOLUME | GST_PLAY_FLAG_SOFT_COLORBALANCE
|
2009-09-09 10:42:04 +00:00
|
|
|
|
2009-03-23 18:40:18 +00:00
|
|
|
#define GST_PLAY_CHAIN(c) ((GstPlayChain *)(c))
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
|
2012-03-30 21:38:01 +00:00
|
|
|
/* enum types */
|
|
|
|
/**
|
|
|
|
* GstPlaySinkSendEventMode:
|
|
|
|
* @MODE_DEFAULT: default GstBin's send_event handling
|
|
|
|
* @MODE_FIRST: send event only to the first sink that return true
|
|
|
|
*
|
|
|
|
* Send event handling to use
|
|
|
|
*/
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
MODE_DEFAULT = 0,
|
|
|
|
MODE_FIRST = 1
|
|
|
|
} GstPlaySinkSendEventMode;
|
|
|
|
|
|
|
|
|
|
|
|
#define GST_TYPE_PLAY_SINK_SEND_EVENT_MODE (gst_play_sink_send_event_mode_get_type ())
|
|
|
|
static GType
|
|
|
|
gst_play_sink_send_event_mode_get_type (void)
|
|
|
|
{
|
|
|
|
static GType gtype = 0;
|
|
|
|
|
|
|
|
if (gtype == 0) {
|
|
|
|
static const GEnumValue values[] = {
|
|
|
|
{MODE_DEFAULT, "Default GstBin's send_event handling (default)",
|
|
|
|
"default"},
|
|
|
|
{MODE_FIRST, "Sends the event to sinks until the first one handles it",
|
|
|
|
"first"},
|
|
|
|
{0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
gtype = g_enum_register_static ("GstPlaySinkSendEventMode", values);
|
|
|
|
}
|
|
|
|
return gtype;
|
|
|
|
}
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
/* holds the common data fields for the audio and video pipelines. We keep them
|
|
|
|
* in a structure to more easily have all the info available. */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
GstPlaySink *playsink;
|
|
|
|
GstElement *bin;
|
|
|
|
gboolean added;
|
|
|
|
gboolean activated;
|
2008-12-20 12:48:43 +00:00
|
|
|
gboolean raw;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
} GstPlayChain;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
GstPlayChain chain;
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
GstPad *sinkpad;
|
2008-02-15 18:38:52 +00:00
|
|
|
GstElement *queue;
|
2014-09-16 18:42:46 +00:00
|
|
|
GstElement *filter_conv;
|
2014-03-16 16:00:38 +00:00
|
|
|
GstElement *filter;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
GstElement *conv;
|
gst/playback/: Add mute property.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_set_mute),
(gst_play_sink_get_mute), (gen_audio_chain):
* gst/playback/gstplaysink.h:
Add mute property.
* gst/playback/gststreamselector.c: (gst_selector_pad_event),
(gst_selector_pad_chain):
* gst/playback/gststreamselector.h:
Make sure we forward the event only once.
* tests/examples/seek/seek.c: (stop_cb), (mute_toggle_cb), (main):
Add and implement the mute button for playbin2.
2008-02-14 18:24:42 +00:00
|
|
|
GstElement *volume; /* element with the volume property */
|
2009-05-28 15:21:35 +00:00
|
|
|
gboolean sink_volume; /* if the volume was provided by the sink */
|
2013-05-21 14:35:18 +00:00
|
|
|
gulong notify_volume_id;
|
|
|
|
gulong notify_mute_id;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
GstElement *sink;
|
2010-06-07 12:38:42 +00:00
|
|
|
GstElement *ts_offset;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
} GstPlayAudioChain;
|
|
|
|
|
2010-04-26 15:30:44 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
GstPlayChain chain;
|
|
|
|
GstPad *sinkpad, *srcpad;
|
|
|
|
GstElement *conv;
|
|
|
|
GstElement *deinterlace;
|
|
|
|
} GstPlayVideoDeinterlaceChain;
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
GstPlayChain chain;
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
GstPad *sinkpad;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
GstElement *queue;
|
2014-09-16 18:42:46 +00:00
|
|
|
GstElement *filter_conv;
|
2014-03-16 16:00:38 +00:00
|
|
|
GstElement *filter;
|
2008-02-18 11:54:15 +00:00
|
|
|
GstElement *conv;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
GstElement *sink;
|
2008-02-18 11:54:15 +00:00
|
|
|
gboolean async;
|
2010-06-07 12:38:42 +00:00
|
|
|
GstElement *ts_offset;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
} GstPlayVideoChain;
|
|
|
|
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
GstPlayChain chain;
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
GstPad *sinkpad;
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
GstElement *queue;
|
|
|
|
GstElement *conv;
|
|
|
|
GstElement *resample;
|
2012-12-13 10:31:28 +00:00
|
|
|
GstPad *blockpad; /* srcpad of queue, used for blocking the vis */
|
|
|
|
GstPad *vispeerpad; /* srcpad of resample, used for unlinking the vis */
|
2008-02-29 12:26:48 +00:00
|
|
|
GstPad *vissinkpad; /* visualisation sinkpad, */
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
GstElement *vis;
|
2008-02-29 12:26:48 +00:00
|
|
|
GstPad *vissrcpad; /* visualisation srcpad, */
|
|
|
|
GstPad *srcpad; /* outgoing srcpad, used to connect to the next
|
|
|
|
* chain */
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
} GstPlayVisChain;
|
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
GstPlayChain chain;
|
|
|
|
GstPad *sinkpad;
|
2009-11-02 14:50:17 +00:00
|
|
|
GstElement *queue;
|
|
|
|
GstElement *identity;
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
GstElement *overlay;
|
|
|
|
GstPad *videosinkpad;
|
|
|
|
GstPad *textsinkpad;
|
|
|
|
GstPad *srcpad; /* outgoing srcpad, used to connect to the next
|
|
|
|
* chain */
|
2009-03-12 16:47:41 +00:00
|
|
|
GstElement *sink; /* custom sink to receive subtitle buffers */
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
} GstPlayTextChain;
|
|
|
|
|
2009-09-28 20:06:11 +00:00
|
|
|
#define GST_PLAY_SINK_GET_LOCK(playsink) (&((GstPlaySink *)playsink)->lock)
|
2010-05-14 15:13:17 +00:00
|
|
|
#define GST_PLAY_SINK_LOCK(playsink) G_STMT_START { \
|
|
|
|
GST_LOG_OBJECT (playsink, "locking from thread %p", g_thread_self ()); \
|
2012-01-19 08:48:38 +00:00
|
|
|
g_rec_mutex_lock (GST_PLAY_SINK_GET_LOCK (playsink)); \
|
2010-05-14 15:13:17 +00:00
|
|
|
GST_LOG_OBJECT (playsink, "locked from thread %p", g_thread_self ()); \
|
|
|
|
} G_STMT_END
|
|
|
|
#define GST_PLAY_SINK_UNLOCK(playsink) G_STMT_START { \
|
|
|
|
GST_LOG_OBJECT (playsink, "unlocking from thread %p", g_thread_self ()); \
|
2012-01-19 08:48:38 +00:00
|
|
|
g_rec_mutex_unlock (GST_PLAY_SINK_GET_LOCK (playsink)); \
|
2010-05-14 15:13:17 +00:00
|
|
|
} G_STMT_END
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
|
2011-07-27 11:05:31 +00:00
|
|
|
#define PENDING_FLAG_SET(playsink, flagtype) \
|
|
|
|
((playsink->pending_blocked_pads) |= (1 << flagtype))
|
|
|
|
#define PENDING_FLAG_UNSET(playsink, flagtype) \
|
|
|
|
((playsink->pending_blocked_pads) &= ~(1 << flagtype))
|
|
|
|
#define PENDING_FLAG_IS_SET(playsink, flagtype) \
|
|
|
|
((playsink->pending_blocked_pads) & (1 << flagtype))
|
|
|
|
#define PENDING_VIDEO_BLOCK(playsink) \
|
|
|
|
((playsink->pending_blocked_pads) & (1 << GST_PLAY_SINK_TYPE_VIDEO_RAW | 1 << GST_PLAY_SINK_TYPE_VIDEO))
|
|
|
|
#define PENDING_AUDIO_BLOCK(playsink) \
|
|
|
|
((playsink->pending_blocked_pads) & (1 << GST_PLAY_SINK_TYPE_AUDIO_RAW | 1 << GST_PLAY_SINK_TYPE_AUDIO))
|
|
|
|
#define PENDING_TEXT_BLOCK(playsink) \
|
|
|
|
PENDING_FLAG_IS_SET(playsink, GST_PLAY_SINK_TYPE_TEXT)
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
struct _GstPlaySink
|
|
|
|
{
|
|
|
|
GstBin bin;
|
|
|
|
|
2012-01-19 08:48:38 +00:00
|
|
|
GRecMutex lock;
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
|
2009-05-07 12:28:30 +00:00
|
|
|
gboolean async_pending;
|
2009-05-14 20:37:22 +00:00
|
|
|
gboolean need_async_start;
|
2009-05-07 12:28:30 +00:00
|
|
|
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
GstPlayFlags flags;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2010-07-11 12:44:10 +00:00
|
|
|
GstStreamSynchronizer *stream_synchronizer;
|
|
|
|
|
2009-03-24 16:12:53 +00:00
|
|
|
/* chains */
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
GstPlayAudioChain *audiochain;
|
2010-04-26 15:30:44 +00:00
|
|
|
GstPlayVideoDeinterlaceChain *videodeinterlacechain;
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
GstPlayVideoChain *videochain;
|
|
|
|
GstPlayVisChain *vischain;
|
|
|
|
GstPlayTextChain *textchain;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2009-03-24 16:12:53 +00:00
|
|
|
/* audio */
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
GstPad *audio_pad;
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
gboolean audio_pad_raw;
|
2011-03-15 11:51:04 +00:00
|
|
|
gboolean audio_pad_blocked;
|
2010-07-11 12:44:10 +00:00
|
|
|
GstPad *audio_srcpad_stream_synchronizer;
|
|
|
|
GstPad *audio_sinkpad_stream_synchronizer;
|
2015-05-26 11:06:50 +00:00
|
|
|
GstElement *audio_ssync_queue;
|
|
|
|
GstPad *audio_ssync_queue_sinkpad;
|
2011-06-01 17:34:54 +00:00
|
|
|
gulong audio_block_id;
|
2013-05-21 14:35:18 +00:00
|
|
|
gulong audio_notify_caps_id;
|
2009-03-24 16:12:53 +00:00
|
|
|
/* audio tee */
|
2008-02-15 18:38:52 +00:00
|
|
|
GstElement *audio_tee;
|
|
|
|
GstPad *audio_tee_sink;
|
|
|
|
GstPad *audio_tee_asrc;
|
|
|
|
GstPad *audio_tee_vissrc;
|
2009-03-24 16:12:53 +00:00
|
|
|
/* video */
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
GstPad *video_pad;
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
gboolean video_pad_raw;
|
2011-03-15 11:51:04 +00:00
|
|
|
gboolean video_pad_blocked;
|
2010-07-11 12:44:10 +00:00
|
|
|
GstPad *video_srcpad_stream_synchronizer;
|
|
|
|
GstPad *video_sinkpad_stream_synchronizer;
|
2011-06-01 17:34:54 +00:00
|
|
|
gulong video_block_id;
|
2013-05-21 14:35:18 +00:00
|
|
|
gulong video_notify_caps_id;
|
2009-03-24 16:12:53 +00:00
|
|
|
/* text */
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
GstPad *text_pad;
|
2011-03-15 11:51:04 +00:00
|
|
|
gboolean text_pad_blocked;
|
2010-07-11 12:44:10 +00:00
|
|
|
GstPad *text_srcpad_stream_synchronizer;
|
|
|
|
GstPad *text_sinkpad_stream_synchronizer;
|
2011-06-01 17:34:54 +00:00
|
|
|
gulong text_block_id;
|
2009-03-24 16:12:53 +00:00
|
|
|
|
2013-10-02 13:02:44 +00:00
|
|
|
gulong vis_pad_block_id;
|
|
|
|
|
2011-07-27 11:05:31 +00:00
|
|
|
guint32 pending_blocked_pads;
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
/* properties */
|
|
|
|
GstElement *audio_sink;
|
|
|
|
GstElement *video_sink;
|
2014-03-16 16:00:38 +00:00
|
|
|
GstElement *audio_filter;
|
|
|
|
GstElement *video_filter;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
GstElement *visualisation;
|
2009-03-12 16:47:41 +00:00
|
|
|
GstElement *text_sink;
|
2009-12-07 08:13:40 +00:00
|
|
|
gdouble volume;
|
gst/playback/: Add mute property.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_set_mute),
(gst_play_sink_get_mute), (gen_audio_chain):
* gst/playback/gstplaysink.h:
Add mute property.
* gst/playback/gststreamselector.c: (gst_selector_pad_event),
(gst_selector_pad_chain):
* gst/playback/gststreamselector.h:
Make sure we forward the event only once.
* tests/examples/seek/seek.c: (stop_cb), (mute_toggle_cb), (main):
Add and implement the mute button for playbin2.
2008-02-14 18:24:42 +00:00
|
|
|
gboolean mute;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
gchar *font_desc; /* font description */
|
2010-02-21 18:52:45 +00:00
|
|
|
gchar *subtitle_encoding; /* subtitle encoding */
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
guint connection_speed; /* connection speed in bits/sec (0 = unknown) */
|
2011-11-04 09:48:50 +00:00
|
|
|
guint count;
|
2009-05-22 12:49:14 +00:00
|
|
|
gboolean volume_changed; /* volume/mute changed while no audiochain */
|
2009-12-07 08:13:40 +00:00
|
|
|
gboolean mute_changed; /* ... has been created yet */
|
2010-06-07 12:38:42 +00:00
|
|
|
gint64 av_offset;
|
2012-03-30 21:38:01 +00:00
|
|
|
GstPlaySinkSendEventMode send_event_mode;
|
2012-06-14 07:29:23 +00:00
|
|
|
gboolean force_aspect_ratio;
|
2012-02-23 10:33:27 +00:00
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
/* videooverlay proxy interface */
|
|
|
|
GstVideoOverlay *overlay_element; /* protected with LOCK */
|
|
|
|
gboolean overlay_handle_set;
|
|
|
|
guintptr overlay_handle;
|
|
|
|
gboolean overlay_render_rectangle_set;
|
|
|
|
gint overlay_x, overlay_y, overlay_width, overlay_height;
|
|
|
|
gboolean overlay_handle_events_set;
|
|
|
|
gboolean overlay_handle_events;
|
2012-02-23 12:19:55 +00:00
|
|
|
|
|
|
|
/* colorbalance proxy interface */
|
|
|
|
GstColorBalance *colorbalance_element;
|
|
|
|
GList *colorbalance_channels; /* CONTRAST, BRIGHTNESS, HUE, SATURATION */
|
|
|
|
gint colorbalance_values[4];
|
2013-05-21 14:35:18 +00:00
|
|
|
gulong colorbalance_value_changed_id;
|
2012-05-16 13:41:41 +00:00
|
|
|
|
2012-05-24 14:02:59 +00:00
|
|
|
/* sending audio/video flushes break stream changes when the pipeline
|
|
|
|
* is paused and played again in 0.10 */
|
|
|
|
#if 0
|
|
|
|
gboolean video_custom_flush_finished;
|
|
|
|
gboolean video_ignore_wrong_state;
|
|
|
|
gboolean video_pending_flush;
|
|
|
|
|
|
|
|
gboolean audio_custom_flush_finished;
|
|
|
|
gboolean audio_ignore_wrong_state;
|
|
|
|
gboolean audio_pending_flush;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
gboolean text_custom_flush_finished;
|
|
|
|
gboolean text_ignore_wrong_state;
|
|
|
|
gboolean text_pending_flush;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstPlaySinkClass
|
|
|
|
{
|
|
|
|
GstBinClass parent_class;
|
2009-09-09 10:42:04 +00:00
|
|
|
|
|
|
|
gboolean (*reconfigure) (GstPlaySink * playsink);
|
2010-06-05 09:05:22 +00:00
|
|
|
|
2011-12-01 15:48:49 +00:00
|
|
|
GstSample *(*convert_sample) (GstPlaySink * playsink, GstCaps * caps);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
};
|
|
|
|
|
2011-03-15 11:51:04 +00:00
|
|
|
|
|
|
|
static GstStaticPadTemplate audiotemplate =
|
|
|
|
GST_STATIC_PAD_TEMPLATE ("audio_sink",
|
2009-09-08 09:35:20 +00:00
|
|
|
GST_PAD_SINK,
|
|
|
|
GST_PAD_REQUEST,
|
|
|
|
GST_STATIC_CAPS_ANY);
|
2011-03-15 11:51:04 +00:00
|
|
|
static GstStaticPadTemplate videotemplate =
|
|
|
|
GST_STATIC_PAD_TEMPLATE ("video_sink",
|
2009-09-08 09:35:20 +00:00
|
|
|
GST_PAD_SINK,
|
|
|
|
GST_PAD_REQUEST,
|
|
|
|
GST_STATIC_CAPS_ANY);
|
2011-03-15 11:51:04 +00:00
|
|
|
static GstStaticPadTemplate texttemplate = GST_STATIC_PAD_TEMPLATE ("text_sink",
|
2009-09-08 09:35:20 +00:00
|
|
|
GST_PAD_SINK,
|
|
|
|
GST_PAD_REQUEST,
|
|
|
|
GST_STATIC_CAPS_ANY);
|
2011-03-15 11:51:04 +00:00
|
|
|
|
|
|
|
/* FIXME 0.11: Remove */
|
|
|
|
static GstStaticPadTemplate audiorawtemplate =
|
|
|
|
GST_STATIC_PAD_TEMPLATE ("audio_raw_sink",
|
2009-09-08 09:35:20 +00:00
|
|
|
GST_PAD_SINK,
|
|
|
|
GST_PAD_REQUEST,
|
|
|
|
GST_STATIC_CAPS_ANY);
|
2011-03-15 11:51:04 +00:00
|
|
|
static GstStaticPadTemplate videorawtemplate =
|
|
|
|
GST_STATIC_PAD_TEMPLATE ("video_raw_sink",
|
2009-09-08 09:35:20 +00:00
|
|
|
GST_PAD_SINK,
|
|
|
|
GST_PAD_REQUEST,
|
|
|
|
GST_STATIC_CAPS_ANY);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2011-03-15 11:51:04 +00:00
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
/* props */
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
PROP_0,
|
2009-09-09 10:42:04 +00:00
|
|
|
PROP_FLAGS,
|
2009-09-14 10:18:33 +00:00
|
|
|
PROP_MUTE,
|
|
|
|
PROP_VOLUME,
|
|
|
|
PROP_FONT_DESC,
|
2010-02-21 18:52:45 +00:00
|
|
|
PROP_SUBTITLE_ENCODING,
|
2009-09-14 10:18:33 +00:00
|
|
|
PROP_VIS_PLUGIN,
|
2011-12-01 15:48:49 +00:00
|
|
|
PROP_SAMPLE,
|
2010-06-07 12:38:42 +00:00
|
|
|
PROP_AV_OFFSET,
|
2011-10-04 14:22:55 +00:00
|
|
|
PROP_VIDEO_SINK,
|
2011-10-05 10:45:19 +00:00
|
|
|
PROP_AUDIO_SINK,
|
|
|
|
PROP_TEXT_SINK,
|
2012-03-30 21:38:01 +00:00
|
|
|
PROP_SEND_EVENT_MODE,
|
2012-06-14 07:29:23 +00:00
|
|
|
PROP_FORCE_ASPECT_RATIO,
|
2014-03-16 16:00:38 +00:00
|
|
|
PROP_VIDEO_FILTER,
|
2015-04-24 16:10:59 +00:00
|
|
|
PROP_AUDIO_FILTER
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* signals */
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
LAST_SIGNAL
|
|
|
|
};
|
|
|
|
|
|
|
|
static void gst_play_sink_dispose (GObject * object);
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
static void gst_play_sink_finalize (GObject * object);
|
2009-09-09 09:17:28 +00:00
|
|
|
static void gst_play_sink_set_property (GObject * object, guint prop_id,
|
|
|
|
const GValue * value, GParamSpec * spec);
|
|
|
|
static void gst_play_sink_get_property (GObject * object, guint prop_id,
|
|
|
|
GValue * value, GParamSpec * spec);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2009-09-08 09:35:20 +00:00
|
|
|
static GstPad *gst_play_sink_request_new_pad (GstElement * element,
|
2011-05-10 14:44:37 +00:00
|
|
|
GstPadTemplate * templ, const gchar * name, const GstCaps * caps);
|
2009-09-08 09:35:20 +00:00
|
|
|
static void gst_play_sink_release_request_pad (GstElement * element,
|
|
|
|
GstPad * pad);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
static gboolean gst_play_sink_send_event (GstElement * element,
|
|
|
|
GstEvent * event);
|
|
|
|
static GstStateChangeReturn gst_play_sink_change_state (GstElement * element,
|
|
|
|
GstStateChange transition);
|
|
|
|
|
2009-06-01 09:31:49 +00:00
|
|
|
static void gst_play_sink_handle_message (GstBin * bin, GstMessage * message);
|
|
|
|
|
2012-05-24 14:02:59 +00:00
|
|
|
/* sending audio/video flushes break stream changes when the pipeline
|
|
|
|
* is paused and played again in 0.10 */
|
|
|
|
#if 0
|
|
|
|
static gboolean gst_play_sink_video_sink_event (GstPad * pad, GstEvent * event);
|
|
|
|
static GstFlowReturn gst_play_sink_video_sink_chain (GstPad * pad,
|
|
|
|
GstBuffer * buffer);
|
|
|
|
static gboolean gst_play_sink_audio_sink_event (GstPad * pad, GstEvent * event);
|
|
|
|
static GstFlowReturn gst_play_sink_audio_sink_chain (GstPad * pad,
|
|
|
|
GstBuffer * buffer);
|
|
|
|
#endif
|
|
|
|
static gboolean gst_play_sink_text_sink_event (GstPad * pad, GstObject * parent,
|
|
|
|
GstEvent * event);
|
|
|
|
static GstFlowReturn gst_play_sink_text_sink_chain (GstPad * pad,
|
|
|
|
GstObject * parent, GstBuffer * buffer);
|
|
|
|
|
2010-05-06 13:40:34 +00:00
|
|
|
static void notify_volume_cb (GObject * object, GParamSpec * pspec,
|
|
|
|
GstPlaySink * playsink);
|
|
|
|
static void notify_mute_cb (GObject * object, GParamSpec * pspec,
|
|
|
|
GstPlaySink * playsink);
|
|
|
|
|
2010-06-07 12:38:42 +00:00
|
|
|
static void update_av_offset (GstPlaySink * playsink);
|
|
|
|
|
2012-06-26 08:54:18 +00:00
|
|
|
static gboolean gst_play_sink_do_reconfigure (GstPlaySink * playsink);
|
|
|
|
|
2012-05-16 13:41:41 +00:00
|
|
|
static GQuark _playsink_reset_segment_event_marker_id = 0;
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
/* static guint gst_play_sink_signals[LAST_SIGNAL] = { 0 }; */
|
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
static void gst_play_sink_overlay_init (gpointer g_iface,
|
2012-02-23 10:33:27 +00:00
|
|
|
gpointer g_iface_data);
|
2012-02-23 10:54:27 +00:00
|
|
|
static void gst_play_sink_navigation_init (gpointer g_iface,
|
|
|
|
gpointer g_iface_data);
|
2012-02-23 12:19:55 +00:00
|
|
|
static void gst_play_sink_colorbalance_init (gpointer g_iface,
|
|
|
|
gpointer g_iface_data);
|
|
|
|
|
2012-02-22 08:50:39 +00:00
|
|
|
static void
|
|
|
|
_do_init (GType type)
|
|
|
|
{
|
|
|
|
static const GInterfaceInfo svol_info = {
|
|
|
|
NULL, NULL, NULL
|
|
|
|
};
|
2012-03-02 09:00:55 +00:00
|
|
|
static const GInterfaceInfo ov_info = {
|
|
|
|
gst_play_sink_overlay_init,
|
2012-02-23 10:33:27 +00:00
|
|
|
NULL, NULL
|
|
|
|
};
|
2012-02-23 10:54:27 +00:00
|
|
|
static const GInterfaceInfo nav_info = {
|
|
|
|
gst_play_sink_navigation_init,
|
|
|
|
NULL, NULL
|
|
|
|
};
|
2012-02-23 12:19:55 +00:00
|
|
|
static const GInterfaceInfo col_info = {
|
|
|
|
gst_play_sink_colorbalance_init,
|
|
|
|
NULL, NULL
|
|
|
|
};
|
2012-02-22 08:50:39 +00:00
|
|
|
|
|
|
|
g_type_add_interface_static (type, GST_TYPE_STREAM_VOLUME, &svol_info);
|
2012-03-02 09:00:55 +00:00
|
|
|
g_type_add_interface_static (type, GST_TYPE_VIDEO_OVERLAY, &ov_info);
|
2012-02-23 10:54:27 +00:00
|
|
|
g_type_add_interface_static (type, GST_TYPE_NAVIGATION, &nav_info);
|
2012-02-23 12:19:55 +00:00
|
|
|
g_type_add_interface_static (type, GST_TYPE_COLOR_BALANCE, &col_info);
|
2012-02-22 08:50:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
G_DEFINE_TYPE_WITH_CODE (GstPlaySink, gst_play_sink, GST_TYPE_BIN,
|
|
|
|
_do_init (g_define_type_id));
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
gst_play_sink_class_init (GstPlaySinkClass * klass)
|
|
|
|
{
|
|
|
|
GObjectClass *gobject_klass;
|
|
|
|
GstElementClass *gstelement_klass;
|
|
|
|
GstBinClass *gstbin_klass;
|
|
|
|
|
|
|
|
gobject_klass = (GObjectClass *) klass;
|
|
|
|
gstelement_klass = (GstElementClass *) klass;
|
|
|
|
gstbin_klass = (GstBinClass *) klass;
|
|
|
|
|
2009-10-28 00:59:35 +00:00
|
|
|
gobject_klass->dispose = gst_play_sink_dispose;
|
|
|
|
gobject_klass->finalize = gst_play_sink_finalize;
|
|
|
|
gobject_klass->set_property = gst_play_sink_set_property;
|
|
|
|
gobject_klass->get_property = gst_play_sink_get_property;
|
2009-09-09 09:17:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstPlaySink:flags
|
|
|
|
*
|
|
|
|
* Control the behaviour of playsink.
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_FLAGS,
|
|
|
|
g_param_spec_flags ("flags", "Flags", "Flags to control behaviour",
|
|
|
|
GST_TYPE_PLAY_FLAGS, DEFAULT_FLAGS,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2009-09-14 10:18:33 +00:00
|
|
|
/**
|
|
|
|
* GstPlaySink:volume:
|
|
|
|
*
|
|
|
|
* Get or set the current audio stream volume. 1.0 means 100%,
|
|
|
|
* 0.0 means mute. This uses a linear volume scale.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_VOLUME,
|
|
|
|
g_param_spec_double ("volume", "Volume", "The audio volume, 1.0=100%",
|
|
|
|
0.0, VOLUME_MAX_DOUBLE, 1.0,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_MUTE,
|
|
|
|
g_param_spec_boolean ("mute", "Mute",
|
|
|
|
"Mute the audio channel without changing the volume", FALSE,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_FONT_DESC,
|
|
|
|
g_param_spec_string ("subtitle-font-desc",
|
|
|
|
"Subtitle font description",
|
|
|
|
"Pango font description of font "
|
|
|
|
"to be used for subtitle rendering", NULL,
|
|
|
|
G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
|
2010-02-21 18:52:45 +00:00
|
|
|
g_object_class_install_property (gobject_klass, PROP_SUBTITLE_ENCODING,
|
|
|
|
g_param_spec_string ("subtitle-encoding", "subtitle encoding",
|
|
|
|
"Encoding to assume if input subtitles are not in UTF-8 encoding. "
|
|
|
|
"If not set, the GST_SUBTITLE_ENCODING environment variable will "
|
|
|
|
"be checked for an encoding to use. If that is not set either, "
|
|
|
|
"ISO-8859-15 will be assumed.", NULL,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2009-09-14 10:18:33 +00:00
|
|
|
g_object_class_install_property (gobject_klass, PROP_VIS_PLUGIN,
|
|
|
|
g_param_spec_object ("vis-plugin", "Vis plugin",
|
|
|
|
"the visualization element to use (NULL = default)",
|
|
|
|
GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2010-06-05 08:31:03 +00:00
|
|
|
/**
|
2011-12-01 15:48:49 +00:00
|
|
|
* GstPlaySink:sample:
|
2010-06-05 08:31:03 +00:00
|
|
|
*
|
2011-12-01 15:48:49 +00:00
|
|
|
* Get the currently rendered or prerolled sample in the video sink.
|
|
|
|
* The #GstCaps in the sample will describe the format of the buffer.
|
2010-06-05 08:31:03 +00:00
|
|
|
*/
|
2011-12-01 15:48:49 +00:00
|
|
|
g_object_class_install_property (gobject_klass, PROP_SAMPLE,
|
|
|
|
g_param_spec_boxed ("sample", "Sample",
|
|
|
|
"The last sample (NULL = no video available)",
|
|
|
|
GST_TYPE_SAMPLE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
2010-06-07 12:38:42 +00:00
|
|
|
/**
|
|
|
|
* GstPlaySink:av-offset:
|
|
|
|
*
|
|
|
|
* Control the synchronisation offset between the audio and video streams.
|
|
|
|
* Positive values make the audio ahead of the video and negative values make
|
|
|
|
* the audio go behind the video.
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_AV_OFFSET,
|
|
|
|
g_param_spec_int64 ("av-offset", "AV Offset",
|
|
|
|
"The synchronisation offset between audio and video in nanoseconds",
|
|
|
|
G_MININT64, G_MAXINT64, 0,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2009-09-14 10:18:33 +00:00
|
|
|
|
2014-03-16 16:00:38 +00:00
|
|
|
/**
|
|
|
|
* GstPlaySink:video-filter:
|
|
|
|
*
|
|
|
|
* Set the video filter element/bin to use. Will apply on a best-effort basis
|
|
|
|
* unless GST_PLAY_FLAG_FORCE_FILTERS is set. playsink must be in
|
|
|
|
* %GST_STATE_NULL
|
|
|
|
*/
|
2014-10-10 09:14:17 +00:00
|
|
|
g_object_class_install_property (gobject_klass, PROP_VIDEO_FILTER,
|
2014-03-16 16:00:38 +00:00
|
|
|
g_param_spec_object ("video-filter", "Video filter",
|
|
|
|
"the video filter(s) to apply, if possible",
|
|
|
|
GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
/**
|
|
|
|
* GstPlaySink:audio-filter:
|
|
|
|
*
|
|
|
|
* Set the audio filter element/bin to use. Will apply on a best-effort basis
|
|
|
|
* unless GST_PLAY_FLAG_FORCE_FILTERS is set. playsink must be in
|
|
|
|
* %GST_STATE_NULL
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_AUDIO_FILTER,
|
|
|
|
g_param_spec_object ("audio-filter", "Audio filter",
|
|
|
|
"the audio filter(s) to apply, if possible",
|
|
|
|
GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2011-10-04 14:22:55 +00:00
|
|
|
/**
|
|
|
|
* GstPlaySink:video-sink:
|
|
|
|
*
|
|
|
|
* Set the used video sink element. NULL will use the default sink. playsink
|
|
|
|
* must be in %GST_STATE_NULL
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_VIDEO_SINK,
|
|
|
|
g_param_spec_object ("video-sink", "Video Sink",
|
|
|
|
"the video output element to use (NULL = default sink)",
|
|
|
|
GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2011-10-05 10:45:19 +00:00
|
|
|
/**
|
|
|
|
* GstPlaySink:audio-sink:
|
|
|
|
*
|
|
|
|
* Set the used audio sink element. NULL will use the default sink. playsink
|
|
|
|
* must be in %GST_STATE_NULL
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_AUDIO_SINK,
|
|
|
|
g_param_spec_object ("audio-sink", "Audio Sink",
|
|
|
|
"the audio output element to use (NULL = default sink)",
|
|
|
|
GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2012-02-23 10:33:27 +00:00
|
|
|
|
2011-10-05 10:45:19 +00:00
|
|
|
/**
|
|
|
|
* GstPlaySink:text-sink:
|
|
|
|
*
|
|
|
|
* Set the used text sink element. NULL will use the default sink. playsink
|
|
|
|
* must be in %GST_STATE_NULL
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_TEXT_SINK,
|
|
|
|
g_param_spec_object ("text-sink", "Text sink",
|
2012-05-11 08:58:45 +00:00
|
|
|
"the text output element to use (NULL = default subtitleoverlay)",
|
2011-10-05 10:45:19 +00:00
|
|
|
GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2012-03-30 21:38:01 +00:00
|
|
|
/**
|
|
|
|
* GstPlaySink::send-event-mode:
|
|
|
|
*
|
|
|
|
* Sets the handling method used for events received from send_event
|
|
|
|
* function. The default is %MODE_DEFAULT, that uses %GstBin's default
|
|
|
|
* handling (push the event to all internal sinks).
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_SEND_EVENT_MODE,
|
|
|
|
g_param_spec_enum ("send-event-mode", "Send event mode",
|
|
|
|
"How to send events received in send_event function",
|
|
|
|
GST_TYPE_PLAY_SINK_SEND_EVENT_MODE, MODE_DEFAULT,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2011-10-04 14:22:55 +00:00
|
|
|
|
2012-06-14 07:29:23 +00:00
|
|
|
/**
|
|
|
|
* GstPlaySink::force-aspect-ratio:
|
|
|
|
*
|
|
|
|
* Requests the video sink to enforce the video display aspect ratio.
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_klass, PROP_FORCE_ASPECT_RATIO,
|
|
|
|
g_param_spec_boolean ("force-aspect-ratio", "Force Aspect Ratio",
|
|
|
|
"When enabled, scaling will respect original aspect ratio", TRUE,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
|
2009-09-09 10:42:04 +00:00
|
|
|
g_signal_new ("reconfigure", G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstPlaySinkClass,
|
2012-03-02 10:15:02 +00:00
|
|
|
reconfigure), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_BOOLEAN,
|
2009-09-09 10:42:04 +00:00
|
|
|
0, G_TYPE_NONE);
|
2010-06-05 09:05:22 +00:00
|
|
|
/**
|
2011-12-01 15:48:49 +00:00
|
|
|
* GstPlaySink::convert-sample
|
2010-06-05 09:05:22 +00:00
|
|
|
* @playsink: a #GstPlaySink
|
2011-12-01 15:48:49 +00:00
|
|
|
* @caps: the target format of the sample
|
2010-06-05 09:05:22 +00:00
|
|
|
*
|
2011-12-01 15:48:49 +00:00
|
|
|
* Action signal to retrieve the currently playing video sample in the format
|
2010-06-05 09:05:22 +00:00
|
|
|
* specified by @caps.
|
|
|
|
* If @caps is %NULL, no conversion will be performed and this function is
|
2011-12-01 15:48:49 +00:00
|
|
|
* equivalent to the #GstPlaySink::sample property.
|
2010-06-05 09:05:22 +00:00
|
|
|
*
|
2011-12-01 15:48:49 +00:00
|
|
|
* Returns: a #GstSample of the current video sample converted to #caps.
|
|
|
|
* The caps in the sample will describe the final layout of the buffer data.
|
|
|
|
* %NULL is returned when no current sample can be retrieved or when the
|
2010-06-05 09:05:22 +00:00
|
|
|
* conversion failed.
|
|
|
|
*/
|
2011-12-01 15:48:49 +00:00
|
|
|
g_signal_new ("convert-sample", G_TYPE_FROM_CLASS (klass),
|
2010-06-05 09:05:22 +00:00
|
|
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
2011-12-01 15:48:49 +00:00
|
|
|
G_STRUCT_OFFSET (GstPlaySinkClass, convert_sample), NULL, NULL,
|
2012-03-02 10:15:02 +00:00
|
|
|
g_cclosure_marshal_generic, GST_TYPE_SAMPLE, 1, GST_TYPE_CAPS);
|
2009-09-09 10:42:04 +00:00
|
|
|
|
2009-09-08 09:35:20 +00:00
|
|
|
gst_element_class_add_pad_template (gstelement_klass,
|
|
|
|
gst_static_pad_template_get (&audiorawtemplate));
|
|
|
|
gst_element_class_add_pad_template (gstelement_klass,
|
|
|
|
gst_static_pad_template_get (&audiotemplate));
|
|
|
|
gst_element_class_add_pad_template (gstelement_klass,
|
|
|
|
gst_static_pad_template_get (&videorawtemplate));
|
|
|
|
gst_element_class_add_pad_template (gstelement_klass,
|
|
|
|
gst_static_pad_template_get (&videotemplate));
|
|
|
|
gst_element_class_add_pad_template (gstelement_klass,
|
|
|
|
gst_static_pad_template_get (&texttemplate));
|
2012-04-09 23:45:16 +00:00
|
|
|
gst_element_class_set_static_metadata (gstelement_klass, "Player Sink",
|
2009-12-07 08:13:40 +00:00
|
|
|
"Generic/Bin/Sink",
|
|
|
|
"Convenience sink for multiple streams",
|
|
|
|
"Wim Taymans <wim.taymans@gmail.com>");
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
|
|
|
gstelement_klass->change_state =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_play_sink_change_state);
|
|
|
|
gstelement_klass->send_event = GST_DEBUG_FUNCPTR (gst_play_sink_send_event);
|
2009-09-08 09:35:20 +00:00
|
|
|
gstelement_klass->request_new_pad =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_play_sink_request_new_pad);
|
|
|
|
gstelement_klass->release_pad =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_play_sink_release_request_pad);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2009-06-01 09:31:49 +00:00
|
|
|
gstbin_klass->handle_message =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_play_sink_handle_message);
|
2009-09-09 10:42:04 +00:00
|
|
|
|
2012-06-26 09:04:23 +00:00
|
|
|
klass->reconfigure = GST_DEBUG_FUNCPTR (gst_play_sink_reconfigure);
|
2011-12-01 15:48:49 +00:00
|
|
|
klass->convert_sample = GST_DEBUG_FUNCPTR (gst_play_sink_convert_sample);
|
2012-05-16 13:41:41 +00:00
|
|
|
|
|
|
|
_playsink_reset_segment_event_marker_id =
|
|
|
|
g_quark_from_static_string ("gst-playsink-reset-segment-event-marker");
|
2012-10-03 10:37:33 +00:00
|
|
|
|
|
|
|
g_type_class_ref (GST_TYPE_STREAM_SYNCHRONIZER);
|
|
|
|
g_type_class_ref (GST_TYPE_COLOR_BALANCE_CHANNEL);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
gst_play_sink_init (GstPlaySink * playsink)
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
{
|
2012-02-23 12:19:55 +00:00
|
|
|
GstColorBalanceChannel *channel;
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
/* init groups */
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
playsink->video_sink = NULL;
|
|
|
|
playsink->audio_sink = NULL;
|
|
|
|
playsink->visualisation = NULL;
|
2009-03-12 16:47:41 +00:00
|
|
|
playsink->text_sink = NULL;
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
playsink->volume = 1.0;
|
|
|
|
playsink->font_desc = NULL;
|
2010-02-21 18:52:45 +00:00
|
|
|
playsink->subtitle_encoding = NULL;
|
2009-09-09 09:17:28 +00:00
|
|
|
playsink->flags = DEFAULT_FLAGS;
|
2012-03-30 21:38:01 +00:00
|
|
|
playsink->send_event_mode = MODE_DEFAULT;
|
2012-06-14 07:29:23 +00:00
|
|
|
playsink->force_aspect_ratio = TRUE;
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
|
2010-07-11 12:44:10 +00:00
|
|
|
playsink->stream_synchronizer =
|
|
|
|
g_object_new (GST_TYPE_STREAM_SYNCHRONIZER, NULL);
|
|
|
|
gst_bin_add (GST_BIN_CAST (playsink),
|
|
|
|
GST_ELEMENT_CAST (playsink->stream_synchronizer));
|
|
|
|
|
2012-01-19 08:48:38 +00:00
|
|
|
g_rec_mutex_init (&playsink->lock);
|
2011-11-28 15:55:32 +00:00
|
|
|
GST_OBJECT_FLAG_SET (playsink, GST_ELEMENT_FLAG_SINK);
|
2012-02-23 12:19:55 +00:00
|
|
|
|
|
|
|
channel =
|
|
|
|
GST_COLOR_BALANCE_CHANNEL (g_object_new (GST_TYPE_COLOR_BALANCE_CHANNEL,
|
|
|
|
NULL));
|
|
|
|
channel->label = g_strdup ("CONTRAST");
|
|
|
|
channel->min_value = -1000;
|
|
|
|
channel->max_value = 1000;
|
|
|
|
playsink->colorbalance_channels =
|
|
|
|
g_list_append (playsink->colorbalance_channels, channel);
|
|
|
|
playsink->colorbalance_values[0] = 0;
|
|
|
|
|
|
|
|
channel =
|
|
|
|
GST_COLOR_BALANCE_CHANNEL (g_object_new (GST_TYPE_COLOR_BALANCE_CHANNEL,
|
|
|
|
NULL));
|
|
|
|
channel->label = g_strdup ("BRIGHTNESS");
|
|
|
|
channel->min_value = -1000;
|
|
|
|
channel->max_value = 1000;
|
|
|
|
playsink->colorbalance_channels =
|
|
|
|
g_list_append (playsink->colorbalance_channels, channel);
|
|
|
|
playsink->colorbalance_values[1] = 0;
|
|
|
|
|
|
|
|
channel =
|
|
|
|
GST_COLOR_BALANCE_CHANNEL (g_object_new (GST_TYPE_COLOR_BALANCE_CHANNEL,
|
|
|
|
NULL));
|
|
|
|
channel->label = g_strdup ("HUE");
|
|
|
|
channel->min_value = -1000;
|
|
|
|
channel->max_value = 1000;
|
|
|
|
playsink->colorbalance_channels =
|
|
|
|
g_list_append (playsink->colorbalance_channels, channel);
|
|
|
|
playsink->colorbalance_values[2] = 0;
|
|
|
|
|
|
|
|
channel =
|
|
|
|
GST_COLOR_BALANCE_CHANNEL (g_object_new (GST_TYPE_COLOR_BALANCE_CHANNEL,
|
|
|
|
NULL));
|
|
|
|
channel->label = g_strdup ("SATURATION");
|
|
|
|
channel->min_value = -1000;
|
|
|
|
channel->max_value = 1000;
|
|
|
|
playsink->colorbalance_channels =
|
|
|
|
g_list_append (playsink->colorbalance_channels, channel);
|
|
|
|
playsink->colorbalance_values[3] = 0;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
|
|
|
|
2010-05-06 13:40:34 +00:00
|
|
|
static void
|
2013-05-21 14:35:18 +00:00
|
|
|
disconnect_audio_chain (GstPlayAudioChain * chain, GstPlaySink * playsink)
|
2010-05-06 13:40:34 +00:00
|
|
|
{
|
|
|
|
if (chain) {
|
2013-05-21 14:35:18 +00:00
|
|
|
if (chain->notify_volume_id)
|
|
|
|
g_signal_handler_disconnect (chain->volume, chain->notify_volume_id);
|
|
|
|
if (chain->notify_mute_id)
|
2015-07-10 08:53:24 +00:00
|
|
|
g_signal_handler_disconnect (chain->volume, chain->notify_mute_id);
|
2013-05-21 14:35:18 +00:00
|
|
|
chain->notify_volume_id = chain->notify_mute_id = 0;
|
2010-05-06 13:40:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-01-30 19:04:37 +00:00
|
|
|
static void
|
|
|
|
free_chain (GstPlayChain * chain)
|
|
|
|
{
|
|
|
|
if (chain) {
|
|
|
|
if (chain->bin)
|
|
|
|
gst_object_unref (chain->bin);
|
|
|
|
g_free (chain);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-26 11:06:50 +00:00
|
|
|
static void
|
|
|
|
gst_play_sink_remove_audio_ssync_queue (GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
if (playsink->audio_ssync_queue) {
|
|
|
|
gst_element_set_state (playsink->audio_ssync_queue, GST_STATE_NULL);
|
|
|
|
gst_object_unref (playsink->audio_ssync_queue_sinkpad);
|
|
|
|
gst_bin_remove (GST_BIN_CAST (playsink), playsink->audio_ssync_queue);
|
|
|
|
playsink->audio_ssync_queue = NULL;
|
|
|
|
playsink->audio_ssync_queue_sinkpad = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
static void
|
|
|
|
gst_play_sink_dispose (GObject * object)
|
|
|
|
{
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
GstPlaySink *playsink;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
playsink = GST_PLAY_SINK (object);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2014-03-16 16:00:38 +00:00
|
|
|
if (playsink->audio_filter != NULL) {
|
|
|
|
gst_element_set_state (playsink->audio_filter, GST_STATE_NULL);
|
|
|
|
gst_object_unref (playsink->audio_filter);
|
|
|
|
playsink->audio_filter = NULL;
|
|
|
|
}
|
|
|
|
if (playsink->video_filter != NULL) {
|
|
|
|
gst_element_set_state (playsink->video_filter, GST_STATE_NULL);
|
|
|
|
gst_object_unref (playsink->video_filter);
|
|
|
|
playsink->video_filter = NULL;
|
|
|
|
}
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
if (playsink->audio_sink != NULL) {
|
|
|
|
gst_element_set_state (playsink->audio_sink, GST_STATE_NULL);
|
|
|
|
gst_object_unref (playsink->audio_sink);
|
|
|
|
playsink->audio_sink = NULL;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
if (playsink->video_sink != NULL) {
|
|
|
|
gst_element_set_state (playsink->video_sink, GST_STATE_NULL);
|
|
|
|
gst_object_unref (playsink->video_sink);
|
|
|
|
playsink->video_sink = NULL;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
if (playsink->visualisation != NULL) {
|
|
|
|
gst_element_set_state (playsink->visualisation, GST_STATE_NULL);
|
|
|
|
gst_object_unref (playsink->visualisation);
|
|
|
|
playsink->visualisation = NULL;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
2009-03-12 16:47:41 +00:00
|
|
|
if (playsink->text_sink != NULL) {
|
|
|
|
gst_element_set_state (playsink->text_sink, GST_STATE_NULL);
|
|
|
|
gst_object_unref (playsink->text_sink);
|
|
|
|
playsink->text_sink = NULL;
|
|
|
|
}
|
2009-01-30 19:04:37 +00:00
|
|
|
|
2010-04-26 15:30:44 +00:00
|
|
|
free_chain ((GstPlayChain *) playsink->videodeinterlacechain);
|
|
|
|
playsink->videodeinterlacechain = NULL;
|
2009-01-30 19:04:37 +00:00
|
|
|
free_chain ((GstPlayChain *) playsink->videochain);
|
|
|
|
playsink->videochain = NULL;
|
|
|
|
free_chain ((GstPlayChain *) playsink->audiochain);
|
|
|
|
playsink->audiochain = NULL;
|
|
|
|
free_chain ((GstPlayChain *) playsink->vischain);
|
|
|
|
playsink->vischain = NULL;
|
|
|
|
free_chain ((GstPlayChain *) playsink->textchain);
|
|
|
|
playsink->textchain = NULL;
|
|
|
|
|
2009-01-30 20:04:01 +00:00
|
|
|
if (playsink->audio_tee_sink) {
|
|
|
|
gst_object_unref (playsink->audio_tee_sink);
|
|
|
|
playsink->audio_tee_sink = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (playsink->audio_tee_vissrc) {
|
|
|
|
gst_element_release_request_pad (playsink->audio_tee,
|
|
|
|
playsink->audio_tee_vissrc);
|
|
|
|
gst_object_unref (playsink->audio_tee_vissrc);
|
|
|
|
playsink->audio_tee_vissrc = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (playsink->audio_tee_asrc) {
|
|
|
|
gst_element_release_request_pad (playsink->audio_tee,
|
|
|
|
playsink->audio_tee_asrc);
|
|
|
|
gst_object_unref (playsink->audio_tee_asrc);
|
|
|
|
playsink->audio_tee_asrc = NULL;
|
|
|
|
}
|
|
|
|
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
g_free (playsink->font_desc);
|
|
|
|
playsink->font_desc = NULL;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2010-02-21 18:52:45 +00:00
|
|
|
g_free (playsink->subtitle_encoding);
|
|
|
|
playsink->subtitle_encoding = NULL;
|
|
|
|
|
2010-07-11 12:44:10 +00:00
|
|
|
playsink->stream_synchronizer = NULL;
|
|
|
|
|
2012-02-23 12:19:55 +00:00
|
|
|
g_list_foreach (playsink->colorbalance_channels, (GFunc) gst_object_unref,
|
|
|
|
NULL);
|
|
|
|
g_list_free (playsink->colorbalance_channels);
|
|
|
|
playsink->colorbalance_channels = NULL;
|
|
|
|
|
2008-12-10 17:39:32 +00:00
|
|
|
G_OBJECT_CLASS (gst_play_sink_parent_class)->dispose (object);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
static void
|
|
|
|
gst_play_sink_finalize (GObject * object)
|
|
|
|
{
|
|
|
|
GstPlaySink *playsink;
|
|
|
|
|
|
|
|
playsink = GST_PLAY_SINK (object);
|
|
|
|
|
2012-01-19 08:48:38 +00:00
|
|
|
g_rec_mutex_clear (&playsink->lock);
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
|
2008-12-10 17:39:32 +00:00
|
|
|
G_OBJECT_CLASS (gst_play_sink_parent_class)->finalize (object);
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
void
|
2009-05-12 08:36:25 +00:00
|
|
|
gst_play_sink_set_sink (GstPlaySink * playsink, GstPlaySinkType type,
|
|
|
|
GstElement * sink)
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
{
|
2009-05-12 08:36:25 +00:00
|
|
|
GstElement **elem = NULL, *old = NULL;
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
|
2009-05-28 14:21:42 +00:00
|
|
|
GST_LOG ("Setting sink %" GST_PTR_FORMAT " as sink type %d", sink, type);
|
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
2009-05-12 08:36:25 +00:00
|
|
|
switch (type) {
|
|
|
|
case GST_PLAY_SINK_TYPE_AUDIO:
|
|
|
|
case GST_PLAY_SINK_TYPE_AUDIO_RAW:
|
|
|
|
elem = &playsink->audio_sink;
|
|
|
|
break;
|
|
|
|
case GST_PLAY_SINK_TYPE_VIDEO:
|
|
|
|
case GST_PLAY_SINK_TYPE_VIDEO_RAW:
|
|
|
|
elem = &playsink->video_sink;
|
|
|
|
break;
|
|
|
|
case GST_PLAY_SINK_TYPE_TEXT:
|
|
|
|
elem = &playsink->text_sink;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (elem) {
|
|
|
|
old = *elem;
|
2009-05-28 14:21:42 +00:00
|
|
|
if (sink)
|
2013-07-10 11:21:29 +00:00
|
|
|
gst_object_ref_sink (sink);
|
2009-05-12 08:36:25 +00:00
|
|
|
*elem = sink;
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
}
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
2010-02-12 18:43:13 +00:00
|
|
|
if (old) {
|
2013-08-14 13:43:23 +00:00
|
|
|
/* Set the old sink to NULL if it is not used any longer */
|
|
|
|
if (old != sink && !GST_OBJECT_PARENT (old))
|
2010-02-12 18:43:13 +00:00
|
|
|
gst_element_set_state (old, GST_STATE_NULL);
|
2009-05-12 08:36:25 +00:00
|
|
|
gst_object_unref (old);
|
2010-02-12 18:43:13 +00:00
|
|
|
}
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GstElement *
|
2009-05-12 08:36:25 +00:00
|
|
|
gst_play_sink_get_sink (GstPlaySink * playsink, GstPlaySinkType type)
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
{
|
|
|
|
GstElement *result = NULL;
|
2009-05-12 08:36:25 +00:00
|
|
|
GstElement *elem = NULL, *chainp = NULL;
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
2009-05-12 08:36:25 +00:00
|
|
|
switch (type) {
|
|
|
|
case GST_PLAY_SINK_TYPE_AUDIO:
|
2011-03-15 11:51:04 +00:00
|
|
|
case GST_PLAY_SINK_TYPE_AUDIO_RAW:
|
2009-05-12 08:36:25 +00:00
|
|
|
{
|
|
|
|
GstPlayAudioChain *chain;
|
|
|
|
if ((chain = (GstPlayAudioChain *) playsink->audiochain))
|
|
|
|
chainp = chain->sink;
|
|
|
|
elem = playsink->audio_sink;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case GST_PLAY_SINK_TYPE_VIDEO:
|
2011-03-15 11:51:04 +00:00
|
|
|
case GST_PLAY_SINK_TYPE_VIDEO_RAW:
|
2009-05-12 08:36:25 +00:00
|
|
|
{
|
|
|
|
GstPlayVideoChain *chain;
|
|
|
|
if ((chain = (GstPlayVideoChain *) playsink->videochain))
|
|
|
|
chainp = chain->sink;
|
|
|
|
elem = playsink->video_sink;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case GST_PLAY_SINK_TYPE_TEXT:
|
|
|
|
{
|
|
|
|
GstPlayTextChain *chain;
|
|
|
|
if ((chain = (GstPlayTextChain *) playsink->textchain))
|
|
|
|
chainp = chain->sink;
|
|
|
|
elem = playsink->text_sink;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (chainp) {
|
|
|
|
/* we have an active chain with a sink, get the sink */
|
|
|
|
result = gst_object_ref (chainp);
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
}
|
|
|
|
/* nothing found, return last configured sink */
|
2009-05-12 08:36:25 +00:00
|
|
|
if (result == NULL && elem)
|
|
|
|
result = gst_object_ref (elem);
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
return result;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
|
|
|
|
2014-03-16 16:00:38 +00:00
|
|
|
void
|
|
|
|
gst_play_sink_set_filter (GstPlaySink * playsink, GstPlaySinkType type,
|
|
|
|
GstElement * filter)
|
|
|
|
{
|
|
|
|
GstElement **elem = NULL, *old = NULL;
|
|
|
|
|
|
|
|
GST_LOG_OBJECT (playsink,
|
|
|
|
"Setting filter %" GST_PTR_FORMAT " as filter type %d", filter, type);
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
switch (type) {
|
|
|
|
case GST_PLAY_SINK_TYPE_AUDIO:
|
|
|
|
case GST_PLAY_SINK_TYPE_AUDIO_RAW:
|
|
|
|
elem = &playsink->audio_filter;
|
|
|
|
break;
|
|
|
|
case GST_PLAY_SINK_TYPE_VIDEO:
|
|
|
|
case GST_PLAY_SINK_TYPE_VIDEO_RAW:
|
|
|
|
elem = &playsink->video_filter;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (elem) {
|
|
|
|
old = *elem;
|
|
|
|
if (filter)
|
|
|
|
gst_object_ref_sink (filter);
|
|
|
|
*elem = filter;
|
|
|
|
}
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
if (old) {
|
|
|
|
/* Set the old filter to NULL if it is not used any longer */
|
|
|
|
if (old != filter && !GST_OBJECT_PARENT (old))
|
|
|
|
gst_element_set_state (old, GST_STATE_NULL);
|
|
|
|
gst_object_unref (old);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
GstElement *
|
|
|
|
gst_play_sink_get_filter (GstPlaySink * playsink, GstPlaySinkType type)
|
|
|
|
{
|
|
|
|
GstElement *result = NULL;
|
|
|
|
GstElement *elem = NULL, *chainp = NULL;
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
switch (type) {
|
2014-07-12 05:03:30 +00:00
|
|
|
case GST_PLAY_SINK_TYPE_AUDIO:
|
2014-03-16 16:00:38 +00:00
|
|
|
case GST_PLAY_SINK_TYPE_AUDIO_RAW:
|
|
|
|
{
|
|
|
|
GstPlayAudioChain *chain;
|
|
|
|
if ((chain = (GstPlayAudioChain *) playsink->audiochain))
|
|
|
|
chainp = chain->filter;
|
|
|
|
elem = playsink->audio_filter;
|
|
|
|
break;
|
|
|
|
}
|
2014-07-12 05:03:30 +00:00
|
|
|
case GST_PLAY_SINK_TYPE_VIDEO:
|
2014-03-16 16:00:38 +00:00
|
|
|
case GST_PLAY_SINK_TYPE_VIDEO_RAW:
|
|
|
|
{
|
|
|
|
GstPlayVideoChain *chain;
|
|
|
|
if ((chain = (GstPlayVideoChain *) playsink->videochain))
|
|
|
|
chainp = chain->filter;
|
|
|
|
elem = playsink->video_filter;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (chainp) {
|
|
|
|
/* we have an active chain with a filter, get the filter */
|
|
|
|
result = gst_object_ref (chainp);
|
|
|
|
}
|
|
|
|
/* nothing found, return last configured filter */
|
|
|
|
if (result == NULL && elem)
|
|
|
|
result = gst_object_ref (elem);
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2011-11-01 00:34:28 +00:00
|
|
|
static GstPadProbeReturn
|
2011-11-08 10:07:18 +00:00
|
|
|
gst_play_sink_vis_blocked (GstPad * tee_pad, GstPadProbeInfo * info,
|
|
|
|
gpointer user_data)
|
2008-02-29 12:26:48 +00:00
|
|
|
{
|
|
|
|
GstPlaySink *playsink;
|
|
|
|
GstPlayVisChain *chain;
|
|
|
|
|
|
|
|
playsink = GST_PLAY_SINK (user_data);
|
|
|
|
|
2014-05-01 11:08:24 +00:00
|
|
|
if (GST_IS_EVENT (info->data) && !GST_EVENT_IS_SERIALIZED (info->data)) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "Letting non-serialized event %s pass",
|
|
|
|
GST_EVENT_TYPE_NAME (info->data));
|
|
|
|
return GST_PAD_PROBE_PASS;
|
|
|
|
}
|
|
|
|
|
2008-02-29 12:26:48 +00:00
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
GST_DEBUG_OBJECT (playsink, "vis pad blocked");
|
|
|
|
/* now try to change the plugin in the running vis chain */
|
|
|
|
if (!(chain = (GstPlayVisChain *) playsink->vischain))
|
|
|
|
goto done;
|
|
|
|
|
|
|
|
/* unlink the old plugin and unghost the pad */
|
2012-12-13 10:31:28 +00:00
|
|
|
gst_pad_unlink (chain->vispeerpad, chain->vissinkpad);
|
2008-02-29 12:26:48 +00:00
|
|
|
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (chain->srcpad), NULL);
|
|
|
|
|
|
|
|
/* set the old plugin to NULL and remove */
|
|
|
|
gst_element_set_state (chain->vis, GST_STATE_NULL);
|
|
|
|
gst_bin_remove (GST_BIN_CAST (chain->chain.bin), chain->vis);
|
|
|
|
|
|
|
|
/* add new plugin and set state to playing */
|
2009-04-10 11:42:56 +00:00
|
|
|
chain->vis = playsink->visualisation;
|
2008-02-29 12:26:48 +00:00
|
|
|
gst_bin_add (GST_BIN_CAST (chain->chain.bin), chain->vis);
|
|
|
|
gst_element_set_state (chain->vis, GST_STATE_PLAYING);
|
|
|
|
|
|
|
|
/* get pads */
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
chain->vissinkpad = gst_element_get_static_pad (chain->vis, "sink");
|
|
|
|
chain->vissrcpad = gst_element_get_static_pad (chain->vis, "src");
|
2008-02-29 12:26:48 +00:00
|
|
|
|
|
|
|
/* link pads */
|
2012-12-13 10:31:28 +00:00
|
|
|
gst_pad_link_full (chain->vispeerpad, chain->vissinkpad,
|
2010-07-20 19:05:45 +00:00
|
|
|
GST_PAD_LINK_CHECK_NOTHING);
|
2008-02-29 12:26:48 +00:00
|
|
|
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (chain->srcpad),
|
|
|
|
chain->vissrcpad);
|
|
|
|
|
|
|
|
done:
|
2013-10-02 13:02:44 +00:00
|
|
|
playsink->vis_pad_block_id = 0;
|
|
|
|
|
2008-02-29 12:26:48 +00:00
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
2011-06-01 17:34:54 +00:00
|
|
|
|
|
|
|
/* remove the probe and unblock the pad */
|
2011-11-01 00:34:28 +00:00
|
|
|
return GST_PAD_PROBE_REMOVE;
|
2008-02-29 12:26:48 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
void
|
2008-02-29 12:26:48 +00:00
|
|
|
gst_play_sink_set_vis_plugin (GstPlaySink * playsink, GstElement * vis)
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
{
|
2008-02-29 12:26:48 +00:00
|
|
|
GstPlayVisChain *chain;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
/* setting NULL means creating the default vis plugin */
|
|
|
|
if (vis == NULL)
|
|
|
|
vis = gst_element_factory_make ("goom", "vis");
|
|
|
|
|
|
|
|
/* simply return if we don't have a vis plugin here */
|
|
|
|
if (vis == NULL)
|
|
|
|
return;
|
|
|
|
|
2008-02-29 12:26:48 +00:00
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
/* first store the new vis */
|
|
|
|
if (playsink->visualisation)
|
|
|
|
gst_object_unref (playsink->visualisation);
|
2009-04-10 11:27:41 +00:00
|
|
|
/* take ownership */
|
2009-09-23 14:07:36 +00:00
|
|
|
gst_object_ref_sink (vis);
|
2009-04-10 11:27:41 +00:00
|
|
|
playsink->visualisation = vis;
|
2008-02-29 12:26:48 +00:00
|
|
|
|
|
|
|
/* now try to change the plugin in the running vis chain, if we have no chain,
|
|
|
|
* we don't bother, any future vis chain will be created with the new vis
|
|
|
|
* plugin. */
|
|
|
|
if (!(chain = (GstPlayVisChain *) playsink->vischain))
|
|
|
|
goto done;
|
|
|
|
|
|
|
|
/* block the pad, the next time the callback is called we can change the
|
|
|
|
* visualisation. It's possible that this never happens or that the pad was
|
2008-07-31 13:06:13 +00:00
|
|
|
* already blocked. If the callback never happens, we don't have new data so
|
|
|
|
* we don't need the new vis plugin. If the pad was already blocked, the
|
|
|
|
* function returns FALSE but the previous pad block will do the right thing
|
|
|
|
* anyway. */
|
2008-02-29 12:26:48 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "blocking vis pad");
|
2013-10-02 13:02:44 +00:00
|
|
|
if (!playsink->vis_pad_block_id && !playsink->audio_block_id
|
|
|
|
&& !playsink->video_block_id && !playsink->text_block_id)
|
|
|
|
playsink->vis_pad_block_id =
|
|
|
|
gst_pad_add_probe (chain->blockpad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
|
|
|
|
gst_play_sink_vis_blocked, playsink, NULL);
|
2008-02-29 12:26:48 +00:00
|
|
|
done:
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
return;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
GstElement *
|
|
|
|
gst_play_sink_get_vis_plugin (GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
GstElement *result = NULL;
|
|
|
|
GstPlayVisChain *chain;
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
if ((chain = (GstPlayVisChain *) playsink->vischain)) {
|
|
|
|
/* we have an active chain, get the sink */
|
|
|
|
if (chain->vis)
|
|
|
|
result = gst_object_ref (chain->vis);
|
|
|
|
}
|
|
|
|
/* nothing found, return last configured sink */
|
|
|
|
if (result == NULL && playsink->visualisation)
|
|
|
|
result = gst_object_ref (playsink->visualisation);
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
gst/playback/gstplay-marshal.list: Added marshal for streamselector Tags.
Original commit message from CVS:
* gst/playback/gstplay-marshal.list:
Added marshal for streamselector Tags.
* gst/playback/gstplaybasebin.c: (set_active_source):
Streamselector now selects pads based on the pad object instead of its
name.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (get_group), (get_tags),
(gst_play_bin_get_video_tags), (gst_play_bin_get_audio_tags),
(gst_play_bin_get_text_tags),
(gst_play_bin_set_current_video_stream),
(gst_play_bin_set_current_audio_stream),
(gst_play_bin_set_current_text_stream),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (autoplug_select_cb):
Remove option to mute streams with the current-a/v/t property, we have
this functionality in the flags.
Add signals to notify when the number of A/V/T channels changed.
Add action signals to get tags for the A/V/T streams.
Implement setting the current A/V/T stream.
Rearrange some things to simplify stream selection.
Implement volume.
* gst/playback/gstplaysink.c: (gst_play_sink_set_volume),
(gst_play_sink_get_volume), (gst_play_sink_set_property),
(gst_play_sink_get_property), (gen_video_chain), (gen_audio_chain),
(activate_vis), (gst_play_sink_reconfigure):
* gst/playback/gstplaysink.h:
Add and implement volume setting methods.
* gst/playback/gststreamselector.c: (gst_selector_pad_class_init),
(gst_selector_pad_finalize), (gst_selector_pad_get_property),
(gst_selector_pad_event), (gst_stream_selector_class_init),
(gst_stream_selector_init), (gst_stream_selector_finalize),
(gst_stream_selector_set_property),
(gst_stream_selector_get_property),
(gst_stream_selector_get_linked_pad),
(gst_stream_selector_request_new_pad):
* gst/playback/gststreamselector.h:
Add pad properties for tags and status of pads.
Keep tags on pads.
Make active pad selection based on pad object instead of name.
2008-02-08 17:47:37 +00:00
|
|
|
void
|
|
|
|
gst_play_sink_set_volume (GstPlaySink * playsink, gdouble volume)
|
|
|
|
{
|
|
|
|
GstPlayAudioChain *chain;
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
playsink->volume = volume;
|
|
|
|
chain = (GstPlayAudioChain *) playsink->audiochain;
|
|
|
|
if (chain && chain->volume) {
|
2015-07-10 08:53:24 +00:00
|
|
|
GST_LOG_OBJECT (playsink,
|
|
|
|
"elements: volume=%" GST_PTR_FORMAT "; new volume=%.03f, mute=%d",
|
|
|
|
chain->volume, volume, playsink->mute);
|
|
|
|
g_object_set (chain->volume, "volume", volume, NULL);
|
2009-05-22 12:49:14 +00:00
|
|
|
} else {
|
2009-05-28 19:37:59 +00:00
|
|
|
GST_LOG_OBJECT (playsink, "no volume element");
|
2009-05-22 12:49:14 +00:00
|
|
|
playsink->volume_changed = TRUE;
|
gst/playback/gstplay-marshal.list: Added marshal for streamselector Tags.
Original commit message from CVS:
* gst/playback/gstplay-marshal.list:
Added marshal for streamselector Tags.
* gst/playback/gstplaybasebin.c: (set_active_source):
Streamselector now selects pads based on the pad object instead of its
name.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (get_group), (get_tags),
(gst_play_bin_get_video_tags), (gst_play_bin_get_audio_tags),
(gst_play_bin_get_text_tags),
(gst_play_bin_set_current_video_stream),
(gst_play_bin_set_current_audio_stream),
(gst_play_bin_set_current_text_stream),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (autoplug_select_cb):
Remove option to mute streams with the current-a/v/t property, we have
this functionality in the flags.
Add signals to notify when the number of A/V/T channels changed.
Add action signals to get tags for the A/V/T streams.
Implement setting the current A/V/T stream.
Rearrange some things to simplify stream selection.
Implement volume.
* gst/playback/gstplaysink.c: (gst_play_sink_set_volume),
(gst_play_sink_get_volume), (gst_play_sink_set_property),
(gst_play_sink_get_property), (gen_video_chain), (gen_audio_chain),
(activate_vis), (gst_play_sink_reconfigure):
* gst/playback/gstplaysink.h:
Add and implement volume setting methods.
* gst/playback/gststreamselector.c: (gst_selector_pad_class_init),
(gst_selector_pad_finalize), (gst_selector_pad_get_property),
(gst_selector_pad_event), (gst_stream_selector_class_init),
(gst_stream_selector_init), (gst_stream_selector_finalize),
(gst_stream_selector_set_property),
(gst_stream_selector_get_property),
(gst_stream_selector_get_linked_pad),
(gst_stream_selector_request_new_pad):
* gst/playback/gststreamselector.h:
Add pad properties for tags and status of pads.
Keep tags on pads.
Make active pad selection based on pad object instead of name.
2008-02-08 17:47:37 +00:00
|
|
|
}
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
}
|
|
|
|
|
|
|
|
gdouble
|
|
|
|
gst_play_sink_get_volume (GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
gdouble result;
|
|
|
|
GstPlayAudioChain *chain;
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
chain = (GstPlayAudioChain *) playsink->audiochain;
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
result = playsink->volume;
|
gst/playback/gstplay-marshal.list: Added marshal for streamselector Tags.
Original commit message from CVS:
* gst/playback/gstplay-marshal.list:
Added marshal for streamselector Tags.
* gst/playback/gstplaybasebin.c: (set_active_source):
Streamselector now selects pads based on the pad object instead of its
name.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (get_group), (get_tags),
(gst_play_bin_get_video_tags), (gst_play_bin_get_audio_tags),
(gst_play_bin_get_text_tags),
(gst_play_bin_set_current_video_stream),
(gst_play_bin_set_current_audio_stream),
(gst_play_bin_set_current_text_stream),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (autoplug_select_cb):
Remove option to mute streams with the current-a/v/t property, we have
this functionality in the flags.
Add signals to notify when the number of A/V/T channels changed.
Add action signals to get tags for the A/V/T streams.
Implement setting the current A/V/T stream.
Rearrange some things to simplify stream selection.
Implement volume.
* gst/playback/gstplaysink.c: (gst_play_sink_set_volume),
(gst_play_sink_get_volume), (gst_play_sink_set_property),
(gst_play_sink_get_property), (gen_video_chain), (gen_audio_chain),
(activate_vis), (gst_play_sink_reconfigure):
* gst/playback/gstplaysink.h:
Add and implement volume setting methods.
* gst/playback/gststreamselector.c: (gst_selector_pad_class_init),
(gst_selector_pad_finalize), (gst_selector_pad_get_property),
(gst_selector_pad_event), (gst_stream_selector_class_init),
(gst_stream_selector_init), (gst_stream_selector_finalize),
(gst_stream_selector_set_property),
(gst_stream_selector_get_property),
(gst_stream_selector_get_linked_pad),
(gst_stream_selector_request_new_pad):
* gst/playback/gststreamselector.h:
Add pad properties for tags and status of pads.
Keep tags on pads.
Make active pad selection based on pad object instead of name.
2008-02-08 17:47:37 +00:00
|
|
|
if (chain && chain->volume) {
|
2015-07-10 08:53:24 +00:00
|
|
|
g_object_get (chain->volume, "volume", &result, NULL);
|
|
|
|
playsink->volume = result;
|
gst/playback/gstplay-marshal.list: Added marshal for streamselector Tags.
Original commit message from CVS:
* gst/playback/gstplay-marshal.list:
Added marshal for streamselector Tags.
* gst/playback/gstplaybasebin.c: (set_active_source):
Streamselector now selects pads based on the pad object instead of its
name.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (get_group), (get_tags),
(gst_play_bin_get_video_tags), (gst_play_bin_get_audio_tags),
(gst_play_bin_get_text_tags),
(gst_play_bin_set_current_video_stream),
(gst_play_bin_set_current_audio_stream),
(gst_play_bin_set_current_text_stream),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (autoplug_select_cb):
Remove option to mute streams with the current-a/v/t property, we have
this functionality in the flags.
Add signals to notify when the number of A/V/T channels changed.
Add action signals to get tags for the A/V/T streams.
Implement setting the current A/V/T stream.
Rearrange some things to simplify stream selection.
Implement volume.
* gst/playback/gstplaysink.c: (gst_play_sink_set_volume),
(gst_play_sink_get_volume), (gst_play_sink_set_property),
(gst_play_sink_get_property), (gen_video_chain), (gen_audio_chain),
(activate_vis), (gst_play_sink_reconfigure):
* gst/playback/gstplaysink.h:
Add and implement volume setting methods.
* gst/playback/gststreamselector.c: (gst_selector_pad_class_init),
(gst_selector_pad_finalize), (gst_selector_pad_get_property),
(gst_selector_pad_event), (gst_stream_selector_class_init),
(gst_stream_selector_init), (gst_stream_selector_finalize),
(gst_stream_selector_set_property),
(gst_stream_selector_get_property),
(gst_stream_selector_get_linked_pad),
(gst_stream_selector_request_new_pad):
* gst/playback/gststreamselector.h:
Add pad properties for tags and status of pads.
Keep tags on pads.
Make active pad selection based on pad object instead of name.
2008-02-08 17:47:37 +00:00
|
|
|
}
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
gst/playback/: Add mute property.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_set_mute),
(gst_play_sink_get_mute), (gen_audio_chain):
* gst/playback/gstplaysink.h:
Add mute property.
* gst/playback/gststreamselector.c: (gst_selector_pad_event),
(gst_selector_pad_chain):
* gst/playback/gststreamselector.h:
Make sure we forward the event only once.
* tests/examples/seek/seek.c: (stop_cb), (mute_toggle_cb), (main):
Add and implement the mute button for playbin2.
2008-02-14 18:24:42 +00:00
|
|
|
void
|
|
|
|
gst_play_sink_set_mute (GstPlaySink * playsink, gboolean mute)
|
|
|
|
{
|
|
|
|
GstPlayAudioChain *chain;
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
playsink->mute = mute;
|
|
|
|
chain = (GstPlayAudioChain *) playsink->audiochain;
|
2015-07-10 08:53:24 +00:00
|
|
|
if (chain && chain->volume) {
|
|
|
|
g_object_set (chain->volume, "mute", mute, NULL);
|
2009-05-22 12:49:14 +00:00
|
|
|
} else {
|
|
|
|
playsink->mute_changed = TRUE;
|
gst/playback/: Add mute property.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_set_mute),
(gst_play_sink_get_mute), (gen_audio_chain):
* gst/playback/gstplaysink.h:
Add mute property.
* gst/playback/gststreamselector.c: (gst_selector_pad_event),
(gst_selector_pad_chain):
* gst/playback/gststreamselector.h:
Make sure we forward the event only once.
* tests/examples/seek/seek.c: (stop_cb), (mute_toggle_cb), (main):
Add and implement the mute button for playbin2.
2008-02-14 18:24:42 +00:00
|
|
|
}
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
}
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
gst_play_sink_get_mute (GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
gboolean result;
|
|
|
|
GstPlayAudioChain *chain;
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
chain = (GstPlayAudioChain *) playsink->audiochain;
|
2015-07-10 08:53:24 +00:00
|
|
|
if (chain && chain->volume) {
|
|
|
|
g_object_get (chain->volume, "mute", &result, NULL);
|
gst/playback/: Add mute property.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_set_mute),
(gst_play_sink_get_mute), (gen_audio_chain):
* gst/playback/gstplaysink.h:
Add mute property.
* gst/playback/gststreamselector.c: (gst_selector_pad_event),
(gst_selector_pad_chain):
* gst/playback/gststreamselector.h:
Make sure we forward the event only once.
* tests/examples/seek/seek.c: (stop_cb), (mute_toggle_cb), (main):
Add and implement the mute button for playbin2.
2008-02-14 18:24:42 +00:00
|
|
|
playsink->mute = result;
|
|
|
|
} else {
|
|
|
|
result = playsink->mute;
|
|
|
|
}
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
static void
|
|
|
|
post_missing_element_message (GstPlaySink * playsink, const gchar * name)
|
|
|
|
{
|
|
|
|
GstMessage *msg;
|
|
|
|
|
|
|
|
msg = gst_missing_element_message_new (GST_ELEMENT_CAST (playsink), name);
|
|
|
|
gst_element_post_message (GST_ELEMENT_CAST (playsink), msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
add_chain (GstPlayChain * chain, gboolean add)
|
|
|
|
{
|
|
|
|
if (chain->added == add)
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
if (add)
|
|
|
|
gst_bin_add (GST_BIN_CAST (chain->playsink), chain->bin);
|
2009-11-17 15:37:57 +00:00
|
|
|
else {
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
gst_bin_remove (GST_BIN_CAST (chain->playsink), chain->bin);
|
2009-11-17 15:37:57 +00:00
|
|
|
/* we don't want to lose our sink status */
|
2011-11-28 15:55:32 +00:00
|
|
|
GST_OBJECT_FLAG_SET (chain->playsink, GST_ELEMENT_FLAG_SINK);
|
2009-11-17 15:37:57 +00:00
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
|
|
|
chain->added = add;
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
activate_chain (GstPlayChain * chain, gboolean activate)
|
|
|
|
{
|
2009-03-17 14:39:23 +00:00
|
|
|
GstState state;
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
if (chain->activated == activate)
|
|
|
|
return TRUE;
|
|
|
|
|
2009-03-17 14:39:23 +00:00
|
|
|
GST_OBJECT_LOCK (chain->playsink);
|
|
|
|
state = GST_STATE_TARGET (chain->playsink);
|
|
|
|
GST_OBJECT_UNLOCK (chain->playsink);
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
if (activate)
|
2009-03-17 14:39:23 +00:00
|
|
|
gst_element_set_state (chain->bin, state);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
else
|
|
|
|
gst_element_set_state (chain->bin, GST_STATE_NULL);
|
|
|
|
|
|
|
|
chain->activated = activate;
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2010-01-18 02:08:39 +00:00
|
|
|
static gboolean
|
|
|
|
element_is_sink (GstElement * element)
|
2009-02-11 01:10:33 +00:00
|
|
|
{
|
|
|
|
gboolean is_sink;
|
|
|
|
|
|
|
|
GST_OBJECT_LOCK (element);
|
2011-11-28 15:55:32 +00:00
|
|
|
is_sink = GST_OBJECT_FLAG_IS_SET (element, GST_ELEMENT_FLAG_SINK);
|
2009-02-11 01:10:33 +00:00
|
|
|
GST_OBJECT_UNLOCK (element);
|
|
|
|
|
2010-01-18 02:08:39 +00:00
|
|
|
GST_DEBUG_OBJECT (element, "is a sink: %s", (is_sink) ? "yes" : "no");
|
|
|
|
return is_sink;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
element_has_property (GstElement * element, const gchar * pname, GType type)
|
|
|
|
{
|
|
|
|
GParamSpec *pspec;
|
|
|
|
|
|
|
|
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (element), pname);
|
|
|
|
|
|
|
|
if (pspec == NULL) {
|
|
|
|
GST_DEBUG_OBJECT (element, "no %s property", pname);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (type == G_TYPE_INVALID || type == pspec->value_type ||
|
|
|
|
g_type_is_a (pspec->value_type, type)) {
|
|
|
|
GST_DEBUG_OBJECT (element, "has %s property of type %s", pname,
|
|
|
|
(type == G_TYPE_INVALID) ? "any type" : g_type_name (type));
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_WARNING_OBJECT (element, "has %s property, but property is of type %s "
|
|
|
|
"and we expected it to be of type %s", pname,
|
|
|
|
g_type_name (pspec->value_type), g_type_name (type));
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
const gchar *prop_name;
|
|
|
|
GType prop_type;
|
2010-01-18 10:07:30 +00:00
|
|
|
gboolean need_sink;
|
2010-01-18 02:08:39 +00:00
|
|
|
} FindPropertyHelper;
|
|
|
|
|
|
|
|
static gint
|
2011-05-05 14:03:52 +00:00
|
|
|
find_property (const GValue * item, FindPropertyHelper * helper)
|
2010-01-18 02:08:39 +00:00
|
|
|
{
|
2011-05-05 14:03:52 +00:00
|
|
|
GstElement *element = g_value_get_object (item);
|
2010-01-18 10:07:30 +00:00
|
|
|
if (helper->need_sink && !element_is_sink (element)) {
|
2010-01-18 02:08:39 +00:00
|
|
|
return 1;
|
2009-02-11 01:10:33 +00:00
|
|
|
}
|
2010-01-18 02:08:39 +00:00
|
|
|
|
|
|
|
if (!element_has_property (element, helper->prop_name, helper->prop_type)) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2010-01-18 10:07:30 +00:00
|
|
|
GST_INFO_OBJECT (element, "found %s with %s property", helper->prop_name,
|
|
|
|
(helper->need_sink) ? "sink" : "element");
|
2010-01-18 02:08:39 +00:00
|
|
|
return 0; /* keep it */
|
2009-02-11 01:10:33 +00:00
|
|
|
}
|
|
|
|
|
2010-01-18 10:07:30 +00:00
|
|
|
/* FIXME: why not move these functions into core? */
|
2009-03-12 16:47:41 +00:00
|
|
|
/* find a sink in the hierarchy with a property named @name. This function does
|
|
|
|
* not increase the refcount of the returned object and thus remains valid as
|
|
|
|
* long as the bin is valid. */
|
2009-02-11 01:10:33 +00:00
|
|
|
static GstElement *
|
|
|
|
gst_play_sink_find_property_sinks (GstPlaySink * playsink, GstElement * obj,
|
2010-01-18 02:08:39 +00:00
|
|
|
const gchar * name, GType expected_type)
|
2009-02-11 01:10:33 +00:00
|
|
|
{
|
|
|
|
GstElement *result = NULL;
|
|
|
|
GstIterator *it;
|
|
|
|
|
2010-01-18 02:08:39 +00:00
|
|
|
if (element_has_property (obj, name, expected_type)) {
|
2009-03-12 16:47:41 +00:00
|
|
|
result = obj;
|
|
|
|
} else if (GST_IS_BIN (obj)) {
|
2011-05-05 14:03:52 +00:00
|
|
|
gboolean found;
|
|
|
|
GValue item = { 0, };
|
2010-01-18 10:07:30 +00:00
|
|
|
FindPropertyHelper helper = { name, expected_type, TRUE };
|
2010-01-18 02:08:39 +00:00
|
|
|
|
2009-02-11 01:10:33 +00:00
|
|
|
it = gst_bin_iterate_recurse (GST_BIN_CAST (obj));
|
2011-05-05 14:03:52 +00:00
|
|
|
found = gst_iterator_find_custom (it,
|
|
|
|
(GCompareFunc) find_property, &item, &helper);
|
2009-02-11 01:10:33 +00:00
|
|
|
gst_iterator_free (it);
|
2011-06-28 17:03:23 +00:00
|
|
|
if (found) {
|
2011-05-05 14:03:52 +00:00
|
|
|
result = g_value_get_object (&item);
|
2011-06-28 17:03:23 +00:00
|
|
|
/* we don't need the extra ref */
|
|
|
|
g_value_unset (&item);
|
|
|
|
}
|
2009-02-11 01:10:33 +00:00
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2010-01-18 10:07:30 +00:00
|
|
|
/* find an object in the hierarchy with a property named @name */
|
|
|
|
static GstElement *
|
|
|
|
gst_play_sink_find_property (GstPlaySink * playsink, GstElement * obj,
|
|
|
|
const gchar * name, GType expected_type)
|
|
|
|
{
|
|
|
|
GstElement *result = NULL;
|
|
|
|
GstIterator *it;
|
|
|
|
|
|
|
|
if (GST_IS_BIN (obj)) {
|
2011-05-05 14:03:52 +00:00
|
|
|
gboolean found;
|
|
|
|
GValue item = { 0, };
|
2010-01-18 10:07:30 +00:00
|
|
|
FindPropertyHelper helper = { name, expected_type, FALSE };
|
|
|
|
|
|
|
|
it = gst_bin_iterate_recurse (GST_BIN_CAST (obj));
|
2011-05-05 14:03:52 +00:00
|
|
|
found = gst_iterator_find_custom (it,
|
|
|
|
(GCompareFunc) find_property, &item, &helper);
|
2010-01-18 10:07:30 +00:00
|
|
|
gst_iterator_free (it);
|
2012-05-14 05:01:18 +00:00
|
|
|
if (found) {
|
2011-05-05 14:03:52 +00:00
|
|
|
result = g_value_dup_object (&item);
|
2012-05-14 05:01:18 +00:00
|
|
|
g_value_unset (&item);
|
|
|
|
}
|
2010-01-18 10:07:30 +00:00
|
|
|
} else {
|
|
|
|
if (element_has_property (obj, name, expected_type)) {
|
|
|
|
result = obj;
|
|
|
|
gst_object_ref (obj);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2009-05-07 12:28:30 +00:00
|
|
|
static void
|
|
|
|
do_async_start (GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
GstMessage *message;
|
|
|
|
|
2009-11-17 15:39:09 +00:00
|
|
|
if (!playsink->need_async_start) {
|
|
|
|
GST_INFO_OBJECT (playsink, "no async_start needed");
|
2009-05-14 20:37:22 +00:00
|
|
|
return;
|
2009-11-17 15:39:09 +00:00
|
|
|
}
|
2009-05-14 20:37:22 +00:00
|
|
|
|
2009-05-07 12:28:30 +00:00
|
|
|
playsink->async_pending = TRUE;
|
|
|
|
|
2009-05-14 20:37:22 +00:00
|
|
|
GST_INFO_OBJECT (playsink, "Sending async_start message");
|
2011-06-08 11:43:28 +00:00
|
|
|
message = gst_message_new_async_start (GST_OBJECT_CAST (playsink));
|
2009-05-07 12:28:30 +00:00
|
|
|
GST_BIN_CLASS (gst_play_sink_parent_class)->handle_message (GST_BIN_CAST
|
|
|
|
(playsink), message);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
do_async_done (GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
GstMessage *message;
|
|
|
|
|
|
|
|
if (playsink->async_pending) {
|
2009-05-14 20:37:22 +00:00
|
|
|
GST_INFO_OBJECT (playsink, "Sending async_done message");
|
2012-06-13 09:04:21 +00:00
|
|
|
message =
|
|
|
|
gst_message_new_async_done (GST_OBJECT_CAST (playsink),
|
|
|
|
GST_CLOCK_TIME_NONE);
|
2009-05-07 12:28:30 +00:00
|
|
|
GST_BIN_CLASS (gst_play_sink_parent_class)->handle_message (GST_BIN_CAST
|
|
|
|
(playsink), message);
|
|
|
|
|
|
|
|
playsink->async_pending = FALSE;
|
|
|
|
}
|
2009-05-14 20:37:22 +00:00
|
|
|
|
|
|
|
playsink->need_async_start = FALSE;
|
2009-05-07 12:28:30 +00:00
|
|
|
}
|
|
|
|
|
2008-12-10 17:39:32 +00:00
|
|
|
/* try to change the state of an element. This function returns the element when
|
|
|
|
* the state change could be performed. When this function returns NULL an error
|
2009-04-10 11:27:41 +00:00
|
|
|
* occured and the element is unreffed if @unref is TRUE. */
|
2008-12-10 17:39:32 +00:00
|
|
|
static GstElement *
|
2009-04-10 11:27:41 +00:00
|
|
|
try_element (GstPlaySink * playsink, GstElement * element, gboolean unref)
|
2008-12-10 17:39:32 +00:00
|
|
|
{
|
|
|
|
GstStateChangeReturn ret;
|
|
|
|
|
|
|
|
if (element) {
|
|
|
|
ret = gst_element_set_state (element, GST_STATE_READY);
|
|
|
|
if (ret == GST_STATE_CHANGE_FAILURE) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "failed state change..");
|
|
|
|
gst_element_set_state (element, GST_STATE_NULL);
|
2009-04-10 11:27:41 +00:00
|
|
|
if (unref)
|
|
|
|
gst_object_unref (element);
|
2008-12-10 17:39:32 +00:00
|
|
|
element = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return element;
|
|
|
|
}
|
|
|
|
|
2010-04-26 15:30:44 +00:00
|
|
|
/* make the element (bin) that contains the elements needed to perform
|
2013-06-17 13:02:41 +00:00
|
|
|
* video deinterlacing. Only used for *raw* video streams.
|
2010-04-26 15:30:44 +00:00
|
|
|
*
|
2013-06-17 13:02:41 +00:00
|
|
|
* +---------------------------------------+
|
|
|
|
* | vbin |
|
|
|
|
* | +----------+ +-----------+ |
|
|
|
|
* | |colorspace| |deinterlace| |
|
|
|
|
* | +-sink src-sink src-+ |
|
|
|
|
* | | +----------+ +-----------+ | |
|
|
|
|
* sink-+ +-src
|
|
|
|
* +---------------------------------------+
|
2010-04-26 15:30:44 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
static GstPlayVideoDeinterlaceChain *
|
|
|
|
gen_video_deinterlace_chain (GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
GstPlayVideoDeinterlaceChain *chain;
|
|
|
|
GstBin *bin;
|
|
|
|
GstPad *pad;
|
|
|
|
GstElement *head = NULL, *prev = NULL;
|
|
|
|
|
|
|
|
chain = g_new0 (GstPlayVideoDeinterlaceChain, 1);
|
|
|
|
chain->chain.playsink = playsink;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (playsink, "making video deinterlace chain %p", chain);
|
|
|
|
|
|
|
|
/* create a bin to hold objects, as we create them we add them to this bin so
|
|
|
|
* that when something goes wrong we only need to unref the bin */
|
|
|
|
chain->chain.bin = gst_bin_new ("vdbin");
|
|
|
|
bin = GST_BIN_CAST (chain->chain.bin);
|
|
|
|
gst_object_ref_sink (bin);
|
|
|
|
|
2011-05-16 21:46:52 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "creating " COLORSPACE);
|
|
|
|
chain->conv = gst_element_factory_make (COLORSPACE, "vdconv");
|
2010-04-26 15:30:44 +00:00
|
|
|
if (chain->conv == NULL) {
|
2011-05-16 21:46:52 +00:00
|
|
|
post_missing_element_message (playsink, COLORSPACE);
|
2010-04-26 15:30:44 +00:00
|
|
|
GST_ELEMENT_WARNING (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
2011-05-16 21:46:52 +00:00
|
|
|
COLORSPACE), ("video rendering might fail"));
|
2010-04-26 15:30:44 +00:00
|
|
|
} else {
|
|
|
|
gst_bin_add (bin, chain->conv);
|
|
|
|
head = chain->conv;
|
|
|
|
prev = chain->conv;
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (playsink, "creating deinterlace");
|
|
|
|
chain->deinterlace = gst_element_factory_make ("deinterlace", "deinterlace");
|
2012-07-17 12:45:13 +00:00
|
|
|
if (chain->deinterlace == NULL) {
|
|
|
|
chain->deinterlace =
|
|
|
|
gst_element_factory_make ("avdeinterlace", "deinterlace");
|
|
|
|
}
|
2010-04-26 15:30:44 +00:00
|
|
|
if (chain->deinterlace == NULL) {
|
|
|
|
post_missing_element_message (playsink, "deinterlace");
|
|
|
|
GST_ELEMENT_WARNING (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
|
|
|
"deinterlace"), ("deinterlacing won't work"));
|
|
|
|
} else {
|
|
|
|
gst_bin_add (bin, chain->deinterlace);
|
|
|
|
if (prev) {
|
2010-07-20 19:05:45 +00:00
|
|
|
if (!gst_element_link_pads_full (prev, "src", chain->deinterlace, "sink",
|
|
|
|
GST_PAD_LINK_CHECK_TEMPLATE_CAPS))
|
2010-04-26 15:30:44 +00:00
|
|
|
goto link_failed;
|
|
|
|
} else {
|
|
|
|
head = chain->deinterlace;
|
|
|
|
}
|
|
|
|
prev = chain->deinterlace;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (head) {
|
|
|
|
pad = gst_element_get_static_pad (head, "sink");
|
|
|
|
chain->sinkpad = gst_ghost_pad_new ("sink", pad);
|
|
|
|
gst_object_unref (pad);
|
|
|
|
} else {
|
|
|
|
chain->sinkpad = gst_ghost_pad_new_no_target ("sink", GST_PAD_SINK);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (prev) {
|
|
|
|
pad = gst_element_get_static_pad (prev, "src");
|
|
|
|
chain->srcpad = gst_ghost_pad_new ("src", pad);
|
|
|
|
gst_object_unref (pad);
|
|
|
|
} else {
|
|
|
|
chain->srcpad = gst_ghost_pad_new ("src", chain->sinkpad);
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_element_add_pad (chain->chain.bin, chain->sinkpad);
|
|
|
|
gst_element_add_pad (chain->chain.bin, chain->srcpad);
|
|
|
|
|
|
|
|
return chain;
|
|
|
|
|
|
|
|
link_failed:
|
|
|
|
{
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, PAD,
|
|
|
|
(NULL), ("Failed to configure the video deinterlace chain."));
|
|
|
|
free_chain ((GstPlayChain *) chain);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-02-22 13:53:39 +00:00
|
|
|
static gboolean
|
2012-03-02 09:00:55 +00:00
|
|
|
is_valid_color_balance_element (GstColorBalance * bal)
|
2012-02-22 13:53:39 +00:00
|
|
|
{
|
|
|
|
gboolean have_brightness = FALSE;
|
|
|
|
gboolean have_contrast = FALSE;
|
|
|
|
gboolean have_hue = FALSE;
|
|
|
|
gboolean have_saturation = FALSE;
|
|
|
|
const GList *channels, *l;
|
|
|
|
|
|
|
|
channels = gst_color_balance_list_channels (bal);
|
|
|
|
for (l = channels; l; l = l->next) {
|
|
|
|
GstColorBalanceChannel *ch = l->data;
|
|
|
|
|
|
|
|
if (g_strrstr (ch->label, "BRIGHTNESS"))
|
|
|
|
have_brightness = TRUE;
|
|
|
|
else if (g_strrstr (ch->label, "CONTRAST"))
|
|
|
|
have_contrast = TRUE;
|
|
|
|
else if (g_strrstr (ch->label, "HUE"))
|
|
|
|
have_hue = TRUE;
|
|
|
|
else if (g_strrstr (ch->label, "SATURATION"))
|
|
|
|
have_saturation = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return have_brightness && have_contrast && have_hue && have_saturation;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-03-02 09:00:55 +00:00
|
|
|
iterate_color_balance_elements (const GValue * item, gpointer user_data)
|
2012-02-22 13:53:39 +00:00
|
|
|
{
|
2012-03-02 09:00:55 +00:00
|
|
|
gboolean valid;
|
|
|
|
GstColorBalance *cb, **cb_out = user_data;
|
2012-02-23 12:19:55 +00:00
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
cb = GST_COLOR_BALANCE (g_value_get_object (item));
|
|
|
|
valid = is_valid_color_balance_element (cb);
|
2012-02-23 12:19:55 +00:00
|
|
|
if (valid) {
|
|
|
|
if (*cb_out
|
|
|
|
&& gst_color_balance_get_balance_type (*cb_out) ==
|
|
|
|
GST_COLOR_BALANCE_SOFTWARE) {
|
|
|
|
gst_object_unref (*cb_out);
|
2012-03-02 09:00:55 +00:00
|
|
|
*cb_out = GST_COLOR_BALANCE (gst_object_ref (cb));
|
2012-02-23 12:19:55 +00:00
|
|
|
} else if (!*cb_out) {
|
2012-03-02 09:00:55 +00:00
|
|
|
*cb_out = GST_COLOR_BALANCE (gst_object_ref (cb));
|
2012-02-23 12:19:55 +00:00
|
|
|
}
|
|
|
|
}
|
2012-02-22 13:53:39 +00:00
|
|
|
}
|
|
|
|
|
2012-02-23 12:19:55 +00:00
|
|
|
static GstColorBalance *
|
|
|
|
find_color_balance_element (GstElement * element)
|
2012-02-22 10:56:59 +00:00
|
|
|
{
|
2012-02-22 13:53:39 +00:00
|
|
|
GstIterator *it;
|
2012-02-23 12:19:55 +00:00
|
|
|
GstColorBalance *cb = NULL;
|
2012-02-22 10:56:59 +00:00
|
|
|
|
2012-02-23 12:19:55 +00:00
|
|
|
if (GST_IS_COLOR_BALANCE (element)
|
2012-03-02 09:00:55 +00:00
|
|
|
&& is_valid_color_balance_element (GST_COLOR_BALANCE (element)))
|
2012-02-23 12:19:55 +00:00
|
|
|
return GST_COLOR_BALANCE (gst_object_ref (element));
|
2012-02-22 10:56:59 +00:00
|
|
|
else if (!GST_IS_BIN (element))
|
|
|
|
return FALSE;
|
|
|
|
|
2012-02-22 13:53:39 +00:00
|
|
|
it = gst_bin_iterate_all_by_interface (GST_BIN (element),
|
|
|
|
GST_TYPE_COLOR_BALANCE);
|
|
|
|
while (gst_iterator_foreach (it, iterate_color_balance_elements,
|
2012-02-23 12:19:55 +00:00
|
|
|
&cb) == GST_ITERATOR_RESYNC)
|
2012-02-22 13:53:39 +00:00
|
|
|
gst_iterator_resync (it);
|
|
|
|
gst_iterator_free (it);
|
2012-02-22 10:56:59 +00:00
|
|
|
|
2012-02-23 12:19:55 +00:00
|
|
|
return cb;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
colorbalance_value_changed_cb (GstColorBalance * balance,
|
|
|
|
GstColorBalanceChannel * channel, gint value, GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
GList *l;
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
for (i = 0, l = playsink->colorbalance_channels; l; l = l->next, i++) {
|
|
|
|
GstColorBalanceChannel *proxy = l->data;
|
|
|
|
|
|
|
|
if (g_strrstr (channel->label, proxy->label)) {
|
|
|
|
gdouble new_val;
|
|
|
|
|
|
|
|
/* Convert to [0, 1] range */
|
|
|
|
new_val =
|
|
|
|
((gdouble) value -
|
|
|
|
(gdouble) channel->min_value) / ((gdouble) channel->max_value -
|
|
|
|
(gdouble) channel->min_value);
|
|
|
|
/* Convert to proxy range */
|
|
|
|
new_val =
|
|
|
|
proxy->min_value + new_val * ((gdouble) proxy->max_value -
|
|
|
|
(gdouble) proxy->min_value);
|
|
|
|
playsink->colorbalance_values[i] = (gint) (0.5 + new_val);
|
|
|
|
|
|
|
|
gst_color_balance_value_changed (GST_COLOR_BALANCE (playsink), proxy,
|
|
|
|
playsink->colorbalance_values[i]);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
update_colorbalance (GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
GstColorBalance *balance = NULL;
|
|
|
|
GList *l;
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
|
|
|
if (playsink->colorbalance_element) {
|
|
|
|
balance =
|
|
|
|
GST_COLOR_BALANCE (gst_object_ref (playsink->colorbalance_element));
|
|
|
|
}
|
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
if (!balance)
|
|
|
|
return;
|
|
|
|
|
2013-05-21 14:35:18 +00:00
|
|
|
g_signal_handler_block (balance, playsink->colorbalance_value_changed_id);
|
2012-02-23 12:19:55 +00:00
|
|
|
|
|
|
|
for (i = 0, l = playsink->colorbalance_channels; l; l = l->next, i++) {
|
|
|
|
GstColorBalanceChannel *proxy = l->data;
|
|
|
|
GstColorBalanceChannel *channel = NULL;
|
|
|
|
const GList *channels, *k;
|
2013-05-29 16:33:48 +00:00
|
|
|
gdouble new_val;
|
2012-02-23 12:19:55 +00:00
|
|
|
|
|
|
|
channels = gst_color_balance_list_channels (balance);
|
|
|
|
for (k = channels; k; k = k->next) {
|
|
|
|
GstColorBalanceChannel *tmp = k->data;
|
|
|
|
|
|
|
|
if (g_strrstr (tmp->label, proxy->label)) {
|
|
|
|
channel = tmp;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
g_assert (channel);
|
|
|
|
|
2013-05-29 16:33:48 +00:00
|
|
|
/* Convert to [0, 1] range */
|
|
|
|
new_val =
|
|
|
|
((gdouble) playsink->colorbalance_values[i] -
|
|
|
|
(gdouble) proxy->min_value) / ((gdouble) proxy->max_value -
|
|
|
|
(gdouble) proxy->min_value);
|
|
|
|
/* Convert to channel range */
|
|
|
|
new_val =
|
|
|
|
channel->min_value + new_val * ((gdouble) channel->max_value -
|
|
|
|
(gdouble) channel->min_value);
|
|
|
|
|
2013-06-17 13:02:41 +00:00
|
|
|
gst_color_balance_set_value (balance, channel, (gint) (new_val + 0.5));
|
2012-02-23 12:19:55 +00:00
|
|
|
}
|
|
|
|
|
2013-05-21 14:35:18 +00:00
|
|
|
g_signal_handler_unblock (balance, playsink->colorbalance_value_changed_id);
|
2012-04-27 10:54:15 +00:00
|
|
|
|
|
|
|
gst_object_unref (balance);
|
2012-02-22 10:56:59 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
/* make the element (bin) that contains the elements needed to perform
|
2009-09-08 11:02:46 +00:00
|
|
|
* video display.
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
*
|
2014-03-16 16:00:38 +00:00
|
|
|
* +------------------------------------------------------------------------+
|
|
|
|
* | vbin |
|
|
|
|
* | +--------+ +-------+ +----------+ +----------+ +---------+ |
|
|
|
|
* | | filter | | queue | |colorspace| |videoscale| |videosink| |
|
|
|
|
* | +-sink src-sink src-sink src-sink src-sink | |
|
|
|
|
* | | +--------+ +-------+ +----------+ +----------+ +---------+ |
|
|
|
|
* sink-+ |
|
|
|
|
* +------------------------------------------------------------------------+
|
2009-09-08 11:02:46 +00:00
|
|
|
*
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
*/
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
static GstPlayVideoChain *
|
2010-08-12 08:01:03 +00:00
|
|
|
gen_video_chain (GstPlaySink * playsink, gboolean raw, gboolean async)
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
{
|
|
|
|
GstPlayVideoChain *chain;
|
|
|
|
GstBin *bin;
|
|
|
|
GstPad *pad;
|
2009-11-03 11:33:40 +00:00
|
|
|
GstElement *head = NULL, *prev = NULL, *elem = NULL;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
|
|
|
chain = g_new0 (GstPlayVideoChain, 1);
|
2009-01-30 19:04:37 +00:00
|
|
|
chain->chain.playsink = playsink;
|
2008-12-20 12:48:43 +00:00
|
|
|
chain->chain.raw = raw;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "making video chain %p", chain);
|
|
|
|
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
if (playsink->video_sink) {
|
2008-12-10 17:39:32 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "trying configured videosink");
|
2009-04-10 11:27:41 +00:00
|
|
|
chain->sink = try_element (playsink, playsink->video_sink, FALSE);
|
2009-07-14 09:33:29 +00:00
|
|
|
} else {
|
|
|
|
/* only try fallback if no specific sink was chosen */
|
|
|
|
if (chain->sink == NULL) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "trying autovideosink");
|
|
|
|
elem = gst_element_factory_make ("autovideosink", "videosink");
|
|
|
|
chain->sink = try_element (playsink, elem, TRUE);
|
|
|
|
}
|
|
|
|
if (chain->sink == NULL) {
|
|
|
|
/* if default sink from config.h is different then try it too */
|
|
|
|
if (strcmp (DEFAULT_VIDEOSINK, "autovideosink")) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "trying " DEFAULT_VIDEOSINK);
|
|
|
|
elem = gst_element_factory_make (DEFAULT_VIDEOSINK, "videosink");
|
|
|
|
chain->sink = try_element (playsink, elem, TRUE);
|
|
|
|
}
|
|
|
|
}
|
2011-03-15 13:45:03 +00:00
|
|
|
if (chain->sink)
|
|
|
|
playsink->video_sink = gst_object_ref (chain->sink);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
2008-12-10 17:39:32 +00:00
|
|
|
if (chain->sink == NULL)
|
|
|
|
goto no_sinks;
|
2009-11-03 11:33:40 +00:00
|
|
|
head = chain->sink;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2008-02-18 11:54:15 +00:00
|
|
|
/* if we can disable async behaviour of the sink, we can avoid adding a
|
2009-03-12 16:47:41 +00:00
|
|
|
* queue for the audio chain. */
|
2010-01-18 02:08:39 +00:00
|
|
|
elem =
|
|
|
|
gst_play_sink_find_property_sinks (playsink, chain->sink, "async",
|
|
|
|
G_TYPE_BOOLEAN);
|
2009-03-12 16:47:41 +00:00
|
|
|
if (elem) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "setting async property to %d on element %s",
|
|
|
|
async, GST_ELEMENT_NAME (elem));
|
|
|
|
g_object_set (elem, "async", async, NULL);
|
2008-02-18 11:54:15 +00:00
|
|
|
chain->async = async;
|
2008-12-10 17:39:32 +00:00
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "no async property on the sink");
|
2008-02-18 11:54:15 +00:00
|
|
|
chain->async = TRUE;
|
2008-12-10 17:39:32 +00:00
|
|
|
}
|
2008-02-15 18:38:52 +00:00
|
|
|
|
2012-02-23 10:05:11 +00:00
|
|
|
/* Make sure the aspect ratio is kept */
|
|
|
|
elem =
|
|
|
|
gst_play_sink_find_property_sinks (playsink, chain->sink,
|
|
|
|
"force-aspect-ratio", G_TYPE_BOOLEAN);
|
|
|
|
if (elem)
|
2012-06-14 07:29:23 +00:00
|
|
|
g_object_set (elem, "force-aspect-ratio", playsink->force_aspect_ratio,
|
|
|
|
NULL);
|
2012-02-23 10:05:11 +00:00
|
|
|
|
2010-06-07 12:38:42 +00:00
|
|
|
/* find ts-offset element */
|
2011-08-21 21:51:45 +00:00
|
|
|
gst_object_replace ((GstObject **) & chain->ts_offset, (GstObject *)
|
2010-06-07 12:38:42 +00:00
|
|
|
gst_play_sink_find_property_sinks (playsink, chain->sink, "ts-offset",
|
2011-08-21 21:51:45 +00:00
|
|
|
G_TYPE_INT64));
|
2010-06-07 12:38:42 +00:00
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
/* create a bin to hold objects, as we create them we add them to this bin so
|
|
|
|
* that when something goes wrong we only need to unref the bin */
|
|
|
|
chain->chain.bin = gst_bin_new ("vbin");
|
|
|
|
bin = GST_BIN_CAST (chain->chain.bin);
|
2009-09-23 14:07:36 +00:00
|
|
|
gst_object_ref_sink (bin);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
gst_bin_add (bin, chain->sink);
|
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
/* Get the VideoOverlay element */
|
2012-02-23 10:33:27 +00:00
|
|
|
{
|
2012-03-02 09:00:55 +00:00
|
|
|
GstVideoOverlay *overlay = NULL;
|
2012-02-23 10:33:27 +00:00
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
2012-03-02 09:00:55 +00:00
|
|
|
if (playsink->overlay_element)
|
|
|
|
gst_object_unref (playsink->overlay_element);
|
|
|
|
playsink->overlay_element =
|
|
|
|
GST_VIDEO_OVERLAY (gst_bin_get_by_interface (GST_BIN (chain->chain.bin),
|
|
|
|
GST_TYPE_VIDEO_OVERLAY));
|
|
|
|
if (playsink->overlay_element)
|
|
|
|
overlay = GST_VIDEO_OVERLAY (gst_object_ref (playsink->overlay_element));
|
2012-02-23 10:33:27 +00:00
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
if (overlay) {
|
|
|
|
if (playsink->overlay_handle_set)
|
|
|
|
gst_video_overlay_set_window_handle (overlay, playsink->overlay_handle);
|
|
|
|
if (playsink->overlay_handle_events_set)
|
|
|
|
gst_video_overlay_handle_events (overlay,
|
|
|
|
playsink->overlay_handle_events);
|
|
|
|
if (playsink->overlay_render_rectangle_set)
|
|
|
|
gst_video_overlay_set_render_rectangle (overlay,
|
|
|
|
playsink->overlay_x, playsink->overlay_y,
|
|
|
|
playsink->overlay_width, playsink->overlay_height);
|
|
|
|
gst_object_unref (overlay);
|
2012-02-23 10:33:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-16 16:00:38 +00:00
|
|
|
head = chain->sink;
|
|
|
|
prev = NULL;
|
|
|
|
|
|
|
|
/* add the video filter first, so everything is working with post-filter
|
|
|
|
* samples */
|
|
|
|
chain->filter = gst_play_sink_get_filter (playsink,
|
|
|
|
GST_PLAY_SINK_TYPE_VIDEO_RAW);
|
|
|
|
if (chain->filter) {
|
|
|
|
if (!raw) {
|
|
|
|
if (playsink->flags & GST_PLAY_FLAG_FORCE_FILTERS) {
|
|
|
|
goto filter_with_nonraw;
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (playsink,
|
|
|
|
"skipping video filter since we're not raw");
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "adding video filter");
|
2014-09-16 18:42:46 +00:00
|
|
|
chain->filter_conv =
|
|
|
|
gst_element_factory_make ("videoconvert", "filter-convert");
|
|
|
|
if (!chain->filter_conv) {
|
|
|
|
post_missing_element_message (playsink, "videoconvert");
|
|
|
|
GST_ELEMENT_WARNING (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
|
|
|
"videoconvert"),
|
|
|
|
("video playback and visualizations might not work"));
|
|
|
|
} else {
|
|
|
|
gst_bin_add (bin, chain->filter_conv);
|
|
|
|
head = prev = chain->filter_conv;
|
|
|
|
}
|
|
|
|
|
2014-03-16 16:00:38 +00:00
|
|
|
gst_bin_add (bin, chain->filter);
|
2014-09-16 18:42:46 +00:00
|
|
|
if (prev) {
|
|
|
|
if (!gst_element_link_pads_full (prev, "src", chain->filter, "sink",
|
|
|
|
GST_PAD_LINK_CHECK_TEMPLATE_CAPS)) {
|
|
|
|
goto link_failed;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
head = chain->filter;
|
|
|
|
}
|
|
|
|
prev = chain->filter;
|
2014-03-16 16:00:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-08-12 08:01:03 +00:00
|
|
|
/* decouple decoder from sink, this improves playback quite a lot since the
|
|
|
|
* decoder can continue while the sink blocks for synchronisation. We don't
|
|
|
|
* need a lot of buffers as this consumes a lot of memory and we don't want
|
|
|
|
* too little because else we would be context switching too quickly. */
|
|
|
|
chain->queue = gst_element_factory_make ("queue", "vqueue");
|
|
|
|
if (chain->queue == NULL) {
|
|
|
|
post_missing_element_message (playsink, "queue");
|
|
|
|
GST_ELEMENT_WARNING (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
|
|
|
"queue"), ("video rendering might be suboptimal"));
|
|
|
|
} else {
|
|
|
|
g_object_set (G_OBJECT (chain->queue), "max-size-buffers", 3,
|
2010-08-31 08:09:51 +00:00
|
|
|
"max-size-bytes", 0, "max-size-time", (gint64) 0, "silent", TRUE, NULL);
|
2010-08-12 08:01:03 +00:00
|
|
|
gst_bin_add (bin, chain->queue);
|
2014-03-16 16:00:38 +00:00
|
|
|
if (prev) {
|
|
|
|
if (!gst_element_link_pads_full (prev, "src", chain->queue, "sink",
|
|
|
|
GST_PAD_LINK_CHECK_TEMPLATE_CAPS))
|
|
|
|
goto link_failed;
|
|
|
|
} else {
|
|
|
|
head = chain->queue;
|
|
|
|
}
|
|
|
|
prev = chain->queue;
|
2009-03-24 16:12:53 +00:00
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2012-02-23 12:19:55 +00:00
|
|
|
GST_OBJECT_LOCK (playsink);
|
|
|
|
if (playsink->colorbalance_element) {
|
2013-05-21 14:35:18 +00:00
|
|
|
g_signal_handler_disconnect (playsink->colorbalance_element,
|
|
|
|
playsink->colorbalance_value_changed_id);
|
2012-02-23 12:19:55 +00:00
|
|
|
gst_object_unref (playsink->colorbalance_element);
|
2013-07-23 10:35:46 +00:00
|
|
|
playsink->colorbalance_value_changed_id = 0;
|
2012-02-23 12:19:55 +00:00
|
|
|
}
|
|
|
|
playsink->colorbalance_element = find_color_balance_element (chain->sink);
|
2012-06-25 13:21:07 +00:00
|
|
|
if (playsink->colorbalance_element) {
|
2013-05-21 14:35:18 +00:00
|
|
|
playsink->colorbalance_value_changed_id =
|
|
|
|
g_signal_connect (playsink->colorbalance_element, "value-changed",
|
2012-06-25 13:21:07 +00:00
|
|
|
G_CALLBACK (colorbalance_value_changed_cb), playsink);
|
|
|
|
}
|
2012-02-23 12:19:55 +00:00
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
2012-02-22 10:56:59 +00:00
|
|
|
if (!(playsink->flags & GST_PLAY_FLAG_NATIVE_VIDEO)
|
2012-02-23 12:19:55 +00:00
|
|
|
|| (!playsink->colorbalance_element
|
2012-02-22 10:56:59 +00:00
|
|
|
&& (playsink->flags & GST_PLAY_FLAG_SOFT_COLORBALANCE))) {
|
|
|
|
gboolean use_converters = !(playsink->flags & GST_PLAY_FLAG_NATIVE_VIDEO);
|
2012-02-23 12:19:55 +00:00
|
|
|
gboolean use_balance = !playsink->colorbalance_element
|
2012-02-22 10:56:59 +00:00
|
|
|
&& (playsink->flags & GST_PLAY_FLAG_SOFT_COLORBALANCE);
|
|
|
|
|
2011-03-25 07:26:00 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "creating videoconverter");
|
|
|
|
chain->conv =
|
2012-02-22 10:56:59 +00:00
|
|
|
g_object_new (GST_TYPE_PLAY_SINK_VIDEO_CONVERT, "name", "vconv",
|
|
|
|
"use-converters", use_converters, "use-balance", use_balance, NULL);
|
2012-02-23 12:19:55 +00:00
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
2013-05-21 14:35:18 +00:00
|
|
|
if (use_balance && GST_PLAY_SINK_VIDEO_CONVERT (chain->conv)->balance) {
|
2012-02-23 12:19:55 +00:00
|
|
|
playsink->colorbalance_element =
|
|
|
|
GST_COLOR_BALANCE (gst_object_ref (GST_PLAY_SINK_VIDEO_CONVERT
|
|
|
|
(chain->conv)->balance));
|
2013-05-21 14:35:18 +00:00
|
|
|
playsink->colorbalance_value_changed_id =
|
|
|
|
g_signal_connect (playsink->colorbalance_element, "value-changed",
|
|
|
|
G_CALLBACK (colorbalance_value_changed_cb), playsink);
|
|
|
|
}
|
2012-02-23 12:19:55 +00:00
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
2011-03-25 07:26:00 +00:00
|
|
|
gst_bin_add (bin, chain->conv);
|
|
|
|
if (prev) {
|
|
|
|
if (!gst_element_link_pads_full (prev, "src", chain->conv, "sink",
|
|
|
|
GST_PAD_LINK_CHECK_TEMPLATE_CAPS))
|
|
|
|
goto link_failed;
|
2008-12-10 17:39:32 +00:00
|
|
|
} else {
|
2011-03-25 07:26:00 +00:00
|
|
|
head = chain->conv;
|
2008-12-10 17:39:32 +00:00
|
|
|
}
|
2011-03-25 07:26:00 +00:00
|
|
|
prev = chain->conv;
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2012-02-23 12:19:55 +00:00
|
|
|
update_colorbalance (playsink);
|
|
|
|
|
2009-03-24 16:12:53 +00:00
|
|
|
if (prev) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "linking to sink");
|
2010-07-20 19:05:45 +00:00
|
|
|
if (!gst_element_link_pads_full (prev, "src", chain->sink, NULL,
|
|
|
|
GST_PAD_LINK_CHECK_TEMPLATE_CAPS))
|
2009-03-24 16:12:53 +00:00
|
|
|
goto link_failed;
|
|
|
|
}
|
2008-12-10 17:39:32 +00:00
|
|
|
|
2009-03-24 16:12:53 +00:00
|
|
|
pad = gst_element_get_static_pad (head, "sink");
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
chain->sinkpad = gst_ghost_pad_new ("sink", pad);
|
2008-12-10 17:39:32 +00:00
|
|
|
|
2012-05-24 14:02:59 +00:00
|
|
|
/* sending audio/video flushes break stream changes when the pipeline
|
|
|
|
* is paused and played again in 0.10 */
|
|
|
|
#if 0
|
|
|
|
gst_pad_set_event_function (chain->sinkpad,
|
|
|
|
GST_DEBUG_FUNCPTR (gst_play_sink_video_sink_event));
|
|
|
|
gst_pad_set_chain_function (chain->sinkpad,
|
|
|
|
GST_DEBUG_FUNCPTR (gst_play_sink_video_sink_chain));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
gst_object_unref (pad);
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
gst_element_add_pad (chain->chain.bin, chain->sinkpad);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
return chain;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
no_sinks:
|
|
|
|
{
|
2010-03-10 13:34:57 +00:00
|
|
|
if (!elem && !playsink->video_sink) {
|
2009-04-08 13:43:27 +00:00
|
|
|
post_missing_element_message (playsink, "autovideosink");
|
2009-07-14 09:33:29 +00:00
|
|
|
if (strcmp (DEFAULT_VIDEOSINK, "autovideosink")) {
|
|
|
|
post_missing_element_message (playsink, DEFAULT_VIDEOSINK);
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Both autovideosink and %s elements are missing."),
|
|
|
|
DEFAULT_VIDEOSINK), (NULL));
|
|
|
|
} else {
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("The autovideosink element is missing.")), (NULL));
|
|
|
|
}
|
2009-04-08 13:43:27 +00:00
|
|
|
} else {
|
2010-03-10 13:34:57 +00:00
|
|
|
if (playsink->video_sink) {
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, STATE_CHANGE,
|
|
|
|
(_("Configured videosink %s is not working."),
|
|
|
|
GST_ELEMENT_NAME (playsink->video_sink)), (NULL));
|
|
|
|
} else if (strcmp (DEFAULT_VIDEOSINK, "autovideosink")) {
|
2009-07-14 09:33:29 +00:00
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, STATE_CHANGE,
|
|
|
|
(_("Both autovideosink and %s elements are not working."),
|
|
|
|
DEFAULT_VIDEOSINK), (NULL));
|
|
|
|
} else {
|
2010-05-04 10:09:57 +00:00
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, STATE_CHANGE,
|
2009-07-14 09:33:29 +00:00
|
|
|
(_("The autovideosink element is not working.")), (NULL));
|
|
|
|
}
|
2009-04-08 13:43:27 +00:00
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
free_chain ((GstPlayChain *) chain);
|
|
|
|
return NULL;
|
|
|
|
}
|
2012-02-23 10:33:27 +00:00
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
link_failed:
|
|
|
|
{
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, PAD,
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
(NULL), ("Failed to configure the video sink."));
|
2014-03-16 16:00:38 +00:00
|
|
|
goto cleanup;
|
|
|
|
}
|
|
|
|
filter_with_nonraw:
|
|
|
|
{
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, NEGOTIATION,
|
|
|
|
(NULL), ("Cannot apply video-filter on non-raw stream"));
|
|
|
|
goto cleanup;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
2014-03-16 16:00:38 +00:00
|
|
|
cleanup:
|
|
|
|
/* checking sink made it READY */
|
|
|
|
gst_element_set_state (chain->sink, GST_STATE_NULL);
|
|
|
|
/* Remove chain from the bin to allow reuse later */
|
|
|
|
gst_bin_remove (bin, chain->sink);
|
|
|
|
free_chain ((GstPlayChain *) chain);
|
|
|
|
return NULL;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
|
|
|
|
2009-03-23 18:40:18 +00:00
|
|
|
static gboolean
|
2010-08-12 08:01:03 +00:00
|
|
|
setup_video_chain (GstPlaySink * playsink, gboolean raw, gboolean async)
|
2009-03-23 18:40:18 +00:00
|
|
|
{
|
|
|
|
GstElement *elem;
|
|
|
|
GstPlayVideoChain *chain;
|
|
|
|
GstStateChangeReturn ret;
|
|
|
|
|
|
|
|
chain = playsink->videochain;
|
|
|
|
|
2014-03-16 16:00:38 +00:00
|
|
|
/* if we have a filter, and raw-ness changed, we have to force a rebuild */
|
|
|
|
if (chain->filter && chain->chain.raw != raw)
|
|
|
|
return FALSE;
|
|
|
|
|
2011-03-25 07:26:00 +00:00
|
|
|
chain->chain.raw = raw;
|
2011-03-15 11:51:04 +00:00
|
|
|
|
2009-03-23 18:40:18 +00:00
|
|
|
/* if the chain was active we don't do anything */
|
2014-11-28 13:28:06 +00:00
|
|
|
if (GST_PLAY_CHAIN (chain)->activated)
|
2009-03-23 18:40:18 +00:00
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* try to set the sink element to READY again */
|
|
|
|
ret = gst_element_set_state (chain->sink, GST_STATE_READY);
|
|
|
|
if (ret == GST_STATE_CHANGE_FAILURE)
|
|
|
|
return FALSE;
|
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
/* Get the VideoOverlay element */
|
2012-02-23 10:33:27 +00:00
|
|
|
{
|
2012-03-02 09:00:55 +00:00
|
|
|
GstVideoOverlay *overlay = NULL;
|
2012-02-23 10:33:27 +00:00
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
2012-03-02 09:00:55 +00:00
|
|
|
if (playsink->overlay_element)
|
|
|
|
gst_object_unref (playsink->overlay_element);
|
|
|
|
playsink->overlay_element =
|
|
|
|
GST_VIDEO_OVERLAY (gst_bin_get_by_interface (GST_BIN (chain->chain.bin),
|
|
|
|
GST_TYPE_VIDEO_OVERLAY));
|
|
|
|
if (playsink->overlay_element)
|
|
|
|
overlay = GST_VIDEO_OVERLAY (gst_object_ref (playsink->overlay_element));
|
2012-02-23 10:33:27 +00:00
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
if (overlay) {
|
|
|
|
if (playsink->overlay_handle_set)
|
|
|
|
gst_video_overlay_set_window_handle (overlay, playsink->overlay_handle);
|
|
|
|
if (playsink->overlay_handle_events_set)
|
|
|
|
gst_video_overlay_handle_events (overlay,
|
|
|
|
playsink->overlay_handle_events);
|
|
|
|
if (playsink->overlay_render_rectangle_set)
|
|
|
|
gst_video_overlay_set_render_rectangle (overlay,
|
|
|
|
playsink->overlay_x, playsink->overlay_y,
|
|
|
|
playsink->overlay_width, playsink->overlay_height);
|
|
|
|
gst_object_unref (overlay);
|
2012-02-23 10:33:27 +00:00
|
|
|
}
|
|
|
|
}
|
2011-08-21 21:51:45 +00:00
|
|
|
|
2012-02-23 10:33:27 +00:00
|
|
|
/* find ts-offset element */
|
2011-08-21 21:51:45 +00:00
|
|
|
gst_object_replace ((GstObject **) & chain->ts_offset, (GstObject *)
|
2010-06-07 12:38:42 +00:00
|
|
|
gst_play_sink_find_property_sinks (playsink, chain->sink, "ts-offset",
|
2011-08-21 21:51:45 +00:00
|
|
|
G_TYPE_INT64));
|
2010-06-07 12:38:42 +00:00
|
|
|
|
2009-03-23 18:40:18 +00:00
|
|
|
/* if we can disable async behaviour of the sink, we can avoid adding a
|
|
|
|
* queue for the audio chain. */
|
2010-01-18 02:08:39 +00:00
|
|
|
elem =
|
|
|
|
gst_play_sink_find_property_sinks (playsink, chain->sink, "async",
|
|
|
|
G_TYPE_BOOLEAN);
|
2009-03-23 18:40:18 +00:00
|
|
|
if (elem) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "setting async property to %d on element %s",
|
|
|
|
async, GST_ELEMENT_NAME (elem));
|
|
|
|
g_object_set (elem, "async", async, NULL);
|
|
|
|
chain->async = async;
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "no async property on the sink");
|
|
|
|
chain->async = TRUE;
|
|
|
|
}
|
2012-02-22 10:56:59 +00:00
|
|
|
|
2012-02-23 10:05:11 +00:00
|
|
|
/* Make sure the aspect ratio is kept */
|
|
|
|
elem =
|
|
|
|
gst_play_sink_find_property_sinks (playsink, chain->sink,
|
|
|
|
"force-aspect-ratio", G_TYPE_BOOLEAN);
|
|
|
|
if (elem)
|
2012-06-14 07:29:23 +00:00
|
|
|
g_object_set (elem, "force-aspect-ratio", playsink->force_aspect_ratio,
|
|
|
|
NULL);
|
2012-02-23 10:05:11 +00:00
|
|
|
|
2012-02-23 12:19:55 +00:00
|
|
|
GST_OBJECT_LOCK (playsink);
|
|
|
|
if (playsink->colorbalance_element) {
|
2013-05-21 14:35:18 +00:00
|
|
|
g_signal_handler_disconnect (playsink->colorbalance_element,
|
|
|
|
playsink->colorbalance_value_changed_id);
|
2013-07-23 10:35:46 +00:00
|
|
|
playsink->colorbalance_value_changed_id = 0;
|
2012-02-23 12:19:55 +00:00
|
|
|
gst_object_unref (playsink->colorbalance_element);
|
|
|
|
}
|
|
|
|
playsink->colorbalance_element = find_color_balance_element (chain->sink);
|
2012-06-25 13:21:07 +00:00
|
|
|
if (playsink->colorbalance_element) {
|
2013-05-21 14:35:18 +00:00
|
|
|
playsink->colorbalance_value_changed_id =
|
|
|
|
g_signal_connect (playsink->colorbalance_element, "value-changed",
|
2012-06-25 13:21:07 +00:00
|
|
|
G_CALLBACK (colorbalance_value_changed_cb), playsink);
|
|
|
|
}
|
2012-02-23 12:19:55 +00:00
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
|
|
|
if (chain->conv) {
|
|
|
|
gboolean use_balance = !playsink->colorbalance_element
|
|
|
|
&& (playsink->flags & GST_PLAY_FLAG_SOFT_COLORBALANCE);
|
|
|
|
|
|
|
|
g_object_set (chain->conv, "use-balance", use_balance, NULL);
|
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
2013-07-23 10:35:46 +00:00
|
|
|
if (use_balance && GST_PLAY_SINK_VIDEO_CONVERT (chain->conv)->balance) {
|
2012-02-23 12:19:55 +00:00
|
|
|
playsink->colorbalance_element =
|
|
|
|
GST_COLOR_BALANCE (gst_object_ref (GST_PLAY_SINK_VIDEO_CONVERT
|
|
|
|
(chain->conv)->balance));
|
2013-07-23 10:35:46 +00:00
|
|
|
playsink->colorbalance_value_changed_id =
|
|
|
|
g_signal_connect (playsink->colorbalance_element, "value-changed",
|
|
|
|
G_CALLBACK (colorbalance_value_changed_cb), playsink);
|
|
|
|
}
|
2012-02-23 12:19:55 +00:00
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
}
|
|
|
|
|
|
|
|
update_colorbalance (playsink);
|
2012-02-22 10:56:59 +00:00
|
|
|
|
2009-03-23 18:40:18 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2012-05-16 13:41:41 +00:00
|
|
|
static gboolean
|
2012-05-24 14:02:59 +00:00
|
|
|
gst_play_sink_sink_event (GstPad * pad, GstObject * parent, GstEvent * event,
|
|
|
|
const gchar * sink_type,
|
|
|
|
gboolean * sink_ignore_wrong_state,
|
2013-07-23 09:13:19 +00:00
|
|
|
gboolean * sink_custom_flush_finished, gboolean * sink_pending_flush)
|
2012-05-16 13:41:41 +00:00
|
|
|
{
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK_CAST (gst_object_get_parent (parent));
|
|
|
|
gboolean ret;
|
|
|
|
const GstStructure *structure = gst_event_get_structure (event);
|
|
|
|
|
2012-05-24 14:02:59 +00:00
|
|
|
if (GST_EVENT_TYPE (event) == GST_EVENT_CUSTOM_DOWNSTREAM_OOB && structure) {
|
|
|
|
gchar *custom_flush;
|
|
|
|
gchar *custom_flush_finish;
|
|
|
|
|
|
|
|
custom_flush = g_strdup_printf ("playsink-custom-%s-flush", sink_type);
|
|
|
|
custom_flush_finish =
|
|
|
|
g_strdup_printf ("playsink-custom-%s-flush-finish", sink_type);
|
|
|
|
if (strcmp (gst_structure_get_name (structure), custom_flush) == 0) {
|
|
|
|
GST_DEBUG_OBJECT (pad,
|
|
|
|
"Custom %s flush event received, marking to flush %s", sink_type,
|
|
|
|
sink_type);
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
*sink_ignore_wrong_state = TRUE;
|
|
|
|
*sink_custom_flush_finished = FALSE;
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
} else if (strcmp (gst_structure_get_name (structure),
|
|
|
|
custom_flush_finish) == 0) {
|
|
|
|
GST_DEBUG_OBJECT (pad, "Custom %s flush finish event received",
|
|
|
|
sink_type);
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
*sink_pending_flush = TRUE;
|
|
|
|
*sink_custom_flush_finished = TRUE;
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_free (custom_flush);
|
|
|
|
g_free (custom_flush_finish);
|
2012-05-16 13:41:41 +00:00
|
|
|
}
|
|
|
|
|
2012-05-24 14:02:59 +00:00
|
|
|
GST_DEBUG_OBJECT (pad, "Forwarding event %" GST_PTR_FORMAT, event);
|
2012-07-18 15:47:47 +00:00
|
|
|
ret = gst_pad_event_default (pad, parent, gst_event_ref (event));
|
2012-05-16 13:41:41 +00:00
|
|
|
|
|
|
|
gst_event_unref (event);
|
|
|
|
gst_object_unref (playsink);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GstFlowReturn
|
2012-05-24 14:02:59 +00:00
|
|
|
gst_play_sink_sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer,
|
|
|
|
const gchar * sink_type,
|
|
|
|
gboolean * sink_ignore_wrong_state,
|
2013-07-23 09:13:19 +00:00
|
|
|
gboolean * sink_custom_flush_finished, gboolean * sink_pending_flush)
|
2012-05-16 13:41:41 +00:00
|
|
|
{
|
|
|
|
GstBin *tbin = GST_BIN_CAST (gst_pad_get_parent (pad));
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK_CAST (gst_pad_get_parent (tbin));
|
2012-05-20 15:51:17 +00:00
|
|
|
GstFlowReturn ret;
|
2012-05-16 13:41:41 +00:00
|
|
|
|
2012-05-20 15:51:17 +00:00
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
2012-05-16 13:41:41 +00:00
|
|
|
|
2012-05-24 14:02:59 +00:00
|
|
|
if (*sink_pending_flush) {
|
2013-07-23 09:13:19 +00:00
|
|
|
GstEvent *segment_event;
|
2012-05-20 15:51:17 +00:00
|
|
|
GstEvent *event;
|
2012-05-16 13:41:41 +00:00
|
|
|
GstStructure *structure;
|
|
|
|
|
2012-05-24 14:02:59 +00:00
|
|
|
*sink_pending_flush = FALSE;
|
|
|
|
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
2013-07-23 09:13:19 +00:00
|
|
|
segment_event = gst_pad_get_sticky_event (pad, GST_EVENT_SEGMENT, 0);
|
|
|
|
|
2012-05-24 14:02:59 +00:00
|
|
|
/* make the bin drop all cached data.
|
|
|
|
* This event will be dropped on the src pad, if any. */
|
|
|
|
event = gst_event_new_flush_start ();
|
|
|
|
structure = gst_event_writable_structure (event);
|
|
|
|
gst_structure_id_set (structure,
|
|
|
|
_playsink_reset_segment_event_marker_id, G_TYPE_BOOLEAN, TRUE, NULL);
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (pad,
|
|
|
|
"Pushing %s flush-start event with reset segment marker set: %"
|
|
|
|
GST_PTR_FORMAT, sink_type, event);
|
|
|
|
gst_pad_send_event (pad, event);
|
2012-05-16 13:41:41 +00:00
|
|
|
|
|
|
|
/* make queue drop all cached data.
|
|
|
|
* This event will be dropped on the src pad. */
|
|
|
|
event = gst_event_new_flush_stop (TRUE);
|
|
|
|
structure = gst_event_writable_structure (event);
|
|
|
|
gst_structure_id_set (structure,
|
|
|
|
_playsink_reset_segment_event_marker_id, G_TYPE_BOOLEAN, TRUE, NULL);
|
2012-05-20 15:51:17 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (pad,
|
2012-05-24 14:02:59 +00:00
|
|
|
"Pushing %s flush-stop event with reset segment marker set: %"
|
|
|
|
GST_PTR_FORMAT, sink_type, event);
|
2012-05-16 13:41:41 +00:00
|
|
|
gst_pad_send_event (pad, event);
|
|
|
|
|
|
|
|
/* Re-sync queue segment info after flush-stop.
|
|
|
|
* This event will be dropped on the src pad. */
|
2013-07-23 09:13:19 +00:00
|
|
|
if (segment_event) {
|
|
|
|
event = gst_event_copy (segment_event);
|
|
|
|
structure = gst_event_writable_structure (event);
|
|
|
|
gst_structure_id_set (structure,
|
|
|
|
_playsink_reset_segment_event_marker_id, G_TYPE_BOOLEAN, TRUE, NULL);
|
2012-05-16 13:41:41 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (playsink,
|
|
|
|
"Pushing segment event with reset "
|
2013-07-23 09:13:19 +00:00
|
|
|
"segment marker set: %" GST_PTR_FORMAT, event);
|
|
|
|
gst_pad_send_event (pad, event);
|
|
|
|
gst_event_unref (segment_event);
|
2012-05-16 13:41:41 +00:00
|
|
|
}
|
2012-05-24 14:02:59 +00:00
|
|
|
} else {
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
2012-05-20 15:51:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ret = gst_proxy_pad_chain_default (pad, parent, buffer);
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
2012-05-24 14:02:59 +00:00
|
|
|
if (ret == GST_FLOW_FLUSHING && *sink_ignore_wrong_state) {
|
|
|
|
GST_DEBUG_OBJECT (pad, "Ignoring wrong state for %s during flush",
|
|
|
|
sink_type);
|
|
|
|
if (*sink_custom_flush_finished) {
|
|
|
|
GST_DEBUG_OBJECT (pad, "Custom flush finished, stop ignoring "
|
|
|
|
"wrong state for %s", sink_type);
|
|
|
|
*sink_ignore_wrong_state = FALSE;
|
2012-05-20 15:51:17 +00:00
|
|
|
}
|
|
|
|
|
2012-05-16 13:41:41 +00:00
|
|
|
ret = GST_FLOW_OK;
|
|
|
|
}
|
2012-05-20 15:51:17 +00:00
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
2012-05-16 13:41:41 +00:00
|
|
|
|
|
|
|
gst_object_unref (playsink);
|
|
|
|
gst_object_unref (tbin);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2012-05-24 14:02:59 +00:00
|
|
|
/* sending audio/video flushes break stream changes when the pipeline
|
|
|
|
* is paused and played again in 0.10 */
|
|
|
|
#if 0
|
|
|
|
static gboolean
|
|
|
|
gst_play_sink_video_sink_event (GstPad * pad, GstEvent * event)
|
|
|
|
{
|
|
|
|
GstBin *tbin = GST_BIN_CAST (gst_pad_get_parent (pad));
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK_CAST (gst_pad_get_parent (tbin));
|
|
|
|
gboolean ret;
|
|
|
|
|
|
|
|
ret = gst_play_sink_sink_event (pad, event, "video",
|
|
|
|
&playsink->video_ignore_wrong_state,
|
|
|
|
&playsink->video_custom_flush_finished,
|
|
|
|
&playsink->video_pending_flush, &playsink->video_segment);
|
|
|
|
|
|
|
|
gst_object_unref (playsink);
|
|
|
|
gst_object_unref (tbin);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GstFlowReturn
|
|
|
|
gst_play_sink_video_sink_chain (GstPad * pad, GstBuffer * buffer)
|
|
|
|
{
|
|
|
|
GstBin *tbin = GST_BIN_CAST (gst_pad_get_parent (pad));
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK_CAST (gst_pad_get_parent (tbin));
|
|
|
|
gboolean ret;
|
|
|
|
|
|
|
|
ret = gst_play_sink_sink_chain (pad, buffer, "video",
|
|
|
|
&playsink->video_ignore_wrong_state,
|
|
|
|
&playsink->video_custom_flush_finished,
|
|
|
|
&playsink->video_pending_flush, &playsink->video_segment);
|
|
|
|
|
|
|
|
gst_object_unref (playsink);
|
|
|
|
gst_object_unref (tbin);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
gst_play_sink_audio_sink_event (GstPad * pad, GstEvent * event)
|
|
|
|
{
|
|
|
|
GstBin *tbin = GST_BIN_CAST (gst_pad_get_parent (pad));
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK_CAST (gst_pad_get_parent (tbin));
|
|
|
|
gboolean ret;
|
|
|
|
|
|
|
|
ret = gst_play_sink_sink_event (pad, event, "audio",
|
|
|
|
&playsink->audio_ignore_wrong_state,
|
|
|
|
&playsink->audio_custom_flush_finished,
|
|
|
|
&playsink->audio_pending_flush, &playsink->audio_segment);
|
|
|
|
|
|
|
|
gst_object_unref (playsink);
|
|
|
|
gst_object_unref (tbin);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GstFlowReturn
|
|
|
|
gst_play_sink_audio_sink_chain (GstPad * pad, GstBuffer * buffer)
|
|
|
|
{
|
|
|
|
GstBin *tbin = GST_BIN_CAST (gst_pad_get_parent (pad));
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK_CAST (gst_pad_get_parent (tbin));
|
|
|
|
gboolean ret;
|
|
|
|
|
|
|
|
ret = gst_play_sink_sink_chain (pad, buffer, "audio",
|
|
|
|
&playsink->audio_ignore_wrong_state,
|
|
|
|
&playsink->audio_custom_flush_finished,
|
|
|
|
&playsink->audio_pending_flush, &playsink->audio_segment);
|
|
|
|
|
|
|
|
gst_object_unref (playsink);
|
|
|
|
gst_object_unref (tbin);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
gst_play_sink_text_sink_event (GstPad * pad, GstObject * parent,
|
|
|
|
GstEvent * event)
|
|
|
|
{
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK_CAST (gst_object_get_parent (parent));
|
|
|
|
gboolean ret;
|
|
|
|
|
|
|
|
ret = gst_play_sink_sink_event (pad, parent, event, "subtitle",
|
|
|
|
&playsink->text_ignore_wrong_state,
|
2013-07-23 09:13:19 +00:00
|
|
|
&playsink->text_custom_flush_finished, &playsink->text_pending_flush);
|
2012-05-24 14:02:59 +00:00
|
|
|
|
|
|
|
gst_object_unref (playsink);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GstFlowReturn
|
|
|
|
gst_play_sink_text_sink_chain (GstPad * pad, GstObject * parent,
|
|
|
|
GstBuffer * buffer)
|
|
|
|
{
|
|
|
|
gboolean ret;
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK_CAST (gst_object_get_parent (parent));
|
|
|
|
|
|
|
|
ret = gst_play_sink_sink_chain (pad, parent, buffer, "subtitle",
|
|
|
|
&playsink->text_ignore_wrong_state,
|
2013-07-23 09:13:19 +00:00
|
|
|
&playsink->text_custom_flush_finished, &playsink->text_pending_flush);
|
2012-05-24 14:02:59 +00:00
|
|
|
|
|
|
|
gst_object_unref (playsink);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2012-05-16 13:41:41 +00:00
|
|
|
static gboolean
|
|
|
|
gst_play_sink_text_src_event (GstPad * pad, GstObject * parent,
|
|
|
|
GstEvent * event)
|
|
|
|
{
|
|
|
|
gboolean ret;
|
|
|
|
const GstStructure *structure;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (pad, "Got event %" GST_PTR_FORMAT, event);
|
|
|
|
|
|
|
|
structure = gst_event_get_structure (event);
|
|
|
|
|
|
|
|
if (structure &&
|
|
|
|
gst_structure_id_has_field (structure,
|
|
|
|
_playsink_reset_segment_event_marker_id)) {
|
|
|
|
/* the events marked with a reset segment marker
|
|
|
|
* are sent internally to reset the queue and
|
|
|
|
* must be dropped here */
|
|
|
|
GST_DEBUG_OBJECT (pad, "Dropping event with reset "
|
|
|
|
"segment marker set: %" GST_PTR_FORMAT, event);
|
|
|
|
ret = TRUE;
|
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
|
2012-07-18 15:47:47 +00:00
|
|
|
ret = gst_pad_event_default (pad, parent, gst_event_ref (event));
|
2012-05-16 13:41:41 +00:00
|
|
|
|
|
|
|
out:
|
|
|
|
gst_event_unref (event);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
/* make an element for playback of video with subtitles embedded.
|
2011-03-15 11:51:04 +00:00
|
|
|
* Only used for *raw* video streams.
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
*
|
2009-11-02 14:50:17 +00:00
|
|
|
* +--------------------------------------------+
|
|
|
|
* | tbin |
|
|
|
|
* | +--------+ +-----------------+ |
|
|
|
|
* | | queue | | subtitleoverlay | |
|
|
|
|
* video--src sink---video_sink | |
|
|
|
|
* | +--------+ | src--src
|
|
|
|
* text------------------text_sink | |
|
|
|
|
* | +-----------------+ |
|
|
|
|
* +--------------------------------------------+
|
2009-11-02 14:05:41 +00:00
|
|
|
*
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
*/
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
static GstPlayTextChain *
|
|
|
|
gen_text_chain (GstPlaySink * playsink)
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
{
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
GstPlayTextChain *chain;
|
|
|
|
GstBin *bin;
|
2009-03-12 16:47:41 +00:00
|
|
|
GstElement *elem;
|
|
|
|
GstPad *videosinkpad, *textsinkpad, *srcpad;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
chain = g_new0 (GstPlayTextChain, 1);
|
2009-01-30 19:04:37 +00:00
|
|
|
chain->chain.playsink = playsink;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "making text chain %p", chain);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
chain->chain.bin = gst_bin_new ("tbin");
|
|
|
|
bin = GST_BIN_CAST (chain->chain.bin);
|
2009-09-23 14:07:36 +00:00
|
|
|
gst_object_ref_sink (bin);
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
|
2009-03-12 16:47:41 +00:00
|
|
|
videosinkpad = textsinkpad = srcpad = NULL;
|
|
|
|
|
|
|
|
/* first try to hook the text pad to the custom sink */
|
|
|
|
if (playsink->text_sink) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "trying configured textsink");
|
2009-04-10 11:27:41 +00:00
|
|
|
chain->sink = try_element (playsink, playsink->text_sink, FALSE);
|
2009-03-12 16:47:41 +00:00
|
|
|
if (chain->sink) {
|
2010-01-18 02:08:39 +00:00
|
|
|
elem =
|
|
|
|
gst_play_sink_find_property_sinks (playsink, chain->sink, "async",
|
|
|
|
G_TYPE_BOOLEAN);
|
2009-03-12 16:47:41 +00:00
|
|
|
if (elem) {
|
2009-03-17 10:51:58 +00:00
|
|
|
/* make sure the sparse subtitles don't participate in the preroll */
|
|
|
|
g_object_set (elem, "async", FALSE, NULL);
|
2010-08-10 11:06:32 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "adding custom text sink");
|
|
|
|
gst_bin_add (bin, chain->sink);
|
|
|
|
/* NOTE streamsynchronizer needs streams decoupled */
|
|
|
|
/* make a little queue */
|
|
|
|
chain->queue = gst_element_factory_make ("queue", "subqueue");
|
|
|
|
if (chain->queue == NULL) {
|
|
|
|
post_missing_element_message (playsink, "queue");
|
|
|
|
GST_ELEMENT_WARNING (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
|
|
|
"queue"), ("rendering might be suboptimal"));
|
|
|
|
} else {
|
|
|
|
g_object_set (G_OBJECT (chain->queue), "max-size-buffers", 3,
|
2012-05-14 14:52:12 +00:00
|
|
|
"max-size-bytes", 0, "max-size-time", (gint64) GST_SECOND,
|
2010-08-31 08:09:51 +00:00
|
|
|
"silent", TRUE, NULL);
|
2010-08-10 11:06:32 +00:00
|
|
|
gst_bin_add (bin, chain->queue);
|
|
|
|
}
|
2009-03-12 16:47:41 +00:00
|
|
|
/* we have a custom sink, this will be our textsinkpad */
|
2010-08-10 11:06:32 +00:00
|
|
|
if (gst_element_link_pads_full (chain->queue, "src", chain->sink,
|
|
|
|
"sink", GST_PAD_LINK_CHECK_TEMPLATE_CAPS)) {
|
2009-03-12 16:47:41 +00:00
|
|
|
/* we're all fine now and we can add the sink to the chain */
|
2010-08-10 11:06:32 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "using custom text sink");
|
|
|
|
textsinkpad = gst_element_get_static_pad (chain->queue, "sink");
|
2009-03-12 16:47:41 +00:00
|
|
|
} else {
|
|
|
|
GST_WARNING_OBJECT (playsink,
|
|
|
|
"can't find a sink pad on custom text sink");
|
2010-08-10 11:06:32 +00:00
|
|
|
gst_bin_remove (bin, chain->sink);
|
|
|
|
gst_bin_remove (bin, chain->queue);
|
2009-03-12 16:47:41 +00:00
|
|
|
chain->sink = NULL;
|
2010-08-10 11:06:32 +00:00
|
|
|
chain->queue = NULL;
|
2009-03-12 16:47:41 +00:00
|
|
|
}
|
2009-03-17 10:51:58 +00:00
|
|
|
/* try to set sync to true but it's no biggie when we can't */
|
2012-01-19 15:32:05 +00:00
|
|
|
if (chain->sink && (elem =
|
2009-03-17 10:51:58 +00:00
|
|
|
gst_play_sink_find_property_sinks (playsink, chain->sink,
|
2010-01-18 02:08:39 +00:00
|
|
|
"sync", G_TYPE_BOOLEAN)))
|
2009-03-17 10:51:58 +00:00
|
|
|
g_object_set (elem, "sync", TRUE, NULL);
|
2011-03-15 13:45:03 +00:00
|
|
|
|
|
|
|
if (!textsinkpad)
|
|
|
|
gst_bin_remove (bin, chain->sink);
|
2009-03-12 16:47:41 +00:00
|
|
|
} else {
|
|
|
|
GST_WARNING_OBJECT (playsink,
|
|
|
|
"can't find async property in custom text sink");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (textsinkpad == NULL) {
|
|
|
|
GST_ELEMENT_WARNING (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Custom text sink element is not usable.")),
|
2012-05-11 08:58:45 +00:00
|
|
|
("fallback to default subtitleoverlay"));
|
2009-03-12 16:47:41 +00:00
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
|
|
|
|
2009-03-12 16:47:41 +00:00
|
|
|
if (textsinkpad == NULL) {
|
|
|
|
if (!(playsink->flags & GST_PLAY_FLAG_NATIVE_VIDEO)) {
|
2009-11-02 14:50:17 +00:00
|
|
|
/* make a little queue */
|
|
|
|
chain->queue = gst_element_factory_make ("queue", "vqueue");
|
2010-02-15 07:46:26 +00:00
|
|
|
if (chain->queue == NULL) {
|
|
|
|
post_missing_element_message (playsink, "queue");
|
|
|
|
GST_ELEMENT_WARNING (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
|
|
|
"queue"), ("video rendering might be suboptimal"));
|
|
|
|
} else {
|
|
|
|
g_object_set (G_OBJECT (chain->queue), "max-size-buffers", 3,
|
2010-08-31 08:09:51 +00:00
|
|
|
"max-size-bytes", 0, "max-size-time", (gint64) 0,
|
|
|
|
"silent", TRUE, NULL);
|
2010-02-15 07:46:26 +00:00
|
|
|
gst_bin_add (bin, chain->queue);
|
|
|
|
videosinkpad = gst_element_get_static_pad (chain->queue, "sink");
|
|
|
|
}
|
2009-11-02 14:50:17 +00:00
|
|
|
|
2009-11-02 14:05:41 +00:00
|
|
|
chain->overlay =
|
|
|
|
gst_element_factory_make ("subtitleoverlay", "suboverlay");
|
|
|
|
if (chain->overlay == NULL) {
|
|
|
|
post_missing_element_message (playsink, "subtitleoverlay");
|
2009-03-12 16:47:41 +00:00
|
|
|
GST_ELEMENT_WARNING (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
2009-11-02 14:05:41 +00:00
|
|
|
"subtitleoverlay"), ("subtitle rendering disabled"));
|
2009-03-12 16:47:41 +00:00
|
|
|
} else {
|
2010-08-11 08:27:35 +00:00
|
|
|
GstElement *element;
|
|
|
|
|
2009-11-02 14:05:41 +00:00
|
|
|
gst_bin_add (bin, chain->overlay);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2009-11-07 20:38:10 +00:00
|
|
|
g_object_set (G_OBJECT (chain->overlay), "silent", FALSE, NULL);
|
2009-11-02 14:05:41 +00:00
|
|
|
if (playsink->font_desc) {
|
|
|
|
g_object_set (G_OBJECT (chain->overlay), "font-desc",
|
|
|
|
playsink->font_desc, NULL);
|
|
|
|
}
|
2010-02-21 18:52:45 +00:00
|
|
|
if (playsink->subtitle_encoding) {
|
|
|
|
g_object_set (G_OBJECT (chain->overlay), "subtitle-encoding",
|
|
|
|
playsink->subtitle_encoding, NULL);
|
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2010-07-20 19:05:45 +00:00
|
|
|
gst_element_link_pads_full (chain->queue, "src", chain->overlay,
|
|
|
|
"video_sink", GST_PAD_LINK_CHECK_TEMPLATE_CAPS);
|
2009-11-02 14:50:17 +00:00
|
|
|
|
2010-08-11 08:27:35 +00:00
|
|
|
/* make another little queue to decouple streams */
|
|
|
|
element = gst_element_factory_make ("queue", "subqueue");
|
|
|
|
if (element == NULL) {
|
|
|
|
post_missing_element_message (playsink, "queue");
|
|
|
|
GST_ELEMENT_WARNING (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
|
|
|
"queue"), ("rendering might be suboptimal"));
|
|
|
|
} else {
|
|
|
|
g_object_set (G_OBJECT (element), "max-size-buffers", 3,
|
2012-05-14 14:52:12 +00:00
|
|
|
"max-size-bytes", 0, "max-size-time", (gint64) GST_SECOND,
|
2010-08-31 08:09:51 +00:00
|
|
|
"silent", TRUE, NULL);
|
2010-08-11 08:27:35 +00:00
|
|
|
gst_bin_add (bin, element);
|
2012-01-19 15:32:37 +00:00
|
|
|
if (gst_element_link_pads_full (element, "src", chain->overlay,
|
|
|
|
"subtitle_sink", GST_PAD_LINK_CHECK_TEMPLATE_CAPS)) {
|
|
|
|
textsinkpad = gst_element_get_static_pad (element, "sink");
|
|
|
|
srcpad = gst_element_get_static_pad (chain->overlay, "src");
|
|
|
|
} else {
|
|
|
|
gst_bin_remove (bin, chain->sink);
|
|
|
|
gst_bin_remove (bin, chain->overlay);
|
|
|
|
chain->sink = NULL;
|
|
|
|
chain->overlay = NULL;
|
|
|
|
gst_object_unref (videosinkpad);
|
|
|
|
videosinkpad = NULL;
|
|
|
|
}
|
2010-08-11 08:27:35 +00:00
|
|
|
}
|
2009-03-12 16:47:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2009-03-12 16:47:41 +00:00
|
|
|
if (videosinkpad == NULL) {
|
2009-11-02 14:05:41 +00:00
|
|
|
/* if we still don't have a videosink, we don't have an overlay. the only
|
|
|
|
* thing we can do is insert an identity and ghost the src
|
2009-03-12 16:47:41 +00:00
|
|
|
* and sink pads. */
|
2009-11-02 14:50:17 +00:00
|
|
|
chain->identity = gst_element_factory_make ("identity", "tidentity");
|
2010-02-15 07:46:26 +00:00
|
|
|
if (chain->identity == NULL) {
|
|
|
|
post_missing_element_message (playsink, "identity");
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
|
|
|
"identity"), (NULL));
|
|
|
|
} else {
|
|
|
|
g_object_set (chain->identity, "signal-handoffs", FALSE, NULL);
|
|
|
|
g_object_set (chain->identity, "silent", TRUE, NULL);
|
|
|
|
gst_bin_add (bin, chain->identity);
|
|
|
|
srcpad = gst_element_get_static_pad (chain->identity, "src");
|
|
|
|
videosinkpad = gst_element_get_static_pad (chain->identity, "sink");
|
|
|
|
}
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
}
|
2009-03-12 16:47:41 +00:00
|
|
|
|
|
|
|
/* expose the ghostpads */
|
|
|
|
if (videosinkpad) {
|
|
|
|
chain->videosinkpad = gst_ghost_pad_new ("sink", videosinkpad);
|
|
|
|
gst_object_unref (videosinkpad);
|
|
|
|
gst_element_add_pad (chain->chain.bin, chain->videosinkpad);
|
|
|
|
}
|
|
|
|
if (textsinkpad) {
|
|
|
|
chain->textsinkpad = gst_ghost_pad_new ("text_sink", textsinkpad);
|
|
|
|
gst_object_unref (textsinkpad);
|
2012-05-16 13:41:41 +00:00
|
|
|
|
|
|
|
gst_pad_set_event_function (chain->textsinkpad,
|
|
|
|
GST_DEBUG_FUNCPTR (gst_play_sink_text_sink_event));
|
|
|
|
gst_pad_set_chain_function (chain->textsinkpad,
|
|
|
|
GST_DEBUG_FUNCPTR (gst_play_sink_text_sink_chain));
|
|
|
|
|
2009-03-12 16:47:41 +00:00
|
|
|
gst_element_add_pad (chain->chain.bin, chain->textsinkpad);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
2009-03-12 16:47:41 +00:00
|
|
|
if (srcpad) {
|
|
|
|
chain->srcpad = gst_ghost_pad_new ("src", srcpad);
|
|
|
|
gst_object_unref (srcpad);
|
2012-05-16 13:41:41 +00:00
|
|
|
|
|
|
|
gst_pad_set_event_function (chain->srcpad,
|
|
|
|
GST_DEBUG_FUNCPTR (gst_play_sink_text_src_event));
|
|
|
|
|
2009-03-12 16:47:41 +00:00
|
|
|
gst_element_add_pad (chain->chain.bin, chain->srcpad);
|
|
|
|
}
|
|
|
|
|
|
|
|
return chain;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
|
|
|
|
2009-10-29 13:30:31 +00:00
|
|
|
static void
|
2009-10-30 08:24:03 +00:00
|
|
|
notify_volume_cb (GObject * object, GParamSpec * pspec, GstPlaySink * playsink)
|
2009-10-29 13:30:31 +00:00
|
|
|
{
|
2009-10-30 08:24:03 +00:00
|
|
|
gdouble vol;
|
|
|
|
|
|
|
|
g_object_get (object, "volume", &vol, NULL);
|
|
|
|
playsink->volume = vol;
|
|
|
|
|
2009-10-29 13:30:31 +00:00
|
|
|
g_object_notify (G_OBJECT (playsink), "volume");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2009-10-30 08:24:03 +00:00
|
|
|
notify_mute_cb (GObject * object, GParamSpec * pspec, GstPlaySink * playsink)
|
2009-10-29 13:30:31 +00:00
|
|
|
{
|
2009-10-30 08:24:03 +00:00
|
|
|
gboolean mute;
|
|
|
|
|
|
|
|
g_object_get (object, "mute", &mute, NULL);
|
|
|
|
playsink->mute = mute;
|
|
|
|
|
2009-10-29 13:30:31 +00:00
|
|
|
g_object_notify (G_OBJECT (playsink), "mute");
|
|
|
|
}
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
/* make the chain that contains the elements needed to perform
|
2009-09-08 11:02:46 +00:00
|
|
|
* audio playback.
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
*
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
* We add a tee as the first element so that we can link the visualisation chain
|
|
|
|
* to it when requested.
|
|
|
|
*
|
2014-03-16 16:00:38 +00:00
|
|
|
* +--------------------------------------------------------------+
|
|
|
|
* | abin |
|
|
|
|
* | +----------+ +--------+ +---------+ +-----------+ |
|
|
|
|
* | | filter | | queue | | convbin | | audiosink | |
|
|
|
|
* | +-sink src-sink src-sink src-sink | |
|
|
|
|
* | | +----------+ +--------+ +---------+ +-----------+ |
|
|
|
|
* sink-+ |
|
|
|
|
* +--------------------------------------------------------------+
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
*/
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
static GstPlayAudioChain *
|
2010-08-12 08:01:03 +00:00
|
|
|
gen_audio_chain (GstPlaySink * playsink, gboolean raw)
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
{
|
|
|
|
GstPlayAudioChain *chain;
|
|
|
|
GstBin *bin;
|
2008-12-10 17:39:32 +00:00
|
|
|
gboolean have_volume;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
GstPad *pad;
|
2009-07-14 09:33:29 +00:00
|
|
|
GstElement *head, *prev, *elem = NULL;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
|
|
|
chain = g_new0 (GstPlayAudioChain, 1);
|
2009-01-30 19:04:37 +00:00
|
|
|
chain->chain.playsink = playsink;
|
2008-12-20 12:48:43 +00:00
|
|
|
chain->chain.raw = raw;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "making audio chain %p", chain);
|
|
|
|
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
if (playsink->audio_sink) {
|
2009-05-28 14:21:42 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "trying configured audiosink %" GST_PTR_FORMAT,
|
|
|
|
playsink->audio_sink);
|
2009-04-10 11:27:41 +00:00
|
|
|
chain->sink = try_element (playsink, playsink->audio_sink, FALSE);
|
2009-07-14 09:33:29 +00:00
|
|
|
} else {
|
|
|
|
/* only try fallback if no specific sink was chosen */
|
|
|
|
if (chain->sink == NULL) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "trying autoaudiosink");
|
|
|
|
elem = gst_element_factory_make ("autoaudiosink", "audiosink");
|
|
|
|
chain->sink = try_element (playsink, elem, TRUE);
|
|
|
|
}
|
|
|
|
if (chain->sink == NULL) {
|
|
|
|
/* if default sink from config.h is different then try it too */
|
|
|
|
if (strcmp (DEFAULT_AUDIOSINK, "autoaudiosink")) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "trying " DEFAULT_AUDIOSINK);
|
|
|
|
elem = gst_element_factory_make (DEFAULT_AUDIOSINK, "audiosink");
|
|
|
|
chain->sink = try_element (playsink, elem, TRUE);
|
|
|
|
}
|
|
|
|
}
|
2011-03-15 13:45:03 +00:00
|
|
|
if (chain->sink)
|
|
|
|
playsink->audio_sink = gst_object_ref (chain->sink);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
2008-12-10 17:39:32 +00:00
|
|
|
if (chain->sink == NULL)
|
|
|
|
goto no_sinks;
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
chain->chain.bin = gst_bin_new ("abin");
|
|
|
|
bin = GST_BIN_CAST (chain->chain.bin);
|
2009-09-23 14:07:36 +00:00
|
|
|
gst_object_ref_sink (bin);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
gst_bin_add (bin, chain->sink);
|
|
|
|
|
2014-03-16 16:00:38 +00:00
|
|
|
head = chain->sink;
|
|
|
|
prev = NULL;
|
|
|
|
|
|
|
|
/* add the audio filter first, so everything is working with post-filter
|
|
|
|
* samples */
|
|
|
|
chain->filter = gst_play_sink_get_filter (playsink,
|
|
|
|
GST_PLAY_SINK_TYPE_AUDIO_RAW);
|
|
|
|
if (chain->filter) {
|
|
|
|
if (!raw) {
|
|
|
|
if (playsink->flags & GST_PLAY_FLAG_FORCE_FILTERS) {
|
|
|
|
goto filter_with_nonraw;
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (playsink,
|
2014-09-16 18:42:46 +00:00
|
|
|
"skipping audio filter since we're not raw");
|
2014-03-16 16:00:38 +00:00
|
|
|
}
|
|
|
|
} else {
|
2014-09-16 18:42:46 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "adding audio filter");
|
|
|
|
chain->filter_conv =
|
|
|
|
gst_element_factory_make ("audioconvert", "filter-convert");
|
|
|
|
if (!chain->filter_conv) {
|
|
|
|
post_missing_element_message (playsink, "audioconvert");
|
|
|
|
GST_ELEMENT_WARNING (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
|
|
|
"audioconvert"),
|
|
|
|
("audio playback and visualizations might not work"));
|
|
|
|
} else {
|
|
|
|
gst_bin_add (bin, chain->filter_conv);
|
|
|
|
head = prev = chain->filter_conv;
|
|
|
|
}
|
|
|
|
|
2014-03-16 16:00:38 +00:00
|
|
|
gst_bin_add (bin, chain->filter);
|
2014-09-16 18:42:46 +00:00
|
|
|
if (prev) {
|
|
|
|
if (!gst_element_link_pads_full (prev, "src", chain->filter, "sink",
|
|
|
|
GST_PAD_LINK_CHECK_TEMPLATE_CAPS)) {
|
|
|
|
goto link_failed;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
head = chain->filter;
|
|
|
|
}
|
|
|
|
prev = chain->filter;
|
2014-03-16 16:00:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-08-12 08:01:03 +00:00
|
|
|
/* we have to add a queue when we need to decouple for the video sink in
|
2011-03-24 13:22:00 +00:00
|
|
|
* visualisations and for streamsynchronizer */
|
2010-08-12 08:01:03 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "adding audio queue");
|
|
|
|
chain->queue = gst_element_factory_make ("queue", "aqueue");
|
|
|
|
if (chain->queue == NULL) {
|
|
|
|
post_missing_element_message (playsink, "queue");
|
|
|
|
GST_ELEMENT_WARNING (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
|
|
|
"queue"), ("audio playback and visualizations might not work"));
|
|
|
|
} else {
|
2010-08-31 08:09:51 +00:00
|
|
|
g_object_set (chain->queue, "silent", TRUE, NULL);
|
2010-08-12 08:01:03 +00:00
|
|
|
gst_bin_add (bin, chain->queue);
|
2014-03-16 16:00:38 +00:00
|
|
|
if (prev) {
|
|
|
|
if (!gst_element_link_pads_full (prev, "src", chain->queue, "sink",
|
|
|
|
GST_PAD_LINK_CHECK_TEMPLATE_CAPS))
|
|
|
|
goto link_failed;
|
|
|
|
} else {
|
|
|
|
head = chain->queue;
|
|
|
|
}
|
|
|
|
prev = chain->queue;
|
2008-02-18 11:54:15 +00:00
|
|
|
}
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
|
2010-06-07 12:38:42 +00:00
|
|
|
/* find ts-offset element */
|
2011-08-21 21:51:45 +00:00
|
|
|
gst_object_replace ((GstObject **) & chain->ts_offset, (GstObject *)
|
2010-06-07 12:38:42 +00:00
|
|
|
gst_play_sink_find_property_sinks (playsink, chain->sink, "ts-offset",
|
2011-08-21 21:51:45 +00:00
|
|
|
G_TYPE_INT64));
|
2010-06-07 12:38:42 +00:00
|
|
|
|
2015-07-10 08:53:24 +00:00
|
|
|
/* check if the sink, or something within the sink, implements the
|
|
|
|
* streamvolume interface. If it does we don't need to add a volume element. */
|
|
|
|
if (GST_IS_BIN (chain->sink))
|
|
|
|
elem =
|
|
|
|
gst_bin_get_by_interface (GST_BIN_CAST (chain->sink),
|
|
|
|
GST_TYPE_STREAM_VOLUME);
|
|
|
|
else if (GST_IS_STREAM_VOLUME (chain->sink))
|
|
|
|
elem = gst_object_ref (chain->sink);
|
|
|
|
else
|
|
|
|
elem = NULL;
|
2013-05-21 14:35:18 +00:00
|
|
|
chain->notify_volume_id = chain->notify_mute_id = 0;
|
2009-03-23 18:40:18 +00:00
|
|
|
if (elem) {
|
|
|
|
chain->volume = elem;
|
|
|
|
|
2013-05-21 14:35:18 +00:00
|
|
|
chain->notify_volume_id = g_signal_connect (chain->volume, "notify::volume",
|
2009-10-29 13:30:31 +00:00
|
|
|
G_CALLBACK (notify_volume_cb), playsink);
|
|
|
|
|
2008-06-20 17:18:55 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "the sink has a volume property");
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
have_volume = TRUE;
|
2009-05-28 15:21:35 +00:00
|
|
|
chain->sink_volume = TRUE;
|
2015-07-10 08:53:24 +00:00
|
|
|
chain->notify_mute_id = g_signal_connect (chain->volume, "notify::mute",
|
|
|
|
G_CALLBACK (notify_mute_cb), playsink);
|
2009-05-22 12:49:14 +00:00
|
|
|
/* use the sink to control the volume and mute */
|
|
|
|
if (playsink->volume_changed) {
|
|
|
|
g_object_set (G_OBJECT (chain->volume), "volume", playsink->volume, NULL);
|
2009-10-30 08:24:30 +00:00
|
|
|
playsink->volume_changed = FALSE;
|
2009-05-22 12:49:14 +00:00
|
|
|
}
|
|
|
|
if (playsink->mute_changed) {
|
2015-07-10 08:53:24 +00:00
|
|
|
g_object_set (chain->volume, "mute", playsink->mute, NULL);
|
2009-10-30 08:24:30 +00:00
|
|
|
playsink->mute_changed = FALSE;
|
2009-05-22 12:49:14 +00:00
|
|
|
}
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
} else {
|
|
|
|
/* no volume, we need to add a volume element when we can */
|
2008-06-20 17:18:55 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "the sink has no volume property");
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
have_volume = FALSE;
|
2009-05-28 15:21:35 +00:00
|
|
|
chain->sink_volume = FALSE;
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
}
|
|
|
|
|
2011-03-25 07:26:00 +00:00
|
|
|
if (!(playsink->flags & GST_PLAY_FLAG_NATIVE_AUDIO) || (!have_volume
|
2012-02-22 11:07:13 +00:00
|
|
|
&& (playsink->flags & GST_PLAY_FLAG_SOFT_VOLUME))) {
|
2011-10-17 21:05:30 +00:00
|
|
|
gboolean use_converters = !(playsink->flags & GST_PLAY_FLAG_NATIVE_AUDIO);
|
|
|
|
gboolean use_volume =
|
2012-02-22 11:07:13 +00:00
|
|
|
!have_volume && (playsink->flags & GST_PLAY_FLAG_SOFT_VOLUME);
|
2011-10-17 21:05:30 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink,
|
|
|
|
"creating audioconvert with use-converters %d, use-volume %d",
|
|
|
|
use_converters, use_volume);
|
2011-03-25 07:26:00 +00:00
|
|
|
chain->conv =
|
2011-10-17 21:05:30 +00:00
|
|
|
g_object_new (GST_TYPE_PLAY_SINK_AUDIO_CONVERT, "name", "aconv",
|
|
|
|
"use-converters", use_converters, "use-volume", use_volume, NULL);
|
2011-03-25 07:26:00 +00:00
|
|
|
gst_bin_add (bin, chain->conv);
|
|
|
|
if (prev) {
|
|
|
|
if (!gst_element_link_pads_full (prev, "src", chain->conv, "sink",
|
|
|
|
GST_PAD_LINK_CHECK_TEMPLATE_CAPS))
|
|
|
|
goto link_failed;
|
2008-12-10 17:39:32 +00:00
|
|
|
} else {
|
2011-03-25 07:26:00 +00:00
|
|
|
head = chain->conv;
|
2008-12-10 17:39:32 +00:00
|
|
|
}
|
2011-03-25 07:26:00 +00:00
|
|
|
prev = chain->conv;
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
|
2012-02-22 11:07:13 +00:00
|
|
|
if (!have_volume && (playsink->flags & GST_PLAY_FLAG_SOFT_VOLUME)) {
|
2011-03-25 07:26:00 +00:00
|
|
|
GstPlaySinkAudioConvert *conv =
|
|
|
|
GST_PLAY_SINK_AUDIO_CONVERT_CAST (chain->conv);
|
|
|
|
|
|
|
|
if (conv->volume) {
|
|
|
|
chain->volume = conv->volume;
|
2008-12-10 17:39:32 +00:00
|
|
|
have_volume = TRUE;
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
|
2013-05-21 14:35:18 +00:00
|
|
|
chain->notify_volume_id =
|
|
|
|
g_signal_connect (chain->volume, "notify::volume",
|
2009-10-29 13:30:31 +00:00
|
|
|
G_CALLBACK (notify_volume_cb), playsink);
|
|
|
|
|
2008-12-10 17:39:32 +00:00
|
|
|
/* volume also has the mute property */
|
2015-07-10 08:53:24 +00:00
|
|
|
chain->notify_mute_id = g_signal_connect (chain->volume, "notify::mute",
|
2009-11-10 00:48:42 +00:00
|
|
|
G_CALLBACK (notify_mute_cb), playsink);
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
|
2008-12-10 17:39:32 +00:00
|
|
|
/* configure with the latest volume and mute */
|
|
|
|
g_object_set (G_OBJECT (chain->volume), "volume", playsink->volume,
|
|
|
|
NULL);
|
2015-07-10 08:53:24 +00:00
|
|
|
g_object_set (G_OBJECT (chain->volume), "mute", playsink->mute, NULL);
|
2008-12-10 17:39:32 +00:00
|
|
|
}
|
2008-02-18 11:54:15 +00:00
|
|
|
}
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
}
|
2008-12-10 17:39:32 +00:00
|
|
|
|
2008-12-11 11:04:14 +00:00
|
|
|
if (prev) {
|
|
|
|
/* we only have to link to the previous element if we have something in
|
|
|
|
* front of the sink */
|
|
|
|
GST_DEBUG_OBJECT (playsink, "linking to sink");
|
2010-07-20 19:05:45 +00:00
|
|
|
if (!gst_element_link_pads_full (prev, "src", chain->sink, NULL,
|
|
|
|
GST_PAD_LINK_CHECK_TEMPLATE_CAPS))
|
2008-12-11 11:04:14 +00:00
|
|
|
goto link_failed;
|
|
|
|
}
|
2008-12-10 17:39:32 +00:00
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
/* post a warning if we have no way to configure the volume */
|
|
|
|
if (!have_volume) {
|
2008-11-22 14:31:43 +00:00
|
|
|
GST_ELEMENT_WARNING (playsink, STREAM, NOT_IMPLEMENTED,
|
2009-03-12 16:47:41 +00:00
|
|
|
(_("No volume control found")), ("Volume/mute is not available"));
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
}
|
2008-12-10 17:39:32 +00:00
|
|
|
|
|
|
|
/* and ghost the sinkpad of the headmost element */
|
2008-12-11 11:04:14 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "ghosting sink pad");
|
2008-12-10 17:39:32 +00:00
|
|
|
pad = gst_element_get_static_pad (head, "sink");
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
chain->sinkpad = gst_ghost_pad_new ("sink", pad);
|
2012-05-24 14:02:59 +00:00
|
|
|
|
|
|
|
/* sending audio/video flushes break stream changes when the pipeline
|
|
|
|
* is paused and played again in 0.10 */
|
|
|
|
#if 0
|
|
|
|
gst_pad_set_event_function (chain->sinkpad,
|
|
|
|
GST_DEBUG_FUNCPTR (gst_play_sink_audio_sink_event));
|
|
|
|
gst_pad_set_chain_function (chain->sinkpad,
|
|
|
|
GST_DEBUG_FUNCPTR (gst_play_sink_audio_sink_chain));
|
|
|
|
#endif
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
gst_object_unref (pad);
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
gst_element_add_pad (chain->chain.bin, chain->sinkpad);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
return chain;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
no_sinks:
|
|
|
|
{
|
2010-03-10 13:34:57 +00:00
|
|
|
if (!elem && !playsink->audio_sink) {
|
2009-04-08 13:43:27 +00:00
|
|
|
post_missing_element_message (playsink, "autoaudiosink");
|
2009-07-14 09:33:29 +00:00
|
|
|
if (strcmp (DEFAULT_AUDIOSINK, "autoaudiosink")) {
|
|
|
|
post_missing_element_message (playsink, DEFAULT_AUDIOSINK);
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Both autoaudiosink and %s elements are missing."),
|
|
|
|
DEFAULT_AUDIOSINK), (NULL));
|
|
|
|
} else {
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("The autoaudiosink element is missing.")), (NULL));
|
|
|
|
}
|
2009-04-08 13:43:27 +00:00
|
|
|
} else {
|
2010-03-10 13:34:57 +00:00
|
|
|
if (playsink->audio_sink) {
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, STATE_CHANGE,
|
|
|
|
(_("Configured audiosink %s is not working."),
|
|
|
|
GST_ELEMENT_NAME (playsink->audio_sink)), (NULL));
|
|
|
|
} else if (strcmp (DEFAULT_AUDIOSINK, "autoaudiosink")) {
|
2009-07-14 09:33:29 +00:00
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, STATE_CHANGE,
|
|
|
|
(_("Both autoaudiosink and %s elements are not working."),
|
|
|
|
DEFAULT_AUDIOSINK), (NULL));
|
|
|
|
} else {
|
2010-05-04 10:09:57 +00:00
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, STATE_CHANGE,
|
2009-07-14 09:33:29 +00:00
|
|
|
(_("The autoaudiosink element is not working.")), (NULL));
|
|
|
|
}
|
2009-04-08 13:43:27 +00:00
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
free_chain ((GstPlayChain *) chain);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
link_failed:
|
|
|
|
{
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, PAD,
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
(NULL), ("Failed to configure the audio sink."));
|
2014-03-16 16:00:38 +00:00
|
|
|
goto cleanup;
|
|
|
|
}
|
|
|
|
filter_with_nonraw:
|
|
|
|
{
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, NEGOTIATION,
|
|
|
|
(NULL), ("Cannot apply video-filter on non-raw stream"));
|
|
|
|
goto cleanup;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
2014-03-16 16:00:38 +00:00
|
|
|
cleanup:
|
|
|
|
/* checking sink made it READY */
|
|
|
|
gst_element_set_state (chain->sink, GST_STATE_NULL);
|
|
|
|
/* Remove chain from the bin to allow reuse later */
|
|
|
|
gst_bin_remove (bin, chain->sink);
|
|
|
|
free_chain ((GstPlayChain *) chain);
|
|
|
|
return NULL;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
|
|
|
|
2009-03-24 09:42:04 +00:00
|
|
|
static gboolean
|
2010-08-12 08:01:03 +00:00
|
|
|
setup_audio_chain (GstPlaySink * playsink, gboolean raw)
|
2009-03-24 09:42:04 +00:00
|
|
|
{
|
|
|
|
GstElement *elem;
|
|
|
|
GstPlayAudioChain *chain;
|
|
|
|
GstStateChangeReturn ret;
|
2012-03-08 16:55:37 +00:00
|
|
|
GstPlaySinkAudioConvert *conv;
|
2009-03-24 09:42:04 +00:00
|
|
|
|
|
|
|
chain = playsink->audiochain;
|
2012-03-08 16:55:37 +00:00
|
|
|
conv = GST_PLAY_SINK_AUDIO_CONVERT_CAST (chain->conv);
|
2009-03-24 09:42:04 +00:00
|
|
|
|
2014-03-16 16:00:38 +00:00
|
|
|
/* if we have a filter, and raw-ness changed, we have to force a rebuild */
|
|
|
|
if (chain->filter && chain->chain.raw != raw)
|
|
|
|
return FALSE;
|
|
|
|
|
2011-03-25 07:26:00 +00:00
|
|
|
chain->chain.raw = raw;
|
2011-03-15 11:51:04 +00:00
|
|
|
|
2009-03-24 09:42:04 +00:00
|
|
|
/* if the chain was active we don't do anything */
|
2014-11-28 13:28:06 +00:00
|
|
|
if (GST_PLAY_CHAIN (chain)->activated)
|
2009-03-24 09:42:04 +00:00
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* try to set the sink element to READY again */
|
|
|
|
ret = gst_element_set_state (chain->sink, GST_STATE_READY);
|
|
|
|
if (ret == GST_STATE_CHANGE_FAILURE)
|
|
|
|
return FALSE;
|
|
|
|
|
2010-06-07 12:38:42 +00:00
|
|
|
/* find ts-offset element */
|
2011-08-21 21:51:45 +00:00
|
|
|
gst_object_replace ((GstObject **) & chain->ts_offset, (GstObject *)
|
2010-06-07 12:38:42 +00:00
|
|
|
gst_play_sink_find_property_sinks (playsink, chain->sink, "ts-offset",
|
2011-08-21 21:51:45 +00:00
|
|
|
G_TYPE_INT64));
|
2010-06-07 12:38:42 +00:00
|
|
|
|
2013-05-21 14:35:18 +00:00
|
|
|
/* Disconnect signals */
|
|
|
|
disconnect_audio_chain (chain, playsink);
|
|
|
|
|
2015-07-10 08:53:24 +00:00
|
|
|
/* check if the sink, or something within the sink, implements the
|
|
|
|
* streamvolume interface. If it does we don't need to add a volume element. */
|
|
|
|
if (GST_IS_BIN (chain->sink))
|
|
|
|
elem =
|
|
|
|
gst_bin_get_by_interface (GST_BIN_CAST (chain->sink),
|
|
|
|
GST_TYPE_STREAM_VOLUME);
|
|
|
|
else if (GST_IS_STREAM_VOLUME (chain->sink))
|
|
|
|
elem = gst_object_ref (chain->sink);
|
|
|
|
else
|
|
|
|
elem = NULL;
|
2009-03-24 09:42:04 +00:00
|
|
|
if (elem) {
|
|
|
|
chain->volume = elem;
|
|
|
|
|
2009-06-10 14:05:22 +00:00
|
|
|
if (playsink->volume_changed) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "the sink has a volume property, setting %f",
|
|
|
|
playsink->volume);
|
|
|
|
/* use the sink to control the volume */
|
|
|
|
g_object_set (G_OBJECT (chain->volume), "volume", playsink->volume, NULL);
|
2009-10-30 08:24:30 +00:00
|
|
|
playsink->volume_changed = FALSE;
|
2009-06-10 14:05:22 +00:00
|
|
|
}
|
2009-10-29 13:30:31 +00:00
|
|
|
|
2013-05-21 14:35:18 +00:00
|
|
|
chain->notify_volume_id = g_signal_connect (chain->volume, "notify::volume",
|
2009-10-29 13:30:31 +00:00
|
|
|
G_CALLBACK (notify_volume_cb), playsink);
|
2015-07-10 08:53:24 +00:00
|
|
|
chain->notify_mute_id = g_signal_connect (chain->volume, "notify::mute",
|
|
|
|
G_CALLBACK (notify_mute_cb), playsink);
|
|
|
|
g_object_set (chain->volume, "mute", playsink->mute, NULL);
|
|
|
|
playsink->mute_changed = FALSE;
|
2011-03-25 07:26:00 +00:00
|
|
|
|
2011-10-17 21:05:30 +00:00
|
|
|
g_object_set (chain->conv, "use-volume", FALSE, NULL);
|
2012-03-08 16:55:37 +00:00
|
|
|
} else if (conv) {
|
2009-03-24 09:42:04 +00:00
|
|
|
/* no volume, we need to add a volume element when we can */
|
2012-02-22 11:07:13 +00:00
|
|
|
g_object_set (chain->conv, "use-volume",
|
2012-06-07 08:52:53 +00:00
|
|
|
! !(playsink->flags & GST_PLAY_FLAG_SOFT_VOLUME), NULL);
|
2009-03-24 09:42:04 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "the sink has no volume property");
|
2009-10-29 13:30:31 +00:00
|
|
|
|
2012-02-22 11:07:13 +00:00
|
|
|
if (conv->volume && (playsink->flags & GST_PLAY_FLAG_SOFT_VOLUME)) {
|
2011-03-25 07:26:00 +00:00
|
|
|
chain->volume = conv->volume;
|
2009-05-28 19:37:59 +00:00
|
|
|
|
2013-05-21 14:35:18 +00:00
|
|
|
chain->notify_volume_id =
|
|
|
|
g_signal_connect (chain->volume, "notify::volume",
|
2011-03-25 07:26:00 +00:00
|
|
|
G_CALLBACK (notify_volume_cb), playsink);
|
|
|
|
|
2015-07-10 08:53:24 +00:00
|
|
|
chain->notify_mute_id = g_signal_connect (chain->volume, "notify::mute",
|
2011-03-25 07:26:00 +00:00
|
|
|
G_CALLBACK (notify_mute_cb), playsink);
|
2009-05-28 19:37:59 +00:00
|
|
|
|
2011-03-25 07:26:00 +00:00
|
|
|
/* configure with the latest volume and mute */
|
|
|
|
g_object_set (G_OBJECT (chain->volume), "volume", playsink->volume, NULL);
|
2015-07-10 08:53:24 +00:00
|
|
|
g_object_set (G_OBJECT (chain->volume), "mute", playsink->mute, NULL);
|
2009-05-28 19:37:59 +00:00
|
|
|
}
|
2011-03-25 07:26:00 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (playsink, "reusing existing volume element");
|
2009-03-24 09:42:04 +00:00
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
/*
|
2008-02-29 12:26:48 +00:00
|
|
|
* +-------------------------------------------------------------------+
|
|
|
|
* | visbin |
|
|
|
|
* | +----------+ +------------+ +----------+ +-------+ |
|
|
|
|
* | | visqueue | | audioconv | | audiores | | vis | |
|
|
|
|
* | +-sink src-sink + samp src-sink src-sink src-+ |
|
|
|
|
* | | +----------+ +------------+ +----------+ +-------+ | |
|
|
|
|
* sink-+ +-src
|
|
|
|
* +-------------------------------------------------------------------+
|
2009-09-08 11:02:46 +00:00
|
|
|
*
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
*/
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
static GstPlayVisChain *
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
gen_vis_chain (GstPlaySink * playsink)
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
{
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
GstPlayVisChain *chain;
|
|
|
|
GstBin *bin;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
gboolean res;
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
GstPad *pad;
|
2009-04-10 11:42:56 +00:00
|
|
|
GstElement *elem;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
chain = g_new0 (GstPlayVisChain, 1);
|
2009-01-30 19:04:37 +00:00
|
|
|
chain->chain.playsink = playsink;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "making vis chain %p", chain);
|
|
|
|
|
2008-02-15 18:38:52 +00:00
|
|
|
chain->chain.bin = gst_bin_new ("visbin");
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
bin = GST_BIN_CAST (chain->chain.bin);
|
2009-09-23 14:07:36 +00:00
|
|
|
gst_object_ref_sink (bin);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2008-02-18 11:54:15 +00:00
|
|
|
/* we're queuing raw audio here, we can remove this queue when we can disable
|
|
|
|
* async behaviour in the video sink. */
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
chain->queue = gst_element_factory_make ("queue", "visqueue");
|
2010-02-15 07:46:26 +00:00
|
|
|
if (chain->queue == NULL)
|
|
|
|
goto no_queue;
|
2010-08-31 08:09:51 +00:00
|
|
|
g_object_set (chain->queue, "silent", TRUE, NULL);
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
gst_bin_add (bin, chain->queue);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
chain->conv = gst_element_factory_make ("audioconvert", "aconv");
|
|
|
|
if (chain->conv == NULL)
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
goto no_audioconvert;
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
gst_bin_add (bin, chain->conv);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
chain->resample = gst_element_factory_make ("audioresample", "aresample");
|
|
|
|
if (chain->resample == NULL)
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
goto no_audioresample;
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
gst_bin_add (bin, chain->resample);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2008-02-29 12:26:48 +00:00
|
|
|
/* this pad will be used for blocking the dataflow and switching the vis
|
2012-12-13 10:31:28 +00:00
|
|
|
* plugin, we block right after the queue, this makes it possible for the
|
|
|
|
* resample and convert to convert to a format supported by the new vis
|
2008-02-29 12:26:48 +00:00
|
|
|
* plugin */
|
2012-12-13 10:31:28 +00:00
|
|
|
chain->blockpad = gst_element_get_static_pad (chain->queue, "src");
|
|
|
|
/* this is the pad where the vis is linked to */
|
|
|
|
chain->vispeerpad = gst_element_get_static_pad (chain->resample, "src");
|
2008-02-29 12:26:48 +00:00
|
|
|
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
if (playsink->visualisation) {
|
2009-04-10 11:42:56 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "trying configure vis");
|
|
|
|
chain->vis = try_element (playsink, playsink->visualisation, FALSE);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
2009-04-10 11:42:56 +00:00
|
|
|
if (chain->vis == NULL) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "trying goom");
|
|
|
|
elem = gst_element_factory_make ("goom", "vis");
|
|
|
|
chain->vis = try_element (playsink, elem, TRUE);
|
2013-11-26 11:03:24 +00:00
|
|
|
gst_object_replace ((GstObject **) & playsink->visualisation,
|
|
|
|
(GstObject *) elem);
|
2009-04-10 11:42:56 +00:00
|
|
|
}
|
|
|
|
if (chain->vis == NULL)
|
|
|
|
goto no_goom;
|
|
|
|
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
gst_bin_add (bin, chain->vis);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2010-07-20 19:05:45 +00:00
|
|
|
res = gst_element_link_pads_full (chain->queue, "src", chain->conv, "sink",
|
|
|
|
GST_PAD_LINK_CHECK_NOTHING);
|
|
|
|
res &=
|
|
|
|
gst_element_link_pads_full (chain->conv, "src", chain->resample, "sink",
|
|
|
|
GST_PAD_LINK_CHECK_NOTHING);
|
|
|
|
res &=
|
|
|
|
gst_element_link_pads_full (chain->resample, "src", chain->vis, "sink",
|
|
|
|
GST_PAD_LINK_CHECK_NOTHING);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
if (!res)
|
|
|
|
goto link_failed;
|
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
chain->vissinkpad = gst_element_get_static_pad (chain->vis, "sink");
|
|
|
|
chain->vissrcpad = gst_element_get_static_pad (chain->vis, "src");
|
2008-02-29 12:26:48 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
pad = gst_element_get_static_pad (chain->queue, "sink");
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
chain->sinkpad = gst_ghost_pad_new ("sink", pad);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
gst_object_unref (pad);
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
gst_element_add_pad (chain->chain.bin, chain->sinkpad);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2008-02-29 12:26:48 +00:00
|
|
|
chain->srcpad = gst_ghost_pad_new ("src", chain->vissrcpad);
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
gst_element_add_pad (chain->chain.bin, chain->srcpad);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
return chain;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
|
|
|
/* ERRORS */
|
2010-02-15 07:46:26 +00:00
|
|
|
no_queue:
|
|
|
|
{
|
|
|
|
post_missing_element_message (playsink, "queue");
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
|
|
|
"queue"), (NULL));
|
|
|
|
free_chain ((GstPlayChain *) chain);
|
|
|
|
return NULL;
|
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
no_audioconvert:
|
|
|
|
{
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
post_missing_element_message (playsink, "audioconvert");
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, MISSING_PLUGIN,
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
2012-09-29 10:46:56 +00:00
|
|
|
"audioconvert"), ("make sure audioconvert isn't blacklisted"));
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
free_chain ((GstPlayChain *) chain);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
no_audioresample:
|
|
|
|
{
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
post_missing_element_message (playsink, "audioresample");
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, MISSING_PLUGIN,
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
|
|
|
"audioresample"), (NULL));
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
free_chain ((GstPlayChain *) chain);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
no_goom:
|
|
|
|
{
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
post_missing_element_message (playsink, "goom");
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, MISSING_PLUGIN,
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
|
|
|
"goom"), (NULL));
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
free_chain ((GstPlayChain *) chain);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
link_failed:
|
|
|
|
{
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, PAD,
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
(NULL), ("Failed to configure the visualisation element."));
|
2010-08-10 09:19:22 +00:00
|
|
|
/* element made it to READY */
|
|
|
|
gst_element_set_state (chain->vis, GST_STATE_NULL);
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
free_chain ((GstPlayChain *) chain);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* this function is called when all the request pads are requested and when we
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
* have to construct the final pipeline. Based on the flags we construct the
|
|
|
|
* final output pipelines.
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
*/
|
2012-06-26 08:54:18 +00:00
|
|
|
static gboolean
|
|
|
|
gst_play_sink_do_reconfigure (GstPlaySink * playsink)
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
{
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
GstPlayFlags flags;
|
2010-04-26 15:30:44 +00:00
|
|
|
gboolean need_audio, need_video, need_deinterlace, need_vis, need_text;
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (playsink, "reconfiguring");
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
|
2008-02-15 18:38:52 +00:00
|
|
|
/* assume we need nothing */
|
2010-04-26 15:30:44 +00:00
|
|
|
need_audio = need_video = need_deinterlace = need_vis = need_text = FALSE;
|
2008-02-15 18:38:52 +00:00
|
|
|
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
GST_OBJECT_LOCK (playsink);
|
2008-02-15 18:38:52 +00:00
|
|
|
/* get flags, there are protected with the object lock */
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
flags = playsink->flags;
|
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
2008-02-15 18:38:52 +00:00
|
|
|
/* figure out which components we need */
|
2011-09-12 13:48:59 +00:00
|
|
|
if (flags & GST_PLAY_FLAG_TEXT && playsink->text_pad) {
|
2010-02-23 18:12:40 +00:00
|
|
|
/* we have subtitles and we are requested to show it */
|
2009-11-03 11:33:40 +00:00
|
|
|
need_text = TRUE;
|
2010-02-23 18:12:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (((flags & GST_PLAY_FLAG_VIDEO)
|
2010-01-13 08:39:54 +00:00
|
|
|
|| (flags & GST_PLAY_FLAG_NATIVE_VIDEO)) && playsink->video_pad) {
|
2008-02-15 18:38:52 +00:00
|
|
|
/* we have video and we are requested to show it */
|
|
|
|
need_video = TRUE;
|
2010-04-26 15:30:44 +00:00
|
|
|
|
|
|
|
/* we only deinterlace if native video is not requested and
|
|
|
|
* we have raw video */
|
|
|
|
if ((flags & GST_PLAY_FLAG_DEINTERLACE)
|
|
|
|
&& !(flags & GST_PLAY_FLAG_NATIVE_VIDEO) && playsink->video_pad_raw)
|
|
|
|
need_deinterlace = TRUE;
|
2008-02-15 18:38:52 +00:00
|
|
|
}
|
2010-02-23 18:12:40 +00:00
|
|
|
|
2008-02-15 18:38:52 +00:00
|
|
|
if (playsink->audio_pad) {
|
2010-01-13 08:39:54 +00:00
|
|
|
if ((flags & GST_PLAY_FLAG_AUDIO) || (flags & GST_PLAY_FLAG_NATIVE_AUDIO)) {
|
2008-02-15 18:38:52 +00:00
|
|
|
need_audio = TRUE;
|
|
|
|
}
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
if (playsink->audio_pad_raw) {
|
|
|
|
/* only can do vis with raw uncompressed audio */
|
|
|
|
if (flags & GST_PLAY_FLAG_VIS && !need_video) {
|
|
|
|
/* also add video when we add visualisation */
|
|
|
|
need_video = TRUE;
|
|
|
|
need_vis = TRUE;
|
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
|
|
|
}
|
2010-02-23 18:12:40 +00:00
|
|
|
|
|
|
|
/* we have a text_pad and we need text rendering, in this case we need a
|
|
|
|
* video_pad to combine the video with the text or visualizations */
|
2012-03-23 10:07:49 +00:00
|
|
|
if (need_text && !need_video && !playsink->text_sink) {
|
2010-02-23 18:12:40 +00:00
|
|
|
if (playsink->video_pad) {
|
|
|
|
need_video = TRUE;
|
2010-05-14 15:17:33 +00:00
|
|
|
} else if (need_audio) {
|
2010-02-23 18:12:40 +00:00
|
|
|
GST_ELEMENT_WARNING (playsink, STREAM, FORMAT,
|
|
|
|
(_("Can't play a text file without video or visualizations.")),
|
|
|
|
("Have text pad but no video pad or visualizations"));
|
|
|
|
need_text = FALSE;
|
|
|
|
} else {
|
|
|
|
GST_ELEMENT_ERROR (playsink, STREAM, FORMAT,
|
|
|
|
(_("Can't play a text file without video or visualizations.")),
|
|
|
|
("Have text pad but no video pad or visualizations"));
|
2010-05-14 15:13:17 +00:00
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
2010-02-23 18:12:40 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-12-09 11:10:35 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "audio:%d, video:%d, vis:%d, text:%d", need_audio,
|
|
|
|
need_video, need_vis, need_text);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
/* set up video pipeline */
|
2008-02-15 18:38:52 +00:00
|
|
|
if (need_video) {
|
2010-08-12 08:01:03 +00:00
|
|
|
gboolean raw, async;
|
2009-03-23 18:40:18 +00:00
|
|
|
|
|
|
|
/* we need a raw sink when we do vis or when we have a raw pad */
|
|
|
|
raw = need_vis ? TRUE : playsink->video_pad_raw;
|
|
|
|
/* we try to set the sink async=FALSE when we need vis, this way we can
|
|
|
|
* avoid a queue in the audio chain. */
|
|
|
|
async = !need_vis;
|
2009-11-02 14:50:17 +00:00
|
|
|
|
2008-02-15 18:38:52 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "adding video, raw %d",
|
|
|
|
playsink->video_pad_raw);
|
2008-02-18 11:54:15 +00:00
|
|
|
|
2010-07-11 12:44:10 +00:00
|
|
|
if (playsink->videochain) {
|
|
|
|
/* try to reactivate the chain */
|
2013-07-02 12:01:52 +00:00
|
|
|
if ((playsink->video_sink
|
|
|
|
&& playsink->video_sink != playsink->videochain->sink)
|
|
|
|
|| !setup_video_chain (playsink, raw, async)) {
|
2010-07-11 12:44:10 +00:00
|
|
|
if (playsink->video_sinkpad_stream_synchronizer) {
|
|
|
|
gst_element_release_request_pad (GST_ELEMENT_CAST
|
|
|
|
(playsink->stream_synchronizer),
|
|
|
|
playsink->video_sinkpad_stream_synchronizer);
|
|
|
|
gst_object_unref (playsink->video_sinkpad_stream_synchronizer);
|
|
|
|
playsink->video_sinkpad_stream_synchronizer = NULL;
|
|
|
|
gst_object_unref (playsink->video_srcpad_stream_synchronizer);
|
|
|
|
playsink->video_srcpad_stream_synchronizer = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->videochain), FALSE);
|
2011-03-15 13:45:03 +00:00
|
|
|
|
|
|
|
/* Remove the sink from the bin to keep its state
|
|
|
|
* and unparent it to allow reuse */
|
2013-07-02 12:18:20 +00:00
|
|
|
if (playsink->videochain->sink) {
|
|
|
|
if (playsink->videochain->sink != playsink->video_sink)
|
|
|
|
gst_element_set_state (playsink->videochain->sink, GST_STATE_NULL);
|
2011-03-15 13:45:03 +00:00
|
|
|
gst_bin_remove (GST_BIN_CAST (playsink->videochain->chain.bin),
|
|
|
|
playsink->videochain->sink);
|
2013-07-02 12:18:20 +00:00
|
|
|
}
|
2011-03-15 13:45:03 +00:00
|
|
|
|
2010-07-11 12:44:10 +00:00
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->videochain), FALSE);
|
|
|
|
free_chain ((GstPlayChain *) playsink->videochain);
|
|
|
|
playsink->videochain = NULL;
|
2012-06-25 13:14:21 +00:00
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
|
|
|
if (playsink->overlay_element)
|
|
|
|
gst_object_unref (playsink->overlay_element);
|
|
|
|
playsink->overlay_element = NULL;
|
|
|
|
|
|
|
|
if (playsink->colorbalance_element) {
|
2013-05-21 14:35:18 +00:00
|
|
|
g_signal_handler_disconnect (playsink->colorbalance_element,
|
|
|
|
playsink->colorbalance_value_changed_id);
|
2013-07-23 10:35:46 +00:00
|
|
|
playsink->colorbalance_value_changed_id = 0;
|
2012-06-25 13:14:21 +00:00
|
|
|
gst_object_unref (playsink->colorbalance_element);
|
|
|
|
}
|
|
|
|
playsink->colorbalance_element = NULL;
|
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
2010-07-11 12:44:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!playsink->videochain)
|
2010-08-12 08:01:03 +00:00
|
|
|
playsink->videochain = gen_video_chain (playsink, raw, async);
|
2011-02-23 09:32:08 +00:00
|
|
|
if (!playsink->videochain)
|
|
|
|
goto no_chain;
|
2010-07-11 12:44:10 +00:00
|
|
|
|
|
|
|
if (!playsink->video_sinkpad_stream_synchronizer) {
|
2011-05-05 14:03:52 +00:00
|
|
|
GValue item = { 0, };
|
2010-07-11 12:44:10 +00:00
|
|
|
GstIterator *it;
|
|
|
|
|
|
|
|
playsink->video_sinkpad_stream_synchronizer =
|
|
|
|
gst_element_get_request_pad (GST_ELEMENT_CAST
|
2011-11-04 09:48:50 +00:00
|
|
|
(playsink->stream_synchronizer), "sink_%u");
|
2010-07-11 12:44:10 +00:00
|
|
|
it = gst_pad_iterate_internal_links
|
|
|
|
(playsink->video_sinkpad_stream_synchronizer);
|
|
|
|
g_assert (it);
|
2011-05-05 14:03:52 +00:00
|
|
|
gst_iterator_next (it, &item);
|
|
|
|
playsink->video_srcpad_stream_synchronizer = g_value_dup_object (&item);
|
|
|
|
g_value_unset (&item);
|
2010-07-11 12:44:10 +00:00
|
|
|
g_assert (playsink->video_srcpad_stream_synchronizer);
|
|
|
|
gst_iterator_free (it);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (playsink->video_pad)
|
|
|
|
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->video_pad),
|
|
|
|
playsink->video_sinkpad_stream_synchronizer);
|
|
|
|
|
2010-10-31 18:11:53 +00:00
|
|
|
if (need_deinterlace) {
|
2010-04-26 15:30:44 +00:00
|
|
|
if (!playsink->videodeinterlacechain)
|
|
|
|
playsink->videodeinterlacechain =
|
|
|
|
gen_video_deinterlace_chain (playsink);
|
2011-02-23 09:32:08 +00:00
|
|
|
if (!playsink->videodeinterlacechain)
|
|
|
|
goto no_chain;
|
2010-04-26 15:30:44 +00:00
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (playsink, "adding video deinterlace chain");
|
|
|
|
|
2010-10-31 18:06:00 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "setting up deinterlacing chain");
|
2010-04-26 15:30:44 +00:00
|
|
|
|
2010-10-31 18:06:00 +00:00
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->videodeinterlacechain), TRUE);
|
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->videodeinterlacechain), TRUE);
|
2010-07-11 12:44:10 +00:00
|
|
|
|
2012-06-25 14:01:06 +00:00
|
|
|
gst_pad_unlink (playsink->video_srcpad_stream_synchronizer,
|
|
|
|
playsink->videochain->sinkpad);
|
2010-10-31 18:06:00 +00:00
|
|
|
gst_pad_link_full (playsink->video_srcpad_stream_synchronizer,
|
|
|
|
playsink->videodeinterlacechain->sinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
2010-07-11 12:44:10 +00:00
|
|
|
} else {
|
|
|
|
if (playsink->videodeinterlacechain) {
|
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->videodeinterlacechain), FALSE);
|
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->videodeinterlacechain),
|
|
|
|
FALSE);
|
2009-03-23 18:40:18 +00:00
|
|
|
}
|
|
|
|
}
|
2008-02-18 11:54:15 +00:00
|
|
|
|
2010-10-31 18:11:53 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "adding video chain");
|
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->videochain), TRUE);
|
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->videochain), TRUE);
|
|
|
|
/* if we are not part of vis or subtitles, set the ghostpad target */
|
|
|
|
if (!need_vis && !need_text && (!playsink->textchain
|
|
|
|
|| !playsink->text_pad)) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "ghosting video sinkpad");
|
2012-06-25 14:01:06 +00:00
|
|
|
gst_pad_unlink (playsink->video_srcpad_stream_synchronizer,
|
|
|
|
playsink->videochain->sinkpad);
|
2012-06-25 14:07:31 +00:00
|
|
|
if (playsink->videodeinterlacechain
|
|
|
|
&& playsink->videodeinterlacechain->srcpad)
|
|
|
|
gst_pad_unlink (playsink->videodeinterlacechain->srcpad,
|
|
|
|
playsink->videochain->sinkpad);
|
2010-10-31 18:11:53 +00:00
|
|
|
if (need_deinterlace)
|
|
|
|
gst_pad_link_full (playsink->videodeinterlacechain->srcpad,
|
|
|
|
playsink->videochain->sinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
|
|
|
else
|
|
|
|
gst_pad_link_full (playsink->video_srcpad_stream_synchronizer,
|
|
|
|
playsink->videochain->sinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
} else {
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "no video needed");
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
if (playsink->videochain) {
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "removing video chain");
|
2009-03-23 14:27:27 +00:00
|
|
|
if (playsink->vischain) {
|
|
|
|
GstPad *srcpad;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (playsink, "unlinking vis chain");
|
|
|
|
|
2009-09-08 11:02:46 +00:00
|
|
|
/* also had visualisation, release the tee srcpad before we then
|
2009-03-23 15:04:27 +00:00
|
|
|
* unlink the video from it */
|
|
|
|
if (playsink->audio_tee_vissrc) {
|
|
|
|
gst_element_release_request_pad (playsink->audio_tee,
|
|
|
|
playsink->audio_tee_vissrc);
|
|
|
|
gst_object_unref (playsink->audio_tee_vissrc);
|
|
|
|
playsink->audio_tee_vissrc = NULL;
|
|
|
|
}
|
2009-03-23 14:27:27 +00:00
|
|
|
srcpad =
|
2009-05-28 16:05:55 +00:00
|
|
|
gst_element_get_static_pad (playsink->vischain->chain.bin, "src");
|
2009-03-23 14:27:27 +00:00
|
|
|
gst_pad_unlink (srcpad, playsink->videochain->sinkpad);
|
|
|
|
}
|
2010-07-11 12:44:10 +00:00
|
|
|
|
|
|
|
if (playsink->video_sinkpad_stream_synchronizer) {
|
|
|
|
gst_element_release_request_pad (GST_ELEMENT_CAST
|
|
|
|
(playsink->stream_synchronizer),
|
|
|
|
playsink->video_sinkpad_stream_synchronizer);
|
|
|
|
gst_object_unref (playsink->video_sinkpad_stream_synchronizer);
|
|
|
|
playsink->video_sinkpad_stream_synchronizer = NULL;
|
|
|
|
gst_object_unref (playsink->video_srcpad_stream_synchronizer);
|
|
|
|
playsink->video_srcpad_stream_synchronizer = NULL;
|
|
|
|
}
|
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->videochain), FALSE);
|
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->videochain), FALSE);
|
2011-08-31 12:45:08 +00:00
|
|
|
if (playsink->videochain->ts_offset)
|
2011-09-05 09:55:59 +00:00
|
|
|
gst_object_unref (playsink->videochain->ts_offset);
|
2010-06-23 10:10:32 +00:00
|
|
|
playsink->videochain->ts_offset = NULL;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
2010-04-26 15:30:44 +00:00
|
|
|
|
|
|
|
if (playsink->videodeinterlacechain) {
|
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->videodeinterlacechain), FALSE);
|
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->videodeinterlacechain), FALSE);
|
|
|
|
}
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
if (playsink->video_pad)
|
|
|
|
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->video_pad), NULL);
|
2012-06-25 13:14:21 +00:00
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
|
|
|
if (playsink->overlay_element)
|
|
|
|
gst_object_unref (playsink->overlay_element);
|
|
|
|
playsink->overlay_element = NULL;
|
|
|
|
|
|
|
|
if (playsink->colorbalance_element) {
|
2013-05-21 14:35:18 +00:00
|
|
|
g_signal_handler_disconnect (playsink->colorbalance_element,
|
|
|
|
playsink->colorbalance_value_changed_id);
|
2013-07-23 10:35:46 +00:00
|
|
|
playsink->colorbalance_value_changed_id = 0;
|
2012-06-25 13:14:21 +00:00
|
|
|
gst_object_unref (playsink->colorbalance_element);
|
|
|
|
}
|
|
|
|
playsink->colorbalance_element = NULL;
|
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
2013-07-09 12:55:57 +00:00
|
|
|
if (playsink->video_sink)
|
|
|
|
gst_element_set_state (playsink->video_sink, GST_STATE_NULL);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
2008-02-15 18:38:52 +00:00
|
|
|
|
|
|
|
if (need_audio) {
|
2010-08-12 08:01:03 +00:00
|
|
|
gboolean raw;
|
2008-12-20 12:48:43 +00:00
|
|
|
|
2008-02-15 18:38:52 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "adding audio");
|
2008-12-20 12:48:43 +00:00
|
|
|
|
|
|
|
/* get a raw sink if we are asked for a raw pad */
|
|
|
|
raw = playsink->audio_pad_raw;
|
|
|
|
|
2009-03-24 09:42:04 +00:00
|
|
|
if (playsink->audiochain) {
|
|
|
|
/* try to reactivate the chain */
|
2013-07-02 12:01:52 +00:00
|
|
|
if ((playsink->audio_sink
|
|
|
|
&& playsink->audio_sink != playsink->audiochain->sink)
|
|
|
|
|| !setup_audio_chain (playsink, raw)) {
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "removing current audio chain");
|
2009-03-23 15:04:27 +00:00
|
|
|
if (playsink->audio_tee_asrc) {
|
|
|
|
gst_element_release_request_pad (playsink->audio_tee,
|
|
|
|
playsink->audio_tee_asrc);
|
|
|
|
gst_object_unref (playsink->audio_tee_asrc);
|
|
|
|
playsink->audio_tee_asrc = NULL;
|
|
|
|
}
|
2010-07-11 12:44:10 +00:00
|
|
|
|
|
|
|
if (playsink->audio_sinkpad_stream_synchronizer) {
|
|
|
|
gst_element_release_request_pad (GST_ELEMENT_CAST
|
|
|
|
(playsink->stream_synchronizer),
|
|
|
|
playsink->audio_sinkpad_stream_synchronizer);
|
|
|
|
gst_object_unref (playsink->audio_sinkpad_stream_synchronizer);
|
|
|
|
playsink->audio_sinkpad_stream_synchronizer = NULL;
|
|
|
|
gst_object_unref (playsink->audio_srcpad_stream_synchronizer);
|
|
|
|
playsink->audio_srcpad_stream_synchronizer = NULL;
|
2015-05-26 11:06:50 +00:00
|
|
|
|
|
|
|
gst_play_sink_remove_audio_ssync_queue (playsink);
|
2010-07-11 12:44:10 +00:00
|
|
|
}
|
|
|
|
|
2008-12-20 12:48:43 +00:00
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
2011-03-15 13:45:03 +00:00
|
|
|
|
|
|
|
/* Remove the sink from the bin to keep its state
|
|
|
|
* and unparent it to allow reuse */
|
2013-07-02 12:18:20 +00:00
|
|
|
if (playsink->audiochain->sink) {
|
|
|
|
if (playsink->audiochain->sink != playsink->audio_sink)
|
|
|
|
gst_element_set_state (playsink->audiochain->sink, GST_STATE_NULL);
|
2011-03-15 13:45:03 +00:00
|
|
|
gst_bin_remove (GST_BIN_CAST (playsink->audiochain->chain.bin),
|
|
|
|
playsink->audiochain->sink);
|
2013-07-02 12:18:20 +00:00
|
|
|
}
|
2011-03-15 13:45:03 +00:00
|
|
|
|
2008-12-20 12:48:43 +00:00
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
2013-05-21 14:35:18 +00:00
|
|
|
disconnect_audio_chain (playsink->audiochain, playsink);
|
2015-10-15 01:01:38 +00:00
|
|
|
if (playsink->audiochain->volume)
|
|
|
|
gst_object_unref (playsink->audiochain->volume);
|
2009-05-27 13:36:51 +00:00
|
|
|
playsink->audiochain->volume = NULL;
|
2011-08-31 12:45:08 +00:00
|
|
|
if (playsink->audiochain->ts_offset)
|
2011-09-05 09:55:59 +00:00
|
|
|
gst_object_unref (playsink->audiochain->ts_offset);
|
2010-06-23 08:16:07 +00:00
|
|
|
playsink->audiochain->ts_offset = NULL;
|
2009-03-23 18:40:18 +00:00
|
|
|
free_chain ((GstPlayChain *) playsink->audiochain);
|
|
|
|
playsink->audiochain = NULL;
|
2009-05-22 12:49:14 +00:00
|
|
|
playsink->volume_changed = playsink->mute_changed = FALSE;
|
2008-02-18 11:54:15 +00:00
|
|
|
}
|
2008-12-20 12:48:43 +00:00
|
|
|
}
|
2008-02-18 11:54:15 +00:00
|
|
|
|
2009-03-24 09:42:04 +00:00
|
|
|
if (!playsink->audiochain) {
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "creating new audio chain");
|
2010-08-12 08:01:03 +00:00
|
|
|
playsink->audiochain = gen_audio_chain (playsink, raw);
|
2008-02-18 11:54:15 +00:00
|
|
|
}
|
2008-12-20 12:48:43 +00:00
|
|
|
|
2013-07-09 12:55:57 +00:00
|
|
|
if (!playsink->audiochain)
|
|
|
|
goto no_chain;
|
|
|
|
|
2010-07-11 12:44:10 +00:00
|
|
|
if (!playsink->audio_sinkpad_stream_synchronizer) {
|
2015-05-26 11:06:50 +00:00
|
|
|
GstPad *audio_queue_srcpad;
|
2011-05-05 14:03:52 +00:00
|
|
|
GValue item = { 0, };
|
2010-07-11 12:44:10 +00:00
|
|
|
GstIterator *it;
|
|
|
|
|
|
|
|
playsink->audio_sinkpad_stream_synchronizer =
|
|
|
|
gst_element_get_request_pad (GST_ELEMENT_CAST
|
2011-11-04 09:48:50 +00:00
|
|
|
(playsink->stream_synchronizer), "sink_%u");
|
2010-07-11 12:44:10 +00:00
|
|
|
it = gst_pad_iterate_internal_links
|
|
|
|
(playsink->audio_sinkpad_stream_synchronizer);
|
|
|
|
g_assert (it);
|
2011-05-05 14:03:52 +00:00
|
|
|
gst_iterator_next (it, &item);
|
|
|
|
playsink->audio_srcpad_stream_synchronizer = g_value_dup_object (&item);
|
|
|
|
g_value_unset (&item);
|
2010-07-11 12:44:10 +00:00
|
|
|
g_assert (playsink->audio_srcpad_stream_synchronizer);
|
|
|
|
gst_iterator_free (it);
|
2015-05-26 11:06:50 +00:00
|
|
|
|
|
|
|
if (need_vis) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "adding audio stream synchronizer queue");
|
|
|
|
playsink->audio_ssync_queue =
|
|
|
|
gst_element_factory_make ("queue", "audiossyncqueue");
|
|
|
|
if (playsink->audio_ssync_queue == NULL) {
|
|
|
|
post_missing_element_message (playsink, "queue");
|
|
|
|
GST_ELEMENT_WARNING (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
|
|
|
"queue"),
|
|
|
|
("audio playback and visualizations might not work"));
|
|
|
|
}
|
|
|
|
g_object_set (playsink->audio_ssync_queue, "max-size-buffers",
|
|
|
|
(guint) 1, NULL);
|
|
|
|
gst_bin_add (GST_BIN_CAST (playsink), playsink->audio_ssync_queue);
|
|
|
|
playsink->audio_ssync_queue_sinkpad =
|
|
|
|
gst_element_get_static_pad (playsink->audio_ssync_queue, "sink");
|
|
|
|
audio_queue_srcpad =
|
|
|
|
gst_element_get_static_pad (playsink->audio_ssync_queue, "src");
|
|
|
|
gst_element_sync_state_with_parent (playsink->audio_ssync_queue);
|
|
|
|
gst_pad_link_full (audio_queue_srcpad,
|
|
|
|
playsink->audio_sinkpad_stream_synchronizer,
|
|
|
|
GST_PAD_LINK_CHECK_NOTHING);
|
|
|
|
gst_object_unref (audio_queue_srcpad);
|
|
|
|
}
|
2010-07-11 12:44:10 +00:00
|
|
|
}
|
|
|
|
|
2008-12-11 11:04:14 +00:00
|
|
|
if (playsink->audiochain) {
|
2015-05-26 11:06:50 +00:00
|
|
|
GstPad *sinkpad;
|
|
|
|
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "adding audio chain");
|
2009-03-23 15:04:27 +00:00
|
|
|
if (playsink->audio_tee_asrc == NULL) {
|
|
|
|
playsink->audio_tee_asrc =
|
2011-11-03 16:58:57 +00:00
|
|
|
gst_element_get_request_pad (playsink->audio_tee, "src_%u");
|
2009-03-23 15:04:27 +00:00
|
|
|
}
|
2015-05-26 11:06:50 +00:00
|
|
|
|
|
|
|
sinkpad = playsink->audio_ssync_queue_sinkpad;
|
|
|
|
if (!sinkpad)
|
|
|
|
sinkpad = playsink->audio_sinkpad_stream_synchronizer;
|
|
|
|
|
2008-12-11 11:04:14 +00:00
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->audiochain), TRUE);
|
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->audiochain), TRUE);
|
2015-05-26 11:06:50 +00:00
|
|
|
gst_pad_link_full (playsink->audio_tee_asrc, sinkpad,
|
2010-07-20 19:05:45 +00:00
|
|
|
GST_PAD_LINK_CHECK_NOTHING);
|
|
|
|
gst_pad_link_full (playsink->audio_srcpad_stream_synchronizer,
|
|
|
|
playsink->audiochain->sinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
2008-12-11 11:04:14 +00:00
|
|
|
}
|
2008-02-15 18:38:52 +00:00
|
|
|
} else {
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "no audio needed");
|
2008-02-15 18:38:52 +00:00
|
|
|
/* we have no audio or we are requested to not play audio */
|
|
|
|
if (playsink->audiochain) {
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "removing audio chain");
|
2009-03-23 15:04:27 +00:00
|
|
|
/* release the audio pad */
|
|
|
|
if (playsink->audio_tee_asrc) {
|
|
|
|
gst_element_release_request_pad (playsink->audio_tee,
|
|
|
|
playsink->audio_tee_asrc);
|
|
|
|
gst_object_unref (playsink->audio_tee_asrc);
|
|
|
|
playsink->audio_tee_asrc = NULL;
|
|
|
|
}
|
2010-07-11 12:44:10 +00:00
|
|
|
|
|
|
|
if (playsink->audio_sinkpad_stream_synchronizer) {
|
|
|
|
gst_element_release_request_pad (GST_ELEMENT_CAST
|
|
|
|
(playsink->stream_synchronizer),
|
|
|
|
playsink->audio_sinkpad_stream_synchronizer);
|
|
|
|
gst_object_unref (playsink->audio_sinkpad_stream_synchronizer);
|
|
|
|
playsink->audio_sinkpad_stream_synchronizer = NULL;
|
|
|
|
gst_object_unref (playsink->audio_srcpad_stream_synchronizer);
|
|
|
|
playsink->audio_srcpad_stream_synchronizer = NULL;
|
2015-05-26 11:06:50 +00:00
|
|
|
|
|
|
|
gst_play_sink_remove_audio_ssync_queue (playsink);
|
2010-07-11 12:44:10 +00:00
|
|
|
}
|
|
|
|
|
2009-05-28 15:21:35 +00:00
|
|
|
if (playsink->audiochain->sink_volume) {
|
2013-05-21 14:35:18 +00:00
|
|
|
disconnect_audio_chain (playsink->audiochain, playsink);
|
2015-10-15 01:01:38 +00:00
|
|
|
if (playsink->audiochain->volume)
|
|
|
|
gst_object_unref (playsink->audiochain->volume);
|
2009-05-28 15:21:35 +00:00
|
|
|
playsink->audiochain->volume = NULL;
|
2011-08-31 12:45:08 +00:00
|
|
|
if (playsink->audiochain->ts_offset)
|
2011-09-05 09:55:59 +00:00
|
|
|
gst_object_unref (playsink->audiochain->ts_offset);
|
2010-06-23 08:16:07 +00:00
|
|
|
playsink->audiochain->ts_offset = NULL;
|
2009-05-28 15:21:35 +00:00
|
|
|
}
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
2008-02-15 18:38:52 +00:00
|
|
|
}
|
2013-07-09 12:55:57 +00:00
|
|
|
|
|
|
|
if (playsink->audio_sink)
|
|
|
|
gst_element_set_state (playsink->audio_sink, GST_STATE_NULL);
|
2008-02-15 18:38:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (need_vis) {
|
|
|
|
GstPad *srcpad;
|
|
|
|
|
|
|
|
if (!playsink->vischain)
|
|
|
|
playsink->vischain = gen_vis_chain (playsink);
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (playsink, "adding visualisation");
|
|
|
|
|
2008-12-11 11:04:14 +00:00
|
|
|
if (playsink->vischain) {
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "setting up vis chain");
|
2013-10-02 13:02:44 +00:00
|
|
|
|
|
|
|
/* Just change vis plugin or set up chain? */
|
|
|
|
if (playsink->vischain->vis != playsink->visualisation) {
|
|
|
|
/* unlink the old plugin and unghost the pad */
|
|
|
|
gst_pad_unlink (playsink->vischain->vispeerpad,
|
|
|
|
playsink->vischain->vissinkpad);
|
2014-03-16 16:00:38 +00:00
|
|
|
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->vischain->
|
|
|
|
srcpad), NULL);
|
2013-10-02 13:02:44 +00:00
|
|
|
|
|
|
|
/* set the old plugin to NULL and remove */
|
|
|
|
gst_element_set_state (playsink->vischain->vis, GST_STATE_NULL);
|
|
|
|
gst_bin_remove (GST_BIN_CAST (playsink->vischain->chain.bin),
|
|
|
|
playsink->vischain->vis);
|
|
|
|
|
|
|
|
/* add new plugin and set state to playing */
|
|
|
|
playsink->vischain->vis = playsink->visualisation;
|
|
|
|
gst_bin_add (GST_BIN_CAST (playsink->vischain->chain.bin),
|
|
|
|
playsink->vischain->vis);
|
|
|
|
gst_element_set_state (playsink->vischain->vis, GST_STATE_PLAYING);
|
|
|
|
|
|
|
|
/* get pads */
|
|
|
|
playsink->vischain->vissinkpad =
|
|
|
|
gst_element_get_static_pad (playsink->vischain->vis, "sink");
|
|
|
|
playsink->vischain->vissrcpad =
|
|
|
|
gst_element_get_static_pad (playsink->vischain->vis, "src");
|
|
|
|
|
|
|
|
/* link pads */
|
|
|
|
gst_pad_link_full (playsink->vischain->vispeerpad,
|
|
|
|
playsink->vischain->vissinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
2014-03-16 16:00:38 +00:00
|
|
|
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->vischain->
|
|
|
|
srcpad), playsink->vischain->vissrcpad);
|
2013-10-02 13:02:44 +00:00
|
|
|
} else {
|
|
|
|
srcpad =
|
|
|
|
gst_element_get_static_pad (playsink->vischain->chain.bin, "src");
|
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->vischain), TRUE);
|
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->vischain), TRUE);
|
|
|
|
if (playsink->audio_tee_vissrc == NULL) {
|
|
|
|
playsink->audio_tee_vissrc =
|
|
|
|
gst_element_get_request_pad (playsink->audio_tee, "src_%u");
|
|
|
|
}
|
|
|
|
gst_pad_link_full (playsink->audio_tee_vissrc,
|
|
|
|
playsink->vischain->sinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
|
|
|
gst_pad_link_full (srcpad, playsink->video_sinkpad_stream_synchronizer,
|
|
|
|
GST_PAD_LINK_CHECK_NOTHING);
|
|
|
|
gst_pad_link_full (playsink->video_srcpad_stream_synchronizer,
|
|
|
|
playsink->videochain->sinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
|
|
|
gst_object_unref (srcpad);
|
2009-03-23 15:04:27 +00:00
|
|
|
}
|
2008-12-11 11:04:14 +00:00
|
|
|
}
|
2008-02-15 18:38:52 +00:00
|
|
|
} else {
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "no vis needed");
|
2008-02-15 18:38:52 +00:00
|
|
|
if (playsink->vischain) {
|
2009-03-23 15:04:27 +00:00
|
|
|
if (playsink->audio_tee_vissrc) {
|
|
|
|
gst_element_release_request_pad (playsink->audio_tee,
|
|
|
|
playsink->audio_tee_vissrc);
|
|
|
|
gst_object_unref (playsink->audio_tee_vissrc);
|
|
|
|
playsink->audio_tee_vissrc = NULL;
|
|
|
|
}
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "removing vis chain");
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->vischain), FALSE);
|
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->vischain), FALSE);
|
2008-02-15 18:38:52 +00:00
|
|
|
}
|
|
|
|
}
|
2010-02-23 18:12:40 +00:00
|
|
|
|
|
|
|
if (need_text) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "adding text");
|
|
|
|
if (!playsink->textchain) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "creating text chain");
|
|
|
|
playsink->textchain = gen_text_chain (playsink);
|
|
|
|
}
|
|
|
|
if (playsink->textchain) {
|
2010-07-11 12:44:10 +00:00
|
|
|
GstIterator *it;
|
|
|
|
|
2010-02-23 18:12:40 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "adding text chain");
|
|
|
|
if (playsink->textchain->overlay)
|
2010-03-11 14:38:18 +00:00
|
|
|
g_object_set (G_OBJECT (playsink->textchain->overlay), "silent", FALSE,
|
|
|
|
NULL);
|
2010-02-23 18:12:40 +00:00
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->textchain), TRUE);
|
|
|
|
|
2010-10-26 15:41:28 +00:00
|
|
|
if (!playsink->text_sinkpad_stream_synchronizer) {
|
2011-05-05 14:03:52 +00:00
|
|
|
GValue item = { 0, };
|
|
|
|
|
2010-10-26 15:41:28 +00:00
|
|
|
playsink->text_sinkpad_stream_synchronizer =
|
|
|
|
gst_element_get_request_pad (GST_ELEMENT_CAST
|
2011-11-04 09:48:50 +00:00
|
|
|
(playsink->stream_synchronizer), "sink_%u");
|
2010-10-26 15:41:28 +00:00
|
|
|
it = gst_pad_iterate_internal_links
|
|
|
|
(playsink->text_sinkpad_stream_synchronizer);
|
|
|
|
g_assert (it);
|
2011-05-05 14:03:52 +00:00
|
|
|
gst_iterator_next (it, &item);
|
|
|
|
playsink->text_srcpad_stream_synchronizer = g_value_dup_object (&item);
|
|
|
|
g_value_unset (&item);
|
2010-10-26 15:41:28 +00:00
|
|
|
g_assert (playsink->text_srcpad_stream_synchronizer);
|
|
|
|
gst_iterator_free (it);
|
|
|
|
|
|
|
|
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->text_pad),
|
|
|
|
playsink->text_sinkpad_stream_synchronizer);
|
|
|
|
gst_pad_link_full (playsink->text_srcpad_stream_synchronizer,
|
|
|
|
playsink->textchain->textsinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
|
|
|
}
|
2010-02-23 18:12:40 +00:00
|
|
|
|
2012-03-23 10:07:49 +00:00
|
|
|
if (need_vis || need_video) {
|
|
|
|
if (need_vis) {
|
|
|
|
GstPad *srcpad;
|
2010-02-23 18:12:40 +00:00
|
|
|
|
2012-03-23 10:07:49 +00:00
|
|
|
srcpad =
|
|
|
|
gst_element_get_static_pad (playsink->vischain->chain.bin, "src");
|
|
|
|
gst_pad_unlink (srcpad, playsink->videochain->sinkpad);
|
|
|
|
gst_pad_link_full (srcpad, playsink->textchain->videosinkpad,
|
|
|
|
GST_PAD_LINK_CHECK_NOTHING);
|
|
|
|
gst_object_unref (srcpad);
|
|
|
|
} else {
|
2015-06-10 06:50:12 +00:00
|
|
|
if (need_deinterlace) {
|
|
|
|
gst_pad_unlink (playsink->videodeinterlacechain->srcpad,
|
|
|
|
playsink->videochain->sinkpad);
|
2012-03-23 10:07:49 +00:00
|
|
|
gst_pad_link_full (playsink->videodeinterlacechain->srcpad,
|
|
|
|
playsink->textchain->videosinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
2015-06-10 06:50:12 +00:00
|
|
|
} else {
|
|
|
|
gst_pad_unlink (playsink->video_srcpad_stream_synchronizer,
|
|
|
|
playsink->videochain->sinkpad);
|
2012-03-23 10:07:49 +00:00
|
|
|
gst_pad_link_full (playsink->video_srcpad_stream_synchronizer,
|
|
|
|
playsink->textchain->videosinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
2015-06-10 06:50:12 +00:00
|
|
|
}
|
2012-03-23 10:07:49 +00:00
|
|
|
}
|
|
|
|
gst_pad_link_full (playsink->textchain->srcpad,
|
|
|
|
playsink->videochain->sinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
2010-02-23 18:12:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->textchain), TRUE);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "no text needed");
|
|
|
|
/* we have no subtitles/text or we are requested to not show them */
|
2010-07-11 12:44:10 +00:00
|
|
|
|
2010-02-23 18:12:40 +00:00
|
|
|
if (playsink->textchain) {
|
|
|
|
if (playsink->text_pad == NULL) {
|
|
|
|
/* no text pad, remove the chain entirely */
|
|
|
|
GST_DEBUG_OBJECT (playsink, "removing text chain");
|
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->textchain), FALSE);
|
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->textchain), FALSE);
|
2014-02-16 14:32:47 +00:00
|
|
|
|
|
|
|
if (playsink->text_sinkpad_stream_synchronizer) {
|
|
|
|
gst_element_release_request_pad (GST_ELEMENT_CAST
|
|
|
|
(playsink->stream_synchronizer),
|
|
|
|
playsink->text_sinkpad_stream_synchronizer);
|
|
|
|
gst_object_unref (playsink->text_sinkpad_stream_synchronizer);
|
|
|
|
playsink->text_sinkpad_stream_synchronizer = NULL;
|
|
|
|
gst_object_unref (playsink->text_srcpad_stream_synchronizer);
|
|
|
|
playsink->text_srcpad_stream_synchronizer = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!need_video && playsink->video_pad) {
|
|
|
|
if (playsink->video_sinkpad_stream_synchronizer) {
|
|
|
|
gst_element_release_request_pad (GST_ELEMENT_CAST
|
|
|
|
(playsink->stream_synchronizer),
|
|
|
|
playsink->video_sinkpad_stream_synchronizer);
|
|
|
|
gst_object_unref (playsink->video_sinkpad_stream_synchronizer);
|
|
|
|
playsink->video_sinkpad_stream_synchronizer = NULL;
|
|
|
|
gst_object_unref (playsink->video_srcpad_stream_synchronizer);
|
|
|
|
playsink->video_srcpad_stream_synchronizer = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->video_pad),
|
|
|
|
NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (playsink->text_pad && !playsink->textchain)
|
|
|
|
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->text_pad),
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
if (playsink->text_sink)
|
|
|
|
gst_element_set_state (playsink->text_sink, GST_STATE_NULL);
|
2010-02-23 18:12:40 +00:00
|
|
|
} else {
|
|
|
|
/* we have a chain and a textpad, turn the subtitles off */
|
|
|
|
GST_DEBUG_OBJECT (playsink, "turning off the text");
|
2010-03-15 13:26:28 +00:00
|
|
|
if (playsink->textchain->overlay)
|
|
|
|
g_object_set (G_OBJECT (playsink->textchain->overlay), "silent", TRUE,
|
|
|
|
NULL);
|
2010-02-23 18:12:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-06-07 12:38:42 +00:00
|
|
|
update_av_offset (playsink);
|
2009-05-07 12:28:30 +00:00
|
|
|
do_async_done (playsink);
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
return TRUE;
|
2011-02-23 09:32:08 +00:00
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
no_chain:
|
|
|
|
{
|
|
|
|
/* gen_ chain already posted error */
|
|
|
|
GST_DEBUG_OBJECT (playsink, "failed to setup chain");
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
return FALSE;
|
|
|
|
}
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
/**
|
|
|
|
* gst_play_sink_set_flags:
|
|
|
|
* @playsink: a #GstPlaySink
|
|
|
|
* @flags: #GstPlayFlags
|
|
|
|
*
|
|
|
|
* Configure @flags on @playsink. The flags control the behaviour of @playsink
|
|
|
|
* when constructing the sink pipelins.
|
|
|
|
*
|
|
|
|
* Returns: TRUE if the flags could be configured.
|
|
|
|
*/
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
gboolean
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
gst_play_sink_set_flags (GstPlaySink * playsink, GstPlayFlags flags)
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
{
|
|
|
|
g_return_val_if_fail (GST_IS_PLAY_SINK (playsink), FALSE);
|
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
|
|
|
playsink->flags = flags;
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
/**
|
|
|
|
* gst_play_sink_get_flags:
|
|
|
|
* @playsink: a #GstPlaySink
|
|
|
|
*
|
|
|
|
* Get the flags of @playsink. That flags control the behaviour of the sink when
|
|
|
|
* it constructs the sink pipelines.
|
|
|
|
*
|
|
|
|
* Returns: the currently configured #GstPlayFlags.
|
|
|
|
*/
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
GstPlayFlags
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
gst_play_sink_get_flags (GstPlaySink * playsink)
|
|
|
|
{
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
GstPlayFlags res;
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
|
|
|
|
g_return_val_if_fail (GST_IS_PLAY_SINK (playsink), 0);
|
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
|
|
|
res = playsink->flags;
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
void
|
|
|
|
gst_play_sink_set_font_desc (GstPlaySink * playsink, const gchar * desc)
|
|
|
|
{
|
|
|
|
GstPlayTextChain *chain;
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
chain = (GstPlayTextChain *) playsink->textchain;
|
|
|
|
g_free (playsink->font_desc);
|
|
|
|
playsink->font_desc = g_strdup (desc);
|
|
|
|
if (chain && chain->overlay) {
|
|
|
|
g_object_set (chain->overlay, "font-desc", desc, NULL);
|
|
|
|
}
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
}
|
|
|
|
|
|
|
|
gchar *
|
|
|
|
gst_play_sink_get_font_desc (GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
gchar *result = NULL;
|
|
|
|
GstPlayTextChain *chain;
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
chain = (GstPlayTextChain *) playsink->textchain;
|
|
|
|
if (chain && chain->overlay) {
|
|
|
|
g_object_get (chain->overlay, "font-desc", &result, NULL);
|
|
|
|
playsink->font_desc = g_strdup (result);
|
|
|
|
} else {
|
|
|
|
result = g_strdup (playsink->font_desc);
|
|
|
|
}
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2010-02-21 18:52:45 +00:00
|
|
|
void
|
|
|
|
gst_play_sink_set_subtitle_encoding (GstPlaySink * playsink,
|
|
|
|
const gchar * encoding)
|
|
|
|
{
|
|
|
|
GstPlayTextChain *chain;
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
chain = (GstPlayTextChain *) playsink->textchain;
|
|
|
|
g_free (playsink->subtitle_encoding);
|
|
|
|
playsink->subtitle_encoding = g_strdup (encoding);
|
|
|
|
if (chain && chain->overlay) {
|
|
|
|
g_object_set (chain->overlay, "subtitle-encoding", encoding, NULL);
|
|
|
|
}
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
}
|
|
|
|
|
|
|
|
gchar *
|
|
|
|
gst_play_sink_get_subtitle_encoding (GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
gchar *result = NULL;
|
|
|
|
GstPlayTextChain *chain;
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
chain = (GstPlayTextChain *) playsink->textchain;
|
|
|
|
if (chain && chain->overlay) {
|
|
|
|
g_object_get (chain->overlay, "subtitle-encoding", &result, NULL);
|
|
|
|
playsink->subtitle_encoding = g_strdup (result);
|
|
|
|
} else {
|
|
|
|
result = g_strdup (playsink->subtitle_encoding);
|
|
|
|
}
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2010-06-07 12:38:42 +00:00
|
|
|
static void
|
|
|
|
update_av_offset (GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
gint64 av_offset;
|
|
|
|
GstPlayAudioChain *achain;
|
|
|
|
GstPlayVideoChain *vchain;
|
|
|
|
|
|
|
|
av_offset = playsink->av_offset;
|
|
|
|
achain = (GstPlayAudioChain *) playsink->audiochain;
|
|
|
|
vchain = (GstPlayVideoChain *) playsink->videochain;
|
|
|
|
|
|
|
|
if (achain && vchain && achain->ts_offset && vchain->ts_offset) {
|
2012-07-03 19:07:44 +00:00
|
|
|
g_object_set (achain->ts_offset,
|
|
|
|
"ts-offset", MAX (G_GINT64_CONSTANT (0), -av_offset), NULL);
|
|
|
|
g_object_set (vchain->ts_offset,
|
|
|
|
"ts-offset", MAX (G_GINT64_CONSTANT (0), av_offset), NULL);
|
2010-06-07 12:38:42 +00:00
|
|
|
} else {
|
|
|
|
GST_LOG_OBJECT (playsink, "no ts_offset elements");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gst_play_sink_set_av_offset (GstPlaySink * playsink, gint64 av_offset)
|
|
|
|
{
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
playsink->av_offset = av_offset;
|
|
|
|
update_av_offset (playsink);
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
}
|
|
|
|
|
|
|
|
gint64
|
|
|
|
gst_play_sink_get_av_offset (GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
gint64 result;
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
result = playsink->av_offset;
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
/**
|
2011-12-01 15:48:49 +00:00
|
|
|
* gst_play_sink_get_last_sample:
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
* @playsink: a #GstPlaySink
|
|
|
|
*
|
2011-12-01 15:48:49 +00:00
|
|
|
* Get the last displayed sample from @playsink. This sample is in the native
|
|
|
|
* format of the sink element, the caps in the result sample contain the format
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
* of the frame data.
|
|
|
|
*
|
2011-12-01 15:48:49 +00:00
|
|
|
* Returns: a #GstSample with the frame data or %NULL when no video frame is
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
* available.
|
|
|
|
*/
|
2011-12-01 15:48:49 +00:00
|
|
|
GstSample *
|
|
|
|
gst_play_sink_get_last_sample (GstPlaySink * playsink)
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
{
|
2011-12-01 15:48:49 +00:00
|
|
|
GstSample *result = NULL;
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
GstPlayVideoChain *chain;
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
2011-12-01 15:48:49 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "taking last sample");
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
/* get the video chain if we can */
|
|
|
|
if ((chain = (GstPlayVideoChain *) playsink->videochain)) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "found video chain");
|
|
|
|
/* see if the chain is active */
|
|
|
|
if (chain->chain.activated && chain->sink) {
|
2008-02-20 11:52:28 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "video chain active and has a sink");
|
2008-02-20 11:52:28 +00:00
|
|
|
|
|
|
|
/* find and get the last-buffer property now */
|
|
|
|
if ((elem =
|
|
|
|
gst_play_sink_find_property (playsink, chain->sink,
|
2011-12-01 15:48:49 +00:00
|
|
|
"last-sample", GST_TYPE_SAMPLE))) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "getting last-sample property");
|
|
|
|
g_object_get (elem, "last-sample", &result, NULL);
|
2008-02-20 11:52:28 +00:00
|
|
|
gst_object_unref (elem);
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
|
2010-06-05 08:42:56 +00:00
|
|
|
/**
|
2011-12-01 15:48:49 +00:00
|
|
|
* gst_play_sink_convert_sample:
|
2010-06-05 08:42:56 +00:00
|
|
|
* @playsink: a #GstPlaySink
|
|
|
|
* @caps: a #GstCaps
|
|
|
|
*
|
|
|
|
* Get the last displayed frame from @playsink. If caps is %NULL, the video will
|
|
|
|
* be in the native format of the sink element and the caps on the buffer
|
|
|
|
* describe the format of the frame. If @caps is not %NULL, the video
|
|
|
|
* frame will be converted to the format of the caps.
|
|
|
|
*
|
2013-09-06 21:17:44 +00:00
|
|
|
* Returns: a #GstSample of the current video sample converted to #caps.
|
|
|
|
* The caps in the sample will describe the final layout of the buffer data.
|
|
|
|
* %NULL is returned when no current sample can be retrieved or when the
|
|
|
|
* conversion failed.
|
2010-06-05 08:42:56 +00:00
|
|
|
*/
|
2011-12-01 15:48:49 +00:00
|
|
|
GstSample *
|
|
|
|
gst_play_sink_convert_sample (GstPlaySink * playsink, GstCaps * caps)
|
2010-06-05 08:42:56 +00:00
|
|
|
{
|
2011-12-01 15:48:49 +00:00
|
|
|
GstSample *result;
|
|
|
|
GError *err = NULL;
|
2010-06-05 08:42:56 +00:00
|
|
|
|
2011-12-01 15:48:49 +00:00
|
|
|
result = gst_play_sink_get_last_sample (playsink);
|
2010-06-05 08:42:56 +00:00
|
|
|
if (result != NULL && caps != NULL) {
|
2011-12-01 15:48:49 +00:00
|
|
|
GstSample *temp;
|
|
|
|
|
|
|
|
temp = gst_video_convert_sample (result, caps, 25 * GST_SECOND, &err);
|
|
|
|
if (temp == NULL && err)
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
gst_sample_unref (result);
|
2010-06-05 08:42:56 +00:00
|
|
|
result = temp;
|
|
|
|
}
|
|
|
|
return result;
|
2011-12-01 15:48:49 +00:00
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
error:
|
|
|
|
{
|
|
|
|
/* I'm really uncertain whether we should make playsink post an error
|
|
|
|
* on the bus or not. It's not like it's a critical issue regarding
|
|
|
|
* playsink behaviour. */
|
|
|
|
GST_ERROR ("Error converting frame: %s", err->message);
|
|
|
|
gst_sample_unref (result);
|
|
|
|
g_error_free (err);
|
|
|
|
return NULL;
|
|
|
|
}
|
2010-06-05 08:42:56 +00:00
|
|
|
}
|
|
|
|
|
2011-03-15 11:51:04 +00:00
|
|
|
static gboolean
|
|
|
|
is_raw_structure (GstStructure * s)
|
|
|
|
{
|
|
|
|
const gchar *name;
|
|
|
|
|
|
|
|
name = gst_structure_get_name (s);
|
|
|
|
|
2012-02-20 14:17:29 +00:00
|
|
|
if (g_str_equal (name, "video/x-raw") || g_str_equal (name, "audio/x-raw"))
|
2011-03-15 11:51:04 +00:00
|
|
|
return TRUE;
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
is_raw_pad (GstPad * pad)
|
|
|
|
{
|
|
|
|
GstPad *peer = gst_pad_get_peer (pad);
|
|
|
|
GstCaps *caps;
|
|
|
|
gboolean raw = TRUE;
|
|
|
|
|
|
|
|
if (!peer)
|
|
|
|
return raw;
|
|
|
|
|
2011-08-15 10:18:15 +00:00
|
|
|
caps = gst_pad_get_current_caps (peer);
|
2011-03-15 11:51:04 +00:00
|
|
|
if (!caps) {
|
|
|
|
guint i, n;
|
|
|
|
|
2011-11-15 15:48:15 +00:00
|
|
|
caps = gst_pad_query_caps (peer, NULL);
|
2011-03-15 11:51:04 +00:00
|
|
|
|
|
|
|
n = gst_caps_get_size (caps);
|
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
gboolean r = is_raw_structure (gst_caps_get_structure (caps, i));
|
|
|
|
|
|
|
|
if (i == 0) {
|
|
|
|
raw = r;
|
|
|
|
} else if (raw != r) {
|
|
|
|
GST_ERROR_OBJECT (pad,
|
|
|
|
"Caps contains raw and non-raw structures: %" GST_PTR_FORMAT, caps);
|
|
|
|
raw = FALSE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
raw = is_raw_structure (gst_caps_get_structure (caps, 0));
|
|
|
|
}
|
|
|
|
gst_caps_unref (caps);
|
|
|
|
gst_object_unref (peer);
|
|
|
|
|
|
|
|
return raw;
|
|
|
|
}
|
|
|
|
|
2011-11-01 00:34:28 +00:00
|
|
|
static GstPadProbeReturn
|
2011-11-08 10:07:18 +00:00
|
|
|
sinkpad_blocked_cb (GstPad * blockedpad, GstPadProbeInfo * info,
|
|
|
|
gpointer user_data);
|
2011-06-02 10:08:22 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
video_set_blocked (GstPlaySink * playsink, gboolean blocked)
|
|
|
|
{
|
|
|
|
if (playsink->video_pad) {
|
|
|
|
GstPad *opad =
|
|
|
|
GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD
|
|
|
|
(playsink->video_pad)));
|
|
|
|
if (blocked && playsink->video_block_id == 0) {
|
2013-10-02 13:02:44 +00:00
|
|
|
if (playsink->vis_pad_block_id)
|
2014-03-16 16:00:38 +00:00
|
|
|
gst_pad_remove_probe (((GstPlayVisChain *) playsink->vischain)->
|
|
|
|
blockpad, playsink->vis_pad_block_id);
|
2013-10-02 13:02:44 +00:00
|
|
|
playsink->vis_pad_block_id = 0;
|
|
|
|
|
2011-06-02 10:08:22 +00:00
|
|
|
playsink->video_block_id =
|
2011-11-07 16:10:48 +00:00
|
|
|
gst_pad_add_probe (opad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
|
2012-03-22 10:35:13 +00:00
|
|
|
sinkpad_blocked_cb, playsink, NULL);
|
2011-06-02 10:08:22 +00:00
|
|
|
} else if (!blocked && playsink->video_block_id) {
|
|
|
|
gst_pad_remove_probe (opad, playsink->video_block_id);
|
2011-08-18 17:36:50 +00:00
|
|
|
PENDING_FLAG_UNSET (playsink, GST_PLAY_SINK_TYPE_VIDEO_RAW);
|
|
|
|
PENDING_FLAG_UNSET (playsink, GST_PLAY_SINK_TYPE_VIDEO);
|
2011-06-02 10:08:22 +00:00
|
|
|
playsink->video_block_id = 0;
|
|
|
|
playsink->video_pad_blocked = FALSE;
|
|
|
|
}
|
|
|
|
gst_object_unref (opad);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
audio_set_blocked (GstPlaySink * playsink, gboolean blocked)
|
|
|
|
{
|
|
|
|
if (playsink->audio_pad) {
|
|
|
|
GstPad *opad =
|
|
|
|
GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD
|
|
|
|
(playsink->audio_pad)));
|
|
|
|
if (blocked && playsink->audio_block_id == 0) {
|
2013-10-02 13:02:44 +00:00
|
|
|
if (playsink->vis_pad_block_id)
|
2014-03-16 16:00:38 +00:00
|
|
|
gst_pad_remove_probe (((GstPlayVisChain *) playsink->vischain)->
|
|
|
|
blockpad, playsink->vis_pad_block_id);
|
2013-10-02 13:02:44 +00:00
|
|
|
playsink->vis_pad_block_id = 0;
|
|
|
|
|
2011-06-02 10:08:22 +00:00
|
|
|
playsink->audio_block_id =
|
2011-11-07 16:10:48 +00:00
|
|
|
gst_pad_add_probe (opad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
|
2012-03-22 10:35:13 +00:00
|
|
|
sinkpad_blocked_cb, playsink, NULL);
|
2011-06-02 10:08:22 +00:00
|
|
|
} else if (!blocked && playsink->audio_block_id) {
|
2013-10-02 13:02:44 +00:00
|
|
|
if (playsink->vis_pad_block_id)
|
2014-03-16 16:00:38 +00:00
|
|
|
gst_pad_remove_probe (((GstPlayVisChain *) playsink->vischain)->
|
|
|
|
blockpad, playsink->vis_pad_block_id);
|
2013-10-02 13:02:44 +00:00
|
|
|
playsink->vis_pad_block_id = 0;
|
|
|
|
|
2011-06-02 10:08:22 +00:00
|
|
|
gst_pad_remove_probe (opad, playsink->audio_block_id);
|
2011-08-18 17:36:50 +00:00
|
|
|
PENDING_FLAG_UNSET (playsink, GST_PLAY_SINK_TYPE_AUDIO_RAW);
|
|
|
|
PENDING_FLAG_UNSET (playsink, GST_PLAY_SINK_TYPE_AUDIO);
|
2011-06-02 10:08:22 +00:00
|
|
|
playsink->audio_block_id = 0;
|
|
|
|
playsink->audio_pad_blocked = FALSE;
|
|
|
|
}
|
|
|
|
gst_object_unref (opad);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
text_set_blocked (GstPlaySink * playsink, gboolean blocked)
|
|
|
|
{
|
|
|
|
if (playsink->text_pad) {
|
|
|
|
GstPad *opad =
|
|
|
|
GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD
|
|
|
|
(playsink->text_pad)));
|
|
|
|
if (blocked && playsink->text_block_id == 0) {
|
2013-10-02 13:02:44 +00:00
|
|
|
if (playsink->vis_pad_block_id)
|
2014-03-16 16:00:38 +00:00
|
|
|
gst_pad_remove_probe (((GstPlayVisChain *) playsink->vischain)->
|
|
|
|
blockpad, playsink->vis_pad_block_id);
|
2013-10-02 13:02:44 +00:00
|
|
|
playsink->vis_pad_block_id = 0;
|
|
|
|
|
2011-06-02 10:08:22 +00:00
|
|
|
playsink->text_block_id =
|
2011-11-07 16:10:48 +00:00
|
|
|
gst_pad_add_probe (opad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
|
2012-03-22 10:35:13 +00:00
|
|
|
sinkpad_blocked_cb, playsink, NULL);
|
2011-06-02 10:08:22 +00:00
|
|
|
} else if (!blocked && playsink->text_block_id) {
|
|
|
|
gst_pad_remove_probe (opad, playsink->text_block_id);
|
2011-08-18 17:36:50 +00:00
|
|
|
PENDING_FLAG_UNSET (playsink, GST_PLAY_SINK_TYPE_TEXT);
|
2011-06-02 10:08:22 +00:00
|
|
|
playsink->text_block_id = 0;
|
|
|
|
playsink->text_pad_blocked = FALSE;
|
|
|
|
}
|
|
|
|
gst_object_unref (opad);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-06-26 08:54:18 +00:00
|
|
|
gboolean
|
|
|
|
gst_play_sink_reconfigure (GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
GST_LOG_OBJECT (playsink, "Triggering reconfiguration");
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
video_set_blocked (playsink, TRUE);
|
|
|
|
audio_set_blocked (playsink, TRUE);
|
|
|
|
text_set_blocked (playsink, TRUE);
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2011-11-01 00:34:28 +00:00
|
|
|
static GstPadProbeReturn
|
2011-11-08 10:07:18 +00:00
|
|
|
sinkpad_blocked_cb (GstPad * blockedpad, GstPadProbeInfo * info,
|
|
|
|
gpointer user_data)
|
2011-03-15 11:51:04 +00:00
|
|
|
{
|
|
|
|
GstPlaySink *playsink = (GstPlaySink *) user_data;
|
|
|
|
GstPad *pad;
|
|
|
|
|
2014-05-01 11:08:24 +00:00
|
|
|
if (GST_IS_EVENT (info->data) && !GST_EVENT_IS_SERIALIZED (info->data)) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "Letting non-serialized event %s pass",
|
|
|
|
GST_EVENT_TYPE_NAME (info->data));
|
|
|
|
return GST_PAD_PROBE_PASS;
|
|
|
|
}
|
|
|
|
|
2011-03-15 11:51:04 +00:00
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
|
2011-05-09 11:11:00 +00:00
|
|
|
pad = GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD (blockedpad)));
|
2011-03-15 11:51:04 +00:00
|
|
|
if (pad == playsink->video_pad) {
|
2011-05-30 16:36:14 +00:00
|
|
|
playsink->video_pad_blocked = TRUE;
|
|
|
|
GST_DEBUG_OBJECT (pad, "Video pad blocked");
|
2011-03-15 11:51:04 +00:00
|
|
|
} else if (pad == playsink->audio_pad) {
|
2011-05-30 16:36:14 +00:00
|
|
|
playsink->audio_pad_blocked = TRUE;
|
|
|
|
GST_DEBUG_OBJECT (pad, "Audio pad blocked");
|
2011-03-15 11:51:04 +00:00
|
|
|
} else if (pad == playsink->text_pad) {
|
2011-05-30 16:36:14 +00:00
|
|
|
playsink->text_pad_blocked = TRUE;
|
|
|
|
GST_DEBUG_OBJECT (pad, "Text pad blocked");
|
2011-03-15 11:51:04 +00:00
|
|
|
}
|
|
|
|
|
2011-07-27 11:05:31 +00:00
|
|
|
/* We reconfigure when for ALL streams:
|
|
|
|
* * there isn't a pad
|
|
|
|
* * OR the pad is blocked
|
|
|
|
* * OR there are no pending blocks on that pad
|
|
|
|
*/
|
|
|
|
|
|
|
|
if ((!playsink->video_pad || playsink->video_pad_blocked
|
|
|
|
|| !PENDING_VIDEO_BLOCK (playsink)) && (!playsink->audio_pad
|
|
|
|
|| playsink->audio_pad_blocked || !PENDING_AUDIO_BLOCK (playsink))
|
|
|
|
&& (!playsink->text_pad || playsink->text_pad_blocked
|
|
|
|
|| !PENDING_TEXT_BLOCK (playsink))) {
|
2011-03-15 11:51:04 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "All pads blocked -- reconfiguring");
|
|
|
|
|
|
|
|
if (playsink->video_pad) {
|
|
|
|
playsink->video_pad_raw = is_raw_pad (playsink->video_pad);
|
|
|
|
GST_DEBUG_OBJECT (playsink, "Video pad is raw: %d",
|
|
|
|
playsink->video_pad_raw);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (playsink->audio_pad) {
|
|
|
|
playsink->audio_pad_raw = is_raw_pad (playsink->audio_pad);
|
|
|
|
GST_DEBUG_OBJECT (playsink, "Audio pad is raw: %d",
|
|
|
|
playsink->audio_pad_raw);
|
|
|
|
}
|
|
|
|
|
2012-06-26 08:54:18 +00:00
|
|
|
gst_play_sink_do_reconfigure (playsink);
|
2011-03-15 11:51:04 +00:00
|
|
|
|
2011-06-02 10:08:22 +00:00
|
|
|
video_set_blocked (playsink, FALSE);
|
|
|
|
audio_set_blocked (playsink, FALSE);
|
|
|
|
text_set_blocked (playsink, FALSE);
|
2011-03-15 11:51:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gst_object_unref (pad);
|
|
|
|
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
2011-06-01 17:34:54 +00:00
|
|
|
|
2011-11-01 00:34:28 +00:00
|
|
|
return GST_PAD_PROBE_OK;
|
2011-03-15 11:51:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
caps_notify_cb (GstPad * pad, GParamSpec * unused, GstPlaySink * playsink)
|
|
|
|
{
|
|
|
|
gboolean reconfigure = FALSE;
|
|
|
|
GstCaps *caps;
|
|
|
|
gboolean raw;
|
|
|
|
|
|
|
|
g_object_get (pad, "caps", &caps, NULL);
|
|
|
|
if (!caps)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (pad == playsink->audio_pad) {
|
|
|
|
raw = is_raw_pad (pad);
|
2012-06-07 08:52:53 +00:00
|
|
|
reconfigure = (! !playsink->audio_pad_raw != ! !raw)
|
2011-03-15 11:51:04 +00:00
|
|
|
&& playsink->audiochain;
|
|
|
|
GST_DEBUG_OBJECT (pad,
|
|
|
|
"Audio caps changed: raw %d reconfigure %d caps %" GST_PTR_FORMAT, raw,
|
|
|
|
reconfigure, caps);
|
|
|
|
} else if (pad == playsink->video_pad) {
|
|
|
|
raw = is_raw_pad (pad);
|
2012-06-07 08:52:53 +00:00
|
|
|
reconfigure = (! !playsink->video_pad_raw != ! !raw)
|
2011-03-15 11:51:04 +00:00
|
|
|
&& playsink->videochain;
|
|
|
|
GST_DEBUG_OBJECT (pad,
|
|
|
|
"Video caps changed: raw %d reconfigure %d caps %" GST_PTR_FORMAT, raw,
|
|
|
|
reconfigure, caps);
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_caps_unref (caps);
|
|
|
|
|
2012-06-26 08:54:18 +00:00
|
|
|
if (reconfigure)
|
|
|
|
gst_play_sink_reconfigure (playsink);
|
2011-03-15 11:51:04 +00:00
|
|
|
}
|
|
|
|
|
2012-05-08 13:42:02 +00:00
|
|
|
void
|
|
|
|
gst_play_sink_refresh_pad (GstPlaySink * playsink, GstPad * pad,
|
|
|
|
GstPlaySinkType type)
|
|
|
|
{
|
2012-05-09 10:03:26 +00:00
|
|
|
gulong *block_id = NULL;
|
|
|
|
|
2012-05-08 13:42:02 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "refresh pad %" GST_PTR_FORMAT, pad);
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
if (pad == playsink->video_pad) {
|
|
|
|
if (type != GST_PLAY_SINK_TYPE_VIDEO_RAW &&
|
|
|
|
type != GST_PLAY_SINK_TYPE_VIDEO)
|
|
|
|
goto wrong_type;
|
2012-05-09 08:30:55 +00:00
|
|
|
block_id = &playsink->video_block_id;
|
2012-05-08 13:42:02 +00:00
|
|
|
} else if (pad == playsink->audio_pad) {
|
|
|
|
if (type != GST_PLAY_SINK_TYPE_AUDIO_RAW &&
|
|
|
|
type != GST_PLAY_SINK_TYPE_AUDIO)
|
|
|
|
goto wrong_type;
|
2012-05-09 08:30:55 +00:00
|
|
|
block_id = &playsink->audio_block_id;
|
2012-05-08 13:42:02 +00:00
|
|
|
} else if (pad == playsink->text_pad) {
|
|
|
|
if (type != GST_PLAY_SINK_TYPE_TEXT)
|
|
|
|
goto wrong_type;
|
2012-05-09 08:30:55 +00:00
|
|
|
block_id = &playsink->text_block_id;
|
2012-05-08 13:42:02 +00:00
|
|
|
}
|
|
|
|
|
2012-05-14 18:08:38 +00:00
|
|
|
if (type != GST_PLAY_SINK_TYPE_FLUSHING && (block_id && *block_id == 0)) {
|
2012-05-08 13:42:02 +00:00
|
|
|
GstPad *blockpad =
|
|
|
|
GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD (pad)));
|
|
|
|
|
2013-10-02 13:02:44 +00:00
|
|
|
if (playsink->vis_pad_block_id)
|
|
|
|
gst_pad_remove_probe (((GstPlayVisChain *) playsink->vischain)->blockpad,
|
|
|
|
playsink->vis_pad_block_id);
|
|
|
|
playsink->vis_pad_block_id = 0;
|
|
|
|
|
2012-05-09 08:30:55 +00:00
|
|
|
*block_id =
|
|
|
|
gst_pad_add_probe (blockpad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
|
|
|
|
sinkpad_blocked_cb, playsink, NULL);
|
2012-05-08 13:42:02 +00:00
|
|
|
PENDING_FLAG_SET (playsink, type);
|
|
|
|
gst_object_unref (blockpad);
|
|
|
|
}
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
wrong_type:
|
|
|
|
{
|
2012-05-12 12:24:09 +00:00
|
|
|
GST_WARNING_OBJECT (playsink, "wrong type %u for pad %" GST_PTR_FORMAT,
|
|
|
|
type, pad);
|
2012-05-08 13:42:02 +00:00
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
/**
|
|
|
|
* gst_play_sink_request_pad
|
|
|
|
* @playsink: a #GstPlaySink
|
|
|
|
* @type: a #GstPlaySinkType
|
|
|
|
*
|
|
|
|
* Create or return a pad of @type.
|
|
|
|
*
|
|
|
|
* Returns: a #GstPad of @type or %NULL when the pad could not be created.
|
|
|
|
*/
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
GstPad *
|
|
|
|
gst_play_sink_request_pad (GstPlaySink * playsink, GstPlaySinkType type)
|
|
|
|
{
|
|
|
|
GstPad *res = NULL;
|
|
|
|
gboolean created = FALSE;
|
2009-02-25 11:42:20 +00:00
|
|
|
gboolean activate = TRUE;
|
2009-09-08 09:35:20 +00:00
|
|
|
const gchar *pad_name = NULL;
|
2011-06-01 17:34:54 +00:00
|
|
|
gulong *block_id = NULL;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "request pad type %d", type);
|
|
|
|
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
switch (type) {
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
case GST_PLAY_SINK_TYPE_AUDIO_RAW:
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
case GST_PLAY_SINK_TYPE_AUDIO:
|
2011-03-15 11:51:04 +00:00
|
|
|
pad_name = "audio_sink";
|
2008-02-15 18:38:52 +00:00
|
|
|
if (!playsink->audio_tee) {
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_LOG_OBJECT (playsink, "creating tee");
|
2008-02-15 18:38:52 +00:00
|
|
|
/* create tee when needed. This element will feed the audio sink chain
|
|
|
|
* and the vis chain. */
|
|
|
|
playsink->audio_tee = gst_element_factory_make ("tee", "audiotee");
|
2010-02-15 07:46:26 +00:00
|
|
|
if (playsink->audio_tee == NULL) {
|
|
|
|
post_missing_element_message (playsink, "tee");
|
|
|
|
GST_ELEMENT_ERROR (playsink, CORE, MISSING_PLUGIN,
|
|
|
|
(_("Missing element '%s' - check your GStreamer installation."),
|
|
|
|
"tee"), (NULL));
|
|
|
|
res = NULL;
|
|
|
|
break;
|
|
|
|
}
|
2015-03-13 18:07:12 +00:00
|
|
|
playsink->audio_tee_sink =
|
|
|
|
gst_element_get_static_pad (playsink->audio_tee, "sink");
|
|
|
|
gst_bin_add (GST_BIN_CAST (playsink), playsink->audio_tee);
|
2008-02-15 18:38:52 +00:00
|
|
|
}
|
2015-03-13 18:07:12 +00:00
|
|
|
gst_element_set_state (playsink->audio_tee, GST_STATE_PAUSED);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
if (!playsink->audio_pad) {
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_LOG_OBJECT (playsink, "ghosting tee sinkpad");
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
playsink->audio_pad =
|
2009-09-08 09:35:20 +00:00
|
|
|
gst_ghost_pad_new (pad_name, playsink->audio_tee_sink);
|
2013-05-21 14:35:18 +00:00
|
|
|
playsink->audio_notify_caps_id =
|
|
|
|
g_signal_connect (G_OBJECT (playsink->audio_pad), "notify::caps",
|
2011-03-15 11:51:04 +00:00
|
|
|
G_CALLBACK (caps_notify_cb), playsink);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
created = TRUE;
|
|
|
|
}
|
2011-03-15 11:51:04 +00:00
|
|
|
playsink->audio_pad_raw = FALSE;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
res = playsink->audio_pad;
|
2011-06-01 17:34:54 +00:00
|
|
|
block_id = &playsink->audio_block_id;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
break;
|
gst/playback/Makefile.am: Group decodebin2 and uridecodebin into the same plugin so that they can share the GEnumType.
Original commit message from CVS:
* gst/playback/Makefile.am:
Group decodebin2 and uridecodebin into the same plugin so that they
can share the GEnumType.
* gst/playback/gstdecodebin2.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_decode_bin_class_init),
(gst_decode_bin_init), (gst_decode_bin_autoplug_sort),
(gst_decode_bin_autoplug_select), (gst_decode_bin_autoplug_add),
(analyze_new_pad), (connect_pad), (gst_decode_bin_plugin_init):
Add signal to sort factories instead of the more awkward autoplug-select
signal.
Modify autoplug_select so that we can try, skip or expose the
autopluggin of an element on a pad.
* gst/playback/gstfactorylists.c: (compare_ranks),
(decoders_filter), (sinks_filter), (gst_factory_list_is_type),
(element_filter), (gst_factory_list_get_elements),
(gst_factory_list_debug), (gst_factory_list_filter):
* gst/playback/gstfactorylists.h:
Simplify the API, allow getting elements based on mask.
* gst/playback/gstplay-marshal.list:
Add some more marshallers.
* gst/playback/gstplaybin2.c: (init_group), (gst_play_bin_init),
(gst_play_bin_finalize), (pad_removed_cb), (autoplug_factories_cb),
(autoplug_select_cb), (activate_group):
Add support for managing non-raw sinks by providing a custom element and
sink list to decodebin2.
Try to plug non-raw sinks when decodebin2 using autoplug-select of
decodebin2.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_set_mode), (gst_play_sink_request_pad):
* gst/playback/gstplaysink.h:
Add support for raw and non-raw sinks.
Add support to force sinks selected by playbin2.
Don't plug raw converters for non-raw sinks.
* gst/playback/gsturidecodebin.c: (_gst_array_accumulator),
(_gst_select_accumulator), (gst_uri_decode_bin_class_init),
(proxy_autoplug_select_signal), (gst_uri_decode_bin_plugin_init),
(plugin_init):
Use right accumulators.
Proxy new signal.
2007-12-05 17:11:48 +00:00
|
|
|
case GST_PLAY_SINK_TYPE_VIDEO_RAW:
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
case GST_PLAY_SINK_TYPE_VIDEO:
|
2011-03-15 11:51:04 +00:00
|
|
|
pad_name = "video_sink";
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
if (!playsink->video_pad) {
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_LOG_OBJECT (playsink, "ghosting videosink");
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
playsink->video_pad =
|
2009-09-08 09:35:20 +00:00
|
|
|
gst_ghost_pad_new_no_target (pad_name, GST_PAD_SINK);
|
2013-05-21 14:35:18 +00:00
|
|
|
playsink->video_notify_caps_id =
|
|
|
|
g_signal_connect (G_OBJECT (playsink->video_pad), "notify::caps",
|
2011-03-15 11:51:04 +00:00
|
|
|
G_CALLBACK (caps_notify_cb), playsink);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
created = TRUE;
|
|
|
|
}
|
2011-03-15 11:51:04 +00:00
|
|
|
playsink->video_pad_raw = FALSE;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
res = playsink->video_pad;
|
2011-06-01 17:34:54 +00:00
|
|
|
block_id = &playsink->video_block_id;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
break;
|
|
|
|
case GST_PLAY_SINK_TYPE_TEXT:
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_LOG_OBJECT (playsink, "ghosting text");
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
if (!playsink->text_pad) {
|
|
|
|
playsink->text_pad =
|
|
|
|
gst_ghost_pad_new_no_target ("text_sink", GST_PAD_SINK);
|
|
|
|
created = TRUE;
|
|
|
|
}
|
|
|
|
res = playsink->text_pad;
|
2011-06-01 17:34:54 +00:00
|
|
|
block_id = &playsink->text_block_id;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
break;
|
2009-02-25 11:42:20 +00:00
|
|
|
case GST_PLAY_SINK_TYPE_FLUSHING:
|
|
|
|
{
|
|
|
|
gchar *padname;
|
|
|
|
|
|
|
|
/* we need a unique padname for the flushing pad. */
|
2011-11-04 09:48:50 +00:00
|
|
|
padname = g_strdup_printf ("flushing_%u", playsink->count);
|
2009-02-25 11:42:20 +00:00
|
|
|
res = gst_ghost_pad_new_no_target (padname, GST_PAD_SINK);
|
|
|
|
g_free (padname);
|
|
|
|
playsink->count++;
|
|
|
|
activate = FALSE;
|
|
|
|
created = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
default:
|
|
|
|
res = NULL;
|
|
|
|
break;
|
|
|
|
}
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
if (created && res) {
|
2009-02-25 11:42:20 +00:00
|
|
|
/* we have to add the pad when it's active or we get an error when the
|
|
|
|
* element is 'running' */
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
gst_pad_set_active (res, TRUE);
|
|
|
|
gst_element_add_pad (GST_ELEMENT_CAST (playsink), res);
|
2014-05-20 07:48:56 +00:00
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
2011-06-01 17:34:54 +00:00
|
|
|
if (block_id && *block_id == 0) {
|
2011-05-09 11:11:00 +00:00
|
|
|
GstPad *blockpad =
|
|
|
|
GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD (res)));
|
2011-03-15 11:51:04 +00:00
|
|
|
|
2013-10-02 13:02:44 +00:00
|
|
|
if (playsink->vis_pad_block_id)
|
2014-03-16 16:00:38 +00:00
|
|
|
gst_pad_remove_probe (((GstPlayVisChain *) playsink->vischain)->
|
|
|
|
blockpad, playsink->vis_pad_block_id);
|
2013-10-02 13:02:44 +00:00
|
|
|
playsink->vis_pad_block_id = 0;
|
|
|
|
|
2011-06-01 17:34:54 +00:00
|
|
|
*block_id =
|
2011-11-07 16:10:48 +00:00
|
|
|
gst_pad_add_probe (blockpad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
|
2012-03-22 10:35:13 +00:00
|
|
|
sinkpad_blocked_cb, playsink, NULL);
|
2011-07-27 11:05:31 +00:00
|
|
|
PENDING_FLAG_SET (playsink, type);
|
2011-03-15 11:51:04 +00:00
|
|
|
gst_object_unref (blockpad);
|
|
|
|
}
|
2014-05-20 07:48:56 +00:00
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
2009-02-25 11:42:20 +00:00
|
|
|
if (!activate)
|
|
|
|
gst_pad_set_active (res, activate);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2012-05-08 13:42:02 +00:00
|
|
|
|
2009-09-08 09:35:20 +00:00
|
|
|
static GstPad *
|
|
|
|
gst_play_sink_request_new_pad (GstElement * element, GstPadTemplate * templ,
|
2011-05-10 14:44:37 +00:00
|
|
|
const gchar * name, const GstCaps * caps)
|
2009-09-08 09:35:20 +00:00
|
|
|
{
|
|
|
|
GstPlaySink *psink;
|
|
|
|
GstPad *pad;
|
|
|
|
GstPlaySinkType type;
|
|
|
|
const gchar *tplname;
|
|
|
|
|
|
|
|
g_return_val_if_fail (templ != NULL, NULL);
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (element, "name:%s", name);
|
|
|
|
|
|
|
|
psink = GST_PLAY_SINK (element);
|
|
|
|
tplname = GST_PAD_TEMPLATE_NAME_TEMPLATE (templ);
|
|
|
|
|
|
|
|
/* Figure out the GstPlaySinkType based on the template */
|
|
|
|
if (!strcmp (tplname, "audio_sink"))
|
|
|
|
type = GST_PLAY_SINK_TYPE_AUDIO;
|
2010-03-30 13:10:42 +00:00
|
|
|
else if (!strcmp (tplname, "audio_raw_sink"))
|
2009-09-08 09:35:20 +00:00
|
|
|
type = GST_PLAY_SINK_TYPE_AUDIO_RAW;
|
|
|
|
else if (!strcmp (tplname, "video_sink"))
|
|
|
|
type = GST_PLAY_SINK_TYPE_VIDEO;
|
|
|
|
else if (!strcmp (tplname, "video_raw_sink"))
|
|
|
|
type = GST_PLAY_SINK_TYPE_VIDEO_RAW;
|
|
|
|
else if (!strcmp (tplname, "text_sink"))
|
|
|
|
type = GST_PLAY_SINK_TYPE_TEXT;
|
|
|
|
else
|
|
|
|
goto unknown_template;
|
|
|
|
|
|
|
|
pad = gst_play_sink_request_pad (psink, type);
|
|
|
|
return pad;
|
|
|
|
|
|
|
|
unknown_template:
|
|
|
|
GST_WARNING_OBJECT (element, "Unknown pad template");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
void
|
|
|
|
gst_play_sink_release_pad (GstPlaySink * playsink, GstPad * pad)
|
|
|
|
{
|
|
|
|
GstPad **res = NULL;
|
2009-04-14 11:51:41 +00:00
|
|
|
gboolean untarget = TRUE;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "release pad %" GST_PTR_FORMAT, pad);
|
|
|
|
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
if (pad == playsink->video_pad) {
|
|
|
|
res = &playsink->video_pad;
|
2013-05-21 14:35:18 +00:00
|
|
|
g_signal_handler_disconnect (playsink->video_pad,
|
|
|
|
playsink->video_notify_caps_id);
|
2012-09-04 08:03:25 +00:00
|
|
|
video_set_blocked (playsink, FALSE);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
} else if (pad == playsink->audio_pad) {
|
|
|
|
res = &playsink->audio_pad;
|
2013-05-21 14:35:18 +00:00
|
|
|
g_signal_handler_disconnect (playsink->audio_pad,
|
|
|
|
playsink->audio_notify_caps_id);
|
2012-09-04 08:03:25 +00:00
|
|
|
audio_set_blocked (playsink, FALSE);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
} else if (pad == playsink->text_pad) {
|
|
|
|
res = &playsink->text_pad;
|
2012-09-04 08:03:25 +00:00
|
|
|
text_set_blocked (playsink, FALSE);
|
2009-02-25 11:42:20 +00:00
|
|
|
} else {
|
|
|
|
/* try to release the given pad anyway, these could be the FLUSHING pads. */
|
|
|
|
res = &pad;
|
2009-04-14 11:51:41 +00:00
|
|
|
untarget = FALSE;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
|
|
|
if (*res) {
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "deactivate pad %" GST_PTR_FORMAT, *res);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
gst_pad_set_active (*res, FALSE);
|
2009-04-14 11:51:41 +00:00
|
|
|
if (untarget) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "untargeting pad %" GST_PTR_FORMAT, *res);
|
|
|
|
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (*res), NULL);
|
|
|
|
}
|
2008-12-20 12:48:43 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "remove pad %" GST_PTR_FORMAT, *res);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
gst_element_remove_pad (GST_ELEMENT_CAST (playsink), *res);
|
|
|
|
*res = NULL;
|
|
|
|
}
|
|
|
|
}
|
2009-09-28 19:54:03 +00:00
|
|
|
|
2009-09-08 09:35:20 +00:00
|
|
|
static void
|
|
|
|
gst_play_sink_release_request_pad (GstElement * element, GstPad * pad)
|
|
|
|
{
|
|
|
|
GstPlaySink *psink = GST_PLAY_SINK (element);
|
|
|
|
|
|
|
|
gst_play_sink_release_pad (psink, pad);
|
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
2009-06-01 09:31:49 +00:00
|
|
|
static void
|
|
|
|
gst_play_sink_handle_message (GstBin * bin, GstMessage * message)
|
|
|
|
{
|
|
|
|
GstPlaySink *playsink;
|
|
|
|
|
|
|
|
playsink = GST_PLAY_SINK_CAST (bin);
|
|
|
|
|
|
|
|
switch (GST_MESSAGE_TYPE (message)) {
|
|
|
|
case GST_MESSAGE_STEP_DONE:
|
|
|
|
{
|
|
|
|
GstFormat format;
|
|
|
|
guint64 amount;
|
|
|
|
gdouble rate;
|
2009-08-08 13:54:02 +00:00
|
|
|
gboolean flush, intermediate, eos;
|
2009-06-01 09:31:49 +00:00
|
|
|
guint64 duration;
|
|
|
|
|
|
|
|
GST_INFO_OBJECT (playsink, "Handling step-done message");
|
|
|
|
gst_message_parse_step_done (message, &format, &amount, &rate, &flush,
|
2009-06-12 11:52:02 +00:00
|
|
|
&intermediate, &duration, &eos);
|
2009-06-01 09:31:49 +00:00
|
|
|
|
|
|
|
if (format == GST_FORMAT_BUFFERS) {
|
|
|
|
/* for the buffer format, we align the other streams */
|
|
|
|
if (playsink->audiochain) {
|
|
|
|
GstEvent *event;
|
|
|
|
|
|
|
|
event =
|
|
|
|
gst_event_new_step (GST_FORMAT_TIME, duration, rate, flush,
|
|
|
|
intermediate);
|
|
|
|
|
2009-08-08 13:54:02 +00:00
|
|
|
if (!gst_element_send_event (playsink->audiochain->chain.bin, event)) {
|
2009-06-01 09:31:49 +00:00
|
|
|
GST_DEBUG_OBJECT (playsink, "Event failed when sent to audio sink");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GST_BIN_CLASS (gst_play_sink_parent_class)->handle_message (bin, message);
|
|
|
|
break;
|
|
|
|
}
|
2012-02-23 10:33:27 +00:00
|
|
|
case GST_MESSAGE_ELEMENT:{
|
2012-03-02 09:00:55 +00:00
|
|
|
if (gst_is_video_overlay_prepare_window_handle_message (message)) {
|
|
|
|
GstVideoOverlay *overlay;
|
2012-02-23 10:33:27 +00:00
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
2012-03-02 09:00:55 +00:00
|
|
|
if (playsink->overlay_element
|
|
|
|
&& GST_OBJECT_CAST (playsink->overlay_element) !=
|
2012-02-23 10:33:27 +00:00
|
|
|
GST_MESSAGE_SRC (message)) {
|
2012-03-02 09:00:55 +00:00
|
|
|
gst_object_unref (playsink->overlay_element);
|
|
|
|
playsink->overlay_element = NULL;
|
2012-02-23 10:33:27 +00:00
|
|
|
}
|
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
if (!playsink->overlay_element)
|
|
|
|
playsink->overlay_element =
|
|
|
|
GST_VIDEO_OVERLAY (gst_object_ref (GST_MESSAGE_SRC (message)));
|
|
|
|
overlay =
|
|
|
|
GST_VIDEO_OVERLAY (gst_object_ref (playsink->overlay_element));
|
2012-02-23 10:33:27 +00:00
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (playsink, "Got prepare-xwindow-id message");
|
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
if (playsink->overlay_handle_set)
|
|
|
|
gst_video_overlay_set_window_handle (playsink->overlay_element,
|
|
|
|
playsink->overlay_handle);
|
|
|
|
if (playsink->overlay_handle_events_set)
|
|
|
|
gst_video_overlay_handle_events (playsink->overlay_element,
|
|
|
|
playsink->overlay_handle_events);
|
|
|
|
if (playsink->overlay_render_rectangle_set)
|
|
|
|
gst_video_overlay_set_render_rectangle (playsink->overlay_element,
|
|
|
|
playsink->overlay_x, playsink->overlay_y,
|
|
|
|
playsink->overlay_width, playsink->overlay_height);
|
|
|
|
|
|
|
|
gst_object_unref (overlay);
|
2012-02-23 10:33:27 +00:00
|
|
|
gst_message_unref (message);
|
2012-03-02 09:00:55 +00:00
|
|
|
gst_video_overlay_prepare_window_handle (GST_VIDEO_OVERLAY (playsink));
|
2012-03-05 14:23:20 +00:00
|
|
|
} else {
|
|
|
|
GST_BIN_CLASS (gst_play_sink_parent_class)->handle_message (bin,
|
|
|
|
message);
|
2012-02-23 10:33:27 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2009-06-01 09:31:49 +00:00
|
|
|
default:
|
|
|
|
GST_BIN_CLASS (gst_play_sink_parent_class)->handle_message (bin, message);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
/* Send an event to our sinks until one of them works; don't then send to the
|
|
|
|
* remaining sinks (unlike GstBin)
|
2009-11-03 11:33:40 +00:00
|
|
|
* Special case: If a text sink is set we need to send the event
|
2009-08-18 09:15:41 +00:00
|
|
|
* to them in case it's source is different from the a/v stream's source.
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
*/
|
|
|
|
static gboolean
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
gst_play_sink_send_event_to_sink (GstPlaySink * playsink, GstEvent * event)
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
{
|
|
|
|
gboolean res = TRUE;
|
2012-03-30 21:38:01 +00:00
|
|
|
if (playsink->send_event_mode == MODE_FIRST) {
|
|
|
|
if (playsink->textchain && playsink->textchain->sink) {
|
|
|
|
gst_event_ref (event);
|
|
|
|
if ((res =
|
|
|
|
gst_element_send_event (playsink->textchain->chain.bin, event))) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "Sent event successfully to text sink");
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "Event failed when sent to text sink");
|
|
|
|
}
|
2009-08-18 06:39:02 +00:00
|
|
|
}
|
|
|
|
|
2012-03-30 21:38:01 +00:00
|
|
|
if (playsink->videochain) {
|
|
|
|
gst_event_ref (event);
|
|
|
|
if ((res =
|
|
|
|
gst_element_send_event (playsink->videochain->chain.bin,
|
|
|
|
event))) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "Sent event successfully to video sink");
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
GST_DEBUG_OBJECT (playsink, "Event failed when sent to video sink");
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
2012-03-30 21:38:01 +00:00
|
|
|
if (playsink->audiochain) {
|
|
|
|
gst_event_ref (event);
|
|
|
|
if ((res =
|
|
|
|
gst_element_send_event (playsink->audiochain->chain.bin,
|
|
|
|
event))) {
|
|
|
|
GST_DEBUG_OBJECT (playsink, "Sent event successfully to audio sink");
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
GST_DEBUG_OBJECT (playsink, "Event failed when sent to audio sink");
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
2012-03-30 21:38:01 +00:00
|
|
|
} else {
|
|
|
|
return
|
|
|
|
GST_ELEMENT_CLASS (gst_play_sink_parent_class)->send_event
|
|
|
|
(GST_ELEMENT_CAST (playsink), event);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
2009-08-18 06:39:02 +00:00
|
|
|
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
done:
|
|
|
|
gst_event_unref (event);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* We only want to send the event to a single sink (overriding GstBin's
|
|
|
|
* behaviour), but we want to keep GstPipeline's behaviour - wrapping seek
|
|
|
|
* events appropriately. So, this is a messy duplication of code. */
|
|
|
|
static gboolean
|
|
|
|
gst_play_sink_send_event (GstElement * element, GstEvent * event)
|
|
|
|
{
|
|
|
|
gboolean res = FALSE;
|
|
|
|
GstEventType event_type = GST_EVENT_TYPE (event);
|
2009-06-01 09:31:49 +00:00
|
|
|
GstPlaySink *playsink;
|
|
|
|
playsink = GST_PLAY_SINK_CAST (element);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
switch (event_type) {
|
|
|
|
case GST_EVENT_SEEK:
|
2009-06-01 09:31:49 +00:00
|
|
|
GST_DEBUG_OBJECT (element, "Sending event to a sink");
|
|
|
|
res = gst_play_sink_send_event_to_sink (playsink, event);
|
|
|
|
break;
|
|
|
|
case GST_EVENT_STEP:
|
|
|
|
{
|
|
|
|
GstFormat format;
|
|
|
|
guint64 amount;
|
|
|
|
gdouble rate;
|
|
|
|
gboolean flush, intermediate;
|
|
|
|
gst_event_parse_step (event, &format, &amount, &rate, &flush,
|
|
|
|
&intermediate);
|
|
|
|
if (format == GST_FORMAT_BUFFERS) {
|
|
|
|
/* for buffers, we will try to step video frames, for other formats we
|
|
|
|
* send the step to all sinks */
|
|
|
|
res = gst_play_sink_send_event_to_sink (playsink, event);
|
|
|
|
} else {
|
|
|
|
res =
|
|
|
|
GST_ELEMENT_CLASS (gst_play_sink_parent_class)->send_event (element,
|
|
|
|
event);
|
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
break;
|
2009-06-01 09:31:49 +00:00
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
default:
|
2008-12-10 17:39:32 +00:00
|
|
|
res =
|
|
|
|
GST_ELEMENT_CLASS (gst_play_sink_parent_class)->send_event (element,
|
|
|
|
event);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GstStateChangeReturn
|
|
|
|
gst_play_sink_change_state (GstElement * element, GstStateChange transition)
|
|
|
|
{
|
|
|
|
GstStateChangeReturn ret;
|
2009-05-07 12:28:30 +00:00
|
|
|
GstStateChangeReturn bret;
|
gst/playback/gstplaybin2.c: Code cleanups.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_finalize), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (pad_removed_cb), (drained_cb),
(autoplug_select_cb), (activate_group), (deactivate_group),
(setup_next_source), (save_current_group),
(gst_play_bin_change_state):
Code cleanups.
Remove next-uri, we can use the uri property just fine.
Fix some crasher.
Unref uridecodebin when switching.
Fix going to READY.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_finalize), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(gen_video_chain), (gen_text_element), (gen_audio_chain),
(gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_set_flags),
(gst_play_sink_get_flags), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add some locking to make things threadsafe.
* gst/playback/test7.c: (about_to_finish_cb):
Fix test.
2007-12-28 09:00:27 +00:00
|
|
|
GstPlaySink *playsink;
|
|
|
|
playsink = GST_PLAY_SINK (element);
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
switch (transition) {
|
|
|
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
2009-11-17 15:39:09 +00:00
|
|
|
playsink->need_async_start = TRUE;
|
2009-05-08 11:09:32 +00:00
|
|
|
/* we want to go async to PAUSED until we managed to configure and add the
|
|
|
|
* sinks */
|
2009-05-07 12:28:30 +00:00
|
|
|
do_async_start (playsink);
|
|
|
|
ret = GST_STATE_CHANGE_ASYNC;
|
2012-04-27 14:13:27 +00:00
|
|
|
|
|
|
|
/* block all pads here */
|
2012-06-26 08:54:18 +00:00
|
|
|
if (!gst_play_sink_reconfigure (playsink))
|
|
|
|
ret = GST_STATE_CHANGE_FAILURE;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
break;
|
2010-07-16 16:51:35 +00:00
|
|
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
2011-03-15 11:51:04 +00:00
|
|
|
/* unblock all pads here */
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
2011-06-02 10:08:22 +00:00
|
|
|
video_set_blocked (playsink, FALSE);
|
|
|
|
audio_set_blocked (playsink, FALSE);
|
|
|
|
text_set_blocked (playsink, FALSE);
|
2013-10-02 13:02:44 +00:00
|
|
|
if (playsink->vis_pad_block_id)
|
2014-03-16 16:00:38 +00:00
|
|
|
gst_pad_remove_probe (((GstPlayVisChain *) playsink->vischain)->
|
|
|
|
blockpad, playsink->vis_pad_block_id);
|
2013-10-02 13:02:44 +00:00
|
|
|
playsink->vis_pad_block_id = 0;
|
|
|
|
|
2011-03-15 11:51:04 +00:00
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
/* fall through */
|
2009-05-27 13:36:51 +00:00
|
|
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
2009-05-28 15:21:35 +00:00
|
|
|
if (playsink->audiochain && playsink->audiochain->sink_volume) {
|
2015-07-10 08:53:24 +00:00
|
|
|
/* remove our links to the volume elements when they were
|
2009-05-28 15:21:35 +00:00
|
|
|
* provided by a sink */
|
2013-05-21 14:35:18 +00:00
|
|
|
disconnect_audio_chain (playsink->audiochain, playsink);
|
2015-10-15 01:01:38 +00:00
|
|
|
if (playsink->audiochain->volume)
|
|
|
|
gst_object_unref (playsink->audiochain->volume);
|
2009-05-27 13:36:51 +00:00
|
|
|
playsink->audiochain->volume = NULL;
|
2011-09-05 10:02:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (playsink->audiochain && playsink->audiochain->ts_offset) {
|
|
|
|
gst_object_unref (playsink->audiochain->ts_offset);
|
2010-06-23 08:16:07 +00:00
|
|
|
playsink->audiochain->ts_offset = NULL;
|
2009-05-27 13:36:51 +00:00
|
|
|
}
|
2011-09-05 10:02:23 +00:00
|
|
|
|
|
|
|
if (playsink->videochain && playsink->videochain->ts_offset) {
|
|
|
|
gst_object_unref (playsink->videochain->ts_offset);
|
|
|
|
playsink->videochain->ts_offset = NULL;
|
2009-05-27 13:36:51 +00:00
|
|
|
}
|
2012-02-23 10:33:27 +00:00
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
2012-03-02 09:00:55 +00:00
|
|
|
if (playsink->overlay_element)
|
|
|
|
gst_object_unref (playsink->overlay_element);
|
|
|
|
playsink->overlay_element = NULL;
|
2012-02-23 12:19:55 +00:00
|
|
|
|
|
|
|
if (playsink->colorbalance_element) {
|
2013-05-21 14:35:18 +00:00
|
|
|
g_signal_handler_disconnect (playsink->colorbalance_element,
|
|
|
|
playsink->colorbalance_value_changed_id);
|
2013-07-23 10:35:46 +00:00
|
|
|
playsink->colorbalance_value_changed_id = 0;
|
2012-02-23 12:19:55 +00:00
|
|
|
gst_object_unref (playsink->colorbalance_element);
|
|
|
|
}
|
|
|
|
playsink->colorbalance_element = NULL;
|
2012-02-23 10:33:27 +00:00
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
2009-05-27 13:36:51 +00:00
|
|
|
ret = GST_STATE_CHANGE_SUCCESS;
|
|
|
|
break;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
default:
|
2009-05-08 11:09:32 +00:00
|
|
|
/* all other state changes return SUCCESS by default, this value can be
|
|
|
|
* overridden by the result of the children */
|
2009-05-07 13:19:05 +00:00
|
|
|
ret = GST_STATE_CHANGE_SUCCESS;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2009-05-08 11:09:32 +00:00
|
|
|
/* do the state change of the children */
|
2009-05-07 12:28:30 +00:00
|
|
|
bret =
|
2008-12-10 17:39:32 +00:00
|
|
|
GST_ELEMENT_CLASS (gst_play_sink_parent_class)->change_state (element,
|
|
|
|
transition);
|
2009-05-08 11:09:32 +00:00
|
|
|
/* now look at the result of our children and adjust the return value */
|
|
|
|
switch (bret) {
|
|
|
|
case GST_STATE_CHANGE_FAILURE:
|
|
|
|
/* failure, we stop */
|
|
|
|
goto activate_failed;
|
|
|
|
case GST_STATE_CHANGE_NO_PREROLL:
|
|
|
|
/* some child returned NO_PREROLL. This is strange but we never know. We
|
|
|
|
* commit our async state change (if any) and return the NO_PREROLL */
|
|
|
|
do_async_done (playsink);
|
|
|
|
ret = bret;
|
|
|
|
break;
|
|
|
|
case GST_STATE_CHANGE_ASYNC:
|
|
|
|
/* some child was async, return this */
|
|
|
|
ret = bret;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
/* return our previously configured return value */
|
|
|
|
break;
|
2009-05-07 12:28:30 +00:00
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
|
|
|
|
switch (transition) {
|
|
|
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
|
|
|
break;
|
|
|
|
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
|
|
|
|
/* FIXME Release audio device when we implement that */
|
2009-05-14 20:37:22 +00:00
|
|
|
playsink->need_async_start = TRUE;
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
break;
|
2010-07-16 16:51:35 +00:00
|
|
|
case GST_STATE_CHANGE_PAUSED_TO_READY:{
|
|
|
|
if (playsink->video_sinkpad_stream_synchronizer) {
|
|
|
|
gst_element_release_request_pad (GST_ELEMENT_CAST
|
|
|
|
(playsink->stream_synchronizer),
|
|
|
|
playsink->video_sinkpad_stream_synchronizer);
|
|
|
|
gst_object_unref (playsink->video_sinkpad_stream_synchronizer);
|
|
|
|
playsink->video_sinkpad_stream_synchronizer = NULL;
|
|
|
|
gst_object_unref (playsink->video_srcpad_stream_synchronizer);
|
|
|
|
playsink->video_srcpad_stream_synchronizer = NULL;
|
|
|
|
}
|
|
|
|
if (playsink->audio_sinkpad_stream_synchronizer) {
|
|
|
|
gst_element_release_request_pad (GST_ELEMENT_CAST
|
|
|
|
(playsink->stream_synchronizer),
|
|
|
|
playsink->audio_sinkpad_stream_synchronizer);
|
|
|
|
gst_object_unref (playsink->audio_sinkpad_stream_synchronizer);
|
|
|
|
playsink->audio_sinkpad_stream_synchronizer = NULL;
|
|
|
|
gst_object_unref (playsink->audio_srcpad_stream_synchronizer);
|
|
|
|
playsink->audio_srcpad_stream_synchronizer = NULL;
|
2015-05-26 11:06:50 +00:00
|
|
|
|
|
|
|
gst_play_sink_remove_audio_ssync_queue (playsink);
|
2010-07-16 16:51:35 +00:00
|
|
|
}
|
|
|
|
if (playsink->text_sinkpad_stream_synchronizer) {
|
|
|
|
gst_element_release_request_pad (GST_ELEMENT_CAST
|
|
|
|
(playsink->stream_synchronizer),
|
|
|
|
playsink->text_sinkpad_stream_synchronizer);
|
|
|
|
gst_object_unref (playsink->text_sinkpad_stream_synchronizer);
|
|
|
|
playsink->text_sinkpad_stream_synchronizer = NULL;
|
|
|
|
gst_object_unref (playsink->text_srcpad_stream_synchronizer);
|
|
|
|
playsink->text_srcpad_stream_synchronizer = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* fall through */
|
2009-05-27 13:36:51 +00:00
|
|
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
/* remove sinks we added */
|
2010-04-26 15:30:44 +00:00
|
|
|
if (playsink->videodeinterlacechain) {
|
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->videodeinterlacechain),
|
|
|
|
FALSE);
|
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->videodeinterlacechain), FALSE);
|
|
|
|
}
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
if (playsink->videochain) {
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->videochain), FALSE);
|
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->videochain), FALSE);
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
}
|
|
|
|
if (playsink->audiochain) {
|
gst/playback/gstplaysink.*: Add methods to get audio/video/vis elements.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gst_play_sink_init), (gst_play_sink_dispose),
(gst_play_sink_set_video_sink), (gst_play_sink_get_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_get_audio_sink),
(gst_play_sink_vis_unblocked), (gst_play_sink_vis_blocked),
(gst_play_sink_set_vis_plugin), (gst_play_sink_get_vis_plugin),
(gst_play_sink_set_volume), (gst_play_sink_get_volume),
(gst_play_sink_set_mute), (gen_video_chain), (gen_text_chain),
(gen_audio_chain), (gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_send_event_to_sink), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Add methods to get audio/video/vis elements.
Add methods to set the font description for the overlay.
Remove properties, we're using this element with its methods only.
Add support for subtitles.
Rearrange the locking a bit to not use the object lock for protecting
the pipeline construction.
Try to use the volume and mute property on the sink when its available.
Implement the mute option with volume when the sink does not have a mute
property.
Only add volume element when the sink has no volume property.
Only do visualisations with raw audio pads.
2008-03-24 12:15:26 +00:00
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
gst/playback/gstplay-enum.*: Add enums for configuration flags.
Original commit message from CVS:
* gst/playback/gstplay-enum.c:
(register_gst_autoplug_select_result),
(gst_autoplug_select_result_get_type), (register_gst_play_flags),
(gst_play_flags_get_type):
* gst/playback/gstplay-enum.h:
Add enums for configuration flags.
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(init_group), (gst_play_bin_init), (gst_play_bin_set_property),
(gst_play_bin_get_property), (no_more_pads_cb),
(autoplug_select_cb), (gst_play_bin_change_state):
Merge mode with flags.
Add more property getters/setters, defaults and docs.
Add properties to get number of audio/video/text streams.
Create sink object in _init so that we can always rely on it being
there.
* gst/playback/gstplaysink.c: (gst_play_sink_init),
(gen_video_chain), (gen_audio_chain), (gen_vis_chain),
(activate_vis), (gst_play_sink_reconfigure),
(gst_play_sink_set_flags), (gst_play_sink_get_flags),
(gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Use flags to configure the sink pipelines.
Add tee before audio pipeline so that we can use it for visualisations.
Start working on integrating visualisations.
Remove mode, we can do everything with the flags now.
Add method to configue the sink pipeline.
2008-01-07 11:40:04 +00:00
|
|
|
}
|
2009-03-23 18:40:18 +00:00
|
|
|
if (playsink->vischain) {
|
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->vischain), FALSE);
|
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->vischain), FALSE);
|
|
|
|
}
|
|
|
|
if (playsink->textchain) {
|
|
|
|
activate_chain (GST_PLAY_CHAIN (playsink->textchain), FALSE);
|
|
|
|
add_chain (GST_PLAY_CHAIN (playsink->textchain), FALSE);
|
|
|
|
}
|
2009-05-07 12:28:30 +00:00
|
|
|
do_async_done (playsink);
|
2011-02-23 13:31:13 +00:00
|
|
|
/* when going to READY, keep elements around as long as possible,
|
|
|
|
* so they may be re-used faster next time/url around.
|
|
|
|
* when really going to NULL, clean up everything completely. */
|
|
|
|
if (transition == GST_STATE_CHANGE_READY_TO_NULL) {
|
2011-03-15 13:45:03 +00:00
|
|
|
|
|
|
|
/* Unparent the sinks to allow reuse */
|
|
|
|
if (playsink->videochain && playsink->videochain->sink)
|
|
|
|
gst_bin_remove (GST_BIN_CAST (playsink->videochain->chain.bin),
|
|
|
|
playsink->videochain->sink);
|
|
|
|
if (playsink->audiochain && playsink->audiochain->sink)
|
|
|
|
gst_bin_remove (GST_BIN_CAST (playsink->audiochain->chain.bin),
|
|
|
|
playsink->audiochain->sink);
|
|
|
|
if (playsink->textchain && playsink->textchain->sink)
|
|
|
|
gst_bin_remove (GST_BIN_CAST (playsink->textchain->chain.bin),
|
|
|
|
playsink->textchain->sink);
|
|
|
|
if (playsink->audio_sink != NULL)
|
|
|
|
gst_element_set_state (playsink->audio_sink, GST_STATE_NULL);
|
|
|
|
if (playsink->video_sink != NULL)
|
|
|
|
gst_element_set_state (playsink->video_sink, GST_STATE_NULL);
|
|
|
|
if (playsink->visualisation != NULL)
|
|
|
|
gst_element_set_state (playsink->visualisation, GST_STATE_NULL);
|
|
|
|
if (playsink->text_sink != NULL)
|
|
|
|
gst_element_set_state (playsink->text_sink, GST_STATE_NULL);
|
2011-02-23 13:31:13 +00:00
|
|
|
free_chain ((GstPlayChain *) playsink->videodeinterlacechain);
|
|
|
|
playsink->videodeinterlacechain = NULL;
|
|
|
|
free_chain ((GstPlayChain *) playsink->videochain);
|
|
|
|
playsink->videochain = NULL;
|
|
|
|
free_chain ((GstPlayChain *) playsink->audiochain);
|
|
|
|
playsink->audiochain = NULL;
|
|
|
|
free_chain ((GstPlayChain *) playsink->vischain);
|
|
|
|
playsink->vischain = NULL;
|
|
|
|
free_chain ((GstPlayChain *) playsink->textchain);
|
|
|
|
playsink->textchain = NULL;
|
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return ret;
|
2009-05-07 12:28:30 +00:00
|
|
|
/* ERRORS */
|
|
|
|
activate_failed:
|
|
|
|
{
|
|
|
|
GST_DEBUG_OBJECT (element,
|
|
|
|
"element failed to change states -- activation problem?");
|
|
|
|
return GST_STATE_CHANGE_FAILURE;
|
|
|
|
}
|
gst/playback/: Add playbin2.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/test7.c: (update_scale), (warning_cb), (error_cb),
(eos_cb), (about_to_finish_cb), (main):
Add playbin2.
Added gapless playback example.
* gst/playback/gstplaybasebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c: (gst_play_bin_plugin_init):
* gst/playback/gstqueue2.c:
* gst/playback/test.c:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_class_init),
(pad_removed_cb):
* gst/playback/gststreaminfo.h:
Change email.
* gst/playback/gstplaybin2.c: (gst_play_bin_get_type),
(gst_play_bin_class_init), (init_group), (gst_play_bin_init),
(gst_play_bin_dispose), (gst_play_bin_set_uri),
(gst_play_bin_set_suburi), (gst_play_bin_set_property),
(gst_play_bin_get_property), (gst_play_bin_handle_message),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb), (perform_eos),
(drained_cb), (unlink_group), (activate_group),
(setup_next_source), (gst_play_bin_change_state),
(gst_play_bin2_plugin_init):
Added raw first version of playbin2. Does chained oggs and gapless
playback fine. No support for raw sinks yet. No visualisations or
subtitles yet.
* gst/playback/gstplaysink.c: (gst_play_sink_get_type),
(gst_play_sink_class_init), (gst_play_sink_init),
(gst_play_sink_dispose), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_video_sink),
(gst_play_sink_set_audio_sink), (gst_play_sink_set_vis_plugin),
(gst_play_sink_set_property), (gst_play_sink_get_property),
(post_missing_element_message), (free_chain), (add_chain),
(activate_chain), (gen_video_chain), (gen_text_element),
(gen_audio_chain), (gen_vis_element), (gst_play_sink_get_mode),
(gst_play_sink_set_mode), (gst_play_sink_request_pad),
(gst_play_sink_release_pad), (gst_play_sink_send_event_to_sink),
(gst_play_sink_send_event), (gst_play_sink_change_state):
* gst/playback/gstplaysink.h:
Added Element that abstracts the sinks and their pipelines for playbin2.
2007-11-16 15:44:48 +00:00
|
|
|
}
|
2009-09-08 09:35:20 +00:00
|
|
|
|
2009-09-09 09:17:28 +00:00
|
|
|
static void
|
|
|
|
gst_play_sink_set_property (GObject * object, guint prop_id,
|
|
|
|
const GValue * value, GParamSpec * spec)
|
|
|
|
{
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK (object);
|
|
|
|
switch (prop_id) {
|
|
|
|
case PROP_FLAGS:
|
|
|
|
gst_play_sink_set_flags (playsink, g_value_get_flags (value));
|
|
|
|
break;
|
2009-09-14 10:18:33 +00:00
|
|
|
case PROP_VOLUME:
|
|
|
|
gst_play_sink_set_volume (playsink, g_value_get_double (value));
|
|
|
|
break;
|
|
|
|
case PROP_MUTE:
|
|
|
|
gst_play_sink_set_mute (playsink, g_value_get_boolean (value));
|
|
|
|
break;
|
|
|
|
case PROP_FONT_DESC:
|
|
|
|
gst_play_sink_set_font_desc (playsink, g_value_get_string (value));
|
|
|
|
break;
|
2010-02-21 18:52:45 +00:00
|
|
|
case PROP_SUBTITLE_ENCODING:
|
|
|
|
gst_play_sink_set_subtitle_encoding (playsink,
|
|
|
|
g_value_get_string (value));
|
|
|
|
break;
|
2009-09-14 10:18:33 +00:00
|
|
|
case PROP_VIS_PLUGIN:
|
|
|
|
gst_play_sink_set_vis_plugin (playsink, g_value_get_object (value));
|
|
|
|
break;
|
2010-06-07 12:38:42 +00:00
|
|
|
case PROP_AV_OFFSET:
|
|
|
|
gst_play_sink_set_av_offset (playsink, g_value_get_int64 (value));
|
|
|
|
break;
|
2014-03-16 16:00:38 +00:00
|
|
|
case PROP_VIDEO_FILTER:
|
|
|
|
gst_play_sink_set_filter (playsink, GST_PLAY_SINK_TYPE_VIDEO,
|
|
|
|
g_value_get_object (value));
|
|
|
|
break;
|
|
|
|
case PROP_AUDIO_FILTER:
|
|
|
|
gst_play_sink_set_filter (playsink, GST_PLAY_SINK_TYPE_AUDIO,
|
|
|
|
g_value_get_object (value));
|
|
|
|
break;
|
2011-10-04 14:22:55 +00:00
|
|
|
case PROP_VIDEO_SINK:
|
|
|
|
gst_play_sink_set_sink (playsink, GST_PLAY_SINK_TYPE_VIDEO,
|
|
|
|
g_value_get_object (value));
|
|
|
|
break;
|
2011-10-05 10:45:19 +00:00
|
|
|
case PROP_AUDIO_SINK:
|
|
|
|
gst_play_sink_set_sink (playsink, GST_PLAY_SINK_TYPE_AUDIO,
|
|
|
|
g_value_get_object (value));
|
|
|
|
break;
|
|
|
|
case PROP_TEXT_SINK:
|
|
|
|
gst_play_sink_set_sink (playsink, GST_PLAY_SINK_TYPE_TEXT,
|
|
|
|
g_value_get_object (value));
|
|
|
|
break;
|
2012-03-30 21:38:01 +00:00
|
|
|
case PROP_SEND_EVENT_MODE:
|
|
|
|
playsink->send_event_mode = g_value_get_enum (value);
|
|
|
|
break;
|
2012-06-14 07:29:23 +00:00
|
|
|
case PROP_FORCE_ASPECT_RATIO:{
|
|
|
|
GstPlayVideoChain *chain;
|
|
|
|
GstElement *elem;
|
|
|
|
|
|
|
|
playsink->force_aspect_ratio = g_value_get_boolean (value);
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
if (playsink->videochain) {
|
|
|
|
chain = (GstPlayVideoChain *) playsink->videochain;
|
|
|
|
|
|
|
|
if (chain->sink) {
|
|
|
|
elem =
|
|
|
|
gst_play_sink_find_property_sinks (playsink, chain->sink,
|
|
|
|
"force-aspect-ratio", G_TYPE_BOOLEAN);
|
|
|
|
|
|
|
|
if (elem)
|
|
|
|
g_object_set (elem, "force-aspect-ratio",
|
|
|
|
playsink->force_aspect_ratio, NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
break;
|
|
|
|
}
|
2009-09-09 09:17:28 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, spec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_play_sink_get_property (GObject * object, guint prop_id,
|
|
|
|
GValue * value, GParamSpec * spec)
|
|
|
|
{
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK (object);
|
|
|
|
switch (prop_id) {
|
|
|
|
case PROP_FLAGS:
|
|
|
|
g_value_set_flags (value, gst_play_sink_get_flags (playsink));
|
|
|
|
break;
|
2009-09-14 10:18:33 +00:00
|
|
|
case PROP_VOLUME:
|
|
|
|
g_value_set_double (value, gst_play_sink_get_volume (playsink));
|
|
|
|
break;
|
|
|
|
case PROP_MUTE:
|
|
|
|
g_value_set_boolean (value, gst_play_sink_get_mute (playsink));
|
|
|
|
break;
|
|
|
|
case PROP_FONT_DESC:
|
|
|
|
g_value_take_string (value, gst_play_sink_get_font_desc (playsink));
|
|
|
|
break;
|
2010-02-21 18:52:45 +00:00
|
|
|
case PROP_SUBTITLE_ENCODING:
|
|
|
|
g_value_take_string (value,
|
|
|
|
gst_play_sink_get_subtitle_encoding (playsink));
|
|
|
|
break;
|
2009-09-14 10:18:33 +00:00
|
|
|
case PROP_VIS_PLUGIN:
|
2009-09-28 19:54:03 +00:00
|
|
|
g_value_take_object (value, gst_play_sink_get_vis_plugin (playsink));
|
2009-09-14 10:18:33 +00:00
|
|
|
break;
|
2011-12-01 15:48:49 +00:00
|
|
|
case PROP_SAMPLE:
|
|
|
|
gst_value_take_sample (value, gst_play_sink_get_last_sample (playsink));
|
2010-06-05 08:31:03 +00:00
|
|
|
break;
|
2010-06-07 12:38:42 +00:00
|
|
|
case PROP_AV_OFFSET:
|
|
|
|
g_value_set_int64 (value, gst_play_sink_get_av_offset (playsink));
|
|
|
|
break;
|
2014-03-16 16:00:38 +00:00
|
|
|
case PROP_VIDEO_FILTER:
|
|
|
|
g_value_take_object (value, gst_play_sink_get_filter (playsink,
|
|
|
|
GST_PLAY_SINK_TYPE_VIDEO));
|
|
|
|
break;
|
|
|
|
case PROP_AUDIO_FILTER:
|
|
|
|
g_value_take_object (value, gst_play_sink_get_filter (playsink,
|
|
|
|
GST_PLAY_SINK_TYPE_AUDIO));
|
|
|
|
break;
|
2011-10-04 14:22:55 +00:00
|
|
|
case PROP_VIDEO_SINK:
|
|
|
|
g_value_take_object (value, gst_play_sink_get_sink (playsink,
|
|
|
|
GST_PLAY_SINK_TYPE_VIDEO));
|
|
|
|
break;
|
2011-10-05 10:45:19 +00:00
|
|
|
case PROP_AUDIO_SINK:
|
|
|
|
g_value_take_object (value, gst_play_sink_get_sink (playsink,
|
|
|
|
GST_PLAY_SINK_TYPE_AUDIO));
|
|
|
|
break;
|
|
|
|
case PROP_TEXT_SINK:
|
|
|
|
g_value_take_object (value, gst_play_sink_get_sink (playsink,
|
|
|
|
GST_PLAY_SINK_TYPE_TEXT));
|
|
|
|
break;
|
2012-03-30 21:38:01 +00:00
|
|
|
case PROP_SEND_EVENT_MODE:
|
|
|
|
g_value_set_enum (value, playsink->send_event_mode);
|
|
|
|
break;
|
2012-06-14 07:29:23 +00:00
|
|
|
case PROP_FORCE_ASPECT_RATIO:
|
|
|
|
g_value_set_boolean (value, playsink->force_aspect_ratio);
|
|
|
|
break;
|
2009-09-09 09:17:28 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, spec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-02-23 10:33:27 +00:00
|
|
|
static void
|
2012-03-02 09:00:55 +00:00
|
|
|
gst_play_sink_overlay_expose (GstVideoOverlay * overlay)
|
2012-02-23 10:33:27 +00:00
|
|
|
{
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK (overlay);
|
2012-03-02 09:00:55 +00:00
|
|
|
GstVideoOverlay *overlay_element;
|
2012-02-23 10:33:27 +00:00
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
2012-03-02 09:00:55 +00:00
|
|
|
if (playsink->overlay_element)
|
|
|
|
overlay_element =
|
|
|
|
GST_VIDEO_OVERLAY (gst_object_ref (playsink->overlay_element));
|
2012-02-23 10:33:27 +00:00
|
|
|
else
|
2012-03-02 09:00:55 +00:00
|
|
|
overlay_element = NULL;
|
2012-02-23 10:33:27 +00:00
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
if (overlay_element) {
|
|
|
|
gst_video_overlay_expose (overlay_element);
|
|
|
|
gst_object_unref (overlay_element);
|
2012-02-23 10:33:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-03-02 09:00:55 +00:00
|
|
|
gst_play_sink_overlay_handle_events (GstVideoOverlay * overlay,
|
2012-02-23 10:33:27 +00:00
|
|
|
gboolean handle_events)
|
|
|
|
{
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK (overlay);
|
2012-03-02 09:00:55 +00:00
|
|
|
GstVideoOverlay *overlay_element;
|
2012-02-23 10:33:27 +00:00
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
2012-03-02 09:00:55 +00:00
|
|
|
if (playsink->overlay_element)
|
|
|
|
overlay_element =
|
|
|
|
GST_VIDEO_OVERLAY (gst_object_ref (playsink->overlay_element));
|
2012-02-23 10:33:27 +00:00
|
|
|
else
|
2012-03-02 09:00:55 +00:00
|
|
|
overlay_element = NULL;
|
2012-02-23 10:33:27 +00:00
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
playsink->overlay_handle_events_set = TRUE;
|
|
|
|
playsink->overlay_handle_events = handle_events;
|
2012-02-23 10:33:27 +00:00
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
if (overlay_element) {
|
|
|
|
gst_video_overlay_handle_events (overlay_element, handle_events);
|
|
|
|
gst_object_unref (overlay_element);
|
2012-02-23 10:33:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-03-02 09:00:55 +00:00
|
|
|
gst_play_sink_overlay_set_render_rectangle (GstVideoOverlay * overlay, gint x,
|
2012-02-23 10:33:27 +00:00
|
|
|
gint y, gint width, gint height)
|
|
|
|
{
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK (overlay);
|
2012-03-02 09:00:55 +00:00
|
|
|
GstVideoOverlay *overlay_element;
|
2012-02-23 10:33:27 +00:00
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
2012-03-02 09:00:55 +00:00
|
|
|
if (playsink->overlay_element)
|
|
|
|
overlay_element =
|
|
|
|
GST_VIDEO_OVERLAY (gst_object_ref (playsink->overlay_element));
|
2012-02-23 10:33:27 +00:00
|
|
|
else
|
2012-03-02 09:00:55 +00:00
|
|
|
overlay_element = NULL;
|
2012-02-23 10:33:27 +00:00
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
playsink->overlay_render_rectangle_set = TRUE;
|
|
|
|
playsink->overlay_x = x;
|
|
|
|
playsink->overlay_y = y;
|
|
|
|
playsink->overlay_width = width;
|
|
|
|
playsink->overlay_height = height;
|
2012-02-23 10:33:27 +00:00
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
if (overlay_element) {
|
|
|
|
gst_video_overlay_set_render_rectangle (overlay_element, x, y, width,
|
|
|
|
height);
|
|
|
|
gst_object_unref (overlay_element);
|
2012-02-23 10:33:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-03-02 09:00:55 +00:00
|
|
|
gst_play_sink_overlay_set_window_handle (GstVideoOverlay * overlay,
|
2012-02-23 10:33:27 +00:00
|
|
|
guintptr handle)
|
|
|
|
{
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK (overlay);
|
2012-03-02 09:00:55 +00:00
|
|
|
GstVideoOverlay *overlay_element;
|
2012-02-23 10:33:27 +00:00
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
2012-03-02 09:00:55 +00:00
|
|
|
if (playsink->overlay_element)
|
|
|
|
overlay_element =
|
|
|
|
GST_VIDEO_OVERLAY (gst_object_ref (playsink->overlay_element));
|
2012-02-23 10:33:27 +00:00
|
|
|
else
|
2012-03-02 09:00:55 +00:00
|
|
|
overlay_element = NULL;
|
2012-02-23 10:33:27 +00:00
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
playsink->overlay_handle_set = TRUE;
|
|
|
|
playsink->overlay_handle = handle;
|
2012-02-23 10:33:27 +00:00
|
|
|
|
2012-03-02 09:00:55 +00:00
|
|
|
if (overlay_element) {
|
|
|
|
gst_video_overlay_set_window_handle (overlay_element, handle);
|
|
|
|
gst_object_unref (overlay_element);
|
2012-02-23 10:33:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-03-02 09:00:55 +00:00
|
|
|
gst_play_sink_overlay_init (gpointer g_iface, gpointer g_iface_data)
|
2012-02-23 10:33:27 +00:00
|
|
|
{
|
2012-03-02 09:00:55 +00:00
|
|
|
GstVideoOverlayInterface *iface = (GstVideoOverlayInterface *) g_iface;
|
|
|
|
iface->expose = gst_play_sink_overlay_expose;
|
|
|
|
iface->handle_events = gst_play_sink_overlay_handle_events;
|
|
|
|
iface->set_render_rectangle = gst_play_sink_overlay_set_render_rectangle;
|
|
|
|
iface->set_window_handle = gst_play_sink_overlay_set_window_handle;
|
2012-02-23 10:33:27 +00:00
|
|
|
}
|
|
|
|
|
2012-02-23 10:54:27 +00:00
|
|
|
static void
|
|
|
|
gst_play_sink_navigation_send_event (GstNavigation * navigation,
|
|
|
|
GstStructure * structure)
|
|
|
|
{
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK (navigation);
|
|
|
|
GstBin *bin = NULL;
|
|
|
|
|
|
|
|
GST_PLAY_SINK_LOCK (playsink);
|
|
|
|
if (playsink->videochain && playsink->videochain->chain.bin)
|
|
|
|
bin = GST_BIN (gst_object_ref (playsink->videochain->chain.bin));
|
|
|
|
GST_PLAY_SINK_UNLOCK (playsink);
|
|
|
|
|
|
|
|
if (bin) {
|
|
|
|
GstElement *nav = gst_bin_get_by_interface (bin, GST_TYPE_NAVIGATION);
|
|
|
|
|
|
|
|
if (nav) {
|
|
|
|
gst_navigation_send_event (GST_NAVIGATION (nav), structure);
|
|
|
|
structure = NULL;
|
|
|
|
gst_object_unref (nav);
|
2012-03-15 12:59:38 +00:00
|
|
|
} else {
|
|
|
|
GstEvent *event = gst_event_new_navigation (structure);
|
|
|
|
structure = NULL;
|
|
|
|
gst_element_send_event (GST_ELEMENT (bin), event);
|
2012-02-23 10:54:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gst_object_unref (bin);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (structure)
|
|
|
|
gst_structure_free (structure);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_play_sink_navigation_init (gpointer g_iface, gpointer g_iface_data)
|
|
|
|
{
|
|
|
|
GstNavigationInterface *iface = (GstNavigationInterface *) g_iface;
|
|
|
|
|
|
|
|
iface->send_event = gst_play_sink_navigation_send_event;
|
|
|
|
}
|
|
|
|
|
2012-02-23 12:19:55 +00:00
|
|
|
static const GList *
|
|
|
|
gst_play_sink_colorbalance_list_channels (GstColorBalance * balance)
|
|
|
|
{
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK (balance);
|
|
|
|
|
|
|
|
return playsink->colorbalance_channels;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_play_sink_colorbalance_set_value (GstColorBalance * balance,
|
|
|
|
GstColorBalanceChannel * proxy, gint value)
|
|
|
|
{
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK (balance);
|
|
|
|
GList *l;
|
|
|
|
gint i;
|
|
|
|
GstColorBalance *balance_element = NULL;
|
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
|
|
|
if (playsink->colorbalance_element)
|
|
|
|
balance_element =
|
|
|
|
GST_COLOR_BALANCE (gst_object_ref (playsink->colorbalance_element));
|
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
|
|
|
for (i = 0, l = playsink->colorbalance_channels; l; l = l->next, i++) {
|
|
|
|
GstColorBalanceChannel *proxy_tmp = l->data;
|
|
|
|
gdouble new_val;
|
|
|
|
|
|
|
|
if (proxy_tmp != proxy)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
playsink->colorbalance_values[i] = value;
|
|
|
|
|
|
|
|
if (balance_element) {
|
|
|
|
GstColorBalanceChannel *channel = NULL;
|
|
|
|
const GList *channels, *k;
|
|
|
|
|
|
|
|
channels = gst_color_balance_list_channels (balance_element);
|
|
|
|
for (k = channels; k; k = k->next) {
|
2015-06-10 10:26:38 +00:00
|
|
|
GstColorBalanceChannel *tmp = k->data;
|
2012-02-23 12:19:55 +00:00
|
|
|
|
|
|
|
if (g_strrstr (tmp->label, proxy->label)) {
|
|
|
|
channel = tmp;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
g_assert (channel);
|
|
|
|
|
|
|
|
/* Convert to [0, 1] range */
|
|
|
|
new_val =
|
|
|
|
((gdouble) value -
|
|
|
|
(gdouble) proxy->min_value) / ((gdouble) proxy->max_value -
|
|
|
|
(gdouble) proxy->min_value);
|
|
|
|
/* Convert to channel range */
|
|
|
|
new_val =
|
|
|
|
channel->min_value + new_val * ((gdouble) channel->max_value -
|
|
|
|
(gdouble) channel->min_value);
|
|
|
|
|
|
|
|
gst_color_balance_set_value (balance_element, channel,
|
|
|
|
(gint) (new_val + 0.5));
|
|
|
|
|
|
|
|
gst_object_unref (balance_element);
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_color_balance_value_changed (balance, proxy, value);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
|
|
|
gst_play_sink_colorbalance_get_value (GstColorBalance * balance,
|
|
|
|
GstColorBalanceChannel * proxy)
|
|
|
|
{
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK (balance);
|
|
|
|
GList *l;
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
for (i = 0, l = playsink->colorbalance_channels; l; l = l->next, i++) {
|
|
|
|
GstColorBalanceChannel *proxy_tmp = l->data;
|
|
|
|
|
|
|
|
if (proxy_tmp != proxy)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
return playsink->colorbalance_values[i];
|
|
|
|
}
|
|
|
|
|
|
|
|
g_return_val_if_reached (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
static GstColorBalanceType
|
|
|
|
gst_play_sink_colorbalance_get_balance_type (GstColorBalance * balance)
|
|
|
|
{
|
|
|
|
GstPlaySink *playsink = GST_PLAY_SINK (balance);
|
|
|
|
GstColorBalance *balance_element = NULL;
|
|
|
|
GstColorBalanceType t = GST_COLOR_BALANCE_SOFTWARE;
|
|
|
|
|
|
|
|
GST_OBJECT_LOCK (playsink);
|
|
|
|
if (playsink->colorbalance_element)
|
|
|
|
balance_element =
|
|
|
|
GST_COLOR_BALANCE (gst_object_ref (playsink->colorbalance_element));
|
|
|
|
GST_OBJECT_UNLOCK (playsink);
|
|
|
|
|
|
|
|
if (balance_element) {
|
|
|
|
t = gst_color_balance_get_balance_type (balance_element);
|
|
|
|
gst_object_unref (balance_element);
|
|
|
|
}
|
|
|
|
|
|
|
|
return t;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_play_sink_colorbalance_init (gpointer g_iface, gpointer g_iface_data)
|
|
|
|
{
|
2012-03-02 09:00:55 +00:00
|
|
|
GstColorBalanceInterface *iface = (GstColorBalanceInterface *) g_iface;
|
2012-02-23 12:19:55 +00:00
|
|
|
|
|
|
|
iface->list_channels = gst_play_sink_colorbalance_list_channels;
|
|
|
|
iface->set_value = gst_play_sink_colorbalance_set_value;
|
|
|
|
iface->get_value = gst_play_sink_colorbalance_get_value;
|
|
|
|
iface->get_balance_type = gst_play_sink_colorbalance_get_balance_type;
|
|
|
|
}
|
2009-09-09 09:17:28 +00:00
|
|
|
|
2009-09-08 09:35:20 +00:00
|
|
|
gboolean
|
|
|
|
gst_play_sink_plugin_init (GstPlugin * plugin)
|
|
|
|
{
|
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_play_sink_debug, "playsink", 0, "play bin");
|
|
|
|
return gst_element_register (plugin, "playsink", GST_RANK_NONE,
|
|
|
|
GST_TYPE_PLAY_SINK);
|
|
|
|
}
|