[FFmpeg-devel] [PATCH] lavd/avdevice: add control message enums
Lukasz Marek
lukasz.m.luki2 at gmail.com
Thu Apr 10 01:18:44 CEST 2014
On 10.04.2014 01:00, wm4 wrote:
> On Thu, 10 Apr 2014 00:51:00 +0200
> Lukasz Marek <lukasz.m.luki2 at gmail.com> wrote:
>
>> Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>
>> ---
>> libavdevice/avdevice.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
>> 1 file changed, 46 insertions(+), 2 deletions(-)
>>
>> diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h
>> index 8b78067..b676934 100644
>> --- a/libavdevice/avdevice.h
>> +++ b/libavdevice/avdevice.h
>> @@ -109,6 +109,14 @@ typedef struct AVDeviceRect {
>> int height; /**< height */
>> } AVDeviceRect;
>>
>> +typedef union AVDeviceValue {
>> + u_int64_t u64;
>> + int64_t i64;
>> + double dbl;
>> + const char *str;
>> + AVRational q;
>> +} AVDeviceValue;
>> +
>> /**
>> * Message types used by avdevice_app_to_dev_control_message().
>> */
>> @@ -137,7 +145,19 @@ enum AVAppToDevMessageType {
>> * data: AVDeviceRect: area required to be repainted.
>> * NULL: whole area is required to be repainted.
>> */
>> - AV_APP_TO_DEV_WINDOW_REPAINT = MKBETAG('R','E','P','A')
>> + AV_APP_TO_DEV_WINDOW_REPAINT = MKBETAG('R','E','P','A'),
>> +
>> + /**
>> + * Request pause/play.
>> + *
>> + * Application requests pause/unpause playback.
>> + * Mostly usable with devices that have internal buffer.
>> + *
>> + * data: NULL
>> + */
>> + AV_APP_TO_DEV_PAUSE = MKBETAG('P', 'A', 'U', ' '),
>> + AV_APP_TO_DEV_PLAY = MKBETAG('P', 'L', 'A', 'Y'),
>> + AV_APP_TO_DEV_TOGGLE_PAUSE = MKBETAG('P', 'A', 'U', 'T')
>
> Wait, why do these enum values use fourcc? Isn't that excessively ugly
> and has literally no advantages?
TBH I dont see any advantage neither, I was asked to add fourcc.
More information about the ffmpeg-devel
mailing list