Commit graph

113 commits

Author SHA1 Message Date
Wim Taymans e32e8f6c52 video: Improve video frame map/unmap
Install defaul map/unmap function on the metadata and really call the functions
instead of always calling a default implementation.
Rework some bits so that we don't have to mess with the GstMapInfo information
(adding the offset), instead pass the adjusted data pointer from the map function.
2012-02-23 16:50:28 +01:00
Wim Taymans e615e4c2cf video: add performance log for frame copy 2012-02-09 16:03:35 +01:00
Wim Taymans f31d5d7505 debug: add some performance debug 2012-02-09 15:28:54 +01:00
Wim Taymans bfa00d0996 video: mark endianness correctly 2012-02-06 18:33:59 +01:00
Wim Taymans fcdc385aa1 port to new map API 2012-01-25 12:30:53 +01:00
Wim Taymans 5872bcc33a Update for memory API changes 2012-01-19 12:15:18 +01:00
Wim Taymans 21bf4f04f3 video: fix some video formats
Rename the offset field in GstVideoFormatInfo to poffset to avoid confusion with
the offset of the plane in the buffer. The poffset is the offset in the plane
where the first byte of the component data can be found.
Properly implement the COMP_OFFSET calculations.
Fix YV12 and YVU9, simply use the same offsets as the regular I420 and YUV9
variants, we use the plane info to reorder components already.
Improve the unit test.
2012-01-02 13:30:53 +01:00
Wim Taymans 6241ff63f8 video: update interlace caps and docs
Remove interlaced boolean from caps and replace with an interlace-mode enum.
document this new property in the video caps document. With the enum we can
put fields into separate video meta.
Add enum for this interlace-mode in the VideoInfo.
Update the buffer flags.
2011-12-19 18:03:45 +01:00
Tim-Philipp Müller ec0d3566bf Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	ext/alsa/gstalsasrc.c
	ext/alsa/gstalsasrc.h
	gst/adder/gstadder.c
	gst/playback/gstplaybin2.c
	gst/playback/gstplaysinkconvertbin.c
	win32/common/libgstvideo.def
2011-12-02 00:07:39 +00:00
Alessandro Decina 848711706b libgstvideo: minor fixes to key unit events
Make out args to gst_video_event_parse_{downstream|upstream}_force_key_unit
optional, update libgstvideo.def and fix docs a bit.

API: gst_video_event_new_upstream_force_key_unit
API: gst_video_event_new_downstream_force_key_unit
API: gst_video_event_is_force_key_unit
API: gst_video_event_parse_upstream_force_key_unit
API: gst_video_event_parse_downstream_force_key_unit

https://bugzilla.gnome.org/show_bug.cgi?id=607742
2011-11-29 09:15:59 +01:00
Andoni Morales Alastruey df44e771f1 libgstvideo: Add force key unit events 2011-11-29 08:58:28 +01:00
Vincent Penquerc'h ea78b060a7 Revert "libgstvideo: add a new API to handle QoS events and dropping logic"
This reverts commit eb03323fb6.

