Inheritance diagram for DvEncoderVideoPipeYUV:


Public Member Functions | |
| bool | OpenVideoPipe (char *pipe, int width, int height, bool interlaced=true) |
| Open the video pipe. | |
| bool | OutputVideoFrame (uint8_t *frame, int size) |
| Output a YUV422 image to the pipe. | |
| bool | CloseVideo () |
| Close the video pipe. | |
Private Attributes | |
| int | width |
| int | height |
| int | m_pid |
| int | m_writer |
| GError * | m_error |
Note that this is not supported by libdv.
Definition at line 683 of file kino_av_pipe.cc.
|
|
Close the video pipe.
Implements KinoVideoPipe. Definition at line 737 of file kino_av_pipe.cc. References m_writer, sigpipe_clear(), and sigpipe_get(). 00738 {
00739 sigpipe_clear();
00740 close( m_writer );
00741 return sigpipe_get() == 0;
00742 }
|
|
||||||||||||||||||||
|
Open the video pipe.
Implements KinoVideoPipe. Definition at line 700 of file kino_av_pipe.cc. References m_error, m_pid, m_writer, sigpipe_clear(), and sigpipe_get(). 00701 {
00702 sigpipe_clear();
00703 char * args[ 4 ];
00704
00705 args[ 0 ] = "/bin/sh";
00706 args[ 1 ] = "-c";
00707 args[ 2 ] = ( char * )pipe;
00708 args[ 3 ] = NULL;
00709
00710 g_spawn_async_with_pipes( ".", args, NULL, G_SPAWN_LEAVE_DESCRIPTORS_OPEN, NULL, NULL, &m_pid, &m_writer, NULL, NULL, &m_error );
00711
00712 this->width = width;
00713 this->height = height;
00714 char output[ 256 ];
00715 sprintf( output, "YUV4MPEG2 W%d H%d F%s %s XYSCSS=422\n", width, height,
00716 height == 576 ? "25:1 A118:81" : "30000:1001 A40:33", interlaced ? "Ib" : "Ip" );
00717 write( m_writer, output, strlen( output ) );
00718 return m_writer != -1 && sigpipe_get() == 0;
00719 }
|
|
||||||||||||
|
Output a YUV422 image to the pipe.
Implements KinoVideoPipe. Definition at line 724 of file kino_av_pipe.cc. References m_writer, sigpipe_clear(), and sigpipe_get(). 00725 {
00726 sigpipe_clear();
00727 char output[ 256 ];
00728 sprintf( output, "FRAME\n" );
00729 write( m_writer, output, strlen( output ) );
00730 write( m_writer, frame, size );
00731 return sigpipe_get() == 0;
00732 }
|
|
|
Definition at line 687 of file kino_av_pipe.cc. |
|
|
Definition at line 689 of file kino_av_pipe.cc. Referenced by OpenVideoPipe(). |
|
|
Definition at line 688 of file kino_av_pipe.cc. Referenced by OpenVideoPipe(). |
|
|
Definition at line 688 of file kino_av_pipe.cc. Referenced by CloseVideo(), OpenVideoPipe(), and OutputVideoFrame(). |
|
|
Definition at line 686 of file kino_av_pipe.cc. |
1.4.2