[DVDnav-discuss] r1160 - in trunk/libdvdnav: Makefile src/Makefile.am src/dvd_types.h src/dvdnav src/dvdnav.c src/dvdnav.h src/dvdnav/dvd_types.h src/dvdnav/dvdnav.h src/dvdnav/dvdnav_events.h src/dvdnav_events.h s...
reimar
subversion at mplayerhq.hu
Tue Dec 30 15:48:46 CET 2008
Author: reimar
Date: Tue Dec 30 15:48:46 2008
New Revision: 1160
Log:
Move dvd_types.h, dvdnav_events.h and dvdnav.h into a dvdnav directory.
This allows getting rid of the DVDNAV_COMPILE define hack and makes
it easier to use the library without installing or integrating the
source into some other project directly.
Added:
trunk/libdvdnav/src/dvdnav/
trunk/libdvdnav/src/dvdnav/dvd_types.h (props changed)
- copied unchanged from r1159, trunk/libdvdnav/src/dvd_types.h
trunk/libdvdnav/src/dvdnav/dvdnav.h (contents, props changed)
- copied, changed from r1159, trunk/libdvdnav/src/dvdnav.h
trunk/libdvdnav/src/dvdnav/dvdnav_events.h (props changed)
- copied unchanged from r1159, trunk/libdvdnav/src/dvdnav_events.h
Deleted:
trunk/libdvdnav/src/dvd_types.h
trunk/libdvdnav/src/dvdnav.h
trunk/libdvdnav/src/dvdnav_events.h
Modified:
trunk/libdvdnav/Makefile
trunk/libdvdnav/src/Makefile.am
trunk/libdvdnav/src/dvdnav.c
trunk/libdvdnav/src/highlight.c
trunk/libdvdnav/src/navigation.c
trunk/libdvdnav/src/read_cache.c
trunk/libdvdnav/src/remap.c
trunk/libdvdnav/src/searching.c
trunk/libdvdnav/src/settings.c
trunk/libdvdnav/src/vm/decoder.c
trunk/libdvdnav/src/vm/vm.c
trunk/libdvdnav/src/vm/vmcmd.c
Modified: trunk/libdvdnav/Makefile
==============================================================================
--- trunk/libdvdnav/Makefile Sat Dec 13 15:27:51 2008 (r1159)
+++ trunk/libdvdnav/Makefile Tue Dec 30 15:48:46 2008 (r1160)
@@ -12,11 +12,11 @@ SRCS = dvdnav.c highlight.c navigation.c
VPATH+= $(SRC_PATH_BARE)/src/vm
SRCS+= decoder.c vm.c vmcmd.c
-HEADERS = src/dvd_types.h src/dvdnav.h src/dvdnav_events.h
+HEADERS = src/dvdnav/dvd_types.h src/dvdnav/dvdnav.h src/dvdnav/dvdnav_events.h
CFLAGS += $(USEDEBUG) -Wall -funsigned-char
CFLAGS += -I$(CURDIR) -I$(SRC_PATH)/src -I$(SRC_PATH)/src/vm
-CFLAGS += -DDVDNAV_COMPILE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
+CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
CFLAGS += -DHAVE_CONFIG_H -DHAVE_DLFCN_H
L=libdvdnav
@@ -57,7 +57,7 @@ endif
version.h:
sh $(SRC_PATH)/version.sh $(SRC_PATH) "$(SHLIB_VERSION)"
-
+
$(SRCS): version.h
Modified: trunk/libdvdnav/src/Makefile.am
==============================================================================
--- trunk/libdvdnav/src/Makefile.am Sat Dec 13 15:27:51 2008 (r1159)
+++ trunk/libdvdnav/src/Makefile.am Tue Dec 30 15:48:46 2008 (r1160)
@@ -4,7 +4,7 @@ SUBDIRS = vm
includedir = ${prefix}/include/dvdnav
-AM_CPPFLAGS = -DDVDNAV_COMPILE $(THREAD_CFLAGS) $(DVDREAD_CFLAGS) \
+AM_CPPFLAGS = $(THREAD_CFLAGS) $(DVDREAD_CFLAGS) \
-I$(top_srcdir)/src/vm
EXTRA_DIST = README.MAP FELLOWSHIP.map
@@ -31,4 +31,4 @@ libdvdnavmini_la_LIBADD = $(THREAD_LIBS)
libdvdnavmini_la_LDFLAGS = $(libdvdnav_la_LDFLAGS)
-include_HEADERS = dvdnav.h dvdnav_events.h dvd_types.h
+include_HEADERS = dvdnav/dvdnav.h dvdnav/dvdnav_events.h dvdnav/dvd_types.h
Modified: trunk/libdvdnav/src/dvdnav.c
==============================================================================
--- trunk/libdvdnav/src/dvdnav.c Sat Dec 13 15:27:51 2008 (r1159)
+++ trunk/libdvdnav/src/dvdnav.c Tue Dec 30 15:48:46 2008 (r1160)
@@ -33,15 +33,13 @@
#include <limits.h>
#include <string.h>
#include <sys/time.h>
-#include "dvd_types.h"
+#include "dvdnav/dvdnav.h"
#include <dvdread/dvd_reader.h>
#include <dvdread/nav_types.h>
#include <dvdread/ifo_types.h> /* For vm_cmd_t */
#include "remap.h"
#include "vm/decoder.h"
#include "vm/vm.h"
-#include "dvdnav.h"
-#include "dvdnav_events.h"
#include "dvdnav_internal.h"
#include "read_cache.h"
#include <dvdread/nav_read.h>
Copied: trunk/libdvdnav/src/dvdnav/dvd_types.h (from r1159, trunk/libdvdnav/src/dvd_types.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/libdvdnav/src/dvdnav/dvd_types.h Tue Dec 30 15:48:46 2008 (r1160, copy of r1159, trunk/libdvdnav/src/dvd_types.h)
@@ -0,0 +1,275 @@
+/*
+ * Copyright (C) 2000, 2001 Björn Englund, Håkan Hjort
+ *
+ * This file is part of libdvdnav, a DVD navigation library. It is a modified
+ * file originally part of the Ogle DVD player project.
+ *
+ * libdvdnav is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * libdvdnav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with libdvdnav; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/*
+ * Various useful structs and enums for DVDs.
+ */
+
+#ifndef LIBDVDNAV_DVD_TYPES_H
+#define LIBDVDNAV_DVD_TYPES_H
+
+/*
+ * DVD Menu ID
+ * (see dvdnav_menu_call())
+ */
+typedef enum {
+ /* When used in VTS domain, DVD_MENU_Escape behaves like DVD_MENU_Root,
+ * but from within a menu domain, DVD_MENU_Escape resumes playback. */
+ DVD_MENU_Escape = 0,
+ DVD_MENU_Title = 2,
+ DVD_MENU_Root = 3,
+ DVD_MENU_Subpicture = 4,
+ DVD_MENU_Audio = 5,
+ DVD_MENU_Angle = 6,
+ DVD_MENU_Part = 7
+} DVDMenuID_t;
+
+
+/*
+ * Structure containing info on highlight areas
+ * (see dvdnav_get_highlight_area())
+ */
+typedef struct {
+ uint32_t palette; /* The CLUT entries for the highlight palette
+ (4-bits per entry -> 4 entries) */
+ uint16_t sx,sy,ex,ey; /* The start/end x,y positions */
+ uint32_t pts; /* Highlight PTS to match with SPU */
+
+ /* button number for the SPU decoder/overlaying engine */
+ uint32_t buttonN;
+} dvdnav_highlight_area_t;
+
+
+/* the following types are currently unused */
+
+#if 0
+
+/* Domain */
+typedef enum {
+ DVD_DOMAIN_FirstPlay, /* First Play Domain */
+ DVD_DOMAIN_VMG, /* Video Manager Domain */
+ DVD_DOMAIN_VTSMenu, /* Video Title Set Menu Domain */
+ DVD_DOMAIN_VTSTitle, /* Video Title Set Domain */
+ DVD_DOMAIN_Stop /* Stop Domain */
+} DVDDomain_t;
+
+/* User operation permissions */
+typedef enum {
+ UOP_FLAG_TitleOrTimePlay = 0x00000001,
+ UOP_FLAG_ChapterSearchOrPlay = 0x00000002,
+ UOP_FLAG_TitlePlay = 0x00000004,
+ UOP_FLAG_Stop = 0x00000008,
+ UOP_FLAG_GoUp = 0x00000010,
+ UOP_FLAG_TimeOrChapterSearch = 0x00000020,
+ UOP_FLAG_PrevOrTopPGSearch = 0x00000040,
+ UOP_FLAG_NextPGSearch = 0x00000080,
+ UOP_FLAG_ForwardScan = 0x00000100,
+ UOP_FLAG_BackwardScan = 0x00000200,
+ UOP_FLAG_TitleMenuCall = 0x00000400,
+ UOP_FLAG_RootMenuCall = 0x00000800,
+ UOP_FLAG_SubPicMenuCall = 0x00001000,
+ UOP_FLAG_AudioMenuCall = 0x00002000,
+ UOP_FLAG_AngleMenuCall = 0x00004000,
+ UOP_FLAG_ChapterMenuCall = 0x00008000,
+ UOP_FLAG_Resume = 0x00010000,
+ UOP_FLAG_ButtonSelectOrActivate = 0x00020000,
+ UOP_FLAG_StillOff = 0x00040000,
+ UOP_FLAG_PauseOn = 0x00080000,
+ UOP_FLAG_AudioStreamChange = 0x00100000,
+ UOP_FLAG_SubPicStreamChange = 0x00200000,
+ UOP_FLAG_AngleChange = 0x00400000,
+ UOP_FLAG_KaraokeAudioPresModeChange = 0x00800000,
+ UOP_FLAG_VideoPresModeChange = 0x01000000
+} DVDUOP_t;
+
+/* Parental Level */
+typedef enum {
+ DVD_PARENTAL_LEVEL_1 = 1,
+ DVD_PARENTAL_LEVEL_2 = 2,
+ DVD_PARENTAL_LEVEL_3 = 3,
+ DVD_PARENTAL_LEVEL_4 = 4,
+ DVD_PARENTAL_LEVEL_5 = 5,
+ DVD_PARENTAL_LEVEL_6 = 6,
+ DVD_PARENTAL_LEVEL_7 = 7,
+ DVD_PARENTAL_LEVEL_8 = 8,
+ DVD_PARENTAL_LEVEL_None = 15
+} DVDParentalLevel_t;
+
+/* Language ID (ISO-639 language code) */
+typedef uint16_t DVDLangID_t;
+
+/* Country ID (ISO-3166 country code) */
+typedef uint16_t DVDCountryID_t;
+
+/* Register */
+typedef uint16_t DVDRegister_t;
+typedef enum {
+ DVDFalse = 0,
+ DVDTrue = 1
+} DVDBool_t;
+typedef DVDRegister_t DVDGPRMArray_t[16];
+typedef DVDRegister_t DVDSPRMArray_t[24];
+
+/* Navigation */
+typedef int DVDStream_t;
+typedef int DVDPTT_t;
+typedef int DVDTitle_t;
+
+/* Angle number (1-9 or default?) */
+typedef int DVDAngle_t;
+
+/* Timecode */
+typedef struct {
+ uint8_t Hours;
+ uint8_t Minutes;
+ uint8_t Seconds;
+ uint8_t Frames;
+} DVDTimecode_t;
+
+/* Subpicture stream number (0-31,62,63) */
+typedef int DVDSubpictureStream_t;
+
+/* Audio stream number (0-7, 15(none)) */
+typedef int DVDAudioStream_t;
+
+/* The audio application mode */
+typedef enum {
+ DVD_AUDIO_APP_MODE_None = 0,
+ DVD_AUDIO_APP_MODE_Karaoke = 1,
+ DVD_AUDIO_APP_MODE_Surround = 2,
+ DVD_AUDIO_APP_MODE_Other = 3
+} DVDAudioAppMode_t;
+
+/* The audio format */
+typedef enum {
+ DVD_AUDIO_FORMAT_AC3 = 0,
+ DVD_AUDIO_FORMAT_MPEG1 = 1,
+ DVD_AUDIO_FORMAT_MPEG1_DRC = 2,
+ DVD_AUDIO_FORMAT_MPEG2 = 3,
+ DVD_AUDIO_FORMAT_MPEG2_DRC = 4,
+ DVD_AUDIO_FORMAT_LPCM = 5,
+ DVD_AUDIO_FORMAT_DTS = 6,
+ DVD_AUDIO_FORMAT_SDDS = 7,
+ DVD_AUDIO_FORMAT_Other = 8
+} DVDAudioFormat_t;
+
+/* Audio language extension */
+typedef enum {
+ DVD_AUDIO_LANG_EXT_NotSpecified = 0,
+ DVD_AUDIO_LANG_EXT_NormalCaptions = 1,
+ DVD_AUDIO_LANG_EXT_VisuallyImpaired = 2,
+ DVD_AUDIO_LANG_EXT_DirectorsComments1 = 3,
+ DVD_AUDIO_LANG_EXT_DirectorsComments2 = 4
+} DVDAudioLangExt_t;
+
+/* Subpicture language extension */
+typedef enum {
+ DVD_SUBPICTURE_LANG_EXT_NotSpecified = 0,
+ DVD_SUBPICTURE_LANG_EXT_NormalCaptions = 1,
+ DVD_SUBPICTURE_LANG_EXT_BigCaptions = 2,
+ DVD_SUBPICTURE_LANG_EXT_ChildrensCaptions = 3,
+ DVD_SUBPICTURE_LANG_EXT_NormalCC = 5,
+ DVD_SUBPICTURE_LANG_EXT_BigCC = 6,
+ DVD_SUBPICTURE_LANG_EXT_ChildrensCC = 7,
+ DVD_SUBPICTURE_LANG_EXT_Forced = 9,
+ DVD_SUBPICTURE_LANG_EXT_NormalDirectorsComments = 13,
+ DVD_SUBPICTURE_LANG_EXT_BigDirectorsComments = 14,
+ DVD_SUBPICTURE_LANG_EXT_ChildrensDirectorsComments = 15,
+} DVDSubpictureLangExt_t;
+
+/* Karaoke Downmix mode */
+typedef enum {
+ DVD_KARAOKE_DOWNMIX_0to0 = 0x0001,
+ DVD_KARAOKE_DOWNMIX_1to0 = 0x0002,
+ DVD_KARAOKE_DOWNMIX_2to0 = 0x0004,
+ DVD_KARAOKE_DOWNMIX_3to0 = 0x0008,
+ DVD_KARAOKE_DOWNMIX_4to0 = 0x0010,
+ DVD_KARAOKE_DOWNMIX_Lto0 = 0x0020,
+ DVD_KARAOKE_DOWNMIX_Rto0 = 0x0040,
+ DVD_KARAOKE_DOWNMIX_0to1 = 0x0100,
+ DVD_KARAOKE_DOWNMIX_1to1 = 0x0200,
+ DVD_KARAOKE_DOWNMIX_2to1 = 0x0400,
+ DVD_KARAOKE_DOWNMIX_3to1 = 0x0800,
+ DVD_KARAOKE_DOWNMIX_4to1 = 0x1000,
+ DVD_KARAOKE_DOWNMIX_Lto1 = 0x2000,
+ DVD_KARAOKE_DOWNMIX_Rto1 = 0x4000
+} DVDKaraokeDownmix_t;
+typedef int DVDKaraokeDownmixMask_t;
+
+/* Display mode */
+typedef enum {
+ DVD_DISPLAY_MODE_ContentDefault = 0,
+ DVD_DISPLAY_MODE_16x9 = 1,
+ DVD_DISPLAY_MODE_4x3PanScan = 2,
+ DVD_DISPLAY_MODE_4x3Letterboxed = 3
+} DVDDisplayMode_t;
+
+/* Audio attributes */
+typedef struct {
+ DVDAudioAppMode_t AppMode;
+ DVDAudioFormat_t AudioFormat;
+ DVDLangID_t Language;
+ DVDAudioLangExt_t LanguageExtension;
+ DVDBool_t HasMultichannelInfo;
+ DVDAudioSampleFreq_t SampleFrequency;
+ DVDAudioSampleQuant_t SampleQuantization;
+ DVDChannelNumber_t NumberOfChannels;
+} DVDAudioAttributes_t;
+typedef int DVDAudioSampleFreq_t;
+typedef int DVDAudioSampleQuant_t;
+typedef int DVDChannelNumber_t;
+
+/* Subpicture attributes */
+typedef enum {
+ DVD_SUBPICTURE_TYPE_NotSpecified = 0,
+ DVD_SUBPICTURE_TYPE_Language = 1,
+ DVD_SUBPICTURE_TYPE_Other = 2
+} DVDSubpictureType_t;
+typedef enum {
+ DVD_SUBPICTURE_CODING_RunLength = 0,
+ DVD_SUBPICTURE_CODING_Extended = 1,
+ DVD_SUBPICTURE_CODING_Other = 2
+} DVDSubpictureCoding_t;
+typedef struct {
+ DVDSubpictureType_t Type;
+ DVDSubpictureCoding_t CodingMode;
+ DVDLangID_t Language;
+ DVDSubpictureLangExt_t LanguageExtension;
+} DVDSubpictureAttributes_t;
+
+/* Video attributes */
+typedef struct {
+ DVDBool_t PanscanPermitted;
+ DVDBool_t LetterboxPermitted;
+ int AspectX;
+ int AspectY;
+ int FrameRate;
+ int FrameHeight;
+ DVDVideoCompression_t Compression;
+ DVDBool_t Line21Field1InGop;
+ DVDBool_t Line21Field2InGop;
+ int more_to_come;
+} DVDVideoAttributes_t;
+typedef int DVDVideoCompression_t;
+
+#endif
+
+#endif /* LIBDVDNAV_DVD_TYPES_H */
Copied and modified: trunk/libdvdnav/src/dvdnav/dvdnav.h (from r1159, trunk/libdvdnav/src/dvdnav.h)
==============================================================================
--- trunk/libdvdnav/src/dvdnav.h Sat Dec 13 15:27:51 2008 (r1159, copy source)
+++ trunk/libdvdnav/src/dvdnav/dvdnav.h Tue Dec 30 15:48:46 2008 (r1160)
@@ -32,13 +32,11 @@
extern "C" {
#endif
-#ifndef DVDNAV_COMPILE
-# include <dvdnav/dvd_types.h>
-# include <dvdread/dvd_reader.h>
-# include <dvdread/nav_types.h>
-# include <dvdread/ifo_types.h> /* For vm_cmd_t */
-# include <dvdnav/dvdnav_events.h>
-#endif
+#include <dvdnav/dvd_types.h>
+#include <dvdread/dvd_reader.h>
+#include <dvdread/nav_types.h>
+#include <dvdread/ifo_types.h> /* For vm_cmd_t */
+#include <dvdnav/dvdnav_events.h>
Copied: trunk/libdvdnav/src/dvdnav/dvdnav_events.h (from r1159, trunk/libdvdnav/src/dvdnav_events.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/libdvdnav/src/dvdnav/dvdnav_events.h Tue Dec 30 15:48:46 2008 (r1160, copy of r1159, trunk/libdvdnav/src/dvdnav_events.h)
@@ -0,0 +1,236 @@
+/*
+ * Copyright (C) 2001 Rich Wareham <richwareham at users.sourceforge.net>
+ *
+ * This file is part of libdvdnav, a DVD navigation library.
+ *
+ * libdvdnav is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * libdvdnav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with libdvdnav; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/*
+ * This header defines events and event types
+ */
+
+#ifndef LIBDVDNAV_DVDNAV_EVENTS_H
+#define LIBDVDNAV_DVDNAV_EVENTS_H
+
+/*
+ * DVDNAV_BLOCK_OK
+ *
+ * A regular data block from the DVD has been returned.
+ * This one should be demuxed and decoded for playback.
+ */
+#define DVDNAV_BLOCK_OK 0
+
+
+/*
+ * DVDNAV_NOP
+ *
+ * Just ignore this.
+ */
+#define DVDNAV_NOP 1
+
+
+/*
+ * DVDNAV_STILL_FRAME
+ *
+ * We have reached a still frame. The player application should wait
+ * the amount of time specified by the still's length while still handling
+ * user input to make menus and other interactive stills work.
+ * The last delivered frame should be kept showing.
+ * Once the still has timed out, call dvdnav_skip_still().
+ * A length of 0xff means an infinite still which has to be skipped
+ * indirectly by some user interaction.
+ */
+#define DVDNAV_STILL_FRAME 2
+
+typedef struct {
+ /* The length (in seconds) the still frame should be displayed for,
+ * or 0xff if infinite. */
+ int length;
+} dvdnav_still_event_t;
+
+
+/*
+ * DVDNAV_SPU_STREAM_CHANGE
+ *
+ * Inform the SPU decoding/overlaying engine to switch SPU channels.
+ */
+#define DVDNAV_SPU_STREAM_CHANGE 3
+
+typedef struct {
+ /* The physical (MPEG) stream number for widescreen SPU display.
+ * Use this, if you blend the SPU on an anamorphic image before
+ * unsqueezing it. */
+ int physical_wide;
+
+ /* The physical (MPEG) stream number for letterboxed display.
+ * Use this, if you blend the SPU on an anamorphic image after
+ * unsqueezing it. */
+ int physical_letterbox;
+
+ /* The physical (MPEG) stream number for pan&scan display.
+ * Use this, if you blend the SPU on an anamorphic image after
+ * unsqueezing it the pan&scan way. */
+ int physical_pan_scan;
+
+ /* The logical (DVD) stream number. */
+ int logical;
+} dvdnav_spu_stream_change_event_t;
+
+
+/*
+ * DVDNAV_AUDIO_STREAM_CHANGE
+ *
+ * Inform the audio decoder to switch channels.
+ */
+#define DVDNAV_AUDIO_STREAM_CHANGE 4
+
+typedef struct {
+ /* The physical (MPEG) stream number. */
+ int physical;
+
+ /* The logical (DVD) stream number. */
+ int logical;
+} dvdnav_audio_stream_change_event_t;
+
+
+/*
+ * DVDNAV_VTS_CHANGE
+ *
+ * Some status information like video aspect and video scale permissions do
+ * not change inside a VTS. Therefore this event can be used to query such
+ * information only when necessary and update the decoding/displaying
+ * accordingly.
+ */
+#define DVDNAV_VTS_CHANGE 5
+
+typedef struct {
+ int old_vtsN; /* the old VTS number */
+ dvd_read_domain_t old_domain; /* the old domain */
+ int new_vtsN; /* the new VTS number */
+ dvd_read_domain_t new_domain; /* the new domain */
+} dvdnav_vts_change_event_t;
+
+
+/*
+ * DVDNAV_CELL_CHANGE
+ *
+ * Some status information like the current Title and Part numbers do not
+ * change inside a cell. Therefore this event can be used to query such
+ * information only when necessary and update the decoding/displaying
+ * accordingly.
+ * Some useful information for accurate time display is also reported
+ * together with this event.
+ */
+#define DVDNAV_CELL_CHANGE 6
+
+typedef struct {
+ int cellN; /* the new cell number */
+ int pgN; /* the current program number */
+ int64_t cell_length; /* the length of the current cell in PTS ticks */
+ int64_t pg_length; /* the length of the current program in PTS ticks */
+ int64_t pgc_length; /* the length of the current program chain in PTS ticks */
+ int64_t cell_start; /* the start time of the current cell relatively to the PGC in PTS ticks */
+ int64_t pg_start; /* the start time of the current PG relatively to the PGC in PTS ticks */
+} dvdnav_cell_change_event_t;
+
+
+/*
+ * DVDNAV_NAV_PACKET
+ *
+ * NAV packets are useful for various purposes. They define the button
+ * highlight areas and VM commands of DVD menus, so they should in any
+ * case be sent to the SPU decoder/overlaying engine for the menus to work.
+ * NAV packets also provide a way to detect PTS discontinuities, because
+ * they carry the start and end PTS values for the current VOBU.
+ * (pci.vobu_s_ptm and pci.vobu_e_ptm) Whenever the start PTS of the
+ * current NAV does not match the end PTS of the previous NAV, a PTS
+ * discontinuity has occured.
+ * NAV packets can also be used for time display, because they are
+ * timestamped relatively to the current Cell.
+ */
+#define DVDNAV_NAV_PACKET 7
+
+
+/*
+ * DVDNAV_STOP
+ *
+ * Applications should end playback here. A subsequent dvdnav_get_next_block()
+ * call will restart the VM from the beginning of the DVD.
+ */
+#define DVDNAV_STOP 8
+
+
+/*
+ * DVDNAV_HIGHLIGHT
+ *
+ * The current button highlight changed. Inform the overlaying engine to
+ * highlight a different button. Please note, that at the moment only mode 1
+ * highlights are reported this way. That means, when the button highlight
+ * has been moved around by some function call, you will receive an event
+ * telling you the new button. But when a button gets activated, you have
+ * to handle the mode 2 highlighting (that is some different colour the
+ * button turns to on activation) in your application.
+ */
+#define DVDNAV_HIGHLIGHT 9
+
+typedef struct {
+ /* highlight mode: 0 - hide, 1 - show, 2 - activate, currently always 1 */
+ int display;
+
+ /* FIXME: these fields are currently not set */
+ uint32_t palette; /* The CLUT entries for the highlight palette
+ (4-bits per entry -> 4 entries) */
+ uint16_t sx,sy,ex,ey; /* The start/end x,y positions */
+ uint32_t pts; /* Highlight PTS to match with SPU */
+
+ /* button number for the SPU decoder/overlaying engine */
+ uint32_t buttonN;
+} dvdnav_highlight_event_t;
+
+
+/*
+ * DVDNAV_SPU_CLUT_CHANGE
+ *
+ * Inform the SPU decoder/overlaying engine to update its colour lookup table.
+ * The CLUT is given as 16 uint32_t's in the buffer.
+ */
+#define DVDNAV_SPU_CLUT_CHANGE 10
+
+
+/*
+ * DVDNAV_HOP_CHANNEL
+ *
+ * A non-seamless operation has been performed. Applications can drop all
+ * their internal fifo's content, which will speed up the response.
+ */
+#define DVDNAV_HOP_CHANNEL 12
+
+
+/*
+ * DVDNAV_WAIT
+ *
+ * We have reached a point in DVD playback, where timing is critical.
+ * Player application with internal fifos can introduce state
+ * inconsistencies, because libdvdnav is always the fifo's length
+ * ahead in the stream compared to what the application sees.
+ * Such applications should wait until their fifos are empty
+ * when they receive this type of event.
+ * Once this is achieved, call dvdnav_skip_wait().
+ */
+#define DVDNAV_WAIT 13
+
+
+#endif /* LIBDVDNAV_DVDNAV_EVENTS_H */
Modified: trunk/libdvdnav/src/highlight.c
==============================================================================
--- trunk/libdvdnav/src/highlight.c Sat Dec 13 15:27:51 2008 (r1159)
+++ trunk/libdvdnav/src/highlight.c Tue Dec 30 15:48:46 2008 (r1160)
@@ -30,13 +30,12 @@
#include <string.h>
#include <sys/time.h>
#include <dvdread/nav_types.h>
-#include "dvd_types.h"
+#include "dvdnav/dvdnav.h"
#include "remap.h"
#include "vm/decoder.h"
#include "vm/vm.h"
#include "vm/vmcmd.h"
#include "dvdnav_internal.h"
-#include "dvdnav.h"
/*
#define BUTTON_TESTING
Modified: trunk/libdvdnav/src/navigation.c
==============================================================================
--- trunk/libdvdnav/src/navigation.c Sat Dec 13 15:27:51 2008 (r1159)
+++ trunk/libdvdnav/src/navigation.c Tue Dec 30 15:48:46 2008 (r1160)
@@ -26,13 +26,12 @@
#include <limits.h>
#include <string.h>
#include <sys/time.h>
-#include "dvd_types.h"
+#include "dvdnav/dvdnav.h"
#include <dvdread/nav_types.h>
#include <dvdread/ifo_types.h>
#include "remap.h"
#include "vm/decoder.h"
#include "vm/vm.h"
-#include "dvdnav.h"
#include "dvdnav_internal.h"
/* Navigation API calls */
Modified: trunk/libdvdnav/src/read_cache.c
==============================================================================
--- trunk/libdvdnav/src/read_cache.c Sat Dec 13 15:27:51 2008 (r1159)
+++ trunk/libdvdnav/src/read_cache.c Tue Dec 30 15:48:46 2008 (r1160)
@@ -33,13 +33,12 @@
#include <limits.h>
#include <sys/time.h>
#include <time.h>
-#include "dvd_types.h"
+#include "dvdnav/dvdnav.h"
#include <dvdread/nav_types.h>
#include <dvdread/ifo_types.h>
#include "remap.h"
#include "vm/decoder.h"
#include "vm/vm.h"
-#include "dvdnav.h"
#include "dvdnav_internal.h"
#include "read_cache.h"
Modified: trunk/libdvdnav/src/remap.c
==============================================================================
--- trunk/libdvdnav/src/remap.c Sat Dec 13 15:27:51 2008 (r1159)
+++ trunk/libdvdnav/src/remap.c Tue Dec 30 15:48:46 2008 (r1160)
@@ -36,13 +36,12 @@
#include <inttypes.h>
#include <limits.h>
#include <sys/time.h>
-#include "dvd_types.h"
+#include "dvdnav/dvdnav.h"
#include <dvdread/nav_types.h>
#include <dvdread/ifo_types.h>
#include "remap.h"
#include "vm/decoder.h"
#include "vm/vm.h"
-#include "dvdnav.h"
#include "dvdnav_internal.h"
struct block_s {
Modified: trunk/libdvdnav/src/searching.c
==============================================================================
--- trunk/libdvdnav/src/searching.c Sat Dec 13 15:27:51 2008 (r1159)
+++ trunk/libdvdnav/src/searching.c Tue Dec 30 15:48:46 2008 (r1160)
@@ -29,13 +29,12 @@
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
-#include "dvd_types.h"
+#include "dvdnav/dvdnav.h"
#include <dvdread/nav_types.h>
#include <dvdread/ifo_types.h>
#include "remap.h"
#include "vm/decoder.h"
#include "vm/vm.h"
-#include "dvdnav.h"
#include "dvdnav_internal.h"
/*
Modified: trunk/libdvdnav/src/settings.c
==============================================================================
--- trunk/libdvdnav/src/settings.c Sat Dec 13 15:27:51 2008 (r1159)
+++ trunk/libdvdnav/src/settings.c Tue Dec 30 15:48:46 2008 (r1160)
@@ -26,13 +26,12 @@
#include <limits.h>
#include <string.h>
#include <sys/time.h>
-#include "dvd_types.h"
+#include "dvdnav/dvdnav.h"
#include <dvdread/nav_types.h>
#include <dvdread/ifo_types.h>
#include "remap.h"
#include "vm/decoder.h"
#include "vm/vm.h"
-#include "dvdnav.h"
#include "dvdnav_internal.h"
/* Characteristics/setting API calls */
Modified: trunk/libdvdnav/src/vm/decoder.c
==============================================================================
--- trunk/libdvdnav/src/vm/decoder.c Sat Dec 13 15:27:51 2008 (r1159)
+++ trunk/libdvdnav/src/vm/decoder.c Tue Dec 30 15:48:46 2008 (r1160)
@@ -33,12 +33,11 @@
#include <dvdread/nav_types.h>
#include <dvdread/ifo_types.h> /* vm_cmd_t */
-#include "dvd_types.h"
+#include "dvdnav/dvdnav.h"
#include "remap.h"
#include "decoder.h"
#include "vm.h"
#include "vmcmd.h"
-#include "dvdnav.h"
#include "dvdnav_internal.h"
uint32_t vm_getbits(command_t *command, int32_t start, int32_t count) {
Modified: trunk/libdvdnav/src/vm/vm.c
==============================================================================
--- trunk/libdvdnav/src/vm/vm.c Sat Dec 13 15:27:51 2008 (r1159)
+++ trunk/libdvdnav/src/vm/vm.c Tue Dec 30 15:48:46 2008 (r1160)
@@ -40,12 +40,11 @@
#include <dvdread/nav_types.h>
#include <dvdread/ifo_types.h>
#include <dvdread/ifo_read.h>
-#include "dvd_types.h"
+#include "dvdnav/dvdnav.h"
#include "decoder.h"
#include "remap.h"
#include "vm.h"
-#include "dvdnav.h"
#include "dvdnav_internal.h"
#ifdef _MSC_VER
Modified: trunk/libdvdnav/src/vm/vmcmd.c
==============================================================================
--- trunk/libdvdnav/src/vm/vmcmd.c Sat Dec 13 15:27:51 2008 (r1159)
+++ trunk/libdvdnav/src/vm/vmcmd.c Tue Dec 30 15:48:46 2008 (r1160)
@@ -30,14 +30,13 @@
#include <limits.h>
#include <sys/time.h>
-#include "dvd_types.h"
+#include "dvdnav/dvdnav.h"
#include <dvdread/nav_types.h>
#include <dvdread/ifo_types.h>
#include "decoder.h"
#include "remap.h"
#include "vm.h"
#include "vmcmd.h"
-#include "dvdnav.h"
#include "dvdnav_internal.h"
/* freebsd compatibility */
More information about the DVDnav-discuss
mailing list