*grumble* I managed to merge something I did not mean to.
2011-11-28 13:26:53 +00:00
Vincent Penquerc'h eb03323fb6 libgstvideo: add a new API to handle QoS events and dropping logic
https://bugzilla.gnome.org/show_bug.cgi?id=658241
2011-11-28 12:34:43 +00:00
René Stadler 8023733da8 video: init chroma-size and colorimetry members even if missing from caps
This makes a TRUE return from gst_video_info_from_caps fully consistent with
gst_video_info_init.
2011-11-11 19:57:25 +01:00
Wim Taymans 06a6ab3e32 video: add support for max-framerate
Add support for max-framerate in the video helpers and update the video
caps document.
2011-11-11 13:14:21 +01:00
Stefan Sauer e9629e37b7 video: log important details and fix format strings
If we complain about wrong parameters passed, also log the actual value.
2011-11-08 09:32:00 +01:00
Tim-Philipp Müller d7fc45f42e docs: fix up some Since: markers 2011-11-07 23:05:44 +00:00
Wim Taymans e067e67923 rename meta* -> *meta 2011-11-02 09:04:27 +01:00
René Stadler 372cf41a6d audio, video: init audio/video format info to UNKNOWN format
This is to prevent e.g. GST_AUDIO_INFO_FORMAT() from crashing on a NULL pointer
dereference when used with an unset info.
2011-10-28 11:24:00 +02:00
Thiago Santos 123671bc05 libs: video: Add protection against null strings
Check and assert if input for gst_video_format_from_string is null.
Return GST_VIDEO_FORMAT_UNKNOWN as a fallback
2011-10-09 17:05:15 -03:00
Wim Taymans f04b8fd8af audio/video add descriptions
Add a description to the audio and video format info in case we want to use this
later.
2011-09-06 16:46:48 +02:00
Wim Taymans 1bb83435fd video: Add an id to the video frame
Rename @view_id to @id.
Add an id to the video metadata. Add a method to get the metadata from a buffer
with the given id.
Make a method to map a frame with a certain id. This only maps the frame with
the given id on the video metadata. The generic frame id can be used when a
buffer carries multiple video frames such as in multiview mode but maybe also
when dealing with interlaced video that stores the fields in separate buffers.
2011-08-24 13:52:20 +02:00
Wim Taymans e78b66f5a3 video: fix chroma-site enums 2011-08-23 20:34:24 +02:00
Wim Taymans 14ad322e8b video: avoid gst-indent breaking the code 2011-08-23 19:23:03 +02:00
Wim Taymans 9ad89374a3 video: add colorimetry info
Make enums for the chroma siting for easier use in the videoinfo.
Make enums for the color range, color matrix, transfer function and the
color primaries. Add these values to the video info structure in a Colorimetry
structure. These values define the exact colors and are needed to perform
correct colorspace conversion. Use a couple of predefined colorimetry specs
because in practice only a few combinations are in use.
Add view_id to the video frames to identify the view this frame represents in
multiview video.
Remove old gst_video_parse_caps_framerate, use the videoinfo for this.
Port elements to new colorimetry info.
Remove deprecated colorspace property from videotestsrc.
2011-08-23 18:57:35 +02:00
Wim Taymans 00a30b5cfd video: parse number of views
Parse the number of views in multiview video buffers.
2011-08-22 15:57:30 +02:00
Wim Taymans 26c9db9280 video: improve debug 2011-08-04 15:18:03 +02:00
Wim Taymans 68088f7992 video: add more info in the format structure
Add a field to describe how many bits are used to pack items.
Specify the shift for each component.
Add some more flags to better describe the format.
2011-07-25 18:08:24 +02:00
Mark Nauwelaerts 40aad050e2 video: init video info to some sensible defaults 2011-07-10 21:47:12 +02:00
Wim Taymans ddce68a5c2 video: More video helper library improvements
Make a new GstVideoFormatinfo structure that contains the specific information
related to a format such as the number of planes, components, subsampling,
pixel stride etc. The result is that we are now able to introduce the concept of
components again in the API.
Use tables to specify the formats and its properties.
Use macros to get information about the video format description.
Move code to set strides, offsets and size into one function.
Remove methods that are not handled with the structures.
Add methods to retrieve pointers and strides to the components in the video.
2011-07-04 16:01:14 +02:00
Wim Taymans 1d9deae5be video: add video copy function
Add a function to copy a video frame, taking care of source and destination
strides.
2011-06-22 15:25:35 +02:00
Wim Taymans 6d9e76f2de video: remove intermediate Plane structure
Remove the GstVideoPlane structure and move the fields directly into the
GstVideoInfo structure. This makes things a little easier to read and also makes
it more likely that we can pass the stride array to external libraries.
2011-06-20 11:25:58 +02:00
Wim Taymans 20d8d3050c video: use metadata to set up strides
Use the GstMetaVideo when we can to map the buffers and set up the strides.
2011-06-17 16:47:25 +02:00
Wim Taymans 42abb6672e video: Add GstVideoFrame helper structure
The videoframe structure can be used to easily parse the contents of video
buffers.
2011-06-17 15:41:31 +02:00
Wim Taymans 6a254de438 video: port to new API
Add support for palette again.
Rewrite setup code for videoconvert using the new video methods.
2011-06-17 15:39:50 +02:00
Wim Taymans 1aa7ad7dae video: rework part 2
Update docs.
Add method to get number of components.
Implement method to calculate defaults from format and dimensions.
Improve caps parsing.
Implement GstVideoInfo to caps conversion.
2011-06-17 15:37:38 +02:00
Wim Taymans a7ae8d41aa video: rework part 1
Add GstVideoFlags similar to the flags on the metadata. The idea is to replace
the metadata flags with the GstVideoFlags.
Move VideoPlane to video.h, it contains the information for a plane.
Add GstVideoInfo structure that holds the current configuration of a video
format.
Add methods to parse caps into GstVideoInfo.
2011-06-17 15:33:12 +02:00
Wim Taymans 3b9477e173 video: add methods to parse X11 visuals
Add method to convert X11 visual description to GstVideoFormat
2011-06-16 12:52:13 +02:00
Wim Taymans 42fa1010cb video: update video caps 2011-06-16 12:52:13 +02:00
Wim Taymans a87c021237 Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/video/convertframe.c
2011-05-24 09:47:15 +02:00
Stefan Kost ce1369a7e5 docs: add missing parameter docs 2011-05-24 00:12:26 +03:00
Stefan Kost b91b12b639 whitespace: trim trailing whitespace 2011-05-23 13:53:06 +03:00
Stefan Kost 6e12954c68 video.c: use a break and a final warning instead of early returns
Use breaks for case branches instead of return 0. We don't expect these to
happen anyway. Thus have a warning before the final return to make it easier to
see when things go out of sync.
2011-05-23 13:50:59 +03:00
Stefan Kost 40273cf2d3 video.c: use g_assert_not_reached() for logical error here.
This will help to detect them closer to the source if they ever happen.
2011-05-23 13:50:09 +03:00
Wim Taymans 489eed9bb8 Merge branch 'master' into 0.11 2011-05-19 11:31:53 +02:00
Robert Swain ad2010d379 gstvideo: Add gst_video_get_size_from_caps function
gst_video_get_size_from_caps () allows easy calculation of the raw video
buffer size from some fixed video caps.

API: gst_video_get_size_from_caps()
2011-05-18 14:13:46 +02:00
Wim Taymans ec57868488 -base: don't use buffer caps
Port to newest 0.11 core API, remove GST_PAD_CAPS and GST_BUFFER_CAPS.
2011-05-09 13:05:12 +02:00
David Schleef ef3712b427 Revert "video: Remove the extensive checkings from switch"
This reverts commit 500d14c35c.
2011-04-14 12:42:20 -07:00
Sreerenj Balachandran 500d14c35c video: Remove the extensive checkings from switch
The default case handles them already
2011-04-14 10:02:42 +02:00
Sebastian Dröge a29e55f9c4 video: Fix creation of grayscale caps
The endianness was not set correctly before.

Fixes bug #646923.
2011-04-07 10:06:53 +02:00