~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to stream/stream_radio.c

  • Committer: Gauvain Pocentek
  • Date: 2012-03-06 11:59:12 UTC
  • mfrom: (66.1.15 precise)
  • Revision ID: gauvain@pocentek.net-20120306115912-h9d6kt9j0l532oo5
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* New upstream snapshot
* upload to unstable
* Build against external libmpeg2
* drop 51_FTBFS_arm.patch again
* no longer build depend on libcdparanoia-dev on the Hurd
* Fix FTBFS on the hurd.
  Thanks to Samuel Thibault <sthibault@debian.org> (Closes: #654974)
* Fix FTBFS on arm
* New upstream snapshot, Closes: #650339, #643621, #481807
* Imported Upstream version 1.0~rc4+svn34492
* Bump standards version
* Bump dependency on libav >= 4:0.8~, Closes: #653887
* Fix build-indep
* Build mplayer-gui again, Closes: #568514
* Drop debian/all-lang-config-mak.sh, no longer needed
* include .dfsg1 in version number
* remove get-orig-source target
* no longer prune compiler flags from the environment
* No longer advertise nor build 3fdx, mga and dxr3 backends,
  Closes: #496106, #442181, #533546
* beautify mplayer version identification string
* Brown paperbag upload.
* Next try to fix build failure on sparce after recent binutils change.
* Brown paperbag upload.
* Really fix build failure on sparc after recent binutils change.
* Properly set Replaces/Conflicts on mplayer2{,-dbg} to avoid
  file overwrite errors.
* Adjust versioning of mplayer listed in the mplayer-dbg's Depends field.
* Fix build failure on sparc after recent binutils change.
* Urgency medium bumped because of RC-level bugfix
  and speeding up x264 transition.
* Update to my @debian.org email.
* Upload to unstable
* Enable joystick support on Linux only, Closes: #638408
* Rebuild fixes toolchain issue on arm, Closes: #637077
* New upstream snapshot
* following the discussion started by Diego Biurrun <diego@biurrun.de>
  in debian-devel, I have prepared a new packaging of 'mplayer'
  (with code that comes from CVS)
* the upstream tar.bz cannot be distributed by Debian, since it contains
   CSS code; so I am repackaging it 
* I have tried my best to address all known issues:
  - the package contains the detailed Copyright made by Diego Biurrun 
  - the package does not contain CSS code, or  AFAIK other code on which 
     there is active patent enforcement
  - there is a script  debian/cvs-changelog.sh  that shows all changes
     done to files included in this source.
    This should comply with GPLv2 sec 2.a  (in spirit if not in letter)
    For this reason, the source code contains CVS directories.
* needs   make (>= 3.80) for 'html-chunked-$(1)' in DOCS/xml/Makefile

* some corrections, as suggested Diego Biurrun
  - binary codecs should go into /usr/lib/codecs (upstream default)
  - better template 'mplayer/install_codecs'
  - an empty 'font=' in mplayer.conf breaks mplayer: postinst corrected
* correction in 'mplayer/cfgnote'
* better mplayer.postinst and mplayer.config

* New upstream release
* better debian/copyright file
* do not ship a skin
* New upstream release
* changed DEB_BUILD_OPTIONS to DEB_BUILD_CONFIGURE ,
  DEB_BUILD_OPTIONS is used as in debian policy
* use gcc-3.4
* changed xlibs-dev to a long list of dependencies, for Debian/etch
* try to adhere to  http://www.mplayerhq.hu/DOCS/tech/binary-packaging.txt
  (see README.Debian for details)
* removed dependency on xlibmesa-dev, disabled opengl
* New upstream release
* Simon McVittie <hacks@pseudorandom.co.uk> wonderful work:
- Work around Debian bug #267442 (glibc's sys/uio.h and gcc's altivec.h have
  conflicting uses for __vector) by re-ordering #includes
- Fix potential symlink attack in ./configure
- Disable support for binary codecs on platforms for which those codecs
  aren't available; also disable the corresponding Debconf note when it's
  inappropriate
