/*****************************************************************************
 *
 *  interfacemplayer_struct.h -- InterfaceMPlayer settings and structures.
 *
 *  Copyright (C) 2010 Starbuck <starbuck@labdv.com>
 *  All rights reserved.
 *
 *  GNU Lesser General Public License Usage
 *  This file may be used under the terms of the GNU Lesser General
 *  Public License version 2.1 as published by the Free Software
 *  Foundation and appearing in the file LICENSE.LGPL included in the
 *  packaging of this file.  Please review the following information to
 *  ensure the GNU Lesser General Public License version 2.1 requirements
 *  will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 *
 *  GNU General Public License Usage
 *  Alternatively, this file may be used under the terms of the GNU
 *  General Public License version 3.0 as published by the Free Software
 *  Foundation and appearing in the file LICENSE.GPL included in the
 *  packaging of this file.  Please review the following information to
 *  ensure the GNU General Public License version 3.0 requirements will be
 *  met: http://www.gnu.org/copyleft/gpl.html.
 *
 *****************************************************************************/

#ifndef INTERFACEMPLAYER_STRUCT_H
#define INTERFACEMPLAYER_STRUCT_H

#include <QString>
#include <QSize>

// Video player run info
struct mplayer_video_running_t
{
	QSize rez;
	double position;
	int chapter;
	double speed;
	double length;
	int interlaced;
	int scan_order;	// -1 undefined, 0 bottom field first, 1 top field first, 2 2:3 Pulldown, 3 2:2:2:2:2:2:2:2:2:2:2:3 Pulldown

	// Ensure structure initialization
	mplayer_video_running_t(){ clear(); }

	void clear() 
	{
		rez = QSize(0,0);
		position = 0.0;
		chapter = 0;
		speed = 1.0;
		length = 0.0;
		interlaced = -1;
		scan_order = -1;
	}
};

// Video player title info
struct mplayer_video_disk_title_t
{
	bool ignored;
	int chapterN;
	int angleN;
	double length;

	mplayer_video_disk_title_t()
	{
		ignored = false;
		chapterN = 0;
		angleN = 0;
		length = 0.0;
	}
};

// Video player disk info
struct mplayer_video_disk_t
{
	int media;
	int titles;
	QString volumeIdentifier;
	int current;  // current title
	int longest;  // longest title
	mplayer_video_disk_title_t title[99];

	// Ensure structure initialization
	mplayer_video_disk_t() { clear(); }

	void clear() 
	{
		media = 0;
		titles = 0;
		volumeIdentifier.clear();
		current = 0;
		longest = 0;
	}
};

#endif
