Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] API change: VIDEO_GET_EVENT etc.



Hi,

Unless someone objects, I want to commit the patch below to
linux/dvb/video.h for the DVB and dvb-kernel drivers next week.

It adds the missing definiton for 2.21:1 aspect ratio, and
changes the definition of struct video_event to return both
the size and the aspect ratio for event type VIDEO_EVENT_SIZE_CHANGED.
I also added VIDEO_GET_SIZE because I did not want to change
struct video_status for backward compatiblity reasons.

In the V4 API proposal this stuff will be done somewhat different
(details are not clear yet), this patch is meant to enhance the
current API without problems for existing applications.

Please note that the API documentation states that you can
poll() for video events with POLLPRI.


Regards,
Johannes


--- video.h.orig	2003-04-17 18:52:07.000000000 +0200
+++ video.h	2003-04-17 18:51:55.000000000 +0200
@@ -34,7 +34,8 @@
 
 typedef enum {
 	VIDEO_FORMAT_4_3,     /* Select 4:3 format */ 
-        VIDEO_FORMAT_16_9     /* Select 16:9 format. */ 
+        VIDEO_FORMAT_16_9,    /* Select 16:9 format. */
+	VIDEO_FORMAT_221_1    /* 2.21:1 */
 } video_format_t;
 
 
@@ -56,6 +57,11 @@
 	VIDEO_CENTER_CUT_OUT  /* use center cut out format */
 } video_displayformat_t;
 
+typedef struct {
+	int w;
+	int h;
+	video_format_t aspect_ratio;
+} video_size_t;
 
 typedef enum {
         VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */ 
@@ -74,9 +80,10 @@
 
 struct video_event { 
         int32_t type; 
+#define VIDEO_EVENT_SIZE_CHANGED 1
         time_t timestamp;
 	union { 
-	        video_format_t video_format;
+	        video_size_t size;
 	} u; 
 };
 
@@ -186,6 +193,7 @@
 #define VIDEO_SET_SPU_PALETTE      _IOW('o', 51, video_spu_palette_t)
 #define VIDEO_GET_NAVI             _IOR('o', 52, video_navi_pack_t)
 #define VIDEO_SET_ATTRIBUTES       _IO('o', 53)
+#define VIDEO_GET_SIZE             _IOR('o', 55, video_size_t)
 
 #endif /*_DVBVIDEO_H_*/
 


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index