- Changed Build-Depends: so it works in pbuilder
- Explicitly build-depend on libjpeg62-dev, libfontconfig1-dev,
  libungif4-dev 
- Tweak debian/rules to avoid certain errors being ignored
- Use --language=all
* provide a target  'debian/rules get-orig-source' 
  that recreates the orig.tar.gz ; then use the above orig.tar.gz
* rewrote some parts of debian/rules
* don't clean and recompile docs if upstream ships them
* mplayer-doc was shipping too much stuff
* translated man pages where not installed properly
* compile with libdv4-dev
* correct README.Debian
* Forgot build-dep on libtheora
* Must not depend on libxvidcore
* New upstream release
* new release.
* rc1 to become 0.90
* new pre-release
* new pre-release
* gtk bug fixed.
* new release.
* version bumped
* 0.60 pre2 release
* 0.60 pre-release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
247
247
            *pfreq=freq_channel;
248
248
        }
249
249
    }
250
 
    mp_msg(MSGT_RADIO, MSGL_DBG2, MSGTR_RADIO_DoneParsingChannels);
 
250
    mp_msg(MSGT_RADIO, MSGL_DBG2, "[radio] Done parsing channels.\n");
251
251
    return STREAM_OK;
252
252
}
253
253
 
279
279
    }
280
280
    if(tuner.capability & V4L2_TUNER_CAP_LOW){
281
281
        priv->frac=16000;
282
 
        mp_msg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowYes,priv->frac);
 
282
        mp_msg(MSGT_RADIO, MSGL_DBG2, "[radio] tuner is low:yes frac=%d\n", priv->frac);
283
283
    }
284
284
    else{
285
285
        priv->frac=16;
286
 
        mp_msg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowNo,priv->frac);
 
286
        mp_msg(MSGT_RADIO, MSGL_DBG2, "[radio] tuner is low:no frac=%d\n",priv->frac);
287
287
    }
288
288
 
289
289
    priv->rangelow=((float)tuner.rangelow)/priv->frac;
290
290
    priv->rangehigh=((float)tuner.rangehigh)/priv->frac;
291
 
    mp_msg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_FreqRange,priv->rangelow,priv->rangehigh);
 
291
    mp_msg(MSGT_RADIO, MSGL_V, "[radio] Allowed frequency range is %.2f-%.2f MHz.\n", priv->rangelow, priv->rangehigh);
292
292
    return STREAM_OK;
293
293
}
294
294
 
432
432
    }
433
433
    if(tuner.flags & VIDEO_TUNER_LOW){
434
434
        priv->frac=16000;
435
 
        mp_msg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowYes,priv->frac);
 
435
        mp_msg(MSGT_RADIO, MSGL_DBG2, "[radio] tuner is low:yes frac=%d\n", priv->frac);
436
436
    }else{
437
437
        priv->frac=16;
438
 
        mp_msg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowNo,priv->frac);
 
438
        mp_msg(MSGT_RADIO, MSGL_DBG2, "[radio] tuner is low:no frac=%d\n", priv->frac);
439
439
    }
440
440
 
441
441
    priv->rangelow=((float)tuner.rangelow)/priv->frac;
442
442
    priv->rangehigh=((float)tuner.rangehigh)/priv->frac;
443
 
    mp_msg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_FreqRange,priv->rangelow,priv->rangehigh);
 
443
    mp_msg(MSGT_RADIO, MSGL_V, "[radio] Allowed frequency range is %.2f-%.2f MHz.\n", priv->rangelow, priv->rangehigh);
444
444
 
445
445
    return STREAM_OK;
446
446
}
784
784
static int grab_audio_frame(radio_priv_t *priv, char *buffer, int len)
785
785
{
786
786
    int i;
787
 
    mp_msg(MSGT_RADIO, MSGL_DBG3, MSGTR_RADIO_BufferString,"grab_audio_frame",priv->audio_cnt,priv->audio_drop);
 
787
    mp_msg(MSGT_RADIO, MSGL_DBG3, "[radio] grab_audio_frame: in buffer=%d dropped=%d\n", priv->audio_cnt, priv->audio_drop);
788
788
    /* Cache buffer must be filled by some audio packets when playing starts.
789
789
       Otherwise MPlayer will quit with EOF error.
790
790
       Probably, there is need more carefull checking rather than simple 'for' loop
834
834
    }
835
835
 
836
836
    priv->do_capture=1;
837
 
    mp_msg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_CaptureStarting);
 
837
    mp_msg(MSGT_RADIO, MSGL_V, "[radio] Starting capture stuff.\n");
838
838
#ifdef CONFIG_ALSA
839
839
    while ((tmp = strrchr(priv->radio_param->adevice, '='))){
840
840
        tmp[0] = ':';
870
870
            priv->audio_in.bytes_per_sample+priv->audio_in.blocksize;
871
871
    if (priv->audio_buffer_size < 256*priv->audio_in.blocksize)
872
872
        priv->audio_buffer_size = 256*priv->audio_in.blocksize;
873
 
    mp_msg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_AudioBuffer,
 
873
    mp_msg(MSGT_RADIO, MSGL_V, "[radio] Audio capture - buffer=%d bytes (block=%d bytes).\n",
874
874
        priv->audio_buffer_size,priv->audio_in.blocksize);
875
875
    /* start capture */
876
876
    priv->audio_ringbuffer = calloc(1, priv->audio_buffer_size);
968
968
                    priv->radio_channel_current = priv->radio_channel_list;
969
969
                if(!radio_set_freq(stream,priv->radio_channel_current->freq))
970
970
                    return 0;
971
 
                mp_msg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_SelectedChannel,
 
971
                mp_msg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n",
972
972
                    priv->radio_channel_current->index, priv->radio_channel_current->name,
973
973
                    priv->radio_channel_current->freq);
974
974
            break;
980
980
                        priv->radio_channel_current = priv->radio_channel_current->next;
981
981
                if(!radio_set_freq(stream,priv->radio_channel_current->freq))
982
982
                    return 0;
983
 
                mp_msg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_SelectedChannel,
 
983
                mp_msg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n",
984
984
                priv->radio_channel_current->index, priv->radio_channel_current->name,
985
985
                priv->radio_channel_current->freq);
986
986
            break;
1031
1031
        }
1032
1032
        }
1033
1033
        priv->radio_channel_current=tmp;
1034
 
        mp_msg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_SelectedChannel, priv->radio_channel_current->index,
 
1034
        mp_msg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n",
 
1035
            priv->radio_channel_current->index,
1035
1036
            priv->radio_channel_current->name, priv->radio_channel_current->freq);
1036
1037
        if(!radio_set_freq(stream, priv->radio_channel_current->freq))
1037
1038
            return 0;
1128
1129
    else
1129
1130
        priv->driver=NULL;
1130
1131
 
1131
 
    mp_msg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_AvailableDrivers);
 
1132
    mp_msg(MSGT_RADIO, MSGL_V, "[radio] Available drivers: ");
1132
1133
    for(i=0;radio_drivers[i];i++){
1133
1134
        mp_msg(MSGT_RADIO,MSGL_V,"%s, ",radio_drivers[i]->name);
1134
1135
        if(strcmp(priv->radio_param->driver,radio_drivers[i]->name)==0)
1164
1165
        close_s(stream);
1165
1166
        return STREAM_ERROR;
1166
1167
    }
1167
 
    mp_msg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_RadioDevice, priv->radio_fd,priv->radio_param->device);
 
1168
    mp_msg(MSGT_RADIO, MSGL_V, "[radio] Radio fd: %d, %s\n", priv->radio_fd,priv->radio_param->device);
1168
1169
    fcntl(priv->radio_fd, F_SETFD, FD_CLOEXEC);
1169
1170
 
1170
1171
    get_volume(priv, &priv->old_snd_volume);