Commit graph

9441 commits

Author SHA1 Message Date
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
8fb8822532 examples: Adds camerabin2 example
Adds gtk camerabin2 example app
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
Alessandro Decina
5c097c447b dvbsuboverlay: fix compiler warnings on OSX. 2010-12-08 19:36:48 +01:00
Stefan Kost
a8c488aefa output-selector-test: don't hardcode videosinks and use more colorspace conv.
Use autovideosink instead of hardcoded sinks. Use an additional colorspace
converter between videotestsrc and timeoverlay.
2010-12-08 17:39:11 +02:00
Tim-Philipp Müller
dd3fe6ad3c configure: require released versions of core/base instead of old git 2010-12-08 16:30:12 +01:00
Mark Nauwelaerts
26877f66c9 mpeg4videoparse: re-use cleanup() in finalize()
... and also favor finalize() rather than dispose().
2010-12-08 16:30:12 +01:00
Arun Raghavan
5b442d0712 mpeg4videoparse: Set srcpad caps before forwarding newsegment
This holds all newsegement and most other events till there is enough
data to set srcpad caps, so that the downstream link is properly
negotiated before data starts flowing.

https://bugzilla.gnome.org/show_bug.cgi?id=635204
2010-12-08 16:30:12 +01:00
Arun Raghavan
8f30fca636 mpeg4videoparse: Use sinkpad caps as base for srcpad caps
This way, we don't lose additional fields that come from upstream (like
profile/level for now).

https://bugzilla.gnome.org/show_bug.cgi?id=635202
2010-12-08 16:30:12 +01:00
Mark Nauwelaerts
522f470883 mpeg4videoparse: minor fix to error handling
We weren't handling unparseable codec_data in some cases.

https://bugzilla.gnome.org/show_bug.cgi?id=635202
2010-12-08 16:30:12 +01:00
Sebastian Dröge
04eb581480 dvbsuboverlay: Implement nearest neighbour scaling for the subpictures
This becomes necessary when SDTV subtitles are used for HDTV videos.
2010-12-08 16:30:12 +01:00
Mark Nauwelaerts
de85aef333 h264parse: align code with comment 2010-12-08 16:30:12 +01:00
Mark Nauwelaerts
26d69e63d4 h264parse: re-use reset() in finalize() 2010-12-08 16:30:12 +01:00
Arun Raghavan
6f966febce h264parse: Set srcpad caps before forwarding newsegment
This holds all newsegement and most other events till there is enough
data to set srcpad caps, so that the downstream link is properly
negotiated before data starts flowing.

