Skip to contentSkip to conversation

Pause/Resume and flush for V4L2 codec drivers.

DISCUSSION [email protected] 3 participants 5 messages Jan 6, 2012 – Jan 11, 2012 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi

I am trying to implement v4l2 driver for video decoders. The problem I am facing is how to send pause/resume and flush commands from user-space to v4l2 driver. I am thinking of using controls for this. Has anyone done this before or if anyone has any ideas please let me know. Appreciate your help.

Thanks
Vinay

#1 lore raw
Quoted 7 lines · On Friday, January 06, 2012 03:31:37 [email protected] wrote:

Hi

I am trying to implement v4l2 driver for video decoders. The problem I am facing is how to send pause/resume and flush commands from user-space to v4l2 driver. I am thinking of using controls for this. Has anyone done this before or if anyone has any ideas please let me know. Appreciate your help.

See this patch series:

http://www.mail-archive.com/[email protected]/msg40516.html

Does this give you what you need?

Regards,

Hans

Quoted 9 lines

Thanks
Vinay

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

#2 lore raw

Thanks Hans.

Yes it does solve a part of my problem - Pause/Resume. But I dont see any command defined for Flush yet. Do you think we should add one more command to Flush. Also, I see two more commands

#define V4L2_DEC_CMD_START (0)
#define V4L2_DEC_CMD_STOP (1)

How should I use the above two commands for an encoding/decoding session? I was calling start/stop to hardware in streamon/streamoff earlier.

Thanks
Vinay

Quoted 36 lines · On Friday, January 06, 2012 03:31:37 [email protected] wrote:
Quoted 9 lines

Hi

I am trying to implement v4l2 driver for video decoders. The problem I am
facing is how to send pause/resume and flush commands from user-space to v4l2 driver. I am thinking of using controls for this. Has anyone done this before or if anyone has any ideas please let me know. Appreciate your
help.

See this patch series:

http://www.mail-archive.com/[email protected]/msg40516.html

Does this give you what you need?

Regards,

Hans

Quoted 10 lines

Thanks
Vinay

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 5 lines · On Saturday 07 January 2012 02:55:08 [email protected] wrote:

Thanks Hans.

Yes it does solve a part of my problem - Pause/Resume. But I dont see any command defined for Flush yet. Do you think we should add one more command to Flush.

What exactly does flush do? Is it the equivalent of an immediate stop?

Quoted 7 lines

Also, I see two more commands

#define V4L2_DEC_CMD_START (0)
#define V4L2_DEC_CMD_STOP (1)

How should I use the above two commands for an encoding/decoding session? I was calling start/stop to hardware in streamon/streamoff earlier.

See the documentation of these commands in patch 2/8: a write() or streamon does an implicit decoder start, and close/streamoff() does an implicit immediate stop.

For hardware codecs that handle a compressed stream (as opposed to separate compressed frames) it is often very useful to implement the read/write API. That tends to be a natural API to use. E.g. you can just do:

cat test.mpg >/dev/videoX

Regards,

Hans

Quoted 38 lines

Thanks
Vinay

Quoted 34 lines · On Friday, January 06, 2012 03:31:37 [email protected] wrote:
Quoted 9 lines

Hi

I am trying to implement v4l2 driver for video decoders. The problem I am
facing is how to send pause/resume and flush commands from user-space to v4l2 driver. I am thinking of using controls for this. Has anyone done this before or if anyone has any ideas please let me know. Appreciate your
help.

See this patch series:

http://www.mail-archive.com/[email protected]/msg40516.html

Does this give you what you need?

Regards,

Hans

Quoted 8 lines

Thanks
Vinay

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
In reply to [email protected]

Hi Vinay,

Quoted 7 lines · On Friday 06 January 2012 03:31:37 [email protected] wrote:

Hi

I am trying to implement v4l2 driver for video decoders. The problem I am facing is how to send pause/resume and flush commands from user-space to v4l2 driver. I am thinking of using controls for this. Has anyone done this before or if anyone has any ideas please let me know. Appreciate your help.

Is this a memory-to-memory device, or a live stream decoder ?

Signature · 3 lines
Regards,

Laurent Pinchart