Thiago Santos
bc1f57a645
wrappercamerabinsrc: Use drop_eos function from camerabingeneral
...
There was already a event probe function for dropping EOS on
camerabingenereal, so use that instead of replicating the code
2011-01-24 14:50:28 -03:00
Tim-Philipp Müller
eec67aeee6
camerabin2: fix cflags and libs order in Makefile.am
2011-01-03 23:49:51 +00:00
Thiago Santos
95597d8f0e
camerabin2: Various leak fixes
...
Various leak fixes and some code reorganization
2010-12-29 13:24:06 -03:00
Thiago Santos
890c4ab4fd
wrappercamerabinsrc: Implement video capture renegotiate
...
Handle caps renegotiation from camerabin2's renegotiate event
to allow video capture to be done with the user's requested
resolution.
2010-12-29 13:24:06 -03:00
Thiago Santos
203508079a
camerabin2: Fix renegotiate event pushing
...
Use a hack to make the event upstream to reach the camera source
instead of going downstream and being useless.
This was already fixed this way for image srcpad renegotiate and
video srcpad was left unfixed.
2010-12-29 13:24:05 -03:00
Thiago Santos
1c761196f7
wrappercamerabinsrc: Refactor internal pipeline
...
Instead of linking 3 src pads from tee to the ghostpads, use 2
srcpads and add an output-selector to completely split caps
negotiation of video/image modes. I don't think there is an
use case that would require image and video pads to be used
at the same time.
2010-12-29 13:24:05 -03:00
Thiago Santos
1ff89c5f83
videorecordingbin: Fix leaks
2010-12-23 14:24:45 -03:00
Thiago Santos
2513e9f01b
wrappercamerabinsrc: Add converters for viewfinder branch
...
Viewfinder branch should have converters as it has to work
always anyway.
2010-12-23 13:24:56 -03:00
Thiago Santos
450f54b020
viewfinderbin: Remove leaks
...
Removing various leaks from viewfinderbin
2010-12-23 13:24:56 -03:00
Thiago Santos
58d4315965
camerabin2: more logs
2010-12-23 13:24:56 -03:00
Thiago Santos
e94c5b3b9b
wrappercamerabinsrc: Handle camerabin2 custom renegotiate events
2010-12-23 13:24:55 -03:00
Thiago Santos
1e6be5ec56
camerabin2: Use custom renegotiate event
...
Adds a custom renegotiate event that is pushed to the camerasrc pad
that needs renegotiation due to the user selecting a new capture
caps for that pad.
This is a way of notifying the source that it should update its caps, even
if it doesn't use pad allocs.
2010-12-23 13:24:55 -03:00
Thiago Santos
b1a361b566
wrappercamerabinsrc: Add local mode
2010-12-23 13:24:55 -03:00
Thiago Santos
85bf8f2335
camerabin2: Adds properties for capture caps
...
Adds properties for selecting caps for video and image captures
2010-12-23 13:24:55 -03:00
Teemu Katajisto
a7fe67700e
camerabin2: remove abreviations from imagecapturebin
2010-12-23 13:24:55 -03:00
Thiago Santos
539f10f4d9
basecamerasrc: More cleanup
...
Remove old legacy code copied from camerabin(1) that should be handled
by caps negotiation on camerabin2
2010-12-23 13:24:54 -03:00
Thiago Santos
029e63a31e
wrappercamerabinsrc: Remove unused variable
...
Remove wait_for_prepara variable that wasn't being used
2010-12-23 13:24:54 -03:00
Thiago Santos
99210b0a3a
camerabin2: Rename v4l2camerasrc to wrappercamerabinsrc
...
Use a better name for the element that wraps single pad src element
into a 3pad source required by camerabin2.
2010-12-23 13:24:43 -03:00
Thiago Santos
b822ad3cd3
v4l2camerasrc: remove video filter property code
...
Removes some unused custom video filter element property code
2010-12-23 13:20:36 -03:00
Thiago Santos
706740845b
viewfinderbin: Fix video-sink property again
...
Avoid switching the element on the set_property function, instead wait
for the next NULL -> READY transition.
2010-12-23 13:20:36 -03:00
Thiago Santos
07d58dbf84
v4l2camerasrc: add video-src property
...
Adds a property to select the src element to be used internally
on v4l2camerasrc. Yeah, I know, this element should have a better
name.
2010-12-23 13:20:35 -03:00
Thiago Santos
b81677032c
camerabin2: adds PORTING document
...
Adds a PORTING document to explain the differences from
camerabin to camerabin2 and help application developers on
porting from one to another.
2010-12-23 13:20:35 -03:00
Thiago Santos
4938c2e9ea
camerabin2: Move basecamerasrc to gst-libs
...
Move the base camera src class to gst-libs/gst/basecamerabinsrc to
allow it to be included from the tests.
2010-12-23 13:20:31 -03:00
Teemu Katajisto
4a28d5f478
camerabin2: add videorecordingbin::video-muxer property
2010-12-23 13:18:58 -03:00
Teemu Katajisto
c76aeb77e5
camerabin2: add videorecordingbin::video-encoder property
2010-12-23 13:18:58 -03:00
Teemu Katajisto
78dc07987e
camerabin2: remove abbreviations from videorecordingbin
2010-12-23 13:18:58 -03:00
Teemu Katajisto
7409211055
camerabin2: imagecapturebin: release objects and memory allocations
2010-12-23 13:18:58 -03:00
Thiago Santos
59c48d3443
camerabin2: Add camera-src property
...
Adds a property to select the camera source element to be used.
Changing only happens on the next NULL->READY transition
2010-12-23 13:18:57 -03:00
Thiago Santos
adc3cdc6aa
camerabin2: Rename variables
...
Use better name for the variables, making the code clearer. Also
keep a ref for some internal elements to avoid fetching them
by name when needed later.
2010-12-23 13:18:57 -03:00
Thiago Santos
201e9ac221
camerabin2: Add properties for supported capture caps
...
Adds 2 property for getting the supported image/video capture
caps from the camera source.
2010-12-23 13:18:57 -03:00
Thiago Santos
f52d805166
camerabin2: Put enums inside their classes .c
...
Remove global list of properties' enums and put them
inside their classes .c
2010-12-23 13:18:57 -03:00
Thiago Santos
014b8f97f8
viewfinderbin: Fixes to video-sink handling
...
Handle video-sink more carefully, checking if it should
be already added to the bin, and removing old ones when
replacing.
2010-12-23 13:18:57 -03:00
Teemu Katajisto
89142163b1
camerabin2: add imagecapturebin::image-muxer property
2010-12-23 13:18:57 -03:00
Teemu Katajisto
87e0cbff38
camerabin2: add imagecapturebin::image-encoder property
2010-12-23 13:18:57 -03:00
Teemu Katajisto
e5d388698a
camerabin2: remove abreviations from imagecapturebin
2010-12-23 13:18:57 -03:00
André Dieb Martins
7c47fc497f
camerabin2: implement viewfinderbin::video-sink property to override default video output
2010-12-23 13:18:56 -03:00
Thiago Santos
80ff930012
basecamerasrc: Make construct_pipeline optional
...
Construct pipeline should be optional. Subclasses that don't
have internal elements don't need it.
2010-12-23 13:18:56 -03:00
Stefan Kost
ba2368d0bc
basecamerasrc: write more details on the api docs
2010-12-23 12:11:59 -03:00
Stefan Kost
4b23fe6872
basecamerasrc: use the enum type for mode
2010-12-23 12:11:59 -03:00
Stefan Kost
17d5914c59
basecamerasrc: comment cleanups
2010-12-23 12:11:59 -03:00
Sebastian Dröge
b297490b2a
imagecapturebin: Don't leak pad and sink
2010-12-19 12:09:41 +01:00
Sebastian Dröge
9605ff9aa8
imagecapturebin: Don't leak pad template created from static pad template
2010-12-19 12:05:11 +01:00
Sebastian Dröge
073916c9fb
imagecapturebin: Don't leak location string
2010-12-19 12:03:03 +01:00
Thiago Santos
b6d5763e05
basecamerasrc: Remove ghostpads
...
Remove ghost pads from basecamerasrc. Different implementations
of camera sources might not use ghostpads and use default pads.
2010-12-08 15:38:30 -03:00
Thiago Santos
91d8bbd8a1
basecamerasrc: Removing ununsed methods
...
Remove one unused method _finish_image_capture()
2010-12-08 15:38:30 -03:00
Thiago Santos
db72d691ca
camerabin2: Cleanup
...
Removing commented code
2010-12-08 15:38:30 -03:00
Thiago Santos
24bc280806
basecamerasrc: Move start/stop capture signals to basecamerasrc
...
Move start/stop signals and ready-for-capture to basecamerasrc
as this should be present on all camera sources
2010-12-08 15:38:30 -03:00
Thiago Santos
87eddd54d5
basecamerasrc: Add mode property
...
Move mode property from v4l2camerasrc to basecamerasrc, as all
camera sources should handle it.
2010-12-08 15:38:29 -03:00
Thiago Santos
b11342d325
camerabin2: Reset all elements on video recording branch before capture
...
We need to reset the elements from the video recording branch, including
the queue and capsfilter in order to clear the eos state and activate
the pads.
This makes it possible to record multiple videos with camerabin2 in a
sequence, otherwise the source would get a unexpected return and
push EOS, stopping the whole pipeline.
2010-12-08 15:38:29 -03:00
Thiago Santos
5776a17c86
camerabin2: More debug logs
...
Sprinkle some more debugging logs
2010-12-08 15:38:29 -03:00
Thiago Santos
122a7bd556
camerabin2: Various fixes
...
As video recording bin's state is locked, we should always
remember of setting it to NULL when camerabin2 goes to NULL
Be more careful when using elements that might not
have been created yet
And do not set location property recursively on videorecordingbin
2010-12-08 15:38:29 -03:00
Thiago Santos
0685b8921e
viewfinderbin: Improve elements creation
...
Be more careful with cleanup of elements. Also add some logs and
improve docs a little.
2010-12-08 15:38:29 -03:00
Thiago Santos
19e52f35ee
camerabin2: remove unused code
...
General cleanup, removing unused bits
2010-12-08 15:38:28 -03:00
Thiago Santos
ba878c95b2
camerabin2: adds location property
...
Adds a location property to enable applications to select
the captured files names. Locations are handled just like
multifilesink ones
Also disables -Wformat-nonliteral to allow to use non-literals
on g_strdup_printf on camerabin and generate a sequence of
locations for captures.
2010-12-08 15:38:28 -03:00
Thiago Santos
5b3deecab9
camerabin2: Fix set/get property function names
...
Add more consistency to the function names by using
gst_camera_bin as the other functions.
2010-12-08 15:38:28 -03:00
Thiago Santos
cb915196e2
camerabin2: Handle vidbin state change individually
...
Keep vidbin state locked to avoid it going to playing without
being used and leaving an empty file created.
Check the docs on the code for details on the handling.
2010-12-08 15:38:28 -03:00
Thiago Santos
0ae8df4312
camerabin2: Keep it under --enable-experimental
...
camerabin2 is still under heavy development, activate it only if
the --enable-experimental flag is on.
Also add a note to the docs.
2010-12-08 15:38:28 -03:00
Thiago Santos
5be441adff
v4l2camerasrc: Add ready-for-capture property
...
Adds property that informs if v4l2camerasrc is available
for starting a new capture.
It is useful for applications to know (via deep-notify) when the
property changes and a new capture is possible. Note, however, that
starting a new capture from the notify callback will cause a deadlock.
2010-12-08 15:38:28 -03:00
Thiago Santos
bd89d22da9
camerabin2: Update v4l2camerasrc to use start/stop signals
...
Removes the old logic for v4l2camerasrc that used the mode
property switching to start/stop captures to make it identical
to camerabin2 behavior and to allow the future addition of
pausing a video recording.
This also removes the MODE_PREVIEW as it became useless.
2010-12-08 15:38:28 -03:00
Thiago Santos
b4d73cb9a8
camerabin2: Cleanup capturing flag
...
Cleanup capturing flag when the source switches back to the
viewfinder mode
2010-12-08 15:38:28 -03:00
Thiago Santos
9df40915d6
v4l2camerasrc: Remove unnecessary padding
2010-12-08 15:38:28 -03:00
Thiago Santos
91b7f2d99e
v4l2camerasrc: Implement video capture
...
Implements video capture on v4l2camerasrc by using the mode property,
when mode is set to video, the pad probe pushes a new segment
and starts pushing buffers on the pad, when it the property is
sent back to preview, the pad probe pushes an EOS and stops
pushing buffers.
This is controlled by a Recording State variable, that is protected
by the GST_OBJECT_LOCK. I don't think locking for every buffer is
nice, so we could find an alternative lockless way here.
2010-12-08 15:38:28 -03:00
Thiago Santos
596422d19c
v4l2camerasrc: Fix image capture
...
Once a image is captured, v4l2camerasrc should return to the
preview mode and stop capturing.
2010-12-08 15:38:27 -03:00
Thiago Santos
6c7d7946f5
camerabin2: Keep mode definition at -enum file
...
Use 'mode' enum definition from gstcamerabin-enum file to avoid
conflicts between v4l2camerasrc and gstcamerabin2 modes.
For now there is a MODE_PREVIEW there that is only used on the
camerasrc, not sure if we are keeping it at the future, but for
now this works.
2010-12-08 15:38:27 -03:00
Thiago Santos
9095ee429a
v4l2camerasrc: Adds mode property
...
Adds mode property to v4l2camerasrc
2010-12-08 15:38:27 -03:00
Thiago Santos
dee167edc8
camerabin2: Adding debug categories
...
Adding debug categories to v4l2camerasrc and camerabin2, also
removing generic category from camerabingeneral.
2010-12-08 15:38:27 -03:00
Thiago Santos
6c72fed8b4
camerabin2: Adding basic property and signals
...
Adds mode property to camerabin2, allowing users to
select between video and stills capture. Also adds
start/stop capture actions to trigger and stop
capturing
2010-12-08 15:38:27 -03:00
Thiago Santos
a938fd9192
camerabin2: Set filesink's async to FALSE
...
In order to preroll, camerabin2 should have its filesinks in
the imagecapturebin and videorecordingbin with async=FALSE.
2010-12-08 15:38:27 -03:00
Thiago Santos
1887669d6e
camerabin2: Adding basic elements
...
Instantiating and linking basic elements on camerabin2
so it at least shows the viewfinder when running.
2010-12-08 15:38:27 -03:00
Thiago Santos
3db90e1d43
camerabin2: Adds a stub element for camerabin2
...
Adds camerabin2 element, it is now a pile of stubs.
2010-12-08 15:38:27 -03:00
Thiago Santos
39093d2199
camerabin2: v4l2camerasrc: Remove platform specific code
...
Remove platform specific code
2010-12-08 15:38:27 -03:00
Thiago Santos
7f41c2594d
camerabin2: Removing uneeded properties
...
Removing uneeded and unregistered properties.
2010-12-08 15:38:26 -03:00
Thiago Santos
3afa2c3a25
camerabin2: v4l2camerasrc: Fix property warning
...
Avoid setting a property that doesn't exist.
2010-12-08 15:38:26 -03:00
Thiago Santos
fcf80d0253
camerabin2: v4l2camerasrc: Remove unused variable
...
Removed unused leftover variable
2010-12-08 15:38:26 -03:00
Thiago Santos
0dce17a4e8
camerabin2: Adds video recording bin
...
Adds an bin that is responsible for encoding and saving video
streams to files.
For now it is simply a ffmpegcolorspace ! theoraenc ! oggmux !
filesink bin.
Still uncapable of recording audio.
2010-12-08 15:38:26 -03:00
Thiago Santos
94da473ba7
camerabin2: Adding v4l2camerasrc from robclark's branch
...
Adds 3-pad v4l2 camera source from Rob Clark's camerabin
branch on http://gitorious.org/robclark-gstreamer/gst-plugins-bad
2010-12-08 15:38:26 -03:00
Thiago Santos
12245366d8
camerabin2: Adds new imagecapturebin
...
Adds an bin that is responsible for image captures.
It is a simple ffmpegcolorspace ! jpegenc ! jifmux ! multifilesink
for now.
2010-12-08 15:38:26 -03:00
Thiago Santos
3a8ec18f96
camerabin2: Move plugin init to a separate file
...
Moves plugin init to gstplugin.c to allow multiple
elements to register themselves.
2010-12-08 15:38:26 -03:00
Thiago Santos
67415fc412
camerabin2: viewfinderbin: Adds viewfinderbin element
...
Adds viewfinder bin element, one of the modules of camerabin2
that is responsible for displaying the video from the camera.
For now it is only a bin with ffmpegcolorspace ! videoscale !
autovideosink
2010-12-08 15:38:26 -03:00