r1519 - in /experimental/vlc/debian/patches: 400_enable_embedded_video.diff 401_detect_xinerama_fullscreen.diff 402_tivo_overflow.diff

xtophe-guest at users.alioth.debian.org xtophe-guest at users.alioth.debian.org
Sun Oct 19 21:55:47 UTC 2008


Author: xtophe-guest
Date: Sun Oct 19 21:55:47 2008
New Revision: 1519

URL: http://svn.debian.org/wsvn/pkg-multimedia/?sc=1&rev=1519
Log:
Don't forget the patches

Added:
    experimental/vlc/debian/patches/400_enable_embedded_video.diff
    experimental/vlc/debian/patches/401_detect_xinerama_fullscreen.diff
    experimental/vlc/debian/patches/402_tivo_overflow.diff

Added: experimental/vlc/debian/patches/400_enable_embedded_video.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/experimental/vlc/debian/patches/400_enable_embedded_video.diff?rev=1519&op=file
==============================================================================
--- experimental/vlc/debian/patches/400_enable_embedded_video.diff (added)
+++ experimental/vlc/debian/patches/400_enable_embedded_video.diff Sun Oct 19 21:55:47 2008
@@ -1,0 +1,23 @@
+From: Rémi Denis-Courmont <rdenis at simphalempin.com>
+Date: Thu, 9 Oct 2008 20:06:21 +0000 (+0300)
+Subject: Enable embedded video with Qt >= 4.3 - hopefully fixes #2136
+X-Git-Url: http://git.videolan.org/?p=vlc.git;a=commitdiff_plain;h=9c26b8e2a04468aa4b4a158f072d760a991932db;hp=6124f9823a490a0291e2604cd579b2e0e6c2c42f
+
+Enable embedded video with Qt >= 4.3 - hopefully fixes #2136
+---
+
+slightly adjusted so that it actually applies against the 0.9.4 source 
+by siretart
+
+--- a/modules/gui/qt4/qt4.cpp
++++ b/modules/gui/qt4/qt4.cpp
+@@ -213,7 +213,8 @@ vlc_module_begin();
+ 
+         set_callbacks( OpenDialogs, Close );
+ 
+-#ifdef WIN32
++
++#if !defined (Q_WS_X11) || defined HAS_QT43
+     add_submodule();
+         set_capability( "vout window", 50 );
+         set_callbacks( WindowOpen, WindowClose );

