Commit graph

13 commits

Author SHA1 Message Date
Tim-Philipp Müller
1f59906ec1 filesrc, filesink: fix URI creation regression for non-absolute locations
Passing e.g. location=foo would lead to warnings because g_filename_to_uri()
wants an absolute file path and returns NULL otherwise. Use brand-new
gst_filename_to_uri() instead, which will try harder to create a proper
URI for us.

Also add unit test.
2011-02-24 15:36:53 +00:00
Sebastian Dröge
c1c0c86bba file{sink,src}: Check if non-URI characters are escaped, but only for the URI not the location property 2011-02-15 22:57:28 +01:00
Sebastian Dröge
39eeab382c file{src,sink}: Fix unit tests
filesink and filesrc should return exactly the same URI as passed
and must not escape path separators.
2011-02-15 22:57:28 +01:00
Wim Taymans
cc8334905c Don't use gst_element_get_pad().
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_load_and_link):
* gst/gstutils.c: (gst_element_link_pads),
(gst_element_unlink_pads):
* libs/gst/check/gstcheck.c: (gst_check_setup_src_pad),
(gst_check_teardown_src_pad), (gst_check_setup_sink_pad),
(gst_check_teardown_sink_pad),
(gst_check_element_push_buffer_list):
* tests/check/elements/fakesink.c: (GST_START_TEST):
* tests/check/elements/filesink.c:
* tests/check/elements/filesrc.c: (GST_START_TEST):
* tests/check/elements/multiqueue.c: (setup_multiqueue),
(mq_sinkpad_to_srcpad):
* tests/check/elements/tee.c: (GST_START_TEST):
* tests/check/generic/sinks.c: (GST_START_TEST):
* tests/check/gst/gstbin.c: (GST_START_TEST):
* tests/check/gst/gstevent.c: (GST_START_TEST):
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
* tests/check/gst/gstpipeline.c: (GST_START_TEST):
* tests/check/gst/gstquery.c: (GST_START_TEST):
* tests/check/gst/gstutils.c: (GST_START_TEST):
* tests/check/libs/basesrc.c: (GST_START_TEST):
* tests/check/pipelines/parse-launch.c: (run_delayed_test),
(gst_parse_test_element_change_state):
Don't use gst_element_get_pad().
2008-05-21 15:57:52 +00:00
Sebastian Dröge
58cc2ede0a And correct even more valid sparse warnings.
Original commit message from CVS:
* gst/gstelementfactory.h:
* tests/check/elements/fakesink.c:
* tests/check/elements/fakesrc.c: (setup_fakesrc):
* tests/check/elements/fdsrc.c: (setup_fdsrc):
* tests/check/elements/filesink.c: (setup_filesink):
* tests/check/elements/filesrc.c: (setup_filesrc):
* tests/check/elements/identity.c: (setup_identity):
* tests/check/elements/tee.c:
* tests/check/generic/sinks.c:
* tests/check/generic/states.c: (setup), (teardown):
* tests/check/gst/gst.c:
* tests/check/gst/gstabi.c:
* tests/check/gst/gstbin.c:
* tests/check/gst/gstbus.c: (pull_messages):
* tests/check/gst/gstcaps.c:
* tests/check/gst/gstelement.c:
* tests/check/gst/gstevent.c:
* tests/check/gst/gstghostpad.c:
* tests/check/gst/gstiterator.c:
* tests/check/gst/gstmessage.c:
* tests/check/gst/gstminiobject.c: (my_foo_init):
* tests/check/gst/gstobject.c: (thread_name_object),
(gst_object_suite):
* tests/check/gst/gstpad.c:
* tests/check/gst/gstplugin.c:
* tests/check/gst/gstpoll.c:
* tests/check/gst/gstquery.c:
* tests/check/gst/gstsegment.c:
* tests/check/gst/gststructure.c:
* tests/check/gst/gstsystemclock.c:
* tests/check/gst/gsttask.c:
* tests/check/gst/gstutils.c:
* tests/check/gst/gstvalue.c:
* tests/check/gst/struct_hppa.h:
* tests/check/gst/struct_i386.h:
* tests/check/gst/struct_ppc32.h:
* tests/check/gst/struct_ppc64.h:
* tests/check/gst/struct_x86_64.h:
* tests/check/libs/adapter.c: (create_and_fill_adapter):
* tests/check/libs/basesrc.c:
* tests/check/libs/controller.c: (GST_START_TEST):
* tests/check/libs/gdp.c:
* tests/check/libs/gstnetclientclock.c:
* tests/check/libs/gstnettimeprovider.c:
* tests/check/libs/libsabi.c:
* tests/check/libs/struct_hppa.h:
* tests/check/libs/struct_i386.h:
* tests/check/libs/struct_ppc32.h:
* tests/check/libs/struct_ppc64.h:
* tests/check/libs/struct_x86_64.h:
* tests/check/pipelines/cleanup.c:
* tests/check/pipelines/simple-launch-lines.c:
* tests/check/pipelines/stress.c:
And correct even more valid sparse warnings.
* win32/common/libgstreamer.def:
Add gst_poll_fd_init to the list of symbols.
2008-02-29 13:59:24 +00:00
Wim Taymans
f473d72719 libs/gst/base/gstbasesrc.c: Don't update the last_stop position in do_seek, that's the position we did a seek to.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_default_do_seek),
(gst_base_src_loop):
Don't update the last_stop position in do_seek, that's the position we
did a seek to.
Read backwards when we have a negative rate.
* tests/check/elements/filesrc.c: (event_func), (wait_eos),
(setup_filesrc), (cleanup_filesrc), (GST_START_TEST),
(filesrc_suite):
Add check for reverse reading.
2008-01-07 11:23:00 +00:00
Sebastian Dröge
e8f48c03f4 tests/check/elements/filesrc.c: Add unit test for the GstURIHandler interface in filesrc. This also tests the newly a...
Original commit message from CVS:
* tests/check/elements/filesrc.c: (GST_START_TEST),
(filesrc_suite):
Add unit test for the GstURIHandler interface in filesrc. This also
tests the newly added file://localhost/foo/bar support.
2007-02-05 08:15:26 +00:00
Stefan Kost
c9fbb589a0 libs/gst/check/gstcheck.c: do not automatically (de)activate pads
Original commit message from CVS:
* libs/gst/check/gstcheck.c: (gst_check_setup_src_pad),
(gst_check_teardown_src_pad), (gst_check_setup_sink_pad),
(gst_check_teardown_sink_pad):
do not automatically (de)activate pads
* tests/check/Makefile.am:
* tests/check/elements/queue.c: (queue_overrun), (queue_underrun),
(setup_queue), (cleanup_queue), (GST_START_TEST), (queue_suite):
add new, yet simple tests for queue
* tests/check/elements/fakesrc.c: (cleanup_fakesrc):
* tests/check/elements/fdsrc.c: (cleanup_fdsrc):
* tests/check/elements/filesrc.c: (cleanup_filesrc),
(GST_START_TEST):
* tests/check/elements/identity.c: (cleanup_identity):
consistent pad (de)activation
2006-12-21 08:12:28 +00:00
Wim Taymans
21b8eaeab5 Revert fix for regression in #347408 after release.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_update_length):
* tests/check/elements/filesrc.c: (GST_START_TEST):
Revert fix for regression in #347408 after release.
2006-07-14 16:42:20 +00:00
Wim Taymans
1c6b809344 Revert pull-0 fix for release. Disable check. Fixes #347408.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_update_length):
* tests/check/elements/filesrc.c: (GST_START_TEST):
Revert pull-0 fix for release. Disable check. Fixes #347408.
2006-07-13 15:51:05 +00:00
Wim Taymans
ac216fcfdd libs/gst/base/gstbasesrc.c: Update docs. blocksize == 0 now means the default blocksize when working in push based mode.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_wait), (gst_base_src_update_length),
(gst_base_src_get_range), (gst_base_src_default_check_get_range),
(gst_base_src_check_get_range), (gst_base_src_pad_check_get_range),
(gst_base_src_loop), (gst_base_src_start),
(gst_base_src_activate_pull):
Update docs.
blocksize == 0 now means the default blocksize when working in push
based mode.
Remove some pointless asserts in _wait function.
Fix offset/length calculations and EOS handling. We can now pull 0
bytes as well, which is allowed.
use _check_get_range() to decide if we can operate in _pull based
mode.
Fix refcounting leak when check_get_range function was not
implemented.
API GstBaseSrc::blocksize range can be 0 too now (default)
* tests/check/elements/filesrc.c: (GST_START_TEST),
(filesrc_suite):
Added check to test _get_range() behaviour.
2006-07-06 15:46:25 +00:00
Thomas Vander Stichele
904f7041d0 libs/gst/check/gstcheck.c: if we get the wrong message, give us the types as string
Original commit message from CVS:
* libs/gst/check/gstcheck.c: (gst_check_message_error),
(gst_check_run_suite):
if we get the wrong message, give us the types as string
* plugins/elements/gstfilesrc.c: (gst_file_src_start):
Fix a translatable
* tests/check/elements/filesrc.c: (GST_START_TEST):
add a test for trying to open a non-existing file
2006-07-02 23:22:31 +00:00
Thomas Vander Stichele
55856b344c libs/gst/dataprotocol/Makefile.am: build dataprotocol test by linking to the lib, instead of compiling the source, so...
Original commit message from CVS:
* libs/gst/dataprotocol/Makefile.am:
build dataprotocol test by linking to the lib, instead of
compiling the source, so we get coverage
* tests/check/Makefile.am:
* tests/check/elements/filesrc.c: (event_func), (setup_filesrc),
(cleanup_filesrc), (GST_START_TEST), (filesrc_suite):
add a test for filesrc
2006-07-02 09:04:45 +00:00