hrev47615 adds 1 changeset to branch 'master' old head: ea0457cd02d5f76fe1cd584d2bd628dc47c873a1 new head: 22ea661b82e5e8921d1f65114fb0d8c07296aedc overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=22ea661+%5Eea0457c ---------------------------------------------------------------------------- 22ea661: MediaKit: Extend media_[audio|video]_header structures. - This allows a BMediaDecoder (e.g. FFMPEG Plugin) to communicate back format changes to its clients. For a more thorough explanation and discussion see haiku-development mailing list: //www.freelists.org/post/haiku-development/Request-for-protest-Media-Kit-Extend-media-header-struct - Backwards compatibility is taken into account and preserved by reducing the relevant _reserved[] fields. - Code changes that will actually make use of these extensions are due for the following commits. As these structure extensions affect several Haiku components (e.g. media_server, MediaPlayer, etc.) and third party apps (e.g. StampTV, etc.) I refrain from committing them in one batch with this commit. This should make it easier to track down bugs originating in this code change. (cherry picked from commit 806b6888d2dcf84b4934f8f137a48d3381864d1c) [ Colin Günther <coling@xxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev47615 Commit: 22ea661b82e5e8921d1f65114fb0d8c07296aedc URL: http://cgit.haiku-os.org/haiku/commit/?id=22ea661 Author: Colin Günther <coling@xxxxxx> Date: Fri Aug 1 21:32:36 2014 UTC ---------------------------------------------------------------------------- 1 file changed, 15 insertions(+), 4 deletions(-) headers/os/media/MediaDefs.h | 19 +++++++++++++++---- ---------------------------------------------------------------------------- diff --git a/headers/os/media/MediaDefs.h b/headers/os/media/MediaDefs.h index f40e7ab..8cbce1e 100644 --- a/headers/os/media/MediaDefs.h +++ b/headers/os/media/MediaDefs.h @@ -280,8 +280,11 @@ struct media_raw_audio_format { struct media_audio_header { - // TODO: Define this structure, put actual data at the end - int32 _reserved_[16]; + // TODO: Refine this structure and put actual data at the end + int32 _reserved_[14]; + float frame_rate; + uint32 channel_count; + }; @@ -391,8 +394,16 @@ struct media_raw_video_format { struct media_video_header { - uint32 _reserved_[12]; // NOTE: Keep reserved data at the top! - + uint32 _reserved_[8]; // NOTE: Keep reserved data at the top! + + uint32 display_line_width; // Number of pixels per display_line + uint32 display_line_count; // Sum of all interlace fields lines + uint32 bytes_per_row; // Number of bytes in a display_line + // (padding bytes excluded) + uint16 pixel_width_aspect; // 1:1 has 1 here, 4:3 has 4 here + // 16:9 has 16 here! + uint16 pixel_height_aspect;// 1:1 has 1 here, 4:3 has 3 here + // 16:9 has 9 here! float field_gamma; uint32 field_sequence; // Sequence number since start of capture // May roll over if machine is on for a