|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* This file is part of libbluray
|
|
Packit |
5e46da |
* Copyright (C) 2009-2010 John Stebbins
|
|
Packit |
5e46da |
* Copyright (C) 2012 Petri Hintukainen <phintuka@users.sourceforge.net>
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* This library is free software; you can redistribute it and/or
|
|
Packit |
5e46da |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
5e46da |
* License as published by the Free Software Foundation; either
|
|
Packit |
5e46da |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
5e46da |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
5e46da |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
5e46da |
* Lesser General Public License for more details.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
5e46da |
* License along with this library. If not, see
|
|
Packit |
5e46da |
* <http://www.gnu.org/licenses/>.
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#if HAVE_CONFIG_H
|
|
Packit |
5e46da |
#include "config.h"
|
|
Packit |
5e46da |
#endif
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#include "uo_mask.h"
|
|
Packit |
5e46da |
#include "uo_mask_table.h"
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#include "util/bits.h"
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#include <string.h>
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
int
|
|
Packit |
5e46da |
uo_mask_parse(const uint8_t *buf, BD_UO_MASK *uo)
|
|
Packit |
5e46da |
{
|
|
Packit |
5e46da |
BITBUFFER bb;
|
|
Packit |
5e46da |
bb_init(&bb, buf, 8);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
memset(uo, 0, sizeof(BD_UO_MASK));
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
uo->menu_call = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->title_search = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->chapter_search = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->time_search = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->skip_to_next_point = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->skip_to_prev_point = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->play_firstplay = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->stop = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->pause_on = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->pause_off = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->still_off = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->forward = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->backward = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->resume = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->move_up = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->move_down = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->move_left = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->move_right = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->select = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->activate = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->select_and_activate = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->primary_audio_change = bb_read(&bb, 1);
|
|
Packit |
5e46da |
bb_skip(&bb, 1);
|
|
Packit |
5e46da |
uo->angle_change = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->popup_on = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->popup_off = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->pg_enable_disable = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->pg_change = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->secondary_video_enable_disable = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->secondary_video_change = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->secondary_audio_enable_disable = bb_read(&bb, 1);
|
|
Packit |
5e46da |
uo->secondary_audio_change = bb_read(&bb, 1);
|
|
Packit |
5e46da |
bb_skip(&bb, 1);
|
|
Packit |
5e46da |
uo->pip_pg_change = bb_read(&bb, 1);
|
|
Packit |
5e46da |
bb_skip(&bb, 30);
|
|
Packit |
5e46da |
return 1;
|
|
Packit |
5e46da |
}
|
|
Packit |
5e46da |
|