Added: experimental/vlc/debian/patches/401_detect_xinerama_fullscreen.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/experimental/vlc/debian/patches/401_detect_xinerama_fullscreen.diff?rev=1519&op=file
==============================================================================
--- experimental/vlc/debian/patches/401_detect_xinerama_fullscreen.diff (added)
+++ experimental/vlc/debian/patches/401_detect_xinerama_fullscreen.diff Sun Oct 19 21:55:47 2008
@@ -1,0 +1,135 @@
+From: Ilkka Ollakka <ileoo at videolan.org>
+Date: Wed, 15 Oct 2008 17:56:56 +0000 (+0300)
+Subject: Calculate position for videowindow to use current screen in xinerama-setup also.
+X-Git-Url: http://git.videolan.org/?p=vlc.git;a=commitdiff_plain;h=a0a1a207bfd38f497d490a5b1086a0f0bdd5427d;hp=70c75214fa2cac6b5b4775eb627dc7c68825a2fc
+
+Calculate position for videowindow to use current screen in xinerama-setup also.
+
+Basicly same as mplayer/libvo/x11_common.c does.
+---
+
+diff --git a/modules/video_output/x11/glx.c b/modules/video_output/x11/glx.c
+index f151a64..8e56c54 100644
+--- a/modules/video_output/x11/glx.c
++++ b/modules/video_output/x11/glx.c
+@@ -130,7 +130,7 @@ vlc_module_begin();
+     add_bool( "glx-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT, true );
+ #endif
+ #ifdef HAVE_XINERAMA
+-    add_integer ( "glx-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, true );
++    add_integer ( "glx-xineramascreen", -1, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, true );
+ #endif
+ vlc_module_end();
+ 
+diff --git a/modules/video_output/x11/x11.c b/modules/video_output/x11/x11.c
+index 9da6f10..a67a264 100644
+--- a/modules/video_output/x11/x11.c
++++ b/modules/video_output/x11/x11.c
+@@ -76,7 +76,7 @@ vlc_module_begin();
+     add_bool( "x11-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT, true );
+ #endif
+ #ifdef HAVE_XINERAMA
+-    add_integer ( "x11-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, true );
++    add_integer ( "x11-xineramascreen", -1, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, true );
+ #endif
+     set_description( N_("X11 video output") );
+     set_capability( "video output", 70 );
+diff --git a/modules/video_output/x11/xcommon.c b/modules/video_output/x11/xcommon.c
+index 28f2ddc..4f47435 100644
+--- a/modules/video_output/x11/xcommon.c
++++ b/modules/video_output/x11/xcommon.c
+@@ -2094,6 +2094,39 @@ static void ToggleFullScreen ( vout_thread_t *p_vout )
+     {
+         msg_Dbg( p_vout, "entering fullscreen mode" );
+ 
++        /* Getting current window position */
++        Window root_win;
++        Window* child_windows;
++        int num_child_windows;
++        Window parent_win;
++        Window child_win;
++        XWindowAttributes win_attr;
++        int screen_x,screen_y;
++
++        XGetWindowAttributes(
++                p_vout->p_sys->p_display,
++                p_vout->p_sys->p_win->video_window,
++                &win_attr);
++
++        XQueryTree(
++                p_vout->p_sys->p_display,
++                p_vout->p_sys->p_win->video_window,
++                &root_win,
++                &parent_win,
++                &child_windows,
++                &num_child_windows);
++        XFree(child_windows);
++
++        XTranslateCoordinates(
++                p_vout->p_sys->p_display,
++                parent_win, win_attr.root,
++                win_attr.x,win_attr.y,
++                &screen_x,&screen_y,
++                &child_win);
++
++        msg_Dbg( p_vout, "X %d/%d Y %d/%d", win_attr.x,screen_x,win_attr.y,screen_y);
++        /* screen_x and screen_y are current position */
++
+         p_vout->p_sys->b_altfullscreen =
+             config_GetInt( p_vout, MODULE_STRING "-altfullscreen" );
+ 
+@@ -2190,11 +2223,26 @@ static void ToggleFullScreen ( vout_thread_t *p_vout )
+             SCREEN = config_GetInt( p_vout,
+                                         MODULE_STRING "-xineramascreen" );
+ 
+-            /* just check that user has entered a good value */
++            /* just check that user has entered a good value,
++             * otherwise use that screen where window is */
+             if( SCREEN >= i_num_screens || SCREEN < 0 )
+             {
+                 msg_Dbg( p_vout, "requested screen number invalid (%d/%d)", SCREEN, i_num_screens );
+-                SCREEN = 0;
++#define left screens[SCREEN].x_org
++#define right left + screens[SCREEN].width
++#define top screens[SCREEN].y_org
++#define bottom top + screens[SCREEN].height
++
++                 for( SCREEN = i_num_screens-1; SCREEN > 0; SCREEN--)
++                 {
++                     if( left <= screen_x && screen_x <= right &&
++                             top <= screen_y && screen_y <= bottom )
++                         break;
++                 }
++#undef bottom
++#undef top
++#undef right
++#undef left
+             }
+ 
+             /* Get the X/Y upper left corner coordinate of the above screen */
+diff --git a/modules/video_output/x11/xvideo.c b/modules/video_output/x11/xvideo.c
+index 787a9df..2b05b97 100644
+--- a/modules/video_output/x11/xvideo.c
++++ b/modules/video_output/x11/xvideo.c
+@@ -89,7 +89,7 @@ vlc_module_begin();
+     add_bool( "xvideo-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT, true );
+ #endif
+ #ifdef HAVE_XINERAMA
+-    add_integer ( "xvideo-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, true );
++    add_integer ( "xvideo-xineramascreen", -1, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, true );
+ #endif
+ 
+     set_description( N_("XVideo extension video output") );
+diff --git a/modules/video_output/x11/xvmc.c b/modules/video_output/x11/xvmc.c
+index 03c0a49..166ef6e 100644
+--- a/modules/video_output/x11/xvmc.c
++++ b/modules/video_output/x11/xvmc.c
+@@ -143,7 +143,7 @@ vlc_module_begin();
+     add_bool( "xvmc-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT, true );
+ #endif
+ #ifdef HAVE_XINERAMA
+-    add_integer ( "xvmc-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, true );
++    add_integer ( "xvmc-xineramascreen", -1, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, true );
+ #endif
+     add_string( "xvmc-deinterlace-mode", "bob", NULL, MODE_TEXT, MODE_LONGTEXT, false );
+     add_string( "xvmc-crop-style", "eq", NULL, CROP_TEXT, CROP_LONGTEXT, false );

Added: experimental/vlc/debian/patches/402_tivo_overflow.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/experimental/vlc/debian/patches/402_tivo_overflow.diff?rev=1519&op=file
==============================================================================
--- experimental/vlc/debian/patches/402_tivo_overflow.diff (added)
+++ experimental/vlc/debian/patches/402_tivo_overflow.diff Sun Oct 19 21:55:47 2008
@@ -1,0 +1,164 @@
+Taken from upstream:
+Git commits:
+deb738bab3da02d925b365979e026efd15157da6
+703792c784a6572c013148eea81bd2bc8a7ef1bf
+fde9e1cc1fe1ec9635169fa071e42b3aa6436033
+
+Fix some integer overflows and a stupid memset() invocation
+Simplify debug
+Fix (yet another) TiVo demux overflow.(VideoLAN SA-0809)
+Reported by Tobias Klein <tk at trapkit.de>
+
+diff --git a/modules/demux/ty.c b/modules/demux/ty.c
+index 231fdda..11511b4 100644
+--- a/modules/demux/ty.c
++++ b/modules/demux/ty.c
+@@ -241,8 +241,8 @@ struct demux_sys_t
+   //mtime_t         l_last_ty_pts_sync; /* audio PTS at time of last TY PTS */
+   uint64_t        l_first_ty_pts;     /* first TY PTS in this master chunk */
+   uint64_t        l_final_ty_pts;     /* final TY PTS in this master chunk */
+-  int             i_seq_table_size;   /* number of entries in SEQ table */
+-  int             i_bits_per_seq_entry; /* # of bits in SEQ table bitmask */
++  unsigned        i_seq_table_size;   /* number of entries in SEQ table */
++  unsigned        i_bits_per_seq_entry; /* # of bits in SEQ table bitmask */
+ 
+   mtime_t         firstAudioPTS;
+   mtime_t         lastAudioPTS;
+@@ -505,7 +505,7 @@ static int Control(demux_t *p_demux, int i_query, va_list args)
+         if( ( i64 = p_sys->i_stream_size ) > 0 )
+         {
+             pf = (double*) va_arg( args, double* );
+-            *pf = (double)stream_Tell( p_demux->s ) / (double) i64;
++            *pf = ((double)1.0) * stream_Tell( p_demux->s ) / (double) i64;
+             return VLC_SUCCESS;
+         }
+         return VLC_EGENERIC;
+@@ -789,24 +789,17 @@ static int DemuxRecVideo( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_bl
+     /* Send the CC data */
+     if( p_block_in->i_pts > 0 && p_sys->cc.i_data > 0 )
+     {
+-        int i_cc_count;
+-
+-        block_t *p_cc = block_New( p_demux, p_sys->cc.i_data );
+-        p_cc->i_flags |= BLOCK_FLAG_TYPE_I;
+-        p_cc->i_pts = p_block_in->i_pts;
+-        memcpy( p_cc->p_buffer, p_sys->cc.p_data, p_sys->cc.i_data );
+-
+-        for( i = 0, i_cc_count = 0; i < 4; i++ )
+-            i_cc_count += p_sys->p_cc[i] ? 1 : 0;
+-
+         for( i = 0; i < 4; i++ )
+         {
+-            if( !p_sys->p_cc[i] )
+-                continue;
+-            if( i_cc_count > 1 )
+-                es_out_Send( p_demux->out, p_sys->p_cc[i], block_Duplicate( p_cc ) );
+-            else
++            if( p_sys->p_cc[i] )
++            {
++                block_t *p_cc = block_New( p_demux, p_sys->cc.i_data );
++                p_cc->i_flags |= BLOCK_FLAG_TYPE_I;
++                p_cc->i_pts = p_block_in->i_pts;
++                memcpy( p_cc->p_buffer, p_sys->cc.p_data, p_sys->cc.i_data );
++
+                 es_out_Send( p_demux->out, p_sys->p_cc[i], p_cc );
++            }
+         }
+         cc_Flush( &p_sys->cc );
+     }
+@@ -1058,8 +1051,9 @@ static int ty_stream_seek_pct(demux_t *p_demux, double seek_pct)
+ {
+     demux_sys_t *p_sys = p_demux->p_sys;
+     int64_t seek_pos = p_sys->i_stream_size * seek_pct;
+-    int i, i_cur_part;
+     long l_skip_amt;
++    int i;
++    unsigned i_cur_part;
+ 
+     /* if we're not seekable, there's nothing to do */
+     if (!p_sys->b_seekable)
+@@ -1104,7 +1098,6 @@ static int ty_stream_seek_pct(demux_t *p_demux, double seek_pct)
+ 
+     /* to hell with syncing any audio or video, just start reading records... :) */
+     /*p_sys->lastAudioPTS = p_sys->lastVideoPTS = 0;*/
+-    es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
+     return VLC_SUCCESS;
+ }
+ 
+@@ -1480,10 +1473,11 @@ static void DemuxDecodeXds( demux_t *p_demux, uint8_t d1, uint8_t d2 )
+ static int ty_stream_seek_time(demux_t *p_demux, uint64_t l_seek_time)
+ {
+     demux_sys_t *p_sys = p_demux->p_sys;
+-    int i, i_seq_entry = 0;
++    int i_seq_entry = 0;
+     int i_skip_cnt;
++    unsigned i;
+     long l_cur_pos = stream_Tell(p_demux->s);
+-    int i_cur_part = l_cur_pos / TIVO_PART_LENGTH;
++    unsigned i_cur_part = l_cur_pos / TIVO_PART_LENGTH;
+     long l_seek_secs = l_seek_time / 1000000000;
+     uint64_t l_fwd_stamp = 1;
+ 
+@@ -1606,8 +1600,8 @@ static int ty_stream_seek_time(demux_t *p_demux, uint64_t l_seek_time)
+        so we need to skip past any stream data prior to the seq_rec
+        in this chunk */
+     i_skip_cnt = 0;
+-    for (i=0; i<p_sys->i_seq_rec; i++)
+-        i_skip_cnt += p_sys->rec_hdrs[i].l_rec_size;
++    for (int j=0; j<p_sys->i_seq_rec; j++)
++        i_skip_cnt += p_sys->rec_hdrs[j].l_rec_size;
+     stream_Read(p_demux->s, NULL, i_skip_cnt);
+     p_sys->i_cur_rec = p_sys->i_seq_rec;
+     //p_sys->l_last_ty_pts = p_sys->rec_hdrs[p_sys->i_seq_rec].l_ty_pts;
+@@ -1624,7 +1618,7 @@ static void parse_master(demux_t *p_demux)
+ {
+     demux_sys_t *p_sys = p_demux->p_sys;
+     uint8_t mst_buf[32];
+-    int i, i_map_size;
++    uint32_t i, i_map_size;
+     int64_t i_save_pos = stream_Tell(p_demux->s);
+     int64_t i_pts_secs;
+ 
+@@ -1645,14 +1639,20 @@ static void parse_master(demux_t *p_demux)
+     p_sys->i_seq_table_size = i / (8 + i_map_size);
+ 
+     /* parse all the entries */
+-    p_sys->seq_table = malloc(p_sys->i_seq_table_size * sizeof(ty_seq_table_t));
+-    for (i=0; i<p_sys->i_seq_table_size; i++) {
+-        stream_Read(p_demux->s, mst_buf, 8 + i_map_size);
++    p_sys->seq_table = calloc(p_sys->i_seq_table_size, sizeof(ty_seq_table_t));
++    if (p_sys->seq_table == NULL)
++    {
++        p_sys->i_seq_table_size = 0;
++        return;
++    }
++    for (unsigned i=0; i<p_sys->i_seq_table_size; i++) {
++        stream_Read(p_demux->s, mst_buf, 8);
+         p_sys->seq_table[i].l_timestamp = U64_AT(&mst_buf[0]);
+         if (i_map_size > 8) {
+             msg_Err(p_demux, "Unsupported SEQ bitmap size in master chunk");
+-            memset(p_sys->seq_table[i].chunk_bitmask, i_map_size, 0);
++            stream_Read(p_demux->s, NULL, i_map_size);
+         } else {
++            stream_Read(p_demux->s, mst_buf + 8, i_map_size);
+             memcpy(p_sys->seq_table[i].chunk_bitmask, &mst_buf[8], i_map_size);
+         }
+     }
+@@ -1664,11 +1664,13 @@ static void parse_master(demux_t *p_demux)
+     p_sys->b_have_master = true;
+ 
+     i_pts_secs = p_sys->l_first_ty_pts / 1000000000;
+-    msg_Dbg( p_demux, "first TY pts in master is %02d:%02d:%02d",
+-             (int)(i_pts_secs / 3600), (int)((i_pts_secs / 60) % 60), (int)(i_pts_secs % 60) );
++    msg_Dbg( p_demux,
++             "first TY pts in master is %02"PRId64":%02"PRId64":%02"PRId64,
++             i_pts_secs / 3600, (i_pts_secs / 60) % 60, i_pts_secs % 60 );
+     i_pts_secs = p_sys->l_final_ty_pts / 1000000000;
+-    msg_Dbg( p_demux, "final TY pts in master is %02d:%02d:%02d",
+-             (int)(i_pts_secs / 3600), (int)((i_pts_secs / 60) % 60), (int)(i_pts_secs % 60) );
++    msg_Dbg( p_demux,
++             "final TY pts in master is %02"PRId64":%02"PRId64":%02"PRId64,
++             i_pts_secs / 3600, (i_pts_secs / 60) % 60, i_pts_secs % 60 );
+ 
+     /* seek past this chunk */
+     stream_Seek(p_demux->s, i_save_pos + CHUNK_SIZE);




More information about the pkg-multimedia-commits mailing list