]> git.sesse.net Git - vlc/blobdiff - modules/gui/qnx/aout.c
Qt4 - MainInterface cleaning, FIXME labelling, Simplification, put the delay of statu...
[vlc] / modules / gui / qnx / aout.c
index 1e1684aa2c824606221088528549d022a76ac7b6..0c26661fc56fdd23a8df9282ffef6976535c8d96 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * aout.c : QNX audio output
  *****************************************************************************
- * Copyright (C) 2000, 2001 VideoLAN
+ * Copyright (C) 2000, 2001 the VideoLAN team
  *
  * Authors: Henri Fallon <henri@videolan.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
 #include <errno.h>                                                 /* ENOMEM */
-#include <string.h>                                            /* strerror() */
-#include <stdlib.h>                            /* calloc(), malloc(), free() */
 
 #include <vlc/vlc.h>
 
@@ -35,8 +33,7 @@
 #   include <alloca.h>
 #endif
 
-#include <vlc/aout.h>
-#include "aout_internal.h"
+#include <vlc_aout.h>
 
 #include <sys/asoundlib.h>
 
@@ -177,7 +174,7 @@ int E_(OpenAudio)( vlc_object_t *p_this )
     if( vlc_thread_create( p_aout, "aout", QNXaoutThread,
                            VLC_THREAD_PRIORITY_OUTPUT, VLC_FALSE ) )
     {
-        msg_Err( p_aout, "cannot create QNX audio thread (%s)", strerror(errno) );
+        msg_Err( p_aout, "cannot create QNX audio thread (%m)" );
         E_(CloseAudio)( p_this );
         free( p_aout->output.p_sys );
         return -1;
@@ -243,7 +240,7 @@ void E_(CloseAudio) ( vlc_object_t *p_this )
     aout_instance_t *p_aout = (aout_instance_t *)p_this;
     int i_ret;
 
-    p_aout->b_die = 1;
+    vlc_object_kill( p_aout );
     vlc_thread_join( p_aout );
 
     if( ( i_ret = snd_pcm_close( p_aout->output.p_sys->p_pcm_handle ) ) < 0 )
@@ -310,7 +307,7 @@ static int QNXaoutThread( aout_instance_t * p_aout )
 
         if( i_tmp < 0 )
         {
-            msg_Err( p_aout, "write failed (%s)", strerror(errno) );
+            msg_Err( p_aout, "write failed (%m)" );
         }
 
         if ( p_buffer != NULL )