https://bugzilla.gnome.org/show_bug.cgi?id=635205
2010-12-08 16:30:12 +01:00
Mark Nauwelaerts
74fb627a08 jpegparse: try to convert comment tag to UTF-8 2010-12-08 16:30:11 +01:00
Mark Nauwelaerts
49d7f207cb jpegparse: discard incomplete image
... as determined when finding SOI next image before an EOI.
2010-12-08 16:30:11 +01:00
Mark Nauwelaerts
0a26e138dd jpegparse: avoid infinite loop when resyncing 2010-12-08 16:30:11 +01:00
Arun Raghavan
7abe0a56af audioparse: Allow implicit channel map for 1-/2-channel audio
This makes sure we don't set an empty channel map array for 1-/2-channel
audio, causing an assert later on.
2010-12-08 16:30:11 +01:00
Sebastian Dröge
8974371914 dvbsuboverlay: Revert some parts of last commit that shouldn't be committed 2010-12-08 16:30:11 +01:00
Sebastian Dröge
68b8fca047 dvbsuboverlay: Really choose the latest possible subpictures
And not the first subpictures that are still valid according to the
page timeout.
2010-12-08 16:30:11 +01:00
Sebastian Dröge
e25a1dc0cc dvbsuboverlay: Refactor blending function and take average of all chroma values 2010-12-08 16:30:11 +01:00
Sebastian Dröge
2282a08890 dvbsuboverlay: Improve selection of current to be displayed subpictures
Drop all subpictures that are too old anyway and clear the currently
displayed subpictures if num_rects==0 happens.
2010-12-08 16:30:11 +01:00
Sebastian Dröge
01cf79ae59 dvbsuboverlay: Implement clipping of video buffers
Also don't clip subpicture buffers, they have no duration and
clipping them doesn't make much sense here.
2010-12-08 16:30:11 +01:00
Sebastian Dröge
672cb276be dvbsuboverlay: Clean up locking some more 2010-12-08 16:30:10 +01:00
Sebastian Dröge
92109fdfbc dvbsuboverlay: Flush subtitles and all internal state when needed 2010-12-08 16:30:10 +01:00
Sebastian Dröge
472cace08b dvbsuboverlay: Set the global library log function exactly once
And don't use one of the possibly many renderer instances, this is only
calling for crashes.
2010-12-08 16:30:10 +01:00
Sebastian Dröge
2a976ae133 dvbsuboverlay: Remove lots of commented out and unused code and clean up locking 2010-12-08 16:30:10 +01:00
Mart Raudsepp
a203ad1aab dvbsuboverlay: Fix more of the blending, so it looks quite good now
* libdvbsub gives us alpha channel already, not transparency level, so
don't do another "alpha = 255 - alpha", this is done by libdvbsub.
* Fix alpha channel handling in interpolation - assrender had an additional
1bpp alpha bitmap as a possible mask, we don't. So don't use the palette
index array as alpha values; bug from quick code porting long ago to
changing pixel colors (assrender has a single pixel color for whole
regions or something, unlike dvbsub, which has indexed colors).
* Don't forget to reassign our YUV and other local pixel color variables
after shifting to work on the bottom part of a 2x2 subsample block, or
it's obviously very blocky.

Remaining issues in blending:

* Should probably be interpolating or doing something else useful with the
resulting U and V channels, so that most of the source pixel UV values would
actually be actually cared about, except for just one out of possibly four.

* Don't convert AYUV to ARGB in libdvbsub, and then back from ARGB to AYUV in
dvbsuboverlay for no reason

* Re-factor the whole thing to something more like textoverlay blending
* Related to that, perhaps cache the current spu in a good format for quick
blending on each frame, after which the more often called blending parts
might become more straightforward
2010-12-08 16:30:10 +01:00
Mart Raudsepp
efa1e9a1fe dvbsuboverlay: Fix blending bug regarding color channel addressing.
libdvbsub gives us ARGB ordered pixels right now, not RGBA.
2010-12-08 16:30:10 +01:00
Mart Raudsepp
21abf9c4a8 dvbsuboverlay: Do blending calls when appropriate
This gives us actually shown subtitles, however with bugs in the
current blitting code, resulting in very transparent subtitles.
2010-12-08 16:30:10 +01:00
Mart Raudsepp
84b52f6eb4 dvbsuboverlay: Implement fallback page_time_out honoring
The spec has a page_time_out in the page composition segment to ensure
subtitles don't get stuck on screen for too much longer than intended,
when future page composition segments get lost on bad reception, or other
problems. Honor it in the gst plugin side.
2010-12-08 16:30:10 +01:00
Mart Raudsepp
3d09a3b18a dvbsuboverlay: Implement subtitle queueing and syncing with video
Push incoming subtitle pages in a FIFO queue (pending_subtitles)
and dequeue the head when it's time to show it (when video running
time reaches the subtitle page running time).
Keep the subtitle page, that is supposed to be blended on top of video
currently, in a separate object variable (current_subtitle). As a
next step we can then pre-render current_subtitle to a better to blend
format.
2010-12-08 16:30:10 +01:00
Mart Raudsepp
41c82583f5 dvbsuboverlay: Make the new dvb_subtitles_free() accept NULL
Don't crash if dvb_subtitles_free(NULL) gets passed, like most other
*_free functions are happy with.
2010-12-08 16:30:10 +01:00