* go7007 development
@ 2008-10-17 15:21 Pete
2008-10-17 15:36 ` Hans Verkuil
0 siblings, 1 reply; 5+ messages in thread
From: Pete @ 2008-10-17 15:21 UTC (permalink / raw)
To: video4linux-list; +Cc: Greg KH, Dean Anderson
Hello,
I am working on adding the Sensoray 2250 to the go7007 staging tree,
starting from GregKH's staging patch here:
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
gregkh-05-staging-2.6.27.patch
In particular, we are stuck how to change the MPEG format with standard
IOCTL calls. In particular, this comment in the driver go7007.h below
needs explanation:
/* DEPRECATED -- use V4L2_PIX_FMT_MPEG and then call GO7007IOC_S_MPEG_PARAMS
* to select between MPEG1, MPEG2, and MPEG4 */
#define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M','P','G','4') /* MPEG4 */
The existing driver, for backward-compatibility , allowed
V4L2_PIX_FMT_MPEG4 to be used for v4l2_format.pixelformat with
VIDIOC_S_FMT.
GO7007IOC_S_MPEG_PARAMS is a custom ioctl call and we would rather have
this done through v4l2 calls. We also can't seem to find where MPEG1,
MPEG2, and MPEG4 elementary streams are defined in the V4L2 API. We
checked other drivers, but could not find anything. The closest thing
we found was the V4L2_CID_MPEG_STREAM_TYPE control, but the enums do not
define elementary streams nor MPEG4.
Your advice is appreciated.
Thanks.
--
Pete Eberlein
Sensoray Co., Inc.
Email: pete@sensoray.com
http://www.sensoray.com
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: go7007 development 2008-10-17 15:21 go7007 development Pete @ 2008-10-17 15:36 ` Hans Verkuil 2008-10-17 16:07 ` Dean Anderson 2008-10-24 23:43 ` [PATCH] Add MPEG4 and Elementary streams (was Re: go7007 development) Pete Eberlein 0 siblings, 2 replies; 5+ messages in thread From: Hans Verkuil @ 2008-10-17 15:36 UTC (permalink / raw) To: video4linux-list; +Cc: Greg KH, Dean Anderson Hi Pete, On Friday 17 October 2008 17:21:51 Pete wrote: > Hello, > > I am working on adding the Sensoray 2250 to the go7007 staging tree, > starting from GregKH's staging patch here: > http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ > gregkh-05-staging-2.6.27.patch > > In particular, we are stuck how to change the MPEG format with > standard IOCTL calls. In particular, this comment in the driver > go7007.h below needs explanation: > > /* DEPRECATED -- use V4L2_PIX_FMT_MPEG and then call > GO7007IOC_S_MPEG_PARAMS * to select between MPEG1, MPEG2, and MPEG4 > */ > #define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M','P','G','4') /* MPEG4 > */ > > The existing driver, for backward-compatibility , allowed > V4L2_PIX_FMT_MPEG4 to be used for v4l2_format.pixelformat with > VIDIOC_S_FMT. > > GO7007IOC_S_MPEG_PARAMS is a custom ioctl call and we would rather > have this done through v4l2 calls. We also can't seem to find where > MPEG1, MPEG2, and MPEG4 elementary streams are defined in the V4L2 > API. We checked other drivers, but could not find anything. The > closest thing we found was the V4L2_CID_MPEG_STREAM_TYPE control, but > the enums do not define elementary streams nor MPEG4. > > Your advice is appreciated. > > Thanks. It would be really nice to have this driver in the kernel. All MPEG streams use V4L2_PIX_FMT_MPEG and set the exact stream type through V4L2_CID_MPEG_STREAM_TYPE. You probably need to add a few new stream types to this control for the elementary streams. I think something like TYPE_MPEG_ELEM might do the trick, and then you can use the audio and video encoding controls to select the precise audio/video encoding. I don't know enough about the capabilities, so perhaps TYPE_MPEG1/2/4_ELEM is required instead of a more generic TYPE_MPEG_ELEM. Since I designed the MPEG API for V4L2 I guess I'm the right person to help you. I also have a Plextor TV402U since I always wanted to get the go7007 driver into the kernel, but I never had the time so I'm glad you've picked it up. Regards, Hans -- video4linux-list mailing list Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: go7007 development 2008-10-17 15:36 ` Hans Verkuil @ 2008-10-17 16:07 ` Dean Anderson 2008-10-17 16:21 ` Hans Verkuil 2008-10-24 23:43 ` [PATCH] Add MPEG4 and Elementary streams (was Re: go7007 development) Pete Eberlein 1 sibling, 1 reply; 5+ messages in thread From: Dean Anderson @ 2008-10-17 16:07 UTC (permalink / raw) To: Hans Verkuil; +Cc: Greg KH, video4linux-list Hans Verkuil wrote: > Hi Pete, > > On Friday 17 October 2008 17:21:51 Pete wrote: > >> Hello, >> >> I am working on adding the Sensoray 2250 to the go7007 staging tree, >> starting from GregKH's staging patch here: >> http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ >> gregkh-05-staging-2.6.27.patch >> >> In particular, we are stuck how to change the MPEG format with >> standard IOCTL calls. In particular, this comment in the driver >> go7007.h below needs explanation: >> >> /* DEPRECATED -- use V4L2_PIX_FMT_MPEG and then call >> GO7007IOC_S_MPEG_PARAMS * to select between MPEG1, MPEG2, and MPEG4 >> */ >> #define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M','P','G','4') /* MPEG4 >> */ >> >> The existing driver, for backward-compatibility , allowed >> V4L2_PIX_FMT_MPEG4 to be used for v4l2_format.pixelformat with >> VIDIOC_S_FMT. >> >> GO7007IOC_S_MPEG_PARAMS is a custom ioctl call and we would rather >> have this done through v4l2 calls. We also can't seem to find where >> MPEG1, MPEG2, and MPEG4 elementary streams are defined in the V4L2 >> API. We checked other drivers, but could not find anything. The >> closest thing we found was the V4L2_CID_MPEG_STREAM_TYPE control, but >> the enums do not define elementary streams nor MPEG4. >> >> Your advice is appreciated. >> >> Thanks. >> > > It would be really nice to have this driver in the kernel. > > All MPEG streams use V4L2_PIX_FMT_MPEG and set the exact stream type > through V4L2_CID_MPEG_STREAM_TYPE. You probably need to add a few new > stream types to this control for the elementary streams. I think > something like TYPE_MPEG_ELEM might do the trick, and then you can use > the audio and video encoding controls to select the precise audio/video > encoding. > > I don't know enough about the capabilities, so perhaps > TYPE_MPEG1/2/4_ELEM is required instead of a more generic > TYPE_MPEG_ELEM. > > The generic approach seems better. There will be boards with H264 encapsulated in MPEG2 transport stream. I'd recommend keeping the encapsulation/mux format in V4L2_CID_MPEG_STREAM_TYPE, but not necessarily the encoding. Otherwise you'll have V4L2_MPEG_STREAM_TYPE_MPEG2_TS_MPEG4_ENCODING, etc.. Maybe V4L2_CID_MPEG_STREAM_TYPE needs a comment that it is the encapsulation(or mux format), and the encoding should be defined in V4L2_CID_MPEG_VIDEO_ENCODING? So for this Go7007, we suggest adding V4L2_MPEG_STREAM_TYPE_ELEM to V4L2_CID_MPEG_STREAM_TYPE. We also suggest adding V4L2_MPEG_VIDEO_ENCODING_MPEG_4 to V4L2_CID_MPEG_VIDEO_ENCODING. Of course, there is the question of what version of MPEG4, but we'll leave that for another day. What do you think? > Since I designed the MPEG API for V4L2 I guess I'm the right person to > help you. I also have a Plextor TV402U since I always wanted to get the > go7007 driver into the kernel, but I never had the time so I'm glad > you've picked it up. > > Regards, > > Hans > > Good to hear, and thanks for the quick response. Dean -- Dean Anderson Sensoray Co., Inc. Email: dean@sensoray.com http://www.sensoray.com -- video4linux-list mailing list Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: go7007 development 2008-10-17 16:07 ` Dean Anderson @ 2008-10-17 16:21 ` Hans Verkuil 0 siblings, 0 replies; 5+ messages in thread From: Hans Verkuil @ 2008-10-17 16:21 UTC (permalink / raw) To: Dean Anderson; +Cc: Greg KH, video4linux-list On Friday 17 October 2008 18:07:41 Dean Anderson wrote: > Hans Verkuil wrote: > > Hi Pete, > > > > On Friday 17 October 2008 17:21:51 Pete wrote: > >> Hello, > >> > >> I am working on adding the Sensoray 2250 to the go7007 staging > >> tree, starting from GregKH's staging patch here: > >> http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ > >> gregkh-05-staging-2.6.27.patch > >> > >> In particular, we are stuck how to change the MPEG format with > >> standard IOCTL calls. In particular, this comment in the driver > >> go7007.h below needs explanation: > >> > >> /* DEPRECATED -- use V4L2_PIX_FMT_MPEG and then call > >> GO7007IOC_S_MPEG_PARAMS * to select between MPEG1, MPEG2, and > >> MPEG4 */ > >> #define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M','P','G','4') /* > >> MPEG4 */ > >> > >> The existing driver, for backward-compatibility , allowed > >> V4L2_PIX_FMT_MPEG4 to be used for v4l2_format.pixelformat with > >> VIDIOC_S_FMT. > >> > >> GO7007IOC_S_MPEG_PARAMS is a custom ioctl call and we would rather > >> have this done through v4l2 calls. We also can't seem to find > >> where MPEG1, MPEG2, and MPEG4 elementary streams are defined in > >> the V4L2 API. We checked other drivers, but could not find > >> anything. The closest thing we found was the > >> V4L2_CID_MPEG_STREAM_TYPE control, but the enums do not define > >> elementary streams nor MPEG4. > >> > >> Your advice is appreciated. > >> > >> Thanks. > > > > It would be really nice to have this driver in the kernel. > > > > All MPEG streams use V4L2_PIX_FMT_MPEG and set the exact stream > > type through V4L2_CID_MPEG_STREAM_TYPE. You probably need to add a > > few new stream types to this control for the elementary streams. I > > think something like TYPE_MPEG_ELEM might do the trick, and then > > you can use the audio and video encoding controls to select the > > precise audio/video encoding. > > > > I don't know enough about the capabilities, so perhaps > > TYPE_MPEG1/2/4_ELEM is required instead of a more generic > > TYPE_MPEG_ELEM. > > The generic approach seems better. There will be boards with H264 > encapsulated in MPEG2 transport stream. I'd recommend keeping the > encapsulation/mux format in V4L2_CID_MPEG_STREAM_TYPE, but not > necessarily the encoding. > > Otherwise you'll have V4L2_MPEG_STREAM_TYPE_MPEG2_TS_MPEG4_ENCODING, > etc.. Maybe V4L2_CID_MPEG_STREAM_TYPE needs a comment that it is the > encapsulation(or mux format), and the encoding should be defined in > V4L2_CID_MPEG_VIDEO_ENCODING? I think the v4l2 spec is clear enough on this topic. > So for this Go7007, we suggest adding V4L2_MPEG_STREAM_TYPE_ELEM to > V4L2_CID_MPEG_STREAM_TYPE. > We also suggest adding V4L2_MPEG_VIDEO_ENCODING_MPEG_4 to > V4L2_CID_MPEG_VIDEO_ENCODING. Of course, there is the question of > what version of MPEG4, but we'll leave that for another day. > > What do you think? Agreed. Note that V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC already exists in the master v4l-dvb tree http://linuxtv.org/hg/v4l-dvb, also some newer audio encodings. These are merged in the latest 2.6.28 git tree as well. When the go7007 driver has stabilized a bit and switched to the generic ioctls rather than using custom ioctls then you probably want to have you code merged in v4l-dvb. I expect a lot of internal API additions and improvements in the coming months so it's probably good to pay attention to the master tree to see what is happening there. > > > Since I designed the MPEG API for V4L2 I guess I'm the right person > > to help you. I also have a Plextor TV402U since I always wanted to > > get the go7007 driver into the kernel, but I never had the time so > > I'm glad you've picked it up. > > > > Regards, > > > > Hans > > Good to hear, and thanks for the quick response. No problem. Regards, Hans -- video4linux-list mailing list Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Add MPEG4 and Elementary streams (was Re: go7007 development) 2008-10-17 15:36 ` Hans Verkuil 2008-10-17 16:07 ` Dean Anderson @ 2008-10-24 23:43 ` Pete Eberlein 1 sibling, 0 replies; 5+ messages in thread From: Pete Eberlein @ 2008-10-24 23:43 UTC (permalink / raw) To: Hans Verkuil; +Cc: video4linux-list, Dean Anderson Hello Hans, On Fri, 2008-10-17 at 17:36 +0200, Hans Verkuil wrote: > All MPEG streams use V4L2_PIX_FMT_MPEG and set the exact stream type > through V4L2_CID_MPEG_STREAM_TYPE. You probably need to add a few new > stream types to this control for the elementary streams. I think > something like TYPE_MPEG_ELEM might do the trick, and then you can use > the audio and video encoding controls to select the precise audio/video > encoding. Here is a patch that adds the two defines we need for the go7007 driver extended MPEG controls. Please consider it for inclusion in the v4l-dvb tree. V4L2_MPEG_STREAM_TYPE_MPEG_ELEM will be used for elementary MPEG streams, whose type and encoding will be determined by examining a header in the stream. For more information, see http://en.wikipedia.org/wiki/Elementary_stream V4L2_MPEG_VIDEO_ENCODING_MPEG_4 will be used for MPEG-4 Part 2 (Simple Profile, Advanced Simple Profile, etc) encoding. This is not the same as MPEG-4 AVC (Part 10, Advanced Video Coding). Thanks. -- Pete Eberlein Sensoray Co., Inc. Email: pete@sensoray.com http://www.sensoray.com Signed-off-by: Pete Eberlein <pete@sensoray.com> --- diff -r fe810917c6ca linux/include/linux/videodev2.h --- a/linux/include/linux/videodev2.h Fri Oct 24 13:19:14 2008 -0200 +++ b/linux/include/linux/videodev2.h Fri Oct 24 09:57:46 2008 -0700 @@ -892,6 +892,7 @@ enum v4l2_mpeg_stream_type { V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3, /* MPEG-2 DVD-compatible stream */ V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4, /* MPEG-1 VCD-compatible stream */ V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */ + V4L2_MPEG_STREAM_TYPE_MPEG_ELEM = 6, /* MPEG elementary stream */ }; #define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_MPEG_BASE+1) #define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_MPEG_BASE+2) @@ -1027,6 +1028,7 @@ enum v4l2_mpeg_video_encoding { V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0, V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1, V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC = 2, + V4L2_MPEG_VIDEO_ENCODING_MPEG_4 = 3, }; #define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_MPEG_BASE+201) enum v4l2_mpeg_video_aspect { -- video4linux-list mailing list Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-24 23:44 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-10-17 15:21 go7007 development Pete 2008-10-17 15:36 ` Hans Verkuil 2008-10-17 16:07 ` Dean Anderson 2008-10-17 16:21 ` Hans Verkuil 2008-10-24 23:43 ` [PATCH] Add MPEG4 and Elementary streams (was Re: go7007 development) Pete Eberlein
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox