]> git.sesse.net Git - vlc/blobdiff - modules/codec/lpcm.c
Slovenian translation update by Matej Urbančič
[vlc] / modules / codec / lpcm.c
index 3dc389aba2acc54d7f78eecc102b896d1bafa614..6827db40c1b4f2e060b3c2ba9b15286f9cdf5c19 100644 (file)
  *
  * 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 <vlc/vlc.h>
-#include <vlc/decoder.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
+#include <vlc_codec.h>
+#include <vlc_aout.h>
 
 /*****************************************************************************
  * decoder_sys_t : lpcm decoder descriptor
@@ -36,7 +42,7 @@
 struct decoder_sys_t
 {
     /* Module mode */
-    vlc_bool_t b_packetizer;
+    bool b_packetizer;
 
     /*
      * Output properties
@@ -79,12 +85,12 @@ vlc_module_begin();
 
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_ACODEC );
-    set_description( _("Linear PCM audio decoder") );
+    set_description( N_("Linear PCM audio decoder") );
     set_capability( "decoder", 100 );
     set_callbacks( OpenDecoder, CloseDecoder );
 
     add_submodule();
-    set_description( _("Linear PCM audio packetizer") );
+    set_description( N_("Linear PCM audio packetizer") );
     set_capability( "packetizer", 100 );
     set_callbacks( OpenPacketizer, CloseDecoder );
 
@@ -100,20 +106,17 @@ static int OpenDecoder( vlc_object_t *p_this )
 
     if( p_dec->fmt_in.i_codec != VLC_FOURCC('l','p','c','m')
          && p_dec->fmt_in.i_codec != VLC_FOURCC('l','p','c','b') )
-    {   
+    {
         return VLC_EGENERIC;
     }
 
     /* Allocate the memory needed to store the decoder's structure */
     if( ( p_dec->p_sys = p_sys =
           (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL )
-    {
-        msg_Err( p_dec, "out of memory" );
-        return VLC_EGENERIC;
-    }
+        return VLC_ENOMEM;
 
     /* Misc init */
-    p_sys->b_packetizer = VLC_FALSE;
+    p_sys->b_packetizer = false;
     aout_DateSet( &p_sys->end_date, 0 );
 
     /* Set output properties */
@@ -146,7 +149,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
 
     if( i_ret != VLC_SUCCESS ) return i_ret;
 
-    p_dec->p_sys->b_packetizer = VLC_TRUE;
+    p_dec->p_sys->b_packetizer = true;
 
     p_dec->fmt_out.i_codec = VLC_FOURCC('l','p','c','m');