All of lore.kernel.org
 help / color / mirror / Atom feed
* [Question]: What's right way to use struct media_pipeline?
@ 2015-09-24  1:55 Bryan Wu
  2015-09-24  8:47 ` Hans Verkuil
  0 siblings, 1 reply; 3+ messages in thread
From: Bryan Wu @ 2015-09-24  1:55 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media

Hi Hans,

I found struct media_pipeline actually is completely empty and I assume 
we use that to control all the entities belonging to one media_pipeline.

media_pipeline should contains either all the media_link or all the 
media_entity. How come an empty struct can provide those information?

What about following ideas?
1. when media_entity_create_links, it will return a media_link pointer.
2. we save this media_link pointer into the media_pipeline
3. use this media_pipeline for start streaming, stop streaming and 
validate links.

Maybe I miss something during recent media controller changes.

Thanks,
-Bryan

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Question]: What's right way to use struct media_pipeline?
  2015-09-24  1:55 [Question]: What's right way to use struct media_pipeline? Bryan Wu
@ 2015-09-24  8:47 ` Hans Verkuil
  2015-09-24 17:26   ` Bryan Wu
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Verkuil @ 2015-09-24  8:47 UTC (permalink / raw)
  To: Bryan Wu; +Cc: linux-media

On 09/24/2015 02:55 AM, Bryan Wu wrote:
> Hi Hans,
> 
> I found struct media_pipeline actually is completely empty and I assume we use that to control all the entities belonging to one media_pipeline.
> 
> media_pipeline should contains either all the media_link or all the media_entity. How come an empty struct can provide those information?

It's basically an empty base class to speak in C++ terminology.

See drivers/media/platform/xilinx/xilinx-dma.h on how it is used there.

Laurent Pinchart knows a lot more about it than I do, though.

Regards,

	Hans

> 
> What about following ideas?
> 1. when media_entity_create_links, it will return a media_link pointer.
> 2. we save this media_link pointer into the media_pipeline
> 3. use this media_pipeline for start streaming, stop streaming and validate links.
> 
> Maybe I miss something during recent media controller changes.
> 
> Thanks,
> -Bryan
> 
> -----------------------------------------------------------------------------------
> This email message is for the sole use of the intended recipient(s) and may contain
> confidential information.  Any unauthorized review, use, disclosure or distribution
> is prohibited.  If you are not the intended recipient, please contact the sender by
> reply email and destroy all copies of the original message.
> -----------------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Question]: What's right way to use struct media_pipeline?
  2015-09-24  8:47 ` Hans Verkuil
@ 2015-09-24 17:26   ` Bryan Wu
  0 siblings, 0 replies; 3+ messages in thread
From: Bryan Wu @ 2015-09-24 17:26 UTC (permalink / raw)
  To: Hans Verkuil, laurent.pinchart; +Cc: linux-media



On 09/24/2015 01:47 AM, Hans Verkuil wrote:
> On 09/24/2015 02:55 AM, Bryan Wu wrote:
>> Hi Hans,
>>
>> I found struct media_pipeline actually is completely empty and I assume we use that to control all the entities belonging to one media_pipeline.
>>
>> media_pipeline should contains either all the media_link or all the media_entity. How come an empty struct can provide those information?
> It's basically an empty base class to speak in C++ terminology.
>
> See drivers/media/platform/xilinx/xilinx-dma.h on how it is used there.
>
> Laurent Pinchart knows a lot more about it than I do, though.
>

Hi Laurent,

I have a subdev media entity which have 4 media pads.

pad[0] is sink and pad[1] is source, these 2 pads belong to the first 
media pipeline

pad[2] is sink and pad[3] is source, these 2 pads belong to the second 
media pipeline

Actually our hardware Tegra has 3 these kind of entities, so totally we 
have 6 media pipelines like 6 dma channels.

How to handle that with media pipeline framework? I saw in xilinx driver 
it just has one pipeline which is shared by several DMA channels, right?

-Bryan

>
>> What about following ideas?
>> 1. when media_entity_create_links, it will return a media_link pointer.
>> 2. we save this media_link pointer into the media_pipeline
>> 3. use this media_pipeline for start streaming, stop streaming and validate links.
>>
>> Maybe I miss something during recent media controller changes.
>>
>> Thanks,
>> -Bryan
>>
>> -----------------------------------------------------------------------------------
>> This email message is for the sole use of the intended recipient(s) and may contain
>> confidential information.  Any unauthorized review, use, disclosure or distribution
>> is prohibited.  If you are not the intended recipient, please contact the sender by
>> reply email and destroy all copies of the original message.
>> -----------------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-24 17:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-24  1:55 [Question]: What's right way to use struct media_pipeline? Bryan Wu
2015-09-24  8:47 ` Hans Verkuil
2015-09-24 17:26   ` Bryan Wu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.