Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
luzpaz
gstreamer
Commits
19c455db
Commit
19c455db
authored
Nov 23, 2005
by
Thomas Vander Stichele
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove obsolete tests
Original commit message from CVS: remove obsolete tests
parent
3e94eb90
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
174 deletions
+0
-174
tests/instantiate/create.c
tests/instantiate/create.c
+0
-55
tests/negotiation/.gitignore
tests/negotiation/.gitignore
+0
-1
tests/negotiation/Makefile.am
tests/negotiation/Makefile.am
+0
-5
tests/negotiation/capsnego1.c
tests/negotiation/capsnego1.c
+0
-113
No files found.
tests/instantiate/create.c
deleted
100644 → 0
View file @
3e94eb90
/* GStreamer
* Copyright (C) 1999 Erik Walthinsen <omega@cse.ogi.edu>
*
* create.c: test which instantiates all elements and unrefs them
*
* 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
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst.h>
static
void
create_all_elements
(
void
)
{
const
GList
*
elements
;
GstElementFactory
*
factory
;
GstElement
*
element
;
GstRegistry
*
registry
;
registry
=
gst_registry_get_default
();
/* get list of elements */
for
(
elements
=
gst_registry_get_feature_list
(
registry
,
GST_TYPE_ELEMENT_FACTORY
);
elements
!=
NULL
;
elements
=
elements
->
next
)
{
factory
=
(
GstElementFactory
*
)
elements
->
data
;
if
((
element
=
gst_element_factory_create
(
factory
,
"test"
)))
{
gst_object_unref
(
element
);
}
}
}
gint
main
(
gint
argc
,
gchar
*
argv
[])
{
gst_init
(
&
argc
,
&
argv
);
create_all_elements
();
return
0
;
}
tests/negotiation/.gitignore
deleted
100644 → 0
View file @
3e94eb90
capsnego1
tests/negotiation/Makefile.am
deleted
100644 → 0
View file @
3e94eb90
noinst_PROGRAMS
=
capsnego1
LDADD
=
$(GST_OBJ_LIBS)
AM_CFLAGS
=
$(GST_OBJ_CFLAGS)
tests/negotiation/capsnego1.c
deleted
100644 → 0
View file @
3e94eb90
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
*
* 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
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <gst/gst.h>
static
void
caps_nego_failed
(
GstPad
*
pad
,
GstCaps
*
caps
)
{
gboolean
res
;
GstPad
*
peer
;
GstCaps
*
allowed
;
GValue
v_caps
=
{
0
,
};
GValue
v_allowed
=
{
0
,
};
GstCaps
*
toset
;
peer
=
gst_pad_get_peer
(
pad
);
g_value_init
(
&
v_caps
,
GST_TYPE_CAPS
);
g_value_set_boxed
(
&
v_caps
,
caps
);
allowed
=
gst_pad_get_allowed_caps
(
pad
);
g_value_init
(
&
v_allowed
,
GST_TYPE_CAPS
);
g_value_set_boxed
(
&
v_allowed
,
allowed
);
g_print
(
"caps nego failed on pad %s:%s
\n
"
" caps: %p (%s)
\n
"
" allowed: %p (%s)
\n
"
,
gst_element_get_name
(
gst_pad_get_parent
(
pad
)),
gst_pad_get_name
(
pad
),
caps
,
g_strdup_value_contents
(
&
v_caps
),
allowed
,
g_strdup_value_contents
(
&
v_allowed
));
if
(
GST_CAPS_IS_FIXED
(
caps
))
/* if the elements suggested fixed caps, we just relink that way */
toset
=
caps
;
else
/* else we use our hardcoded caps as an exazmple */
toset
=
GST_CAPS_NEW
(
"testcaps"
,
"test/test"
,
"prop"
,
GST_PROPS_INT
(
2
)
);
res
=
gst_pad_relink_filtered
(
pad
,
peer
,
toset
);
if
(
!
res
)
{
g_warning
(
"could not relink identity and sink
\n
"
);
}
}
gint
main
(
gint
argc
,
gchar
*
argv
[])
{
GstElement
*
pipeline
;
GstElement
*
src
,
*
identity
,
*
sink
;
gboolean
res
;
gst_init
(
&
argc
,
&
argv
);
pipeline
=
gst_pipeline_new
(
"pipeline"
);
src
=
gst_element_factory_make
(
"fakesrc"
,
"src"
);
g_object_set
(
G_OBJECT
(
src
),
"num_buffers"
,
4
,
NULL
);
identity
=
gst_element_factory_make
(
"identity"
,
"identity"
);
g_object_set
(
G_OBJECT
(
identity
),
"delay_capsnego"
,
TRUE
,
NULL
);
sink
=
gst_element_factory_make
(
"fakesink"
,
"sink"
);
gst_bin_add_many
(
GST_BIN
(
pipeline
),
src
,
identity
,
sink
,
NULL
);
res
=
gst_element_link_pads_filtered
(
src
,
"src"
,
identity
,
"sink"
,
GST_CAPS_NEW
(
"testcaps"
,
"test/test"
,
"prop"
,
GST_PROPS_INT
(
1
)
));
if
(
!
res
)
{
g_print
(
"could not link src and identity
\n
"
);
return
-
1
;
}
res
=
gst_element_link_pads_filtered
(
identity
,
"src"
,
sink
,
"sink"
,
GST_CAPS_NEW
(
"testcaps"
,
"test/test"
,
"prop"
,
GST_PROPS_INT_RANGE
(
2
,
3
)
));
if
(
!
res
)
{
g_print
(
"could not link identity and sink
\n
"
);
return
-
1
;
}
g_signal_connect
(
gst_element_get_pad
(
identity
,
"src"
),
"caps_nego_failed"
,
G_CALLBACK
(
caps_nego_failed
),
NULL
);
g_signal_connect
(
pipeline
,
"deep_notify"
,
G_CALLBACK
(
gst_element_default_deep_notify
),
NULL
);
g_signal_connect
(
pipeline
,
"error"
,
G_CALLBACK
(
gst_element_default_error
),
NULL
);
gst_element_set_state
(
pipeline
,
GST_STATE_PLAYING
);
while
(
gst_bin_iterate
(
GST_BIN
(
pipeline
)));
gst_element_set_state
(
pipeline
,
GST_STATE_NULL
);
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment