wtay gst-plugins-base: gst-plugins-base/ gst-plugins-base/gst/playback/
[email protected] Thu, 11 Dec 2008 03:04:28 -0800 (PST)
| Newsgroups | gmane.comp.video.gstreamer.cvs |
|---|---|
| Message-ID | <[email protected]> |
CVS Root: /cvs/gstreamer
Module: gst-plugins-base
Changes by: wtay
Date: Thu Dec 11 2008 11:04:28 UTC
Log message:
* gst/playback/gstplaysink.c: (gen_audio_chain),
(gst_play_sink_reconfigure):
Add some more debug info.
Fix linking of just an encoded sink.
Handle failure to create a sink chain more gracefully than crashing.
Modified files:
. : ChangeLog
gst/playback : gstplaysink.c
Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/ChangeLog.diff?r1=1.4243&r2=1.4244
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/gst/playback/gstplaysink.c.diff?r1=1.22&r2=1.23
====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/ChangeLog,v
retrieving revision 1.4243
retrieving revision 1.4244
diff -u -d -r1.4243 -r1.4244
--- ChangeLog 11 Dec 2008 10:33:46 -0000 1.4243
+++ ChangeLog 11 Dec 2008 11:04:12 -0000 1.4244
@@ -1,5 +1,13 @@
2008-12-11 Wim Taymans <[email protected]>
+ * gst/playback/gstplaysink.c: (gen_audio_chain),
+ (gst_play_sink_reconfigure):
+ Add some more debug info.
+ Fix linking of just an encoded sink.
+ Handle failure to create a sink chain more gracefully than crashing.
+
+2008-12-11 Wim Taymans <[email protected]>
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
Pushing 10 buffers is enough to run the test.
Index: gstplaysink.c
RCS file: /cvs/gstreamer/gst-plugins-base/gst/playback/gstplaysink.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- gstplaysink.c 10 Dec 2008 18:43:32 -0000 1.22
+++ gstplaysink.c 11 Dec 2008 11:04:14 -0000 1.23
@@ -944,6 +944,7 @@
}
if (raw) {
+ GST_DEBUG_OBJECT (playsink, "creating audioconvert");
chain->conv = gst_element_factory_make ("audioconvert", "aconv");
if (chain->conv == NULL) {
post_missing_element_message (playsink, "audioconvert");
@@ -961,6 +962,7 @@
prev = chain->conv;
}
+ GST_DEBUG_OBJECT (playsink, "creating audioresample");
chain->resample = gst_element_factory_make ("audioresample", "aresample");
if (chain->resample == NULL) {
post_missing_element_message (playsink, "audioresample");
@@ -979,6 +981,7 @@
if (!have_volume && playsink->flags & GST_PLAY_FLAG_SOFT_VOLUME) {
+ GST_DEBUG_OBJECT (playsink, "creating volume");
chain->volume = gst_element_factory_make ("volume", "volume");
if (chain->volume == NULL) {
post_missing_element_message (playsink, "volume");
@@ -1008,8 +1011,13 @@
- if (!gst_element_link_pads (prev, "src", chain->sink, NULL))
- goto link_failed;
+ 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");
+ if (!gst_element_link_pads (prev, "src", chain->sink, NULL))
+ goto link_failed;
+ }
/* post a warning if we have no way to configure the volume */
if (!have_volume) {
@@ -1018,6 +1026,7 @@
/* and ghost the sinkpad of the headmost element */
+ GST_DEBUG_OBJECT (playsink, "ghosting sink pad");
pad = gst_element_get_static_pad (head, "sink");
chain->sinkpad = gst_ghost_pad_new ("sink", pad);
gst_object_unref (pad);
@@ -1221,13 +1230,15 @@
playsink->videochain = gen_video_chain (playsink, raw, async);
- 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) {
- GST_DEBUG_OBJECT (playsink, "ghosting video sinkpad");
- gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->video_pad),
- playsink->videochain->sinkpad);
+ if (playsink->videochain) {
+ 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) {
+ GST_DEBUG_OBJECT (playsink, "ghosting video sinkpad");
+ gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->video_pad),
+ playsink->videochain->sinkpad);
+ }
} else {
if (playsink->videochain) {
@@ -1285,9 +1296,11 @@
playsink->audiochain = gen_audio_chain (playsink, raw, queue);
- add_chain (GST_PLAY_CHAIN (playsink->audiochain), TRUE);
- gst_pad_link (playsink->audio_tee_asrc, playsink->audiochain->sinkpad);
- activate_chain (GST_PLAY_CHAIN (playsink->audiochain), TRUE);
+ if (playsink->audiochain) {
+ add_chain (GST_PLAY_CHAIN (playsink->audiochain), TRUE);
+ gst_pad_link (playsink->audio_tee_asrc, playsink->audiochain->sinkpad);
+ activate_chain (GST_PLAY_CHAIN (playsink->audiochain), TRUE);
+ }
/* we have no audio or we are requested to not play audio */
if (playsink->audiochain) {
@@ -1305,14 +1318,16 @@
GST_DEBUG_OBJECT (playsink, "adding visualisation");
- srcpad =
- gst_element_get_static_pad (GST_ELEMENT_CAST (playsink->vischain->
- chain.bin), "src");
- add_chain (GST_PLAY_CHAIN (playsink->vischain), TRUE);
- gst_pad_link (playsink->audio_tee_vissrc, playsink->vischain->sinkpad);
- gst_pad_link (srcpad, playsink->videochain->sinkpad);
- gst_object_unref (srcpad);
- activate_chain (GST_PLAY_CHAIN (playsink->vischain), TRUE);
+ if (playsink->vischain) {
+ srcpad =
+ gst_element_get_static_pad (GST_ELEMENT_CAST (playsink->vischain->
+ chain.bin), "src");
+ add_chain (GST_PLAY_CHAIN (playsink->vischain), TRUE);
+ gst_pad_link (playsink->audio_tee_vissrc, playsink->vischain->sinkpad);
+ gst_pad_link (srcpad, playsink->videochain->sinkpad);
+ gst_object_unref (srcpad);
+ activate_chain (GST_PLAY_CHAIN (playsink->vischain), TRUE);
if (playsink->vischain) {
add_chain (GST_PLAY_CHAIN (playsink->vischain), FALSE);
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/