Re: [PATCH] dvb_frontend: Multistream support

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

 



Em 17-08-2012 14:21, CrazyCat escreveu:
> 
> 16.08.2012, 21:11, "Antti Palosaari" <crope@xxxxxx>:
>>>  - /* ISDB-T specifics */
>>>  - u32 isdbs_ts_id;
>>>  -
>>>  - /* DVB-T2 specifics */
>>>  - u32                     dvbt2_plp_id;
>>>  + /* Multistream specifics */
>>>  + u32 stream_id;
>>
>> u32 == 32 bit long unsigned number. See next comment.
>>>
>>>  - c->isdbs_ts_id = 0;
>>>  - c->dvbt2_plp_id = 0;
>>>  + c->stream_id = -1;
>>
>> unsigned number cannot be -1. It can be only 0 or bigger. Due to that
>> this is wrong.
> 
> so maybe better declare in as int ? depend from standard valid stream id (for DVB is 0-255) and any another value (-1) disable stream filtering in demod.

It should be noticed that DVBv5 will pass it as u32 in any case.
So, maybe it is better to use UINT_MAX as the no-filter value:

/home/v4l/v4l/patchwork/include/linux/kernel.h:#define UINT_MAX	(~0U)


Some care is needed when doing that, to avoid 32bits/64bits compat
conflicts. Also, this define doesn't exist in userspace.

so, maybe using something like:

#define NO_STREAM_ID_FILTER	(~0U)

Would work properly, as, even on 64bits system with 32bits userspace,
this should work

or, if we want to be pedantic:

#define NO_STREAM_ID_FILTER	((u32)(~0U))


> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux