mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
work on sink
This commit is contained in:
parent
bdbddaf75b
commit
a03352353f
9 changed files with 180 additions and 306 deletions
|
|
@ -66,6 +66,24 @@ spa_v4l2_open (SpaV4l2Source *this)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
spa_v4l2_close (SpaV4l2Source *this)
|
||||
{
|
||||
SpaV4l2State *state = &this->state[0];
|
||||
|
||||
if (!state->opened)
|
||||
return 0;
|
||||
|
||||
fprintf (stderr, "close\n");
|
||||
if (close(state->fd))
|
||||
perror ("close");
|
||||
|
||||
state->fd = -1;
|
||||
state->opened = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
uint32_t fourcc;
|
||||
SpaVideoFormat format;
|
||||
|
|
@ -418,24 +436,6 @@ spa_v4l2_set_format (SpaV4l2Source *this, V4l2Format *f, bool try_only)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
spa_v4l2_close (SpaV4l2Source *this)
|
||||
{
|
||||
SpaV4l2State *state = &this->state[0];
|
||||
|
||||
if (!state->opened)
|
||||
return 0;
|
||||
|
||||
fprintf (stderr, "close\n");
|
||||
if (close(state->fd))
|
||||
perror ("close");
|
||||
|
||||
state->fd = -1;
|
||||
state->opened = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
mmap_read (SpaV4l2Source *this)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue